[SOLVED] Put time on KNX Bus with NTP Binding

Hey guys,

i have a problem putting time from the NTP-Binding to the KNX-Bus.
Openhab is running in docker on rpi3.

my home.things

ntp:ntp:local  [ hostname="de.pool.ntp.org", refreshInterval=60, refreshNtp=30 ]



Bridge knx:ip:bridge [ 
    ipAddress="10.10.1.102", 
    portNumber=3671, 
    localIp="172.17.0.3", 
    type="TUNNEL", 
    readingPause=50, 
    responseTimeout=10, 
    readRetriesLimit=3,
    useNAT=true, 
    autoReconnectPeriod=1,
    localSourceAddr="1.1.240"
] {
		
	Thing device knx_virtual "KNX-virtual"  {
        Type datetime-control : date [ ga="11.001:9/0/2" ]
        Type datetime-control : time [ ga="10.001:9/0/1" ]
    }
	
}

my home.items:

DateTime Date "Datum und Zeit: [%1$tA, %1$td.%1$tm.%1$tY %1$tT]" { channel="knx:device:ip:knx_virtual:date, knx:device:ip:knx_virtual:time, ntp:ntp:local:dateTime" }

if I query the item date everything is fine.

openhab> smarthome:status Date
2019-03-11T19:53:43.306+0000

The time is never written on the knx bus. I am monitoring this with ETS. If I put a read request from ETS on 9/0/1 in the openhab.log i find the following

2019-03-11 20:50:18.593 [TRACE] [nx.internal.client.AbstractKNXClient] - Received a Group Read Request telegram from '1.1.250' to '9/0/1' with value '[]'
2019-03-11 20:50:18.600 [TRACE] [.internal.handler.DeviceThingHandler] - onGroupRead Thing 'knx:device:bridge:knx_virtual' received a GroupValueRead telegram from '1.1.250' for destination '9/0/1'
2019-03-11 20:50:18.604 [TRACE] [.internal.handler.DeviceThingHandler] - onGroupRead isControl -> postCommand
2019-03-11 20:50:18.608 [TRACE] [.internal.handler.DeviceThingHandler] - onGroupRead size '1'

Other KNX switches are working fine. Can anyone guess what I am doing wrong?

solved it!

new home.items:

DateTime Date "Datum und Zeit: [%1$tA, %1$td.%1$tm.%1$tY %1$tT]" {channel="knx:device:bridge:knx_virtual:time,ntp:ntp:local:dateTime"}

Some update: For a working solution on how to put the date and time from NTP onto the knx bus using OpenHAB 3.2 and MainUI only see this post.

1 Like