Getting system time from the controller
-
The received message looks like this:
Received Message
Sender: 0
Last Node: 0
Destination: 6
Sensor Id: 255
Command: INTERNAL
Message Type: I_TIME
Payload Type: P_STRING
Payload Length: 10
Signing: 0
Payload: 17405944161740594416 is Thu, 27 Feb 2025 11:56:37 GMT which looks reasonable.
So question is, why doesn’t the node print the received time?
-
The received message looks like this:
Received Message
Sender: 0
Last Node: 0
Destination: 6
Sensor Id: 255
Command: INTERNAL
Message Type: I_TIME
Payload Type: P_STRING
Payload Length: 10
Signing: 0
Payload: 17405944161740594416 is Thu, 27 Feb 2025 11:56:37 GMT which looks reasonable.
So question is, why doesn’t the node print the received time?
@mfalkvidd
Thanks for your response. Yes, that's the question. Did I neglect something in my code? Do I have to register the "receiveTime" routine? Is there any workaround to use the response data? This node is an ESP32 D1 mini...if that makes a difference. Does the operation depend on an interrupt?
Again, thanks -
@mfalkvidd
Thanks for your response. Yes, that's the question. Did I neglect something in my code? Do I have to register the "receiveTime" routine? Is there any workaround to use the response data? This node is an ESP32 D1 mini...if that makes a difference. Does the operation depend on an interrupt?
Again, thanks -
@mfalkvidd
Thanks for your response. Yes, that's the question. Did I neglect something in my code? Do I have to register the "receiveTime" routine? Is there any workaround to use the response data? This node is an ESP32 D1 mini...if that makes a difference. Does the operation depend on an interrupt?
Again, thanks@dpcons it could be that the gateway code for receiving time is (unintentionally) broken. I noticed that the other thread you found also was about a gateway.
I have never used receivetime myself but I am pretty sure I have seen it working for other people on regular nodes.
-
I have found that controllers can be very slow to respond to time requests. Same experience for Domoticz and for Homeassistant. Try a wait(1500) after the time request.
@nagelc Thanks for responding. The response from the controller seems to be very quick. The problem is the 'receiveTime' routine never gets executed. mfalkvidd stated that the response in the serial output looked reasonable so I'm assuming the controller is responding OK. I tried adding the delay(1500) but same issue.
Again, thanks for your response. -
@dpcons it could be that the gateway code for receiving time is (unintentionally) broken. I noticed that the other thread you found also was about a gateway.
I have never used receivetime myself but I am pretty sure I have seen it working for other people on regular nodes.
@mfalkvidd Thanks for the response. I once built the 'Display and Time' sensor and I remember it working...but that was about 3-4 years ago and I no longer have the device. Maybe I build it back up again and give it a shot!
-
@mfalkvidd Thanks for the response. I once built the 'Display and Time' sensor and I remember it working...but that was about 3-4 years ago and I no longer have the device. Maybe I build it back up again and give it a shot!
@dpcons I built the Time Display example and after a little futzing, I got it to talk to my NRF24L01 system but the receiveTimez() function looks broken. It appears to respond with data that's read, but function never executes.
Looks like I'll punt for now. -
@dpcons I built the Time Display example and after a little futzing, I got it to talk to my NRF24L01 system but the receiveTimez() function looks broken. It appears to respond with data that's read, but function never executes.
Looks like I'll punt for now. -
@dpcons try changing
unsigned longin your sketch touint32_tCould be that the override needs to have an exact match.
@mfalkvidd Thanks, I'll try that.