Python SDK for Philips Hue devices
Project description
This library eases the interaction with Philips Hue devices
from zhue import Bridge
# upnp/nupnp discovery
b = Bridge.discover()
# register a new user on the Hue bridge
b.create_user()
# or use a predefined username
b.username = 'MY_USERNAME'
# query lights
b.lights
# turn light on and off
b.light('outdoor').on()
b.light('outdoor').off()
# query groups
b.groups
# turn all lights belonging to a group on
b.group('living').on()
# query sensors
b.sensors
# get temperature readings
[x.temperature for x in b.temperature_sensors]
# get light level readings
[x.light_level for x in b.light_level_sensors]
# get battery levels
[x.config.battery for x in b.sensors if hasattr(x.config, 'battery')]
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
zhue-0.6.1.tar.gz
(6.4 kB
view hashes)