Page 1 of 1

Weird problem when asking for the server time from a mySensor node.

Posted: Sunday 27 April 2025 17:32
by TheoL
Version: 2024.7
Platform: Raspberry (latest version
Plugin/Hardware: MySensors
Description:
I'm testing out how I can use the receiveTime - that is on the MySensors side - in a mySensors project. That is the MySensors function to request the server time from Domoticz.

There are two issues I run into:
  1. Domoticz returns the local time. Not the UTC time as I would expect. It's weird you don't get a utc time, because now you have to translate the local time into UTC on your MySensors node.
  • Domoticz - as it seems - goes beserk when a query for the time at a whole hour.
    When you request the time at 0 minutes, Domoticz starts spamming your node for a whole minute long. Meaning like every other 40ms I receive the time for 1 minute. I just asked for it once. Also during this DDOS on my Node I sometimes get a time that is 2 january 1970. Which is weird. It took me some time to find out why the time on my node sometimes went from the correct time to a 00:30 time.
Now it's an assumption of mine, that this is not in the MySensors gateway or Node code. Because I see the transmition leds on my gateway flashing really fast. And the MySensors Gateway normally does 3 retries - of which I'm not even sure if that is in the gateway or Domoticz Code.

Re: Weird problem when asking for the server time from a mySensor node.

Posted: Tuesday 06 May 2025 11:08
by TheoL
Just a quick follow up. I tested it with a different type of radio - RFM69HW instead of NRF24L01+ - so that also means a different Gateway. So far I haven't seen the same odd behaviour. I will keep testing. Possible causes:
  • Old/incompatible MySensors version: the first Gateway is/was still MySensors 1.5 and the new Gateway is the latest release
  • Bug in the NRF part? I highly doubt it, but you never know
I will keep testing. The fact that Domotics returns local time instead of UTC is still something that is unwanted for me. But I can imagine you can not change that easily, as a lot of nodes probably already use the current implementation. Maybe give us a choice if we want to receive UTC or Local time from Domoticz

Re: Weird problem when asking for the server time from a mySensor node.

Posted: Tuesday 06 May 2025 13:15
by gizmocuz
Let's assume it is not Domoticz

regarding the time in localtime

https://forum.mysensors.org/topic/2810/ ... me-handler

As mentioned in the above thread by 'admin', the mysensors node does not know anything about time/timezones, the controller does

Re: Weird problem when asking for the server time from a mySensor node.

Posted: Tuesday 06 May 2025 17:42
by TheoL
Good to see you in here sir. Yes for most nodes doing an hourly time synch and getting local time could be a good strategy. But I'm working on a DLS aware node. I can work around it, but translating the local time to utc. Because I need to store utc in an rtc.

As in regard to the other problem. I'll try another NRF gateway and if that also doesn't show that behavior, I will report back and close it.