Phone detection - new approach

Hi community,
There are a many threads about phone detection using ping or sniffe other network packages, but all off them seems to have problems.
So I have a new idea. Would it be possible to integrate the detection in the iOS and Android app as an background service? A binding could open a port, and if a new setting in the app is turned on and the app detect the home network (maybe the name must be configured) the app tries to connect to the port. The binding only have to create a thing with one channel for each connected phone.
I have no experience with app development and so I don’t know what a app can do in the background, because the are normally suspended if the app goes in the background. But I read that there is a file download service, may this helps.
I’am interested in a discussion of this idea and may be there are any app developers which could help to develop this approach.


Or integrate an MQqt server in openHAB and use OwnTracks like the “Competion” named iobroker is doing it.

Adding an MQTT server does not eliminate the need to install another app on your phone or adding new functionality to the official apps. And if you are installing another app on your phone anyway that app can (and probably should) be using the native OH REST API.

I don’t really see the need for a separate binding for this. All one would have to do, from a technical perspective, is tell the app to update a specific Item when it can reach OH through the local address.

However, neither this nor the original approach would not work in the case of people who only interact with their OH through a public interface or those who interact with their OH through a VPN.

Finally, as a community, we find it best to post just one thread for a discussion like this rather than the three separate threads that have been posted.

The Rotini app has an option to report your phones GPS at regular intervals without the need for MQTT. I’m sure something similar could be done in the official apps?

I’ve setup IFTTT location and OpenHAB2 updates and found it to be flawless on iOS. It works perfectly, it is simple to maintain and doesn’t require a lot of extra steps.

1 Like

[quote=“rlkoshak, post:3, topic:29053”]
Finally, as a community, we find it best to post just one thread for a discussion like this rather than the three separate threads that have been posted.[/quote]
Sorry, for this, may it was not a good idea, but the three threads covers different topics, this one is the main thread for finding a solution for implementing a new feature in OH, in the other threads, I’am searching developer support for iOS and android, I thought, it would be better to to this in the correct area for this forum.

I agree that it makes no sense to have a different app. Maybe only while the development phase, but than it must be integrated in the official app. Is it possible for a phone app to detect the which wlan connection is online? Than would it be possible to use this solution also for vpn users. I think detecting the wlan would be better, than using the GPS.

I’am a software developer, and I’am consider to develop the phone this phone detection feature, but first I want find good and simple technical way to do this.


It certainly is on Android. Don’t know about iPhones.

Honestly, this problem has been around since the beginning. I’m convinced there is no simple presence detection approach that works well for all users. The iPhone is really the only hard part. The Network binding works great for Android devices.

There was some work started on an iPhone presence detection binding awhile back using some could api Apple provides but I don’t think it ever went anywhere. I don’t know if the developers lost interest it if they ran into technical difficulties. That might be worth looking into.

Even though it really isn’t needed for Android, if something is added to the phone apps it should be added to both for a consultant behavior.

One thing that I can see being a problem is making it work fast enough. It can’t sit there in the background polling one a fraction of a second or your phone battery will die. But if it’s polls one every half a minute it may not be responsive enough to be useful.

With the IFTTT service down I am asking myself how guys from Homeassitant managed to implement home arrival/leave straight from the ios app using gps in the same way as ifttt.
Will it be impossible for us to do it?
I’m sure many will appreciate this, unfortunately I’m not good enough to contribute

I believe they use the iCloud API. And for the record, there has been an iCloud bind now for nearly two years.