If you want to start to do some experimenting with your Phillips Hue lights chances are that you’ll need to use the Hue API sooner or later. To use this API you will need to get a token but at the moment there is no official way to do this.

You can do it as follows:

  • Get your bridge IP via https://www.meethue.com/api/nupnp
  • Go to the API debugger http://<bridge ip address>/debug/clip.html and use message body {"devicetype":"my_hue_app#hue app"}.
  • Press the button on your bridge and now push the POST button on the debugger.
  • You should see a response like:
    [
        {
            "success": {
                "username": "7fbb0cd252f3787c2b81892b03d8a9"
            }
        }
    ]
  • username is the token you can use to control your lights.

Example usage

curl -X PUT --data '{"bri":42}' http://<bridge ip address>/api/<username>/lights/1/state

Tip Jar

If you like this blog, leave a tip! Your tip will help provide the basic necessities which sustain this blog: coffee, beer and raincoats for surviving the pitiful Belgium climate.

Ethereum 0x4cB6A32e31F8bAAfF7B6bee79F0b8aa4968e24E1

Swarm for privacy nerds

Not cleaning up your WiFi connection history could potentially harm your privacy Continue reading

Automate desktop cleanup

Published on May 07, 2017