SkillAgentSearch skills...

ZigbeeTLc

Custom firmware for Zigbee 3.0 IoT devices on the TLSR825x chip

Install / Use

/learn @pvvx/ZigbeeTLc
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

Custom firmware for Zigbee 3.0 IoT devices on the TLSR825x chip

Based on an example from Telink's Zigbee SDK.

Due to limitations in ZHA regarding reading and writing unknown Zigbee attributes, as well as numerous bugs in this year's ZHA and ZHA toolkit versions, and numerous bugs in Z2M, support for this repository has been discontinued until these bugs are fixed or the situation in HA is improved. These integrations have closed all debugging capabilities for ZigBee devices.

Currently supported devices: LYWSD03MMC, CGG1, CGG1N, CGDK2, MHO-C122, MJWSD06MMC, MHO-C401(old), MHO-C401N, TS0201_TZ3000, TH03Z, TH03, LKTMZL02, ZG-227Z, ZY-ZTH02, ZY-ZTH02Pro, ZY-ZTH03Pro, ZG-303Z, Zbeacon-TH01, Zbeacon-TH01-v2.0, ZBEACON-MC, ZTY0201.

Additional alternative firmware options for some devices with TLSR825x can be found at github.com/slacky1965, doctor64/tuyaZigbee

Please direct questions regarding use and configuration in ZHA, Zigbee2MQTT, Home Assistant to the appropriate resources.

Warning(!)

New versions check that the configuration written to the device is compatible with the one updated for the new SDK (i.e. compatible with version 0.1.2.5). If it is not compatible, all settings, including bindings, are deleted. In this case, the Zigbee coordinator sees a device with the same IEEE number and a "rebinding" is performed.

  • Due to high consumption, limited transmit power of +2 dBm is used. A moderately discharged CR2032 battery cannot withstand higher power.
  • Average consumption for Xiaomi LYWSD03MMC HW: B1.4 - ~15 uA.

To flash the Zigbee from BLE firmware, use a Google Chrome, Microsoft Edge or Opera Browser.*

  1. Go to the Over-the-air Webupdater Page TelinkMiFlasher.html
  2. If using Android, Windows, Linux: Ensure you enabled "experimental web platform features". Therefore copy the according link (i.e. chrome://flags/#enable-experimental-web-platform-features for Chrome), open a new browser tab, paste the copied URL. Now sten the Experimental Web Platform features flag to Enabled. Then restart the browser.
  3. In the Telink Flasher Page: Press Connect:. The browser should open a popup with visible Bluetooth devices. Choose the according target device (i.e. LYWSD03MMC) to pair.
  4. After connection is established a Do Acivation button appears. Press this button to start the decryption key process. For original firmware versions 2.1.1_0159 and higher, further description is provided separately.
  5. Install the BLE firmware. When finished, use "Reconnect".
  6. Select and install Zigbee firmware.
  7. The device should now show up in your Zigbee bridge (If joining is enabled, of course). If this does not happen, reinsert the battery and/or short-circuit the RESET and GND pins on the LYWSD03MMC board, and on sensors with a button, press the button and hold it for 15 seconds.

Action of the button

Action of the button (or contact "reset" to "gnd" for LYWSD03MMC):

  • Short press - send temperature, humidity and battery data.

  • Hold for 2 seconds - Switches temperature between Celsius and Fahrenheit. The change will immediately appear on the screen.

  • Hold for 7 seconds — reset binding. The screen will display "ooo" (for devices with fast screen refresh, not E-Ink). After restarting, the thermometer will wait forever for registration. Twitching the battery does not change anything.

  • Hold for 15 seconds - resets bindings and all user settings. The screen will no longer display "ooo" and will display temperature and humidity. After restarting, the thermometer will wait forever for registration. Jerking the battery does not change anything.

  • After flashing from BLE, the thermometer is already in standby mode for registration in the Zigbee network.

  • (!) When changing (Zigbee OTA) the firmware version, if there were changes in the FW functionality, re-registration of the device is required (actual for any Zigbee device).

Additional settings

ClusterID: 0x0000 (Basic)

Attr: 0x0005, CHAR_STR (id: 0x42), ModelIdentifer (Device Name): 3..23 Chars.

ClusterID: 0x0204 (Thermostat User Interface Configuration)

Attr: 0x0000, ENUM8 (id:0x30). 0 – Celsius, 1- Fahrenheit. Default 0.<br> Attr: 0x0002, ENUM8 (id:0x30). 0 - Show smiley, 1 - Don't show smiley. Default 0.<br> Attr: 0x0100, INT16 (id:0x29), Temperature offset, in 0.01° steps, range: -32767 (-327.67°)..32767(+327.67°). Default 0.<br> Attr: 0x0101, INT16 (id:0x29), Humidity offset, in 0.01% steps, range: -32767 (-327.67%)..32767(+327.67%). Default 0.<br> Attr: 0x0102, INT16 (id:0x29), Comfort temperature minimum, in 0.01° steps, range -32767..+32767 (-327.67° ..+327.67°). Default 2000 (20.00°C).<br> Attr: 0x0103, INT16 (id:0x29), Comfort temperature maximum, in 0.01° steps, range -32767..+32767 (-327.67° ..+327.67°). Default 2500 (25.00°C).<br> Attr: 0x0104, UINT16 (id:0x21), Comfort humidity minimum, in 1% steps, range 0..9999 (0..99.99%). Default 4000 (40.00%).<br> Attr: 0x0105, UINT16 (id:0x21), Comfort humidity maximum, in 1% steps, range 0..9999 (0..99.99%). Default 6000 (60.00%).<br> Attr: 0x0106, ENUM8 (id:0x30), Turn off the display. 1 - Display Off. Default 0 - Display On.<br> Attr: 0x0107, UINT8 (id:0x20), Measurement interval, range: 3..255 seconds. Default 10 seconds.

• Not on all HW variants, turning off the display leads to a significant reduction in consumption. Better results are obtained by increasing the measurement interval.

Default Report Settings

Power configuration (ClusterID: 0x0001), Battery Voltage (Attr: 0x0020). Min interval 360 sec, Max interval 3600 sec, Tolerance 0.<br> Power configuration (ClusterID: 0x0001), Battery Percentage Remaining (Attr: 0x0021). Min interval 360 sec, Max interval 3600 sec, Tolerance 0.<br> Temperature Measurement (ClusterID: 0x0402), Measured Value (Attr: 0x0000). Min interval 30 sec, Max interval 180 sec, Tolerance 10 (0.1°).<br> Relative Humidity Measurement (ClusterID: 0x0405), Measured Value (Attr: 0x0000). Min interval 30 sec, Max interval 180 sec, Tolerance 50 (0.5%).

Zigbee OTA

OTA update in ZHA

Before flashing the firmware, check the compliance of the “Manufacturer Code” and “Image Type” between the OTA file and those issued by the Zigbee device.

Sample: "1141-020a-01233001-Z03MMC.zigbee"

| Manufacturer Code | Image Type | File Version | Stack Version | Name | Ext OTA | | -- | -- | -- | -- | -- | -- | | 1141 | 020a | 0123 | 3001 | Z03MMC | zigbee | | 0x1141 - Telink | 0x02 - TLSR825x, 0x0a - Xiaomi LYWSD03MMC | App release 0.1, App build 2.3 | Zigbee v3.0, Release 0.1 | Z03MMC | OTA |

|Image Type| File Name | Device, note | | -- | -- | -- | | 0x0201 | ZMHOC401 | MHO-C401 (old version) | | 0x0202 | ZCGG1 | CGG1 (old version) | | 0x0203 | Z03MMC | LYWSD03MMC ver https://github.com/devbis/z03mmc | | 0x0204 | --- | WATERMETER ver https://github.com/slacky1965/watermeter_zed | | 0x0206 | ZCGDK2 | CGDK2 | | 0x0207 | ZCGG1N | CGG1 (new version) | | 0x0208 | ZMHOC401N | MHO-C401 (new version) | | 0x020A | Z03MMC | LYWSD03MMC ver https://github.com/pvvx/ZigbeeTLc | | 0x020B | ZMHOC122 | MHO-C122 | | 0x020D | Z06MMC | MJWSD06MMC | | 0x0211 | ZTS0201 | TS0201-TZ3000 | | 0x0216 | ZTH03 | TH03Z | | 0x021b | ZTH01 | ZTH01 | | 0x021c | ZTH02 | ZTH02 | | 0x021e | TH03 | TH03 | | 0x021f | LKTMZL02 | LKTMZL02 | | 0x0221 | ZTH05 | ZTH05 | | 0x0225 | ZYZTH02 | ZY-ZTH02 | | 0x0226 | ZYZTH01 | ZY-ZTH02-Pro, ZY-ZTH03-Pro | | 0x0227 | ZG227 | ZG227 | | 0x022C | ZG303Z | ZG-303Z | | 0x022D | ZBTH01 | ZBeacon-TH01 | | 0x022E | ZB_MC | ZBeacon-MC | | 0x022F | ZB2TH01 | ZBeacon-TH01 v2.0 | | 0x0230 | ZTY0201 | TY0201_TZ3000_bjawzodf |

Display decimal places for temperature, humidity and battery charge in ZHA.

ZHA patch for more precision display of data for all Zigbee devices.

Indication on LCD screen

A solid "BT" icon indicates a connection loss or the thermome

Related Skills

View on GitHub
GitHub Stars743
CategoryDevelopment
Updated5d ago
Forks50

Languages

C

Security Score

80/100

Audited on Mar 26, 2026

No findings