I did read through the various posts regarding KNX and NTP time (and had my own post for the KNX 1.X Binding), but did not come up with a solution how I can send the time (to KNX group address 10/0/0) and the date (to KNX group address 10/0/1) using the time I get via the NTP binding.
In OH 2.3 with the KNX 1.X binding and the NTP (version 2) binding my item (and thing) definition was like this:
Thing ntp:ntp:germany [ hostname="nl.pool.ntp.org", refreshInterval=60, refreshNtp=30, timeZone="America/Detroit", locale="de_DE" ]
DateTime ntpDate "Date [%1$td.%1$tm.%1$tY %1$tH:%1$tM]" {channel="ntp:ntp:germany:dateTime",knx="10.001:10/0/0,11.001:10/0/1"}
So in a first attempt I changed my OH 2.4 KNX 2.4.0 binding settings to this ( no change for the NTP Thing):
KNX Thing/Channel definition:
Type datetime : ntpDate "Date [%1$td.%1$tm.%1$tY %1$tH:%1$tM]" [ ga="10.001:10/0/0,11.001:10/0/1" ]
(This did not produce any error.)
ā¦ and the changed the item definition to this:
DateTime ntpDate "Date [%1$td.%1$tm.%1$tY %1$tH:%1$tM]" {channel="ntp:ntp:germany:dateTime",channel="knx:device:bridge:Datum_Device:ntpDate"}
With that I donāt see any error reported, but I also do not get the time send to the KNX bus.
I do see the ntpDate contain the correct time as I can see this via sitemap/app.
My next guess inspired from this -> [KNX2] Send date+time to KNX produces endless loop post was to set up two channels and add them to the Item:
Thing device Datum_Device
{
Type datetime : knxntpDate [ ga="11.001:10/0/1" ]
Type datetime : knxntpTime [ ga="10.001:10/0/0" ]
}
DateTime ntpDate "Gruna [%1$td.%1$tm.%1$tY %1$tH:%1$tM]" {channel="ntp:ntp:germany:dateTime",channel="knx:device:bridge:Datum_Device:knxntpDate",channel="knx:device:bridge:Datum_Device:knxntpTime"}
But this unfortunately did not help as well. I am now out of ideas how I can send the time and the date on a regular base to the KNX bus (with the KNX2 binding).
Does anyone of you have a solution and can post it. (I have to make use of the NTP time.)
(In my KNX 1.X binding solution I did not have to run any rule to send the time to the KNX bus.)
Any hint is appreciated.