[SOLVED] Not reading correct format data from Network Binding

Not able to read corect format data coming from Network Binding for “latency” (number) and “lastseen” (datetime), but a simple hyphen only. In HABmin/Thing/ all data can be read. So I supposed that it’s a simple code formating issue.

Items:

Switch ArduinoSwitchInverter {channel = "network:pingdevice:network_pingdevice_192_168_1_10:online"}
Number ArduinoSwitchInverterResponseTime {channel ="network:pingdevice:network_pingdevice_192_168_1_10:latency"}
DateTime ArduinoSwitchInverterLastSeen {channel ="network:pingdevice:network_pingdevice_192_168_1_10:lastseen"}

Sitemap:

Frame label=""{
		Group item=Under label="Development"{
			Text item=ArduinoSwitchInverter label="Arduino Wemos Board [%s]"
			Text item=ArduinoSwitchInverterResponseTime label="Device Response Time is [%s]"
			Text item=ArduinoSwitchInverterLastSeen label="Last Seen: [%s]"
		}
	}

What do the logs say about these 3 items?

2019-01-18 13:21:25.251 [vent.ItemStateChangedEvent] - network_pingdevice_192_168_1_10_latency changed from 102.0 to 83.0

2019-01-18 13:21:25.283 [vent.ItemStateChangedEvent] - network_pingdevice_192_168_1_10_lastseen changed from 2019-01-18T13:20:25.101+0200 to 2019-01-18T13:21:25.226+0200

2019-01-18 13:22:25.298 [vent.ItemStateChangedEvent] - network_pingdevice_192_168_1_10_latency changed from 83.0 to 24.0

2019-01-18 13:22:25.344 [vent.ItemStateChangedEvent] - network_pingdevice_192_168_1_10_lastseen changed from 2019-01-18T13:21:25.226+0200 to 2019-01-18T13:22:25.278+0200

2019-01-18 13:22:48.645 [ome.event.ItemCommandEvent] - Item 'network_pingdevice_192_168_1_10_online' received command REFRESH

2019-01-18 13:22:48.680 [ome.event.ItemCommandEvent] - Item 'network_pingdevice_192_168_1_10_latency' received command REFRESH

2019-01-18 13:22:48.715 [ome.event.ItemCommandEvent] - Item 'network_pingdevice_192_168_1_10_lastseen' received command REFRESH

2019-01-18 13:22:51.212 [ome.event.ItemCommandEvent] - Item 'network_pingdevice_192_168_1_10_online' received command REFRESH

2019-01-18 13:22:51.246 [ome.event.ItemCommandEvent] - Item 'network_pingdevice_192_168_1_10_latency' received command REFRESH

2019-01-18 13:22:51.278 [ome.event.ItemCommandEvent] - Item 'network_pingdevice_192_168_1_10_lastseen' received command REFRESH

2019-01-18 13:22:53.582 [ome.event.ItemCommandEvent] - Item 'network_pingdevice_192_168_1_10_online' received command REFRESH

2019-01-18 13:22:53.619 [ome.event.ItemCommandEvent] - Item 'network_pingdevice_192_168_1_10_latency' received command REFRESH

2019-01-18 13:22:53.650 [ome.event.ItemCommandEvent] - Item 'network_pingdevice_192_168_1_10_lastseen' received command REFRESH

2019-01-18 13:22:53.717 [vent.ItemStateChangedEvent] - network_pingdevice_192_168_1_10_online changed from ON to OFF

2019-01-18 13:22:53.729 [vent.ItemStateChangedEvent] - network_pingdevice_192_168_1_10_latency changed from 24.0 to -1.0

2019-01-18 13:22:53.757 [vent.ItemStateChangedEvent] - network_pingdevice_192_168_1_10_latency changed from -1.0 to UNDEF

2019-01-18 13:22:53.764 [me.event.ThingUpdatedEvent] - Thing 'network:pingdevice:192_168_1_100' has been updated.

2019-01-18 13:22:56.940 [ome.event.ItemCommandEvent] - Item 'network_pingdevice_192_168_1_10_online' received command REFRESH

2019-01-18 13:22:56.974 [ome.event.ItemCommandEvent] - Item 'network_pingdevice_192_168_1_10_latency' received command REFRESH

2019-01-18 13:22:57.004 [ome.event.ItemCommandEvent] - Item 'network_pingdevice_192_168_1_10_lastseen' received command REFRESH

2019-01-18 13:22:57.892 [ome.event.ItemCommandEvent] - Item 'network_pingdevice_192_168_1_10_online' received command REFRESH

2019-01-18 13:22:57.928 [ome.event.ItemCommandEvent] - Item 'network_pingdevice_192_168_1_10_latency' received command REFRESH

2019-01-18 13:22:57.956 [ome.event.ItemCommandEvent] - Item 'network_pingdevice_192_168_1_10_lastseen' received command REFRESH

2019-01-18 13:23:02.019 [vent.ItemStateChangedEvent] - network_pingdevice_192_168_1_10_latency changed from UNDEF to -1.0

2019-01-18 13:23:02.038 [vent.ItemStateChangedEvent] - network_pingdevice_192_168_1_10_latency changed from -1.0 to UNDEF

2019-01-18 13:23:18.351 [me.event.ThingUpdatedEvent] - Thing 'network:pingdevice:ArduinoSwitchInverter' has been updated.

Any rules involved that send that REFRESH command? I have never seen that before

Nothing at all. I’ve just finished to configure HABmin and edit “items” and “sitemap”. And play with connect and disconnect of the Arduino board.

Remove those spaces:

Switch ArduinoSwitchInverter { channel="network:pingdevice:network_pingdevice_192_168_1_10:online" }
Number ArduinoSwitchInverterResponseTime { channel="network:pingdevice:network_pingdevice_192_168_1_10:latency" }
DateTime ArduinoSwitchInverterLastSeen { channel="network:pingdevice:network_pingdevice_192_168_1_10:lastseen" }

Not sure wich spaces…

the ones around the = after channel
Your items are not in the log which mean they don’t exist
Can you post the whole items file, please
Also what to the openhab.log show when you save that file?

I found the issue: the name of the Thing in HABmin should be exactly with the one used in “items” file. I used a different one - that was the mistake. Now everything is working well.

Correct defined items wich works well:

Switch ArduinoSwitchInverter {channel = "network:pingdevice:ArduinoSwitchInverter:online"}
Number ArduinoSwitchInverterResponseTime {channel ="network:pingdevice:ArduinoSwitchInverter:latency"}
DateTime ArduinoSwitchInverterLastSeen {channel ="network:pingdevice:ArduinoSwitchInverter:lastseen"}