Solved: Leveraging GPS information on smartphone for openHAB internal geo fencing

Hi there,
I raised this question already some time ago but only found two closed and unsolved PRs from 2018 which do not really answer whether this should be considered a valid feature for the app.
As the app should be able to have access to the GPS location information of the smartphone it should be possible to test this against a geofence being defined directly defined in the app.
I am currently using tasker to do this and I am thinking to register to myopenhab.org and let tasker alter my openhab item states … but configuring tasker is very complicated (at least for me) and I was wondering if the geofencing could not be included directly into the openHAB app.

I would be happy if somebody could advise if this is good idea, why it is possibly not a good idea or if there are technical inhibitors that prevent an integration into the app.

Thank you and cheers
Justus

Hi,

there’s an open issue, so it might be implemented at some point: Integrate Geofence-based Presence · Issue #343 · openhab/openhab-android · GitHub

It’s not a bad idea per se. However, in my experience GPS is usually not accurate enough nor timely enough to use for many home automation uses. GPS based mapping apps “cheat” to make it look like the GPS is super accurate. but if you stand still and look at the raw GPS readings you’ll see your location jumping around by tens of meters with each reading.

Thus, your geofences often have to be too large to be useful in many cases.

But you can experiment with the GPSTracker add-on with OwnTracks or GPSLogger. These are easier to set up and get working with OH than Tasker. You’ll still need myopenhab.org though unless you want to set up MQTT, which is going to be a lot more work than Tasker. It will show you whether GPS can even meet your requirements and let you achieve your goals until such time that the Android app supports GPS.

Hi @rlkoshak,
I have my geo fence 1km around my house to give the heating some advantage powering up before some enters the door hence accuracy does not matter so much to me. And this is IMHO a valid way for using the geofence. For leaving the house I am using the Wifi connection of our smartphones to detect if someone is “in the house” (close to the house).
I agree that you have to chose the right method for a given use case an GPS is not appropriate for short distance geofencing :slight_smile:
Nevertheless it is awkward to use a separate app for geofence handling as OwnTracks and GPSLogger also leverage the GPS data from the device.

Hi @mueller-ma,
thank you. Maybe I have not seen this open issue. The ones I found had been closed. I kindly appreciate that this is a recognized “opportunity” and I understand that it is a matter of time an resource what can be implemented into the app and what cannot.

I keep the fingers crossed that it might happen some time soon :slight_smile:

Cheers
Justus

It really isn’t that. It’s a matter of someone volunteering to implement it.

Yes, I agree. And I guess there are more users in the openHAB community than developers (like myself). I am already challenged with pogramming OH rules but I am definitely overwhelmed with anything beyond that. Hence I totally appreciate the efforts of the existing volunteers with programming skills :clap: