https://github.com/marplex/tuyafree
Environment for building firmware for Zigbee TeLink Tuya devices.
https://github.com/marplex/tuyafree
Last synced: 6 months ago
JSON representation
Environment for building firmware for Zigbee TeLink Tuya devices.
- Host: GitHub
- URL: https://github.com/marplex/tuyafree
- Owner: Marplex
- License: apache-2.0
- Created: 2024-01-24T15:37:36.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-01-24T15:38:52.000Z (about 2 years ago)
- Last Synced: 2025-03-25T13:46:50.382Z (11 months ago)
- Language: C
- Size: 30.3 KB
- Stars: 1
- Watchers: 3
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
tuyaFree
Environment for building firmware for Zigbee TeLink Tuya devices.
Inspired by doctor64/tuyaZigbee
# About
This is a work in progress.
The goal of this project is to create a stable and developer friendly environment for building custom Zigbee firmwares for Tuya devices.
I will continue this by developing a firmware for the **TS0004** [in-wall zigbee mini switches](https://www.aliexpress.us/item/1005005534030750.html) adding support for interlocking and inching.
# Supported devices
Many Tuya devices come with `ZT2S` or `ZTU` modules. They all use the "Z2" RF chip which is based on the supported `TLSR8258`. Please refer to [doctor64/tuyaZigbee](https://github.com/doctor64/tuyaZigbee/tree/master#is-my-device-supported) for additional info.
### TS0004
This mini switch uses the ZT2S and ZTU modules depending on the supported channels.
- **ZT2S** for 1ch/2ch
- **ZTU** for 3ch/4ch
I have reverse engineered the board wirings of the ZTU 4ch version. The mapping is available at [boards/board_ztu_TS0004_4ch.h](src/tuyaFree/boards/board_ztu_TS0004_4ch.h)
# Prepare toolchain and SDK
Download and prepare the **Linux toolchain** for Telink chips.
```bash
#Download toolchain
wget http://shyboy.oss-cn-shenzhen.aliyuncs.com/readonly/tc32_gcc_v2.0.tar.bz2
#Extract to /opt
sudo tar -xvjf tc32_gcc_v2.0.tar.bz2 -C /opt/
```
Automatically download and prepare the **TelinkSDK**
```bash
./install.sh
```
# Compile
Configure the build and compile the project. The build script will output the `tuyaFree.bin` file directly in the root folder.
```bash
#Configure
./configure.sh
#Build
./build.sh
```