How to control Tuya API device with an HTML request

77 Views Asked by At

So I'm trying to make my phone button a light switch. I found an app that can remap my phone's physical buttons to commands. One of them is HTML Request (POST and GET I have no idea any of this).

I figured out how to control my light bulb with a phyton script. I got it working with Tuya API. My first plan was to somehow execute this phyton script on the cloud but I don't know how and I thought it would be a dumb solution because I think we can directly control the device via Tuya that is on the cloud already.

I think HTTP Request can send/post(?) a command to Tuya API to turn my light bulb on/off. Or maybe there's another way to do this? Attached screenshot of the command output list to map my button.

command list

http request query

0

There are 0 best solutions below