Interface to Tuya devices over LAN.
💡 For now, only v3.3 is supported as I only own devices using this version.
To control a device you will need these 3 things:
⚠️ This library does not provide support for getting these. See how to do that using any of those projects:
Generous thanks to the maintainers of those tools for details on interfacing with Tuya devices.
⚠️ Keep in mind that:
- After pairing the devices, it's recommended to assign static IPs in your router.
- If you reset or re-pair devices the local key will change.
- You can delete your tuya IOT account but not the SmartLife one and devices should be kept there.
- For state updates to be received properly, the device needs to be able to access the Tuya backend.
This library is composed of two main components:
The protocol is responsible for handling communication details with the Tuya device. Its interface consists of an asynchronous method to update the device and accepts a callback to subscribe to state changes.
See protocol module.
The device handles higher level functional logic such as buffering, constraints and specific device commands.
See device module.