Presence feature with MQTT

Hello,

I am currently doing different tests with Gladys and when I add a fake device (MQTT Presence feature), the displayed text does not match reality.

When my script first sends the info to the MQTT broker, Gladys displays « in a few seconds »

I don’t think this is the appropriate text. Right?

Hello @Will_71

Back to the future

Thanks @VonOx, I hadn’t realized that this point was already known.

It was supposed to be fixed :sweat_smile:

Thanks for the speed :+1:

Hello @Will_71, the bug is due to the fact that the clock of your Gladys instance is a few milliseconds ahead of your browser :slight_smile:

However, we recently fixed this « bug » (last Friday afternoon) and the fix will be included in the next version of Gladys. (See commit → Fix #1328 : Presence sensor should not display datetime in the future… · GladysAssistant/Gladys@969d215 · GitHub)

To fix the bug, we cheat: if the date from the instance is in the future, we replace it with the current date of the browser :slight_smile:

So Gladys can also see the future! That’s why I need to replace my Domoticz with Gladys :joy:
After that, it wasn’t annoying, but it’s weird when you see this kind of message.
I will test it during the next update to confirm that it works!

Thanks again for the developers’ responsiveness.

Gladys no longer reads in the future and no longer displays « in a few seconds » :smile: :+1:
image