pvvx / zigbeetlc Goto Github PK
View Code? Open in Web Editor NEWCustom firmware for Zigbee 3.0 IoT devices on the TLSR825x chip
License: Other
Custom firmware for Zigbee 3.0 IoT devices on the TLSR825x chip
License: Other
Hi and thanks for this good stuff.
I have flashed your fimware on a lywsd03mmc B1.4.
After the flash, the lywsd03mmc restart and now I have the temp and humidity and bluetooth doesn't work.
So for me the firmware is well installed.
But the bluetooth icon stay present all the time and I don't success to connect to my zigbee bridge...
I try reset and grnd pin. After 2 second, the lywsd03mmc switch from C to F (it's OK) and after 7 seconds he restart (3 dots appears fastly). I try to remove the battery for few hours without success.
I never success to add on my zigbee bridge...
I use Z2M.
So, I can't roll back to BLE.
Any idea ?
Hi, thanks a lot for doing these amazing hacks to these devices.
I tried to zigbee'fy a CGDK2 and had an idea it as the same procedure as for LYWSD03MMC. I flashed with ATC_ota_40000.bin which went fine but bricked the device.
Any way to recover?
Thanks!
wrong filenames in 0.1.1.2 *.zigbee files
eg. 1141-020a-01113001-Z03MMC.zigbee
should be
1141-020a-01123001-Z03MMC.zigbee
So, I have 4 LYWSD03MMC all flashed to zigbee, three of them are on firmware 3001-0118 and I think (because now I cant rememeber) the fourth one was on an older version 3001-0116 or something like that or maybe it was a different fork, really not sure, either way in zigbee2mqtt I got an update notification but only for that one on the older version so I did the OTA update and now it says ver 3001-1100 which seems newer than the listed one, the other odd thing is if I try and do an update for the others it says nothing available. Have attached a pic so you can see my version numbers and dates.
Any ideas why i got that one update ?
Please add a sensor LYWSDCGQ/01ZM
Here are some logs from Zigbee2MQTT (1.34.0 commit: aae7312); zStack12 Coordinator revision 20211115.
According to this, my 9 LYWSD03MMC thermometers (called T1 - T9) "requested OTA" very frequently.
Each of them is running 3001-0117
(20231215).
I'm not sure if this is poor wording in Z2M or if the devices themselves actually request the OTA. If they do, I believe the 5 minutes is a bit excessive?
I tried to figure out if these are actually from the devices and there are a 3 different calls to ota_queryStart
which might be responsible?
<...>
2024-01-24 20:14:14Received Zigbee message from 'T4', type 'commandQueryNextImageRequest', cluster 'genOta', data '{"fieldControl":0,"fileVersion":18296833,"imageType":522,"manufacturerCode":4417}' from endpoint 1 with groupID 0
2024-01-24 20:14:14Device 'T4' requested OTA
2024-01-24 20:14:15Responded to OTA request of 'T4' with 'NO_IMAGE_AVAILABLE'
2024-01-24 20:14:20Received Zigbee message from 'T9', type 'commandQueryNextImageRequest', cluster 'genOta', data '{"fieldControl":0,"fileVersion":18296833,"imageType":522,"manufacturerCode":4417}' from endpoint 1 with groupID 0
2024-01-24 20:14:20Device 'T9' requested OTA
2024-01-24 20:14:20Responded to OTA request of 'T9' with 'NO_IMAGE_AVAILABLE'
2024-01-24 20:15:20Received Zigbee message from 'T7', type 'commandQueryNextImageRequest', cluster 'genOta', data '{"fieldControl":0,"fileVersion":18296833,"imageType":522,"manufacturerCode":4417}' from endpoint 1 with groupID 0
2024-01-24 20:15:20Device 'T7' requested OTA
2024-01-24 20:15:20Responded to OTA request of 'T7' with 'NO_IMAGE_AVAILABLE'
2024-01-24 20:15:49Received Zigbee message from 'T1', type 'commandQueryNextImageRequest', cluster 'genOta', data '{"fieldControl":0,"fileVersion":18296833,"imageType":522,"manufacturerCode":4417}' from endpoint 1 with groupID 0
2024-01-24 20:15:49Device 'T1' requested OTA
2024-01-24 20:15:49Responded to OTA request of 'T1' with 'NO_IMAGE_AVAILABLE'
2024-01-24 20:16:10Received Zigbee message from 'T2', type 'commandQueryNextImageRequest', cluster 'genOta', data '{"fieldControl":0,"fileVersion":18296833,"imageType":522,"manufacturerCode":4417}' from endpoint 1 with groupID 0
2024-01-24 20:16:10Device 'T2' requested OTA
2024-01-24 20:16:10Responded to OTA request of 'T2' with 'NO_IMAGE_AVAILABLE'
2024-01-24 20:16:32Received Zigbee message from 'T5', type 'commandQueryNextImageRequest', cluster 'genOta', data '{"fieldControl":0,"fileVersion":18296833,"imageType":522,"manufacturerCode":4417}' from endpoint 1 with groupID 0
2024-01-24 20:16:32Device 'T5' requested OTA
2024-01-24 20:16:32Responded to OTA request of 'T5' with 'NO_IMAGE_AVAILABLE'
2024-01-24 20:16:40Received Zigbee message from 'T6', type 'commandQueryNextImageRequest', cluster 'genOta', data '{"fieldControl":0,"fileVersion":18296833,"imageType":522,"manufacturerCode":4417}' from endpoint 1 with groupID 0
2024-01-24 20:16:40Device 'T6' requested OTA
2024-01-24 20:16:40Responded to OTA request of 'T6' with 'NO_IMAGE_AVAILABLE'
2024-01-24 20:16:55Received Zigbee message from 'T3', type 'commandQueryNextImageRequest', cluster 'genOta', data '{"fieldControl":0,"fileVersion":18296833,"imageType":522,"manufacturerCode":4417}' from endpoint 1 with groupID 0
2024-01-24 20:16:55Device 'T3' requested OTA
2024-01-24 20:16:56Responded to OTA request of 'T3' with 'NO_IMAGE_AVAILABLE'
2024-01-24 20:19:14Received Zigbee message from 'T4', type 'commandQueryNextImageRequest', cluster 'genOta', data '{"fieldControl":0,"fileVersion":18296833,"imageType":522,"manufacturerCode":4417}' from endpoint 1 with groupID 0
2024-01-24 20:19:14Device 'T4' requested OTA
2024-01-24 20:19:15Responded to OTA request of 'T4' with 'NO_IMAGE_AVAILABLE'
2024-01-24 20:19:20Received Zigbee message from 'T9', type 'commandQueryNextImageRequest', cluster 'genOta', data '{"fieldControl":0,"fileVersion":18296833,"imageType":522,"manufacturerCode":4417}' from endpoint 1 with groupID 0
2024-01-24 20:19:20Device 'T9' requested OTA
2024-01-24 20:19:20Responded to OTA request of 'T9' with 'NO_IMAGE_AVAILABLE'
2024-01-24 20:20:20Received Zigbee message from 'T7', type 'commandQueryNextImageRequest', cluster 'genOta', data '{"fieldControl":0,"fileVersion":18296833,"imageType":522,"manufacturerCode":4417}' from endpoint 1 with groupID 0
2024-01-24 20:20:20Device 'T7' requested OTA
2024-01-24 20:20:20Responded to OTA request of 'T7' with 'NO_IMAGE_AVAILABLE'
"Ota" is not bound to the coordinator either, and there's no reporting configured for "Ota" either.
I have 11 other zigbee devices, and none of them show up here (or not as frequently ~ 5 minutes).
Is this a bug?
Personally, I'd also prefer to push OTA whenever I want them and not when the devices deems them necessary. I'm not sure how zigbee OTA works in this regard, but I'm surprised the device asks at all - I thought the coordinator was responsible.
I'm on Zigbee2MQTT (1.34.0 commit: aae7312); zStack12 Coordinator revision 20211115.
I have 9 LYWSD03MMC thermometers (called T1 - T9).
Each of them is running 3001-0117 (20231215).
Initially I configured them to hide the smiley using #28 (comment) in zigbee2mqtt using the "Dev Console", but it keeps breaking - the smiley keeps coming back randomly (or temporarily?).
They've been running this firmware for about ~7 weeks.
Since then, in at least 3 cases, one of those thermometers (a different one each time) suddenly started showing the comfort smiley.
First, it happened on 1 thermometer about a week after initial setup of the thermometers. Then it happened 2 more times this week, again, on different thermometers.
It's fixable by rewriting 1 to the visibility setting on the affected thermometer.
Each of the affected thermometers report > 70% battery
It's not clear to me if this is a zigbee2mqtt reconfiguration issue or a bug in this firmware or even something like a flash malfunction.
I'd like to provide logs, but my logs are quickly rotating because of issue #46 and I never spotted the moment it changed.
I did not try to read back the config attribute on an affected thermometer (I always just rewrote the field to hide the smiley again), but will read it out if it happens again.
Is it possible to control the offset for humidity and temperature with the Zigbee firmware? With the BLE firmware I can do it directly in Telink Flasher, but obviously you can't use the Flasher anymore once the Zigbee variant is flashed.
I wanted to control the offset on device level, not HA, so that the display on the device itself would be correct as well. I use ZHA. I have 'calibrated' values for a bunch of LYWSD03MMC, because they drift when it comes to humidity.
ClusterID: 0x0204 (Thermostat User Interface Configuration)
Attr: 0x0100, INT16 (id:0x29), Temperature offset, in 0.01° steps, range: -32767 (-327.67°)..32767(+327.67°). Default 0.
Attr: 0x0101, INT16 (id:0x29), Humidity offset, in 0.01% steps, range: -32767 (-327.67%)..32767(+327.67%). Default 0.
Attr: 0x0106, ENUM8 (id:0x30), Turn off the display. 1 - Display Off. Default 0 - Display On.
Attr: 0x0107, UINT8 (id:0x20), Measurement interval, step 1 second, range: 3..255 seconds. Default 10 seconds.
LYWSD03MMC uses 4 display controller options. Not all types of display controllers have a shutdown command.
Only for the controller in HW B1.9 there is documentation and a complete shutdown works for it.
The version is determined by the addresses of the display and sensor on I2C
HW | LCD I2C addr | SHTxxx I2C addr | Note |
---|---|---|---|
B1.4 | 0x3C (IST3055NA0) | 0x70 (SHTC3) | |
B1.5 | UART! (Special MCU?) | 0x70 (SHTC3) | |
B1.6 | UART! (Special MCU?) | 0x44 (SHT4x) | |
B1.7 | 0x3C | 0x44 (SHT4x) | Test original string HW |
B1.9 | 0x3E (analogue BU9792FUV) | 0x44 (SHT4x) | |
B2.0 | 0x3C | 0x44 (SHT4x) | Test original string HW |
Version 1.7 or 2.0 is determined at first run by reading the HW line written in Flash.
Display matrices or controllers are different for all versions, except B1.7 = B2.0.
ClusterID: 0x0204 (Thermostat User Interface Configuration)
Attr: 0x0100, INT8 (id:0x28), Temperature offset, in 0.01° steps, range: -127 (-12.7°)..127 (+12.7°). Default 0.
Attr: 0x0101, INT8 (id:0x28), Humidity offset, in 0.01% steps, range: -127 (-12.7 %)..(+12.7 %). Default 0.
Some days ago I flashed a couple of LYWSD03MMC sensors from custom BTHome to the ZigbeeTLc firmware using TelinkMiFlasher.
I added the 2 devices in Z2M and they work fine so far - showing up as version 3001-0102
I am now trying to do OTA update via Z2M - either to latest 106 firmware or even back to BLE.
I've tried both firmware 1141-020a-01103001-Z03MMC.zigbee and 1141-020a-99993001-ATC_v46.zigbee
However in both cases Z2M shows update starting ..0% - and then immediatelly after it fails with "Update failed with reason: 'invalid image'"
2023-11-20 14:31:56 Got upgrade end request for '0xa4c138fda3d5689c': {"status":150,"manufacturerCode":4417,"imageType":522,"fileVersion":2576953345}
2023-11-20 14:31:56 Update failed with reason: 'invalid image'
Not sure where to go from there - any way to update via OTA or do I need to use USB cable?
I reprogrammed one of my LYWSD03MMC (sensor) to version 1.08
After a few hours, the sensor stopped reporting to Z2M
The connection to the coordinator is good.
The sensor froze, I tried to change the ambient temperature, but the temperature and humidity did not change on the display.
Manual reading in Z2M gives an error in the 'MAC transaction expired' logs
After reset, readings are normal until the next time the sensor freezes.
I have a test Mijia that I have converted to Zigbee, and I'm finding the lack of configuration painful... I've figured out some of the endpoints I can tweak with the zha-toolkit, but I'm wondering if the others are not yet implemented or just not documented?
Here are the ones I scraped from the docs and from other issues:
ClusterID: 0x0204 (Thermostat User Interface Configuration), Attr: 0x0000 (TemperatureDisplayMode), ENUM8 = 0 in C, = 1 in F,
Attr: 0x0002 (ScheduleProgrammingVisibility), ENUM8 = 0 show smiley On, = 1 show smiley Off)
Attr: 0x0100, INT8, Temperature offset, in 0.1° steps.
Attr: 0x0101, INT8, Humidity offset, in 0.1% steps.
Looking at the configuration values I had from one of the BT devices, are any of these implemented?
It would also be nice to have a way to control the interval of switching between clock/battery/humidty info -- i don't see a setting for that in the BT version. It's possible it's a side effect of one of the other settings like measure interval though.
And is there a way to put custom data on the device screen? (ex. the BT custom firmware has a "Show on device screen" function where you can put specific values for the temperature, smiley, humidity, and battery).
I don't use all of these, but I'm sure there are folks who do. And I figured I may as well save you having to deal with 20 different feature requests if you can do them all in one... :-)
Is it possible to set a calibration / offset on the sensors via zigbee? So that the values displayed on the screen are also changed.
I have four of the MHO-C401 sensors and not alle of them show the same values.
Is there a documentation with all possible settings / commands for the zigbee firmware?
With your custom firmware 4.x (Link) it is possible, but only Bluetooth is supported, right?
Thank you very much for your firmware! It works really well with my zigbee setup.
Hi,
The title says it all, i've done this flashing a few times but this time it gives me the error: Size firmware is more 131072 bytes!
Any idea?
Thanks!
Hello,
I am experiencing difficulties when using OTA (Over-The-Air) to flash the firmware on LYWSD03MMC.
For beginning, i flashed the device with devbis/z03mmc but sensor crash and don't show true temperature/humidity.
I want to use pvvx/ZigbeeTLc because i never experiment issue with the pvvx BLE version !
When attempting the update, I encounter the following issues:
My configuration.yaml:
The wigpy_ota folder:
Content:
I put zigbee in folder like this:
--> from github RAW with wget in /root/homeassistant/zigpy_ota/
The Service ZHA Called:
The error in Logviewer:
Observed Behavior:
However, the update process fails at a certain stage, and the LYWSD03MMC is not updated correctly.
Since the Z2M update to 1.35.3-1 I get the following configuration-error for all my LYWSD03MMC:
"Failed to configure""TempHumLCD_Schlafzimmer",
"attempt 2 (Error":Read 0xa4c138a130e2c2f3/1 hvacUserInterfaceCfg([
16
],
{
"timeout":10000,
"disableResponse":false,
"disableRecovery":false,
"disableDefaultResponse":true,
"direction":0,
"srcEndpoint":null,
"reservedBits":0,
"manufacturerCode":null,
"transactionSequenceNumber":null,
"writeUndiv":false
}")
failed (Status""UNSUPPORTED_ATTRIBUTE"")
at Endpoint.checkStatus (/app/node_modules/zigbee-herdsman/src/controller/model/endpoint.ts":"319":"28)
at Endpoint.read (/app/node_modules/zigbee-herdsman/src/controller/model/endpoint.ts":"469":"22)
at setupAttributes (/app/node_modules/zigbee-herdsman-converters/src/lib/modernExtend.ts":"63":"13)
at configure (/app/node_modules/zigbee-herdsman-converters/src/lib/modernExtend.ts":"84":"17)
at Object.configure (/app/node_modules/zigbee-herdsman-converters/src/index.ts":"141":"25)
at Configure.configure (/app/lib/extension/configure.ts":"120":"13)
at EventEmitter.wrappedCallback (/app/lib/eventBus.ts":"174":17))
I have already tested this external converter - same problem
There are no problems with this external converter, but all settings are missing (smiley off etc.):
const fz = require('zigbee-herdsman-converters/converters/fromZigbee');
const exposes = require('zigbee-herdsman-converters/lib/exposes');
const reporting = require('zigbee-herdsman-converters/lib/reporting');
const ota = require('zigbee-herdsman-converters/lib/ota');
const e = exposes.presets;
const definition = {
zigbeeModel: ['LYWSD03MMC'],
model: 'LYWSD03MMC',
vendor: 'Xiaomi',
description: 'Temperature & humidity sensor',
fromZigbee: [fz.temperature, fz.humidity, fz.battery],
toZigbee: [],
configure: async (device, coordinatorEndpoint, logger) => {
const endpoint = device.getEndpoint(1);
const bindClusters = ['msTemperatureMeasurement', 'msRelativeHumidity', 'genPowerCfg'];
await reporting.bind(endpoint, coordinatorEndpoint, bindClusters);
await reporting.temperature(endpoint, {min: 10, max: 300, change: 10});
await reporting.humidity(endpoint, {min: 10, max: 300, change: 50});
await reporting.batteryVoltage(endpoint);
await reporting.batteryPercentageRemaining(endpoint);
},
exposes: [e.temperature(), e.humidity(), e.battery()],
ota: ota.zigbeeOTA,
};
module.exports = definition;
There is only this warning:
OTA: Images currently unavailable for device 'LYWSD03MMC', hardwareVersion '16', manufacturerName Xiaomi, {"fieldControl":0,"manufacturerCode":4417,"imageType":522,"fileVersion":18427905}'
I'm sure that all the settings worked until recently even without an external converter.
However, I can't find any issue or report on this problem.
Am I doing something wrong or is it a known problem?
Is there a way to solve this?
Installed Version on devices:
1141-020a-01193001-Z03MMC.zigbee
(until yesterday all devices were on v0.1.1.8 - as the problem was recognized)
The values are -39.18°C and 99.99% on the Zigbee Side. The LCD shows -39°C and 100%.
I tried your custom BT firmware and the measurements were correct. I reverted to it via Zigbee OTA and everything is correct again.
I tried both 1.07 and 1.08
Не могу зарегистрировать перепрошитый LYWSD03MMC в сети Zigbee2MQTT. Ситуация такая. Была прошивка от devbis.
Удалил датчик из сети (принудительно). Прошил Z03MMC_v0119.bin (по проводам). Запускаю в сети join - устройство "возникает", начинается его опрос. Все как обычно, доходит до появления сообщения "устройство успешно прошло интервью" (точный текст на английском не помню, но суть понятна), и... через пару секунд сообщение "Device такое-то left the network".
Уже раз десять пробовал - и зажимать сброс на 7 секунд, и просто передергивать батарейку, и перезапускать службу Z2M. Но результат один и тот же - в самый последний момент, когда казалось бы, все настройки закончены, происходит этот "выход" из сети.
P.S. Продолжение истории. Датчик лежит на столе, показывает значок Bluetooth. С датчиком ничего не делается, контакты не замыкаются, батарейка не извлекается - он просто лежит на столе. Если при этом в сети Zigbee разрешен join, то бесконечно происходит цикл спаривания, интервью и покидания сети.
Hi, I got an TS0201 flashed to 0115 and paired to ZHA. But after succesful OTA update to 0117 via ZHA, this device disconnected and I can't pair it to ZHA anymore. I got a Z2M instance nearby and it can be paired to Z2M.
После прошивки с 0115 в 0117 через OTA в ZHA связь с кетайский девайсом потерялась, повторно спарить в ZHA невозможно. В рядом стоящий z2m залетает без проблем. Само собой режим спаривания в Z2M отключен, когда я пытаюсь это сделать в ZHA.
I have 2 rebuilt WSD500A sensors. I flashed it with your firmware, adapted the converter for them, and everything would be fine, but when, after reflashing, I began to connect them to another coordinator, they were not detected in the pairing mode. I couldn't connect at all.
Having returned, one sensor quickly connected to the old coordinator, as it had not been removed from the network. I deleted it from Z2M and couldn't add it anymore. I tried adding it to both z2m and ZHA - nothing.
After many pairing attempts, I was also able to add a second sensor.
Suggestions why it is not possible to add to z2m:
Is it possible to make the reset/pairing button work in this sensor? Now the sensor does not react to its pressing. Pairing is extremely unstable, and sometimes it is completely impossible to do.
Подключен через Sonoff dongle и zha.
На экране термометра изменяются показания температуры и влажности, но в ХА изменяются только значения влажности. (изменение на 0.4 градуса, прошло больше 2 минут)
Если правильно понял, интервал обновления не реже 1 раза в 2 минуты?
Looks like my LYWSD03MMC was bricked after flashing the firmware. The display does not turn on after flashing and can't find it in my zigbee network.
Things I tried:
Logs:
3:48:30 PM: Searching for devices
3:48:42 PM: NotFoundError: User cancelled the requestDevice() chooser.
3:48:42 PM: Reconnect 1 from 5
3:49:07 PM: Searching for devices
3:49:35 PM: Connecting to: Climate_1
3:50:00 PM: Hardware Revision String: B1.4
3:50:00 PM: Software Revision String: V4.3
3:50:00 PM: Firmware Revision String: github.com/pvvx
3:50:00 PM: Detected custom Firmware
3:50:11 PM: Hardware Version: LYWSD03MMC B1.4, Software Version: 4.3, Sensor: SHTC3 (SHTV3)
3:50:11 PM: Custom config HEX string: 55031002002804a9313180b4
3:50:31 PM: Load firmware file 'Z03MMC_v0102.bin'...
3:50:32 PM: File: Z03MMC_v0102.bin
3:50:32 PM: File size: 128900 bytes
3:50:32 PM: Count: 8057
3:50:36 PM: Start DFU
3:51:07 PM: Update done after 30.577 seconds
3:51:08 PM: Disconnected.
Hello @pvvx ,
is there a possibility to turn off a device display in a zigbee firmware? I am using LYWSD03MMC and it would be great if I could turn the display off.
Thanks for your work!
Ota
Can you please use a custom manufacturer's code for your firmwares while they are in beta as they are incompatible with z03mmc in some ways and it causes issues with upgrade.
https://github.com/pvvx/ZigbeeTLc/blob/master/src/version_cfg.h#L53
Feel free to use telink code or any different for other devices besides 03 image type.
Should I be able to still find the device via BT scan, or is this function lost?
I have tried removing battery, and shorting GND/RST pins - this results in - - -
being displayed and allows to to pair to a Zigbee controller, but does not allow me to find the device using a BT scan.
How do I flash the next version of firmware once it is released, or return to factory or BLE-based custom firmware? Is this only available via a USB connection now?
(Note I am not 100% sure of the Zigbee firmware version applied, Z2M shows firmware 3001-0105
with build date 20231116
)
Hi
I flashed several LYWSD03MMC last days with version 0.1.1.6 with success.
But I just tried to flash a new one with 0.1.1.7 (I didn't notice a new version was available) and I can't pair with Z2M. I tried to remove battery, and also shortcut GND and reset without success
Any idea ?
Hi all.
I had no troubles to upgrade the LYWSD03MMC to custom BLE and then to 1.1.4.
Z2M works fine, even upgrade to 1.1.7 was relatively smooth.
But what about battery life?
The original battery was depleted in 10 and 12 days (two devices).
Do you have the same experience?
Or there is something wrong with my ones?
Both are placed very near the Zigbee stick, LQI is around 150-200.
Add OTA firmware on Zigbee2MQTT & option (or tutorial) to change firmware from z03mmc to ZigbeeTLc
BTW ... what are the differences between these firmwares ?
Имеется 8 датчиков LYWSD03MMC, в свое время прошитых в Zigbee прошивкой отсюда: https://github.com/devbis/z03mmc
Можно ли установить на них прошивку из этого проекта через OTA?
Судя по принятой индексации, OTA-файл должен называться 1141-0203-... и т.д. с расширением .zigbee
Но подобного файла в репозитории я не нашел. Нашел только файл Z03MMC_v0119.bin, предназначенный для прошивки через COM-порт (один датчик я прошил, но разбирать и паять провода к остальным очень не хотелось бы).
Спасибо!
The "configuration.yaml" file must have a directory assigned to the OTA files and the "ZHA Toolkit" installed.
For example, the directory name will be: “/zigbee_ota”
zha:
zigpy_config:
ota:
enabled: true
# Download the index over HTTPS
z2m_remote_index: https://raw.githubusercontent.com/Koenkk/zigbee-OTA/master/index.json
# Or, load the index offline
z2m_local_index: ./zigbee_ota/index.json
allow_advanced_ota_dir: I understand I can *destroy* my devices by enabling OTA
updates from files. Some OTA updates can be mistakenly applied to the
wrong device, breaking it. I am consciously using this at my own risk.
advanced_ota_dir: ./zigbee_ota
otau_directory: ./zigbee_ota
ikea_provider: false
ledvance_provider: false
salus_provider: false
sonoff_provider: false
inovelli_provider: false
thirdreality_provider: false
Place the new FW version files "*.zigbee" or "index.json" from bin into this directory ("./zigbee_ota").
Restart ZHA (preferably the entire Home Assistant).
Doesn't work in the new version of ZHA!
https://github.com/mdeweerd/zha-toolkit#ota_notify---downloadtrigger-device-fw-update
Go to “Developer tools” -> “SERVICES” and select “ZHA Toolkit: Trigger Device's Firmware Update”.
Select “Device Reference” and click “CALL SERVICE”.
After some time, 15..20 minutes, the firmware number will change:
To restore to BLE, use the Zigbee OTA file with the same number device from: https://github.com/pvvx/ATC_MiThermometer/tree/master/zigbee_ota
After running Zigbee OTA, be sure to delete this file or files from the update directories for Zigbee OTA and completely restart z2m/zha. Otherwise, with the new Zigbee firmware, this update in BLE will work again.
OTA on the following link doesn't contain one for TS0201. I am trying to go back to BLE from Zigbee
https://github.com/pvvx/ATC_MiThermometer/tree/master/zigbee_ota
The log was as follows:
12:34:52: Hardware Revision String: B1.4
12:34:52: Software Revision String: V3.8
12:34:52: Firmware Revision String: github.com/pvvx
12:34:52: Detected custom Firmware
12:34:52: Hardware Version: LYWSD03MMC B1.4, Software Version: 3.8, Sensor: SHTC3 (SHTV3)
12:34:52: Custom config HEX string: 55076500002804a97c31803c000000
12:35:01: Load firmware file 'https://raw.githubusercontent.com/pvvx/ZigbeeTLc/master/bin/Z03MMC_v0113.bin'...
12:35:01: File: https://raw.githubusercontent.com/pvvx/ZigbeeTLc/master/bin/Z03MMC_v0113.bin
12:35:01: File size: 127812 bytes
12:35:01: Count: 7989
12:35:03: Disconnected.
12:35:13: Reconnect
12:35:16: Hardware Revision String: B1.4
12:35:16: Software Revision String: V3.8
12:35:16: Firmware Revision String: github.com/pvvx
12:35:16: Detected custom Firmware
12:35:16: Hardware Version: LYWSD03MMC B1.4, Software Version: 3.8, Sensor: SHTC3 (SHTV3)
12:35:16: Custom config HEX string: 55076500002804a97c31803c000000
12:35:20: Start DFU
12:37:18: Update done after 117.092 seconds
It was before flashed with custom BLE firmware. The flashing of the zigbee firmware seemed to run fine.
Now I can't connect it to Zigbee nor to BT. It just doesn't show up. It shows the temperature and humidity normally. No matter how I press the button it just switches between F and C but doesn't seem to get into the zigbee pairing mode.
Any help would be appreciated. I have even switched out the battery. Btw this device doesn't have GND and REST pins it just has a button that I can press.
Thank you very much.
Hello,
I made a flash of my BT thermometer to Zigbee with your flasher on https://pvvx.github.io/ATC_MiThermometer/TelinkMiFlasher.html
Now I´am on version:
20231108
3001-0101
Is there any way how to make an OTA update to latest version in Z2M please?
I tried to download this file https://github.com/pvvx/ZigbeeTLc/blob/master/bin/1141-020a-01103001-Z03MMC.zigbee and make manual OTA in Z2M but it ends all time with an error:
Thanks for your help
I have 4 LYWSD03MMC B1.6s. Three of them work fine with this Zigbee firmware. But one of them simply refuses to join my Zigbee network (using ZHA). It works fine when I flash (by UART) the custom BT firmware (from https://github.com/pvvx/ATC_MiThermometer).
I have no idea how to debug this.. Any advice appreciated. Thanks.
Hi,
at first, thank you for your hardwork.
as I would like to test the new Zigbee firmware, I need to ask you for some details:
Sorry for these questions but I think I´am not only one user who is confused of these two different versions and I hope this can help other users to make decision.
Thanks, regards, Petr
I now tried 2x Qingping Temp RH Lite to flash them with the ZigBee Firmware and both sensors just show this screen after flashing:
I don't have any chance to get this thing working properly. So restarting or resetting don't work.
Also I don't get it in the Zigbee network.
Also the thing don't create any Bluetooth so I can't recover it with the flasher site...
Is there I did wrong or did the manufacturer change something?
Диапазоны комфортной температуры и влажности захардкожены
Line 113 in e065034
Find the file components/zha/sensor.py
(lib64/python3.11/site-packages/homeassistant
) and fix it:
class Sensor(ZhaEntity, SensorEntity):
"""Base ZHA sensor."""
_attribute_name: int | str | None = None
_decimals: int = 2
_divisor: int = 1
_multiplier: int | float = 1
"""Return the state of the entity."""
# per zcl specs battery percent is reported at 200% ¯\_(ツ)_/¯
if not isinstance(value, numbers.Number) or value == -1:
return None
value = round(value / 2, 1)
return value
site-packages/homeassistant/components/zha/core/cluster_handlers/general.py :
class DeviceTemperature(ClusterHandler):
"""Device Temperature cluster handler."""
REPORT_CONFIG = (
{
"attr": "current_temperature",
"config": (REPORT_CONFIG_MIN_INT, REPORT_CONFIG_MAX_INT, 10),
},
)
site-packages/homeassistant/components/zha/core/cluster_handlers/measurement.py :
class RelativeHumidity(ClusterHandler):
"""Relative Humidity measurement cluster handler."""
REPORT_CONFIG = (
AttrReportConfig(
attr="measured_value",
config=(REPORT_CONFIG_MIN_INT, REPORT_CONFIG_MAX_INT, 50),
),
)
...
class TemperatureMeasurement(ClusterHandler):
"""Temperature measurement cluster handler."""
REPORT_CONFIG = (
AttrReportConfig(
attr="measured_value",
config=(REPORT_CONFIG_MIN_INT, REPORT_CONFIG_MAX_INT, 10),
),
)
site-packages/homeassistant/components/zha/core/const.py :
REPORT_CONFIG_ATTR_PER_REQ = 3
REPORT_CONFIG_MAX_INT = 180
REPORT_CONFIG_MAX_INT_BATTERY_SAVE = 10800
REPORT_CONFIG_MIN_INT = 30
REPORT_CONFIG_MIN_INT_ASAP = 1
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.