Tuya WiFi Smart Plug
To talk to the device, you need 3 things:
- The device IP address
- UUID / Device ID
- localKey
You can get this by sniffing the traffic the Android app makes with a SSL Capture app. When adding a new plug, some of the requests should contain something about a 'localKey'. One of the requests should also return all devices as well as their corresponding localKey from their server.
Self Hosted
It looks like the plug currently talks with
- mq.gw.tuyaus.com via MQTT
- a1.tuyaus.com via HTTP
You will probably still need to allow it to connect to the cloud once. If you don't let it completely connect, some features like voltage/wattage are disabled from the output (?).
The localKey seems to change every time the device is reconnected to the cloud.