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.5.tar.gz (10.2 kB view details)

Uploaded Source

File details

Details for the file zhue-0.9.5.tar.gz.

File metadata

  • Download URL: zhue-0.9.5.tar.gz
  • Upload date:
  • Size: 10.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for zhue-0.9.5.tar.gz
Algorithm Hash digest
SHA256 40493c60821dac9f1a37619bffa600494abcbd865e7d3ed55dfe1cd21b5bf687
MD5 45b82e585ba88fd5ab2679e77b0722f0
BLAKE2b-256 428ce5838b6605b6779d9d303f431a4d8f57e0eedb2d75ffc44cf1e148a42808

See more details on using hashes here.

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