Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Meross divice incorrect timestamp

See original GitHub issue
Hi All, this is my first isue for this component.

Every morning I find this warning: MerossDevice(2103099103431490845048e1e960a3c2) has incorrect timestamp

I have 6 devices but just that one reports this warning.

Version of the custom_component

home assistant v 2021.9.7
  Meross Lan v 2.3.3


Add your logs here.

no log available

## Describe the bug
A clear and concise description of what the bug is.

## Debug log

<!-- To enable debug logs check this -->

Questo errore ha avuto origine da un'integrazione personalizzata.

Logger: custom_components.meross_lan
Source: custom_components/meross_lan/
Integration: Meross LAN (documentation, issues)
First occurred: 9:09:51 (1 occurrences)
Last logged: 9:09:51

MerossDevice(2103099103431490845048e1e960a3c2) has incorrect timestamp

Add your logs here.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

krahabbcommented, Nov 27, 2021

Hello @czornikk, I see your point and I’m also concerned about ‘log inflation’

right now meross_lan logs a warning when the device timestamp is more than 5 seconds away from HA. Also, when this happens and the device is able to accept a special kind of command, meross_lan starts the synchronization procedure. I’m not really sure how it works but this is what I’ve seen so far:

  • when you start the procedure externally (or when the device boots it happens it starts on its own) it begins repeating a message over mqtt waiting for a reply with the ‘correct’ timestamp. If this happens before the procedure timeouts it gets the configured timestamp and starts using it. You can start the procedure yourself by just sending (through meross_lan there’s a dedicated service for this) a triggering message over mqtt (supposed the device firmware supports it). You can check the specific discussion here #115. In order to use meross_lan to send the triggering message you could use meross_lan.request service (check the main readme for some help but should be self-explanatory) When the procedure starts meross_lan handles the synchronization messages (hopefully)

As stated meross_lan logs the warning when the device is more than 5 seconds away from HA epoch and this log repeats once in a week if the condition persists. While writing I’ve realized some way to let this message be less intrusive for the cases which shouldn’t (like when meross_lan would be able to fix the de-synchronization) without totally removing it so you could expect some tweaks to this logic in the next patches

krahabbcommented, Oct 16, 2021

I don’t know really, the log after 10 hours since last boot should be from a device who didn’t logged before since my code should really log only once every 24 hours per device. If that device synchronizes with a wrong time the log would come through right when the new time misalign with HA (I’ve read throughout this repo issues/contributions that meross devices query the NTP every 1 hour or so if I remember right) If not, and the log for the same device appears twice (i.e. at boot and after 10 hours) that could be a bug in my logging code somewhere which I should inspect. At any rate, being only 8-9 devices over 12 logging this warning the problem, I guess, should lie in these devices not getting a proper time setting (maybe it’s just some like 6-7 seconds away from HA time even though I don’t expect an NTP service to be that much misaligned but…that’s it) I would not care too much about the warning (a bit annoying I see) if the device still has a proper time and moreover if it’s not behaving erratically. I’ll keep an eye on this issue anyway trying to get better knowledge and maybe refine the logging behaviour

Read more comments on GitHub >

github_iconTop Results From Across the Web

What should I do if the time of my smart home device does not ...
Tap Edit, and go to the settings page: Tap Time zone and select ...
Read more >
Meross wi-fi Plug - Domoticz
Anybody is using this Meross wi-fi plug ? ... It works fine with IFTTT command to swith on/off devices but I want to...
Read more >
Share your Projects! - Home Assistant Community
Some great people managed to configure Meross device… ... is what I am looking for. yes local once u sniff a valid timestamp...
Read more >
Meross Garage Opener - Devices - Hubitat Community
The problem is that when opened/closed, Meross devices push their open/close status to a Meross MQTT server in the cloud.
Read more >
node-red-contrib-meross - npm
Meross Config is a config node to set the token, message id and timestamp for being able to locally communicate with your devices....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found