Smart bulb controlled from a Raspberry Pi with Python. My RGB alarm clock
I’ve got a BeeWi Smart LED Color Bulb. I must admit I cannot resist to buy those kind of devices :).
I can switch on/off the bulb and change the color using its Mobile App, but it’s not fun. I want to play a little bit with the bulb. My idea is the following one: First switch on the bulb in the mornint and set up the bulb color (Blue for example). Then change bulb color depending on my morning routine. And finally switch the bulb off. Now with this bulb’s color I know if my morning routine is on-time, just looking at the bulb’s color. For example if the bulb is red and I’m still having breakfast probably I’m late.
Now I only need to set up the crontab within my Raspberry Pi to trigger the script and switch on/off the bulb and change the RGB color.
# switch on the bulb /usr/bin/python /mnt/media/projects/iot/bulb.py /mnt/media/projects/iot/conf.json on # set bulb's color to green /usr/bin/python /mnt/media/projects/iot/bulb.py /mnt/media/projects/iot/conf.json colour 999900
Now I’ve got another toy in my desk. One arduino board. I’m sure I will enjoy a lot 🙂