A custom firmware for Tuya telink based switch module. Code is based on pvvx's ZigbeeTLc firmware, huge thanks!
Note that rebranded version may have different internals and may not work. "Zigbee Manufacturer" is more reliable identifier of device.
- Tuya WHD02 is supported. Tested only for
_TZ3000_skueekg3
. - TS0001 is supported. Should work for
_TZ3000_tqlv4ug4
. - TS0002 is supported. Should work for
_TZ3000_zmy4lslw
. - TS0011 is supported.
- TS0012 is supported.
If you device is not supported, but it is some Tuya switch module, please check the porting guide.
The main driver for this project was the following factory firmware bug: if one button is pressed, the device ignores clicks to other buttons for ~0.5 seconds. The most frustrating consequence is that pressing both buttons at the same time turns only one relay on.
- Detached mode, e.g. switch doesn't trigger relay but only generates events via Zigbee
- Long press for momentary switches
- Router mode (TS0012 is no neutral switch so factory firmware works as end device)
- Super fast reaction time (compared to the factory firmware)
- 5 quick presses to reset the device
Only on linux:
make install
make
Firmware can be flashed via OTA. If you still use zigbee2mqtt 1.x, use this guide
To switch between End Device and Router follow this guide
To flash via wire, follow this guide
- Add way to change device pinout on the fly, to allow easier porting of firmware
- Keep status LED on when device is connected
- Add separate firmwares for End Device/Router
- Improve device boot time significantly by removing unnecessary logs
- Fix bug that caused report to be sent every second
- Add support of statup behaviour: ON, OFF, TOGGLE, PREVIOUS
- Add support of button actions: 'released', 'press', 'long_press'. This is only useful for momentary (doorbell-like) switches.
- Add way to reset the device by pressing any switch button 5 times in a row
- Fix support for ON_OFF, OFF_ON actions
- https://github.com/pvvx/ZigbeeTLc (firmware for telink based ATC) as this was base for this project
- https://github.com/doctor64/tuyaZigbee (firmware for some other Tuya Zigbee devices) for some helpful examples
- https://medium.com/@omaslyuchenko for Hello Zigbee World series, that contain very usefull reference on how to implement own Zigbee device