Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LYWSD03MMC keeps reporting N/A for temperature and humidity #103

Open
MathijsG opened this issue Jan 7, 2024 · 21 comments
Open

LYWSD03MMC keeps reporting N/A for temperature and humidity #103

MathijsG opened this issue Jan 7, 2024 · 21 comments

Comments

@MathijsG
Copy link

MathijsG commented Jan 7, 2024

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

@devbis
Copy link
Owner

devbis commented Jan 7, 2024

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

@pvvx
Copy link

pvvx commented Jan 8, 2024

What does "RECONFIGURE" show?
image

@MathijsG
Copy link
Author

MathijsG commented Jan 8, 2024

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

@EinSchwerd
Copy link

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

@MathijsG
Copy link
Author

@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?

@EinSchwerd
Copy link

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.

@devbis
Copy link
Owner

devbis commented Jan 12, 2024

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

@EinSchwerd
Copy link

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.

@ildus
Copy link

ildus commented Jan 14, 2024

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

@Yari117
Copy link

Yari117 commented Jan 23, 2024

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.

@MathijsG
Copy link
Author

MathijsG commented Feb 7, 2024

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

@MathijsG
Copy link
Author

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.

@devbis
Copy link
Owner

devbis commented Feb 10, 2024

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

@MathijsG
Copy link
Author

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

@devbis
Copy link
Owner

devbis commented Feb 10, 2024

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

@pvvx
Copy link

pvvx commented Feb 11, 2024

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

@devbis
Copy link
Owner

devbis commented Feb 11, 2024

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

@pvvx
Copy link

pvvx commented Feb 11, 2024

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

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

ev_on_timer()

@pvvx
Copy link

pvvx commented Feb 11, 2024

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

@Yari117
Copy link

Yari117 commented Mar 21, 2024

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

@DiegoJp
Copy link

DiegoJp commented Jun 7, 2024

Happened to me twice between last week and today. New CR2032 battery and all. Device apparently crashes and keeps stuck on a fixed value of T° and hum%.
The workaround is resetting the device by shorting the ground and reset pins with a pair of tweezers for about 5 seconds max (the screen goes out for a bit). But that's no good for the plastic of the cover which is a bit hard to take out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants