[BUG] Some sensors no longer display values

Hello everyone,

For several weeks (maybe more), some of my sensors no longer display information on the Gladys web page. However everything is visible in Zigbee2MQTT.

Context
I have 100% Zigbee-connected devices. From 220V plugs to temperature or motion sensors. I therefore use the dedicated service, which relies on Zigbee2MQTT.

Description
In the Zigbee2MQTT web interface I see that all my sensors are reporting their info:

However in the Gladys interface, some devices don’t even show the latest value:

Debug
Do you have any idea how to debug this situation? Check in the DB?
@pierre-gilles we had mentioned that my DB needed cleaning, but I admit I don’t know where to start. Maybe we should document a small section for users in my case :sweat_smile:

Can you check in the background tasks whether the aggregation is going well? (Settings

The device view indicates when the device was last seen, is everything OK on your end?

It’s funny, I’ve never had this view at home.

« Devices » sorry

On closer inspection, some sensors show N/A — indeed, that’s not good :scream:
Maybe the battery is dead, I’ll go around and test.

On those, pressing the button pushes the state — check the LED when you press it; if it’s not very bright the battery is dead.

On Xiaomi devices the battery indicator is worthless. I find Sonoff more reliable.

1 Like

At first glance, that would indeed be it. Battery shown at 97% but no LED activity… Useless!
A Gladys

1 Like

It’s clear, as @VonOx said, the value reported by the Xiaomi sensors is not reliable at all! I’ve also had cases where the value was above 95% but the sensor had stopped working.

When I was using Domoticz, there was an option to test the time between two value updates. I had it set to 24H and beyond that I would receive a message telling me that I hadn’t received new data from the sensor. That’s how I realized that the battery level reported by the Xiaomi devices was unreliable.

1 Like

I’ve made some progress on the subject and noticed two things, one of which could almost be considered a bug depending on how you look at it.

  1. Indeed, the battery value of the Xiaomi devices seems absolutely useless. The sensors stop working overnight. [EDIT]: This is true for most sensors. But one of them had lost the connection, I had to re-pair it.

  2. BUT Gladys will always display the last recorded value, even if it is weeks old. I’m realizing this now, because my sensors didn’t show the high temperatures from earlier in the week.

  3. I now understand why, @pierre-gilles, some graphs were displayed empty (if you remember): since the sensor no longer sends data, only the last known value is used in the graphs. I’m also wondering how aggregation is handled?

Excerpt from my interface:

I also noticed this because the scene that notifies me when a room has been too humid for several hours was always returning the same thing… Since November 17, 2021?! :scream::scream:

:play_button:Here are my recommendations:

  • Determine the age of the last value received.
  • When it exceeds 24h (or even 48h if needed), Gladys should warn that the sensor is not working (KO).
  • Gladys should stop calculating graphs and displaying the last known value for sensors that are not working (KO).
3 Likes

+1 on the concurrency side we have a status ‹ unavailable ›

[EDIT]: That’s true for most sensors. But one of them had lost its connection, I had to re-pair it.

And regarding the unavailable status, it’s a Gladys Core development because it will bring uniformity. That’s why you can choose very high values (24h or 48h); that should work for all sensors.

[quote=« lmilcent, post:10, topic:7402 »]

  • Determine the age of the last received value.
  • When
1 Like
1 Like