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
祝您玩得开心!让我知道您如何使用它。
项目细节
关闭
hue-0.1.0.tar.gz的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 37427d42c8f01329e8639abd24c064c5182824eeeb862931065d54daa07891f0 |
|
MD5 | 073cc81a97caea9fb66752b38a90a42f |
|
BLAKE2b-256 | 4ed6e0fd54f9f554cf786142217c037cbd35d24e819c1b65b83daea7acc6a0ad |