Skip to main content

Python client for the Philips Hue lighting system. I figured out almost all of this by monitoring the traffic on my router. I then found https://github.com/alistairg/IndigoHue/blob/master/Hue.indigoPlugin/Contents/Server%20Plugin/plugin.py which gave some clues about RGB support and the magic strings (select, lselect) to send alerts.

Sample Usage is not docs:

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

Have fun! Let me know how you’re using it.

Metadata

Release files for hue 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for hue 0.1.0
File Size Uploaded Provenance
hue-0.1.0.tar.gz 3.4 kB Without provenance Details

Release files / hue-0.1.0.tar.gz

Download URL hue-0.1.0.tar.gz
Size 3.4 kB
Tags Source
SHA-256 checksum
How to use checksums
37427d42c8f01329e8639abd24c064c5182824eeeb862931065d54daa07891f0
BLAKE2b-256 checksum
How to use checksums
4ed6e0fd54f9f554cf786142217c037cbd35d24e819c1b65b83daea7acc6a0ad
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for hue 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page