Control a Tuya plug locally from Python with TinyTuyacode · unverified · Read status and switch a Tuya Wi-Fi outlet over the LAN with TinyTuya, using the device ID, IP, local key and protocol version. Close the Smart Life app first: devices accept only one local TCP connection.
Get the device ID and local key of your own Tuya devicesprocedure · unverified · Local control needs each device's ID, IP address, local key and protocol version. The TinyTuya wizard fetches IDs and keys from your own account through a Tuya IoT cloud project linked to your Smart Life app. Keys change whenever a device is re-paired.