Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for zhue, version 0.9.5
Filename, size File type Python version Upload date Hashes
Filename, size zhue-0.9.5.tar.gz (10.2 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page