Philips Hue的Python客户端
项目描述
Philips Hue照明系统的Python客户端。我几乎通过监视我的路由器上的流量来解决了这些问题。然后我发现https://github.com/alistairg/IndigoHue/blob/master/Hue.indigoPlugin/Contents/Server%20Plugin/plugin.py,它提供了一些有关RGB支持和发送警报的魔法字符串(select, lselect)的线索。
示例用法不是文档
from hue import Hue;
h = Hue(); # Initialize the class
h.station_ip = "192.168.1.222" # Your base station IP
h.get_state(); # Authenticate, bootstrap your lighting system
l = h.lights.get('l3') # get bulb #3
l.bri(0) # Dimmest
l.bri(255) # Brightest
l.rgb(120, 120, 0) # [0-255 rgb values]
l.rgb("#9af703") # Hex string
l.on()
l.off()
l.toggle()
l.alert() # short alert
l.alert("lselect") # long alert
l.setState({"bri": 220, "alert": "select"}) # Complex send
祝您玩得开心!告诉我您如何使用它。
项目详情
关闭
python-hue-0.1.2.tar.gz的散列
| 算法 | 哈希摘要 | |
|---|---|---|
| SHA256 | b5a6e894481448616dcf9dc0ba96e024ebea3fcdaf19218665624bf1f82c6830 |
|
| MD5 | 730d253bf4a430779d27ebaba24e7f42 |
|
| BLAKE2b-256 | 077204c8b288b24638075b1ffff06ad85ac953b5d6fb6ba10004b6804cc608fc |