I've been working on and off the last few days on getting a button set up to turn on and off a GE Link light connected to the Philips Hue bridge.

The reason why is to preserve the dim setting on the light bulb. When you turn on the light with the switch on the lamp, it turns the light on full brightness. That's perfect for some situations, but when I get up to nurse and change a diaper, I want to keep the room as dim as possible to keep the baby as asleep (or sleepy). Typically we have the lamp set on the lowest setting. Unfortunately that isn't something that can be controlled with the physical switch on the lamp.

I have been leaving the light on most of the night, but I want the baby to get used to sleeping in darkness. That is why I wanted to get a remote switch (or button) set up to turn on and off the lamp at the dimmest setting.

Initially I wanted to use the Hue Tap, which is a remote switch we already have. However non-Hue light bulbs are not compatible with the Tap. That meant finding an alternate way to remotely turn on and off the light. (I didn't want to go out and buy a dimmable light bulb when a more fun, albeit complicated, solution presented itself.)

So I opted to create a python script to run on the Raspberry Pi.
I knew I had all of the components, which was great. I didn't really want to buy anything since I have plenty of miscellaneous switches and buttons for arduino projects. My only real issue is that the plastic connectors on the wire are a bit too high when plugged into the GPIO pins on the Raspberry Pi. Which means I can't quite close the case.

I'm going to have to get a dremmel or a knife to cut down the plastic a bit to close the case. But that's a project for tomorrow or the next day. I also have a larger button I think I am going to wire up to make it easy to push at 3am in the morning.

If you are interested, I have the files and a brief description up on github.
https://github.com/shatteredhaven/ControllingHueLightsWithPushButton

0 comments:

Post a Comment