z03mmc icon indicating copy to clipboard operation
z03mmc copied to clipboard

LYWSD03MMC keeps reporting N/A for temperature and humidity

Open MathijsG opened this issue 6 months ago • 20 comments

I recently flashed my LYWSD03MMC with z03mmc.bin to transfer it from the custom BLE firmware to Zigbee.

It pairs fine and everything, reports LQI, visually switches to Fahrenheit/Celsius, but the reported temperature and humidity keeps reporting N/A.

I've tried re-pairing them, removing them. Using a different coordinator didn't help as well.

My last resort is reflashing it back to Bluetooth via UART.

Any direction to pinpoint this issue?

The device physically looks like this: image

MathijsG avatar Jan 07 '24 16:01 MathijsG

What zigbee coordinator software do you use? What version of firmware did you write?

devbis avatar Jan 07 '24 21:01 devbis

What does "RECONFIGURE" show? image

pvvx avatar Jan 08 '24 01:01 pvvx

Sorry I'm in the Zigbee2mqtt camp. Should make that more clear next time, sorry.

I did it in Z2M however:

image

I took this z03mmc.bin file from: https://github.com/devbis/z03mmc/releases/tag/1.0.6

What zigbee coordinator software do you use? What version of firmware did you write?

Zigbee2MQTT version 1.35.1 commit: unknown Coordinator type zStack3x0 Coordinator revision 20230507 Coordinator IEEE Address 0x00124b0018ed3f49 Frontend version 0.6.151 Zigbee-herdsman-converters version 18.9.0 Zigbee-herdsman version 0.30.0

MathijsG avatar Jan 08 '24 10:01 MathijsG

I'm facing a similar issue. I force-removed the device from Z2M a couple of times and it recovered I was getting proper numbers. However, after some time the thermometer locks up. It stops sending any values and it stops updating the temperature on the display. image

I OTA flashed it mid-December 2023 with the latest available firmware and it was working OK for a while. I'm using a SONOFF Zigbee 3.0 USB Dongle Plus with Debian 12 and Home Assistant 2024.1

EinSchwerd avatar Jan 11 '24 21:01 EinSchwerd

@EinSchwerd if you get actual numbers for temperature and humidity at the zigbee-level then this seems like a different issue. Maybe yours has something to do with distance towards the device? Move it closer to the actual device it is connected to, or pair it to something else closer?

MathijsG avatar Jan 11 '24 23:01 MathijsG

I don't get numbers on zigbee-level. I don't get numbers at all. It seems like the device is deadlocked as the server does not receive any messages other than that the thermometer is connected.

EinSchwerd avatar Jan 12 '24 01:01 EinSchwerd

Can you read data from attribute manually? Temperature/measuredValue. Does changing battery and/or moving closer to the coordinator help?

devbis avatar Jan 12 '24 06:01 devbis

I put it onto the coordinator antenna and no change. How can I manually read the value from it? It does not change the value displayed on the device itself regularly. It only does a value update when I re-insert the battery.

EinSchwerd avatar Jan 14 '24 03:01 EinSchwerd

Facing same issue, using the firmware from 09.11.2023. The values showed as 'N/A' in zigbee2mqtt.

ildus avatar Jan 14 '24 16:01 ildus

Same here! Works for some time and then stops to respond. Taking the battery out for 10 sec and placing it back helps - new values are transmitted for some period (several days) and then the same thing happens. Z2M with external converter.

Yari117 avatar Jan 23 '24 20:01 Yari117

Recently there was an OTA update for my sensor, and that fixed it :-)!

MathijsG avatar Feb 07 '24 14:02 MathijsG

When I compare the amount of temp updates to my still-Bluetooth temp sensors (exact same devices): Zigbee variant: image

Bluetooth variant (custom firmware): image

It seems like the Bluetooth version updates much more frequently. Is this something I can change on my side? The paramaters of reporting an update are already quite low (often) by default, yet it seems like it's not reporting temp changes as accurately and timely as my Bluetooth sensors.

MathijsG avatar Feb 10 '24 15:02 MathijsG

You can configure the reporting time and delta using standard zigbee functionality. What software do you use?

devbis avatar Feb 10 '24 16:02 devbis

I use Zigbee2mqtt. And the defaults for this device are already very low in reporting (so it's often reporting al ready). See attached screenshot: image

But it seems more like the sensor ignores these settings somehow, as it's often keeping the same value. Sometimes it only updates when I pressed these buttons (the refresh icons): image

MathijsG avatar Feb 10 '24 16:02 MathijsG

The configuration is correct. Try upgrade to the latest firmware, use fresh battery and re-join if needed.

devbis avatar Feb 10 '24 19:02 devbis

Один и тот-же таймер app_reportMinAttrTimerCb в цикле переназначается на все события: https://github.com/devbis/z03mmc/blob/master/src/reporting.c#L80C87-L80C111 В итоге отрабатывает одно. Взята процедура из примера в SDK, в котором существует только одно событие и не рассчитана на множественные ... В итоге она иногда отрабатывает, когда происходит повторный вызов, после срабатывания таймера. Но не всегда. Получается, что когда быстро меняются значения T или H, передается только что-то одно.

pvvx avatar Feb 11 '24 13:02 pvvx

Это не таймер, а колбек на таймер. О каких ограничениях в коде идет речь, если это вызывает такой эффект? Есть ссылка на код реализации таймеров, где это вызывает проблемы?

devbis avatar Feb 11 '24 14:02 devbis

А как назначается ID таймера? Именно по адресу callback

Есть ссылка на код реализации таймеров, где это вызывает проблемы?

ev_on_timer()

pvvx avatar Feb 11 '24 14:02 pvvx

Я не разбирал ваш код, но эффект выходит именно такой – когда значения T и H меняются быстро, передается только одно T или H.

pvvx avatar Feb 11 '24 15:02 pvvx

Recently there was an OTA update for my sensor, and that fixed it :-)!

OK, I thought the OTA helped, but the sensor keeps dropping out. Battery out reset helps for a day or so, then the sensor stops reporting

Yari117 avatar Mar 21 '24 19:03 Yari117