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.

Source Distribution

zhue-0.9.3.tar.gz (10.6 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page