How to Over-Engineer your Xmas Lights
Use your Raspberry Pi to control your lights
Originally published at https://fek.io.
For this holiday season I decided to upgrade my lighting for the exterior of my home. I purchased some Philips Hue lights for my home. One of the nice things about the Philips Hue lights is that you can control your lights and their mood and color from a hub. The Philips Hue hub connects to a ethernet port in your home. Once it is installed, you can register new lights to that hub, and control them from an app. But the really cool thing about the hub is that it has a REST based web service you can call from your local network to check on and control your bulbs.
Philips has good instructions on how to get a user key to call the hub. Once you have that {user} key, you can turn lights off and on as well as change the color and brightness of the bulb.
Address https://<bridge ip address>/api/1028d66426293e821ecfd9ef1a0731df/lights/1/state
Body {"on":false}
Method PUT
For my home project I decided that I wanted to be able to control the lights from a program I was running on a Raspberry Pi. If you are not familiar with the Pi, it is a credit card sized computer that can connect to Wi-Fi, bluetooth and ethernet.