Over the Christmas holidays, I thought it would be a good idea to see if I couldn’t write some code to automatically control my home’s “smart” devices based on the time of day etc.
All my “smart” devices are teckin smart plugs, and Teckin lightbulbs. I really want to get to the point where I can either deploy an opensource piece of software that can expose a RESTful API that I can communicate with in order to control my home devices, or find an existing RESTful API that I can communicate with to send the requests to.
I have managed to connect to, and authenticate with my google smart speakers, but then got stuck on how to send the commands to interact with the devices.
I thought maybe as an alternative, I could send requests to the “Smart Life” android app’s API which keeps leading me to “Tuya”, which looked promising from the API docs, but I went down a massive rabbit hole trying to get set up.
Question
Has anyone had some success with controlling smart devices such as sockets and lightbulbs through sending requests to google home/assistant, or used the Tuya API? I’d even be happy if I built “commands” or “actions” using a web interface GUI, I just need a way to expose them via a web URL or RESTful request.