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

Automate desktop cleanup

How to automate a daily clean up of your messy desktop use cron and a small little bash script. Continue reading