OH2 Network Binding - Device always online

Is this Binding broken ATM? I have added my phone to the binding. and i cannot get it to show offline no matter what combination of settings I use

System Ping OFF/ON
DHCP Detection OFF/ON

device always shows online. the device is clearly not online, and cannot be pinged from any machine on the network (because its wifi, is off)

My log also does not show any information regarding ping requests, only that the DHCP listener is online (when DHCP listening is enabled) and there are no obvious errors in the log either.

No, works fine here …

Line 2358: 2017-01-31 17:10:56.032 [ItemStateChangedEvent     ] - phone_aaaa_presence changed from OFF to ON
Line 3236: 2017-01-31 19:22:13.733 [ItemStateChangedEvent     ] - phone_bbbb_presence changed from OFF to ON
Line 3249: 2017-01-31 19:24:35.547 [ItemStateChangedEvent     ] - phone_aaaa_presence changed from ON to OFF
Line 3326: 2017-01-31 19:34:15.503 [ItemStateChangedEvent     ] - phone_bbbb_presence changed from ON to OFF
Line 3335: 2017-01-31 19:37:37.107 [ItemStateChangedEvent     ] - phone_aaaa_presence changed from OFF to ON

Have you checked the refresh time configuration option? If it is for some reason 0, the binding will not refresh the state. Check the event log for periodic status updates on the bindings channels.

Cheers,
David

Same problem here.
But I think the PaperUI shows the state wrong. “Online” in the PaperUI obviously means, the ‘thing’ is present. It has nothing to do with the real network state, which can be expressed by an item.
Regards
Gerry

Exactly.

That’s the way it should be done.

@sihui
Thx for the clarification.

I still have some channel/item hassle with the network binding:

I tried to create a rule based on a channel - without an item- , but that does not work:

when
Channel ‘network:device:95c8d8bf:online’ triggered OFF
then

The item with the same channel adress also does not react, but the log shows the channel-item changing.

What might be wrong here ?
Thanks
Gerry

Channel triggers are only supported by a few bindings (astro and amazon dash button are the ones I know of).

If you have a “Thing” of this type
network:device:phone [ hostname="192.168.x.xx", port="0", retry="1", timeout="5000", refresh_interval="10000", use_system_ping="false" ]

you should use an item like this one:

Switch phone_presence "MyPhone" { channel="network:device:phone:online" }

Thank your very much - again !

Channel triggers are only supported by a few bindings (astro a …
Exactly : Astro binding supports this and that confused me.

I think one can discuss if that is a violation of the architecture, channels-> items -> rules. At least it confuses newbies.

Again a big thank !
Gerry

As far as I know the channel triggers were introduced after many of the bindings already were developed.
So we shouldn’t argue with the devs … :slight_smile:

Hi,

I’m using the binding under Win7 and I never seen the status passing offline for my 2 iPhone.

Here is my things and item definition (copy from sihui):

network:pingdevice:Michael_iPhone [ hostname=“192.168.1.42”, port=“0”, retry=“1”, timeout=“5000”, refresh_interval=“10000”, use_system_ping=“false” ]

Switch Michaelphone_presence “Michael_iPhone” (gPresent,gMichaelPresent) { channel=“network:pingdevice:Michael_iPhone:online” }

Looking on Windows, the ping is anwering : “not possible to join host destination”. But don’t put any error. Could this be the problem ?

Thanks for your help

Try without the double quotes in your thing definition.

Thanks for your fast answer. I just tried but without the double quotes, Thing is not created and I had errors in the log tail.
I also try with the double quote just for the IP address. Thing is created but the Item still always online.

That is the way I am using it successfully. Sorry, no more ideas.

at least this one misses "Thing " in the first place:

Thing network:pingdevice:Michael_iPhone [ hostname="192.168.1.42", port="0", retry="1", timeout="5000", refresh_interval="10000", use_system_ping="false" ]

also check your " - they should be the standard ones (this one could be caused by pasting in your browser, but be sure to check)

Again: both errors should be shown in your logs, please be sure, to check them after updating the files.

secondly:

does this mean, if you type in in your Windows command ping 192.168.1.52 this error message appears?

please post:

  1. your logs after saving Things and items files
  2. your Windows command prompt after typing in the ping-command

I can confirm this strange behaviour in my Windows 8.1 environment. That is why I stopped using the Network Binding and returned to the old OH 1.x Network Health Binding (which works correctly in a Windows environment).

Reducing the timeout at 500ms seems working.

Thanks for your help

im also having this problem everything on my network is reporting strange some are saying they are on when they are off some cant make there mind up whether they are off or on running on windows 10

i have used cmd to ping these devices and the results from there are correct just not openhabs

is this a windows problem or am i just doing something wrong was working fine until after an update

I am not sure, but as several Linux users report that it is working well on their systems I assume it might be Windows related. It was working for me on Windows until approximately mid 2017 but after some snapshot upgrade this strange behaviour started.

After setting the timeout from 5000 to 500 seems to have solved this problem

1 Like

I’m still experiencing devices saying they are on when off and off when on