Skip to main content

Python client for Philips Hue

Project description

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.

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

python-hue-0.1.1.tar.gz (3.4 kB view details)

Uploaded Source

File details

Details for the file python-hue-0.1.1.tar.gz.

File metadata

  • Download URL: python-hue-0.1.1.tar.gz
  • Upload date:
  • Size: 3.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for python-hue-0.1.1.tar.gz
Algorithm Hash digest
SHA256 faa14b6d52ef20ee1dd527c58fcad99b9c98029effe9299cc800be159e89141b
MD5 9c5b06e8b8389d119c56b612d59d3a8f
BLAKE2b-256 27a0ca9fdff99feed6ff52e3d0875d00c8df98a9d5fadc63683fedc205da9d8b

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