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
mhilbush
(Mark)
July 12, 2017, 10:20pm
2
It’s probably the result of the ntp transaction exceeding the timeout. If so, a fix is in the works.
1 Like
Harpo3
(Harpo3)
July 14, 2019, 11:00pm
3
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.cfg
ntp:ntp:local "MyTown" @ "Date- Time" [hostname="0.pool.ntp.org", refreshInterval=60, refreshNtp=30, locale="", timeZone="Europe/Berlin" ]
ntp.items
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:
.sitemap
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: