pvvx / ZigbeeTLc

Custom firmware for Zigbee 3.0 IoT devices on the TLSR825x chip
Other
321 stars 15 forks source link

IH-K009 support required #67

Closed KonsGit closed 2 months ago

KonsGit commented 4 months ago

This is a zigbee temperature and humidity sensor. Look the same as TH03Z. The sensor used is SHT30 sensor. I tried to flash this sensor with the firmware from TS0201_TZ3000, but it doesn’t show anything except the battery. Temperature and humidity are shown as 0. I tried to flash the BLE version from TH03Z and it also shows 0 temperature and humidity. It would be great if your firmware supported these sensors. IMG_6324 IMG_6325

10Silver10 commented 4 months ago

Good afternoon. I am also interested in this topic.

pvvx commented 4 months ago
What numbers does Zigbee OTA have for the original Tuya version? Manufacturer Code Image Type File Version
? ? ?

SHT30 - GXHT30

A set of firmware will be available when someone gives the correct data for updating the Zigbee OTA Tuya version. To get the correct numbers, you need to call the OTA and view the log.

Sample for '_TZ3000_xr3htd96 TS0201':

DEBUG (MainThread) [zigpy.zcl] [0x9289:1:0x0019] Decoded ZCL frame: Ota:QueryNextImageCommand(field_control=<FieldControl: 0>, manufacturer_code=4417, image_type=54179, current_file_version=70)

manufacturer_code=4417 (0x1141), image_type=54179(0xD3A3), current_file_version=70(0x0046))

https://github.com/pvvx/BLE_THSensor/issues/9

KonsGit commented 4 months ago

Now I can’t look up these values in zha. In zigbee2mqtt I see the following information for sensor with original firmware (database.db file):

{"id":23,"type":"EndDevice","ieeeAddr":"0xa4c138bf7fbb7257","nwkAddr":28236,"manufId":4417,"manufName":"_TZ3000_dowj6gyi","powerSource":"Battery" ,"modelId":"TS0201","epList":[1],"endpoints":{"1":{"profId":260,"epId":1,"devId":770,"inClusterList":[ 1,3,1026,1029,0],"outClusterList":[3,25,10],"clusters":{"msTemperatureMeasurement":{"attributes":{"measuredValue":-1998}},"msRelativeHumidity" :{"attributes":{"measuredValue":6567}},"genBasic":{"attributes":{"65503":"�|Y-\u0011�[-\u0012\u0001\u0000\u0000\u0000\ u0011","65506":51,"65508":1,"65534":0,"modelId":"TS0201","manufacturerName":"_TZ3000_dowj6gyi","powerSource":3,"zclVersion":3," appVersion":69,"stackVersion":0,"hwVersion":1,"dateCode":""}},"genPowerCfg":{"attributes":{"batteryPercentageRemaining":2,"batteryVoltage":25}}} ,"binds":[],"configuredReportings":[],"meta":{}}},"appVersion":69,"stackVersion":0,"hwVersion":1,"dateCode":""," zclVersion":3,"interviewCompleted":true,"meta":{"configured":-1440156621},"lastSeen":1708668821325,"defaultSendRequestWhen":"immediate"}

I.e. manufId:4417 manufName:_TZ3000_dowj6gyi modelId:TS0201

More information I can give after the weekend. The sensor that I currently have has already been converted to ble and shows zero temperature and humidity

pvvx commented 4 months ago

The sensor that I currently have has already been converted to ble and shows zero temperature and humidity

https://github.com/pvvx/BLE_THSensor/blob/master/source/TS0201/bin/TH03Z_v45.bin - shows zero temperature?

Zigbee + BLE for HT03Z https://github.com/pvvx/BZdevice/tree/master/bin


Z2M and ZHA hide information about Zigbee devices. To get information about the firmware in the device, you must enable debug log and run the OTA update command, as shown here: https://github.com/pvvx/ZigbeeTLc/issues/7#issue-2000695703

KonsGit commented 4 months ago

Yes, is s shows zero 2024-02-27 12 06 09 2024-02-27 12 06 15

pvvx commented 4 months ago

For testing, I flashed the specified file: https://github.com/pvvx/BLE_THSensor/blob/master/source/TS0201/bin/TH03Z_v45.bin

There are discrepancies:

09:41:59: File: TH03Z_v45.bin
09:41:59: File size: 75316 bytes
09:41:59: Count: 4708
....
09:43:58: Hardware Revision String: V1.0
09:43:58: Software Revision String: V4.5
09:43:58: Firmware Revision String: github.com/pvvx
09:43:58: Detected custom Firmware
09:43:58: Hardware Version: TH03Z V1.0, Software Version: 4.5, Sensor: GXHT30

Custom config HEX string: 55011000002804a931860fb4 86 - The number 6 is the model number (TH03Z). 81 -> TS0201


Once again I flashed it into a prototype that does not have a sensor.

10:19:19: Searching for devices
10:19:42: Connecting to: THS_41C3DA
10:19:46: Hardware Revision String: V1.0
10:19:46: Software Revision String: V4.5
10:19:46: Firmware Revision String: github.com/pvvx
10:19:46: Detected custom Firmware
10:19:46: Hardware Version: TH03Z V1.0, Software Version: 4.5, Sensor: GXHT30
10:19:46: Custom config HEX string: 55011000002804a931860fb4
10:19:49: Load firmware file 'https://raw.githubusercontent.com/pvvx/BLE_THSensor/master/source/TS0201/bin/TH03Z_v45.bin'...
10:19:49: File: https://raw.githubusercontent.com/pvvx/BLE_THSensor/master/source/TS0201/bin/TH03Z_v45.bin
10:19:49: File size: 75316 bytes
10:19:49: Count: 4708
10:19:50: Start DFU
10:20:16: Update done after 25.005 seconds
10:20:20: Disconnected.
10:20:29: Reconnect
10:20:38: Hardware Revision String: V1.0
10:20:38: Software Revision String: V4.5
10:20:38: Firmware Revision String: github.com/pvvx
10:20:38: Detected custom Firmware
10:20:38: Hardware Version: TH03Z V1.0, Software Version: 4.5, Sensor: GXHT30
10:20:38: Custom config HEX string: 55011000002804a931860fb4
KonsGit commented 4 months ago

still the same 2024-02-27 19 37 57 2024-02-27 19 38 02

KonsGit commented 4 months ago

What numbers does Zigbee OTA have for the original Tuya version?

Manufacturer Code Image Type File Version ? ? ?

From sensor with original firmware:

fileVersion:69, imageType:54179, manufacturerCode:4417

pvvx commented 4 months ago

fileVersion: 69 = 0x45, imageType: 54179 = 0xD3A3, manufacturerCode: 4417 = 0x1141 (Telink) Original -> Zigbee OTA: 1141-d3a3-00993001-TH03Z_v45.zigbee = BLE_THSensor -> TelinkMiFlasher.html + any firmware.

KonsGit commented 4 months ago

This firmware does not work on my sensor. Look at the pictures above. It shows 0 temperature and the sensor defines it as CHT8305, which is not correct. I have SHT30

pvvx commented 4 months ago

https://pvvx.github.io/TH03Z/ Module ZTU , Sensor: GXHT30 (SHT30)

@KonsGit - You are flashing the version from TS0201, but you need to use the firmware for TH03Z. The firmware version for TH03Z does not support any sensors other than GXHT30/STH30. And when connected, the model is listed as “TH03Z”.

Hardware Version: TH03Z V1.0, Software Version: 4.5, Sensor: GXHT30
KonsGit commented 4 months ago

Thank you very much Latest version bin/ZTH03Z_v0120.bin works great!

10Silver10 commented 4 months ago

Thank you very much Latest version bin/ZTH03Z_v0120.bin works great!

Hello. You can describe the firmware process in more detail. Thank you in advance.