[SOLVED] Presence with Android after using Iphone

Agreed. I also am inclined to submit a PR to setup arping by default on openhabian with setuid root.

I confirm that this night presence has been 11 hours ON without any issue, so the arping worked fine. Then I had to go out, so went OFF, but I did not get any false OFF.

Regards.
Thanks for the support.

1 Like

Hi, I was using the Network binding with an IPhone X, on latest OS and Android (8.1) for quite some time now. But resently it started that I get problems when any of the phones got disconnected from the WiFi.
For my Android phone for example it takes sometimes up to 30 minutes after disconnecting
from wifi to change the status.
The settings im using are:
Retries 10
Refresh interval 60000
Timeout 5000.
Any idea what could cause this huge delay?

@diyha did your binding updates get PR’d and merged? I don’t see them in the official repo that I can tell?

Not yet. I didn’t get chance to collaborate with maintainer, I was busy. I have posted links to code and explanation is here on thread. We should get this mac address based arping in. It did help my phone.

Is this present in openHAB 2.5.0 Build # 1684?

I followed all the leads in this topic (as far as they seemed to apply to my current OH version on a Synology Disk Station) but they did not seem to make much difference. My Android phone, the wife’s iPhone and her Apple Watch, they all dropped out at irregular intervals before being spotted again while all devices were home. I experimented with the network thing settings for a day or two and now it looks stable: both my Android phone and the wife’s iPhone have been ON for over 24 hours without once dropping out. This is encouraging. My settings are:

  • Refresh interval: 5000
  • Retry: 180
  • Timeout: 5000

This may seem overly aggressive to some but I do not think this is a problem. Pings are cheap. It pings the phone every 5 seconds and if it does not get an answer it will do this for 15 minutes before concluding the phone is not there.
Apparently within a 15 minutes time frame the phone’s network stack will always wake up shortly to do something. I guess this may depend on the kind of apps that are installed on the phone, this appears to work for me but your milage may vary. My phone is running Android 7.1.2 by the way.

Getting back home should typically be noted pretty quickly, although it could take a while if the phone is in a dozing period at the time I get home.

I think the 15 minute delay is actually quite nice. If I have my phone in my pocket and walk up to the snail-mailbox or take the garbage container to the street, I may lose wifi for a couple of minutes but I would not consider myself not home.

Maybe this will help someone.

As much as I like the idea of using one’s Ubiquity Wifi network and the Ubiquity binding (I read this somewhere), I do not have a convenient way to keep a UniFi controller running permanently in my network. I do have Ubiquity access points and a Windows server that is always on but the UniFi controller is a desktop application and there is not always someone logged on to the server, let alone always the same user. So this does not seem to work for me.