Network binding takes 1 minute to update item status

Hi All, using OH2.3 stable, with 2.3 of the network binding.

I have a TV which is pingable when on, Im using the network binding to determine if its on/off. Its taking 1 minute to update the status despite tweaking the timers to be very aggressive.

Any thoughts as to why this is occuring? When I switch it on, its pingable about 1 second after sending the ON command, same with switching it off. The TVStatus item though takes 40-60 seconds

Cheers
kris

How often did you set it to refresh? I believe the default is 1 minute.

I tuned the timers as mentioned right down to like 100ms

Send command at 2:21, 44 seconds.

Updates at 2:22, 30 seconds


14:21:44.746 [INFO ] [smarthome.event.ItemCommandEvent     ] - Item 'TV' received command TVOnOff
14:21:47.384 [INFO ] [smarthome.event.ItemStateChangedEvent] - FibaroEye1Alarm changed from ON to OFF
14:21:56.115 [INFO ] [smarthome.event.ItemStateChangedEvent] - AtticTemp changed from 16.4 to 16.5
14:21:56.117 [INFO ] [smarthome.event.ItemStateChangedEvent] - AtticHumidity changed from 54.9 to 55.5
14:22:30.726 [TRACE] [ng.network.internal.PresenceDetection] - Perform ARP ping presence detection for 192.168.0.200 on interface: ens160
14:22:30.728 [TRACE] [ng.network.internal.PresenceDetection] - Perform native ping presence detection for 192.168.0.200
14:22:30.841 [INFO ] [smarthome.event.ItemStateChangedEvent] - TVStatus changed from ON to OFF

Anyone ? :frowning:

Sounds like a network timeout. Maybe @David_Graeff would have some ideas.

1 Like

Let’s see your item configuration for TVStatus, as well as config for the Network Binding itself.

1 Like

Thanks guys

Switch TVStatus { channel="network:pingdevice:TV:online" }

network:pingdevice:TV [ hostname="192.168.0.200, retry=1, timeout=100, refreshInterval=500" ]
kris@OpenHAB:/etc/openhab2/services$ cat network.cfg
binding.network:allowSystemPings=true
binding.network:allowDHCPlisten=false
binding.network:arpPingToolPath=arping
binding.network:cacheDeviceStateTimeInMS=1000
kris@OpenHAB:/etc/openhab2/services$

Any thoughts???

@Confused any thoughts?

Is there no way to troubleshoot this thing??

You’ve got a 1000ms cache but you’re requesting every 500ms, so you may just be refreshing and getting back the cached value. Maybe due to something else going on, on some occasions it is then taking longer than 1000ms for a ping to be requested, so it then finally gets round to doing a new ping, then the device is found to be offline.

Hi Garry thanks for the reply

What would be your suggestion to resolve?

Try Raising the refreshInterval to greater than 1000ms and see if that improves it.

1 Like

@Confused

same issue. Refresh Interval is 1500, timeout is 100ms. Still takes a minute…

The default cache is 2000ms - try a value higher than this in case your requested 1000ms is not being loaded.

Is it always exactly 60 seconds from when the device is powered off, or is it random? Could it be arping caching the result of the ping too? Maybe the device takes 60 seconds to disable the network? What happens if you unplug the network from the device, rather than ask it to turn on/off?

Ill try that.

When I initiated a turn off and I have a ping running in the back ground, the pings stop immediately after the off command

Its a TV, the cable is behind the TV and its on a wall so im unable to unplug the cable :frowning:

TV has been off all night, yet the ‘THING’ still shows online

I put a dummy path in for the arp to fail but its still doing it.


07:28:21.409 [DEBUG] [org.openhab.binding.network          ] - ServiceEvent MODIFIED - {org.eclipse.smarthome.core.thing.binding.ThingHandlerFactory}={cacheDeviceStateTimeInMS=2000, service.id=376, allowSystemPings=true, service.bundleid=255, service.scope=bundle, allowDHCPlisten=false, arpPingToolPath=test, service.pid=binding.network, component.name=org.openhab.binding.network.internal.NetworkHandlerFactory, component.id=236} - org.openhab.binding.network
07:28:42.928 [TRACE] [ng.network.internal.PresenceDetection] - Perform ARP ping presence detection for 192.168.0.200 on interface: ens160
07:28:42.929 [TRACE] [ng.network.internal.PresenceDetection] - Perform native ping presence detection for 192.168.0.200

on my system, once a network binding thing is found and added then it’s always online even if I switch it off. I have 6 items offline now but their things show online. However, their switch items correctly show the OFF state.

Just in case, if you have a Samsung TV then that binding shows state changes quickly.

I have the defaults set for my TV network binding ping so I can run a test tomorrow and report back.

1 Like

I dont have a samsung tv, at least the THING being online appears OK. The item for the TV shows off correctly but again, takes ages to update.

using a physical remote and looking at the logs, after several on/offs minimum time was 25 secs, max time was 80 secs. On detection seemed usually quicker than off detection.

edit: for my use case this is fine.