Network Binding latency output displays as datetime string - expecting milliseconds

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).


Correctly displays Latency in milliseconds eg: 208


Incorrectly displays Latency as 1970-01-01T00:00:00.038Z

The only difference in the sitemap code is one uses a label of “” and the other uses “Telstra”


Frame label="Internet"{
        Text item=iinet_Internet icon="Network" label=" [%s]"
		Text item=iinet_ResponseTime label="Latency (ms) [%s]"


Switch iinet_Internet { channel="network:pingdevice:devicename:online"}
Number:Time iinet_ResponseTime { channel="network:pingdevice:devicename:latency"}


Thing network:pingdevice:devicename [ hostname="", retry=1, timeout=10000, refreshInterval=60000 ]

Thanks for any pointers… John

What you see is the correct representation of this item type so OH just does what you told it.
Change this to Number in the items definition.

PS and please change the thread title, it has absolutely nothing to do with the underlying OS.

The Network binding docs do suggest that the latency channel is properly a Number:Time type.

But asking for a [%s] format isn’t going to give a nice display. Try [%.0f ms]

Ok thanks for the comments and yes this is assignment is directly copied from the Network binding usage example. I will update my implementation when I get home in a few days.

thank you, done…