DCF time form KNX to adjust time in Node Red

In KNX I get the date/time from a DCF Receiver . This date/time I want to use in Node Red to adjust both sysem to exactly the same time.
How to impement the time in the Node Red system time?

Erwin

What hardware is Node-Red running on?

And what precision do you require for "exactly the same time"?

the hardware is a Raspi 3B. The reason for the exact same time: Node Red switches some minutes delayed to the KNX switch. So i never know if the nodes are working or not. That is boring.

Is the pi connected to the internet?
Which device has the wrong time?

Can you clarify exactly what you mean by that?

The PI switches the nodes some minutes after KNX when the same time is fixed in both system.

Do you mean that when you look at the system time in the two systems they show the same time? If they are different then which one is correct?

If you don't mean that then explain what you mean and explain how the you have setup the pi to switch and how you have setup the KNX to switch.

Please try and explain exactly what is happening so we can understand.

an example:
KNX turn of the a certain appliance at i.e. 10 hrs, also the node red shall switch on this appliance also at 10 hrs to another status (i.e. room heating standy to night). but in reality node red switches on at 10:03 (accordingly to knx time) but 10:00 to node red time.
I now want to adjust node red (raspi) time to knx time.

So your devices are adrift by roughly 3 minutes. That suggests one of them has a problem acquiring an accurate time.

Have you checked that this device is successfully setting the system time?

A Raspberry Pi has no real time clock, so it has to connect to the internet to access an NTP server.
As Colin asked you, is the Pi connected to the internet?

Can you show us the part of your Node-red flow which switches this appliance on at 10:00 / 10:03?

Can you give us a bit more info about your set up: what is this "appliance" and why do you switch it on with both KNX and Node-red?

Also answer the question, if the two system times are different, which one is wrong?

Perhaps you can run an ntp server on your KNX system?
I have no idea if that is possible but it seems a reasonable extension to a DCF time sync setup.

If so, you could configure the Raspberry Pi to obtain time from it.
That would be at the operating system level, not in Node-red.

If the pi is not connected to the internet, so will not be automatically syncing its time, and you only need approximate syncing (ie within seconds rather than milliseconds) then you could just call the linux date command in an exec node.

thanks. thats working.
regards Erwin

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.