[SOLVED] Misleading documentation of network binding?

I just installed openHABian and the network binding.
I just went through the documentation of the network binding at


and wondering about some mismatches.

Just for reference, the example thing definition of the documentation looks this this:
network:pingdevice:one_device [ hostname="192.168.0.64" ]
but I need to use “device” to get it working on my machine:
network:device:one_device [ hostname="192.168.0.64" ]

Also for the channels there seems to be an issue.
The docu reports about

  • online
  • lastseen
  • latency
    but I can see only
  • online
  • time

Am I using an outdated version of the binding?
How may I figure out?

Thanks in advance,
Trickx

Yes, your version is outdated :slight_smile: but to be clear, not very outdated. The documentation was updated 5 days ago…

So, if using openHAB2.2 (aka “unstable” or “snapshot”) and updated to the actual version, both device and pingdevice should work, as device is mapped to pingdevice. See https://github.com/openhab/openhab2-addons/commit/67cb5a81c657ab3fdad9896e30cc7070ad95157e for details.

Hi Udo,

I was on the stable branch and just moved to the latest and greatest 2.2 :slight_smile:
Now the binding behaves as documented.
Nevertheless, I looking for full examples for manual thing configurations,
especially for iPhones.
My device is detected only if it is actively in use.
When the device is locked it appears directly as offline.
I tried different setings.
This is my current one:
network:device:192_168_0_test [hostname=“192.168.0.101”, uses_ios_wakeup=1, uses_arp_pings=1, refresh_interval=5000]

Which OS dependencies are there?
Somewhere I read about libpcap.

Thanks,
Tricks

See the above linked docs:

iPhones, iPads

Apple iOS devices are usually in a deep sleep mode and do not respond to ARP pings under all conditions, but to Bonjour service discovery messages (UDP port 5353). Therefore first a Bonjour message is send, before the ARP presence detection is performed. The binding automatically figures out if the target device is an iOS device. You can check if the binding has correctly recognised your device by having a look at the uses_ios_wakeup property of your thing.

sihui,

thanks for the hint. I have seen this. But it does not work for me.
My iPhone isn’t detected properly and it is not listed as iOS device.

So I would like to define the thing, item and sitemap entry manually,
not using the autodiscovery.
For me it isn’t clear which parameter have to be set to force described behavior.
Furthermore, which log entry are generated to check proper function.
This is my thing definition:
network:device:192_168_0_test [hostname="192.168.0.101", uses_ios_wakeup=1, uses_arp_pings=1, refresh_interval=5000]
How does it need to look like for an iOS device?
Do I have to configure testing on port 5353 manually?
Is there someone who manage to get it running on an RPI3 with openhabian?

Because you are on the latest snapshot, take a look at the changes:

http://docs.openhab.org/addons/bindings/network/readme.html

device is now pingdevice or servicedevice

Udo stated: device is mapped to pingdevice, see above.
The documentation does not provide an example for iPhone detection configuration.

Could not see the whole thread via email on my phone …

Not of any help here, I am using Android and that works fine, sorry.

I have the devices showing up in my OpenHab app as expected. I’m not expecting very precise results, so I’m ok with wat I see. Here is my “thing” config.

network:pingdevice:bPhone [ hostname=“192.168.0.101”, retry=10, timeout=2000, refreshInterval=60000 ]

But I cannot get “lastseen” or “pingtime” to work.
Here is my “items” config.

Switch bPhoneonline “iPhone” (grp_devices) { channel=“network:device:bPhone:online” }
DateTime bPhoneLastSeen “Last seen” (grp_devices) { channel=“network:pingdevice:bPhone:lastseen” }
Number bPhoneResponseTime “Response Time” (grp_devices) { channel=“network:pingdevice:bPhone:latency” }

Any ideas?

Strange thing is, the values show in the log files as well as the Basic-UI, but not on my IOS app.

I also am getting these errors in the log file.

2017-12-04 07:48:09.492 [WARN ] [ome.core.thing.internal.ThingManager] - Cannot delegate update ‘ON’ for item ‘Thing1’ to handler for channel ‘network:device:Thing1:online’, because no thing with the UID ‘network:device:Thing1’ could be found.
2017-12-04 07:48:09.501 [WARN ] [ome.core.thing.internal.ThingManager] - Cannot delegate update ‘19.232616’ for item ‘Thing1ResponseTime’ to handler for channel ‘network:pingdevice:Thing1:latency’, because no thing with the UID ‘network:pingdevice:Thing1’ could be found.
2017-12-04 07:48:09.504 [WARN ] [ome.core.thing.internal.ThingManager] - Cannot delegate update ‘19.232616’ for item ‘Thing1ResponseTime’ to handler for channel ‘network:device:Thing1:time’, because no thing with the UID ‘network:device:Thing1’ could be found.
2017-12-04 07:48:09.592 [WARN ] [ome.core.thing.internal.ThingManager] - Cannot delegate update ‘ON’ for item ‘Thing2’ to handler for channel ‘network:device:Thing2:online’, because no thing with the UID ‘network:device:Thing2’ could be found.
2017-12-04 07:48:09.598 [WARN ] [ome.core.thing.internal.ThingManager] - Cannot delegate update ‘17.244766’ for item ‘Thing2ResponseTime’ to handler for channel ‘network:pingdevice:Thing2:latency’, because no thing with the UID ‘network:pingdevice:Thing2’ could be found.

May have to start from scratch…

Sorry that is a bit ambiguous . I mean to say the devices show “on” and “off” as expected in my iOS Openhab app, but last seen and pingtime does not have any values.

I have the same Problem
Do you solved the problem , my Iphone is not discovered as an iphone

Hello All, how do I add option uses_ios_wakeup over web interface. I’ve created my thing via web and not via code and I can’t see how to change it

Do you use OH3 ? I think that option is enabled automatically.

  • create the thing
  • once the thing is online
  • open the thing again
  • check under information => thing properties
    here the option is enabled without explicitly setting it.
1 Like