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