Network Binding - iPhone Presence Detection - arping Configuration question

Okay, that means that showing no doesn’t mean that there is an issue with arping.

Thus it sometimes shows my s8 android phone as offline although it’s in the wifi

Thank you so much for all the suggestions. I am using Network Binding for presence detection on iPhone 8 Plus iOS 11.2.5

My thing properties shows as follows:

uses_arp _pings is no

I have created the services/network.cfg and added

uses_apr_pings=yes

it does not seem to make any difference in my case.

arping set setup correctly in the OS (Openhabian 2.2 image) and can use it without sudo. Looks good.

My issue is that presence detection is unreliable and item shows offline when iPhone sleeps. I am assuming that because uses_apr_pings is no it is not waking up my iOS device.

Thing:

Thing network:pingdevice:JasoniPhone [ hostname="10.0.1.199", retry=10, timeout=20000 ]

Item:

Switch JasoniPhoneOnline01 { channel="network:pingdevice:JasoniPhone:online" }

uses_apr_pings seem to stay no. Have no idea if it is related

My arping version is 2.14 and was installed as default on openhabian

if running

sudo apt-get upgrade arping

it indicates that this is the latest version.

Appreciate all the suggestions!!

I have exactly the same and my Iphone appears to go offline every 10 minutes or so

I tried with this :slight_smile:network:pingdevice:iPhone_Karl [ hostname=“192.168.0.20”, uses_ios_wakeup=1, uses_arp_pings=1, retry=5 ]

But still no improvment

I think you need a larger retry and potentially a longer timeout.

1 Like

@rlkoshak is right set your max try’s to 20 better would be 30 for reliable detection.

I will post screenshots of my settings once I am on my computer again

Well, that seems to work, but not efficiently. I mean it can take
up to 15 minutes to find my iPhone at home, which is not great for
presence notification

  But cant find any viable iphone presence system apparently, after

reading lot of post

Event with :
network:pingdevice:iPhone_Karl [ hostname=“192.168.0.20”,
uses_ios_wakeup=1, uses_arp_pings=1, retry=15, timeout=5000,
refreshInterval=60000]

My iPhone went off for good, so clearly there is something not working here
If I check my router, I still see my IP connected to WiFi

Any advice on how to reliably get my presence ?

I am using: retry=40 timeout=7500

And it works perfect. iPhones do have the issue that they only response to arping after 25-35 pings.

When you say works perfect, it means your device is detected after how many seconds ?

I’ll try with your parameters

Well the first detection is taking most of the time around 30sec to 1 minute. Sometimes 2 minutes.

After that the detection works continuously and shows you reliable as present.

If you use 40 retrys and timeout=5000, it only would be around max. 3.5 min for detection or if timeout=2500 it will take max.1.5 minutes for detection. (It will do the arping 40times each 1.5 minutes)

What i posted earlier is my setup which works perfect for me. I never tried such low timeouts (2500/5000) before.

So I did use you config :

  [ hostname="192.168.0.20",

uses_ios_wakeup=1, uses_arp_pings=1, retry=40, timeout=15000,
refreshInterval=60000]

And what I see now, it is 15:26 system time :

Device
OFF

Device Response Time

Just made a test with :

  [ hostname="192.168.0.20",

uses_ios_wakeup=1, uses_arp_pings=1, retry=40, timeout=15000,
refreshInterval=60000]

I left home at 8:39 and this is what I see :

Device
ON

Device Response Time
82

Last Seen
16.03.2018,
07:38

It is now 8:53 (openHab is GMT, so 1 hour behind), so it didn't

detect I was out

uses_dhcp_listen
no
dhcp_state
No access
right for port 67. Bound to port 6767 instead. Port
forwarding necessary!
presence_detection_type
ARP_PING
arp_state
IPUTILS_ARPING
uses_ios_wakeup
On
icmp_state
IPUTILS_LINUX_PING
uses_arp_pings
nonetwork.cfg

uses_apr_pings=yes

allowSystemPings=false

In fact, not even sure the binding does anything

I have this as debug :

  org.openhab.binding.network                                │

DEBUG

  org.openhab.binding.network.internal                       │ DEBUG

And I still don’t see anything in log files…

And now, I enabled it for my wife’s iPhone and there it works fine.

I see the status refreshed correctly (the last seen), but still not with mine.

On mine, device is OFF, lastseen at 1:38 (it is 6:40)

Could it be that there is something different with the iPhoneX ?

I’m experiencing also issue with network binding and iPhone 5 SE. But since last night I tried to change the timeout value in the thing property from the default 5000 to 10000 and for all the night the phone was detected as present.

Sorry to ask here… But I don’t have a network.thing file… AFAIK it’s stored in the database.
But the lastseen part shows in PaperUI, but is not working in an item file when trying to use it in a rule…

I know you will need more details unless there is a topic already about this (i could not find any)

Hi All, am i right in saying that for this to function, the phones need a static ip or a mapping for its MAC to obtain the same IP?

Correct, I find it easier to set static DHCP leases; it isn’t fun when a phone switch occurs but I find that a small price to pay compared to figuring out how to set static IPs on various phones/tablets/computers/etc.

Tricky… and fairly manual for reasons you’ve mentioned. Its a shame presence works so poorly on IPhones

The best way I have found to manage the wonderful iPhone is to use the network binding, a python bluetooth script that sleeps on the OS for 300 secs, and the iCloud binding using the doco rule to determine the iPhone to be within so many feet(?) of where the friend lives. And then based most of the rules off a group that had those 3 things as members as they were all notorious for flipping off randomly.
Also the iCloud binding spams the events.log in OH for all the GPS updates also had to grep exclude the phone location so I could troubleshoot issues. Thankfully the friend was able to return to an Android phone and things have become far easier to monitor in OH.