I have trouble detecting my phone (Moto G5) with the network binding for a presence rule. Detection works when I am using the phone, but fails when the phone is sleeping for a few minutes. When waking the device up it is detected immediately (and not after the defined ping interval time, might be important).
I read that there are also problems with iPhones.
Is there an easy solution to this or should I use a different method to detect presence?
I am having similar trouble with a Nexus 6 too, and iphones are even more stubborn as they go into a deep sleep very frequently.
There are quite a few threads on this forum (search for presence detection) and most people seem to only get a reasonable success rate if more than one presence detection mechanism is employed (network, owntracks, bluetooth, icloud, etc etc)
But in any case make sure you read the threads on using icloud, hping3 and arp for iphone detection and owntracks etc for all. One of them may work also for your phone.
Thanks for your answer. All of the solutions seem to require some work, right? So it is not possible to just install a binding and set it up or change something in the network binding?
If that is the case, I will look into a different presence detection for now, as I don’t want to have much overload just because of that.
All require work, correct. Reliable presence detection appears to be one of the most challenging things in home automation, at least if it is desired to be setup to deal with all edge cases. Again, I can only recommend to read the forum, lots has been written, some good ideas have been presented. As indicated most have put several services together to make it work (cell phone presence detection, motion detectors, etc). From what I read, this can work like a charm, but you will need to invest considerable (at the very least time) to make it work. Good luck.
The network binding will soon get the ability to use arp ping (works for android all the time) and does the same thing as hping3 (udp port knock + arp ping). So hopefully the binding can be of more use in the future.
I know this is old, this is now resolved with Android Pie update. Previously my device fall asleep it would go offline in openhab, since PIE update my device shows online whenever I’m within my router regardless of sleep or not.
However, by using arping it should have been detected also with previous Android versions, at least for me that worked. So actually this has been resolved long ago already.
correct on both my wife’s note 8 and my note 9, after device would go to sleep ARP no longer worked. However with latest PIE update, we’re both functioning.
But, since I see recent activty here I thought I’d ask…
When going from OH 1.x to 2.x I now have network binding 2.5.
Before I had set up a ting for my phone and it was using ping. Never worked when the phone when to sleep.
I’m guessing update to 2.5 in the binding didn’t change it to using arping…but, I con’t figure out if I can change the existing thing from ping to arping.
As I noted in the other thread, arping from the comandline does find the phone in sleep mode, but, not 100% of the times it is arped. For example:
Although I did not understand your request completely it seems that you recently changed to openHAB 2 and have now problems setting up arping correctly for the network binding?
Additionally you seem to have questions about the detection with arping since somtimes the ping from terminal results in Timeouts?
So regarding the setup I would like to forward you to the openHAB docs where you will hopefully find enough information to setup arping correctly for your thing. If not, please create a seperate thread.
I cannot help regarding the Timeouts, just that it might not be relevant, so just test after you set up your thing properly.