Skip to content

marce14-git/tuya-zigbee-switch

 
 

Repository files navigation

GitHub stars GitHub issues StandWithUkraine Discord

🔓 Custom firmware for Tuya Zigbee switches

Feature-rich custom firmware for Telink-based Tuya Zigbee switches, switch-modules and sockets.

🔌 Supported devices

There are already 30+ devices/supported.md.

Tip

If your device contains a supported Tuya Zigbee module (ZTU, ZT2S, ZT3L), porting is relatively simple.
It consists of tracing (or guessing) the board pinout, adding an entry in device_db.yaml and rebuilding.

Further reading:

🤔 Why?

The main driver for this project was a frustrating bug in the factory firmware:

When you pressed one button, the device ignored input from the others for ~0.5 seconds. As a result, pressing two buttons simultaneously toggled a single relay.

Users also consider this the missing piece of a reliable smart home because it allows using a light switch as a Zigbee remote.

Most of the cheap switches on the market do not allow binding to other devices out-of-the-box.

✨ Features

  • Super fast reaction time (compared to stock firmware)
  • Outgoing binds (use switch to remotely control Zigbee lightbulbs - state & brightness)
  • Supports all button types: toggle, momentary NO, momentary NC
  • Configurable Long press for push-switches (custom action & duration)
  • Custom switch action modes, allowing to synchronize switch position or binded devices with relay state
  • Both Router & EndDevice modes for no-Neutral devices
  • Detached mode (generate Zigbee events without triggering relays)
  • Power-on behavior (on, off, previous, toggle)
  • Wireless flashing and updating (OTA from original fw to custom fw, further OTA updates)
  • Multiple reset options (10x switch press, on-board button)

📲 Flashing

If your device is already on devices/supported.md, the firmware can be installed and updated:

Otherwise, check contribute/porting_to_new_device.md.

📝 Changelog

Read the firmware release notes here: changelog_fw.md.

🚨 ️Known issues

Stay up to date with the known_issues.md to prevent bricking your device!

❓ Frequently Asked Questions (FAQ)

Read the faq.md and feel free to ask more questions or suggest useful information.
Also read endpoints.md for information about groups and binding.
To switch between EndDevice and Router, follow change_device_type.md.

Discord

Join the discussion, ask for help or just follow the news on:

Discord

Keep important topics on GitHub!

🛠️ Building and Contributing

Welcome to the team! Please read:

🙏 Acknowledgements

⭐ Star History

Star History Chart

About

Feature-rich custom firmware for Telink-based Tuya Zigbee switches and switch-modules.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C 56.1%
  • C++ 16.6%
  • Python 12.9%
  • Jinja 4.2%
  • JavaScript 3.9%
  • Makefile 3.3%
  • Other 3.0%