Hey folks,
I’m porting my Ubuntu Linux 5.4.-90-generic to rpi 4 latest v3 openhabian 5.10.63-v71 (from uname -a) stable release. I have a few Zwave devices configured but I’m no programmer so I started porting with a simple internet up/down display in BasicUI. It’s probably a simple issue but I can’t find a fix/similar problem in the topics and it’s driving me crazy searching/reading for it over the past 2 weeks.
Same simple code on both platforms, pretty much directly from the network binding example page but different string handling result. I’ve checked the locale and ntp setup in both - other than RTC both same. All log files and update messages display the iinet_ResposeTime value correctly. But on the rpi BasicUI I get an epoch style string date time display (in Z which is even more confusing to me).
Linux
Correctly displays Latency in milliseconds eg: 208
RPi
Incorrectly displays Latency as 1970-01-01T00:00:00.038Z
The only difference in the sitemap code is one uses a label of “iinet.com” and the other uses “Telstra”
Sitemap
Frame label="Internet"{
Text item=iinet_Internet icon="Network" label="iinet.com [%s]"
Text item=iinet_ResponseTime label="Latency (ms) [%s]"
}
Item
Switch iinet_Internet { channel="network:pingdevice:devicename:online"}
Number:Time iinet_ResponseTime { channel="network:pingdevice:devicename:latency"}
Thing
Thing network:pingdevice:devicename [ hostname="64.255.238.206", retry=1, timeout=10000, refreshInterval=60000 ]
Thanks for any pointers… John