We do a lot of Halloween decorating at our house, both indoor and outdoor. My oldest son loves Halloween. Every year he dresses up as some ghoulish creature to scare trick-or-treaters. When it came time to replace our failing porch lights last year, I wanted to replace it with LEDs that had a range of colors. I ended up selecting these lights which were controllable with a phone app as well as Alexa. I didn’t consider the programmability of the lights at the time.
This week was spring break for the kids – I took the week off. Unfortunately the kids and I all got sick. My wife managed to dodge it for a few days but couldn’t escape it either. We weren’t able to do too many activities. But my oldest son and I started on a little project to figure out what we could do with the new lights. I discovered that the lights had a REST API available through the Tuya IOT Platform!
I spent a chunk of my break writing Python against the Tuya REST API. I built a controller and was able to create a few light and sound sequences. The result is this lighting project in GitHub. The MP3 sounds were all generated by my son – it has been a lot of fun seeing his creativity come out in the audio portions of this project.
It was exciting to be able to apply some of the job skills I’ve gained over the past few years to a personal project. A project like this would have been completely out of reach for me back in 2019. Then, I didn’t know Git, Python, or anything about APIs. Now, the only barrier is learning the specific API calls.