Ntp binding - couldn't establish network connection

Hello guys,

I have following problem with ntp binding.

OH2 prints "2017-07-12 10:37:21.665 [WARN ] [thome.binding.ntp.handler.NtpHandler] - ntp:ntp:local couldn’t establish network connection [host ‘0.pool.ntp.org’] -> returning current sytem time instead."
in /var/log/openhab2/openhab.log

My ntp.things looks like this:
ntp:ntp:local [hostname=“0.pool.ntp.org”, refreshInterval=60, refreshNtp=30, locale="", timeZone=“Europe/Vienna” ]
My ntp.items looks like this:
DateTime Date “Date [%1$tA, %1$td.%1$tm.%1$tY %1$tH:%1$tM]” { channel=“ntp:ntp:local:dateTime” }

Do you have any idea to fix this?

Best regards

It’s probably the result of the ntp transaction exceeding the timeout. If so, a fix is in the works.

1 Like

Following up on this. Getting ntp timeouts daily with binding-ntp - 2.5.0.M1.

Not seeing a way to adjust the timeout via paper UI. Anyone have a way to do this with .cfg?

Current Paper UI settings:

Hostname: 0.pool.ntp.org
Refresh Interval 60
NTP Refresh Frequency 30
Server Port 123

Try this:


ntp:ntp:local "MyTown" @ "Date- Time"	[hostname="0.pool.ntp.org", refreshInterval=60, refreshNtp=30, locale="", timeZone="Europe/Berlin" ]


DateTime              Current_DateTime                "Heute [%1$tA, %1$td.%1$tm.%1$ty,%1$tH:%1$tM]"      <calendar>                              {channel="ntp:ntp:local:dateTime"}
String                CurrentTime2                    "Zeit-String [%1$tH]"                               <time>                                  {channel="ntp:ntp:local:dateTime" }

and the result in PaperUI looks like:


    Text item=Current_DateTime     label="Heute ist [%1$tA, %1$td.%1$tm.%1$ty]"     valuecolor=["red"] labelcolor=["red"]
    Text item=CurrentTime2                                                          valuecolor=["red"] labelcolor=["red"]

and at the very end you will see this: