GPSTracker with Life360, OwnTracks and GPSLogger integration

So I assume persistence won’t help either. Too bad there is no way to keep things in sync after a reboot (I am rebooting A TON these days) :wink:

Thanks!

Define Distance channels in the binding. This way every location message will maintain this internal state which is a frequent event. Depending on you mobile app settings of course…

Then how do I turn that into a switch? A rule?

The same way you are doing it now. When you link a switch under the trigger channel you’ll have the Distance channel names in a dropdown or manually use the same region name in the items file you used when defined the distance channel.

BTW the SystemDistance channel can be used as Home…

I think I might have it configured correctly, but anyway you could explain how to do it in the .items config file? Here’s what I have in PaperUI:

Manual configuration gives you a full example for this.

Ok, I defined the thing twice in the manual config and had typos all over the place (getting late). So I deleted the code example, don’t want to confuse anybody.

But I still had to issue the previous state of the switch before it would change to the next state.

Looks like everything is working great. Thanks so much for your help tonight. Been struggling with the MQTT version of this since upgrade to OH2, this is so much better as it actually works! Where can I donate to thank you for your time, or to help the OH project overall?

Hi @gbicskei,

I have been using your binding for quite some time now and I am really happy with it.
It works flawlessly ever since you helped me to set it up.

However, I have a little challenge:
I use this binding for presence detection which works quite well. But sometimes openHAB updates my status to absent when leaving the house (good), but when entering the wubway the accuray would have very high values (1400, etc.) so that openHAB updates my status to present (even though I am far away).

Would there be a way to implement a max for the accuray (if it reached a certain value, it will be ignored) so that the “enter” event would not trigger?

Similar type of question when it comes to accuracy – binding seems to be working well, but per the logs:

  • when I get home i see the home/enter event rather quickly (accuracy ~100 ft)
  • ~30 seconds later I see a home/leave event (accuracy ~7500 ft)
  • ~5 minutes later a home/enter event (accuracy ~100 ft)

Maybe owntrack accuracy is being affected when I pull into my garage? I wonder if there is a way to disable home/leave events if > a certain accuracy?

@Chrishab @Jeff_Smeker
The binding works based on the location reports received from the phones. I suppose when you enter a building where the GPS signal is week the accuracy goes high and your phones send an inaccurate location coordinate. I like your idea to limit the accuracy to prevent such false enter/leave events. Please create an issue and let me know the number. This can be done in no time…

Will do! But, since I have never done this, can you help me with the link (I assume Github)?

https://github.com/openhab/openhab2-addons/issues

https://github.com/openhab/openhab2-addons/issues/4362

Let me know in case you miss anything. Thank you already!

@Chrishab @Jeff_Smeker

Change is merged.
Cheers

1 Like

Thank you @gbicskei

Just updated to build #1461 but cannot see the threshold setting yet.
Guess I was too optimistic and I have to wait for the next build :scream:

Thank you for the fast change - I will test as soon as a new build is available!

I installed the latest snapshot and it worked fine, thanks again.
The only problem I noticed was that the things went “offline” as the threshold configuration was missing - not sure if this should be added to the documentation?

I’ve seen that too. Stopping openHAB, clearing the cache and tmp forlders and restarting resolved the problem. I think this symptom applies only for upgrades as the definition is changed under the existing saved configuration. If a new thing (phone) is added the configuration will have a default threshold value…

I’ve been trying to set this up but I can’t seem to get it working and I think it is because i’m self hosting an instance of myopenhab. If I am on my local network and use my local server URL (ex https://openhab.local/gpstracker/owntracks) it works, and if I open a browser to that URL I get a 400 error as expected but if I try to go through my myopenhab instance (ex https://openhab.mydomain.com/gpstracker/owntracks) owntracks gives me a 403 even though the username and pass are right and in a browser I get a 404 error but all the other UIs come up fine so I know proxying is working. Do I need to upgrade my myopenhab instance to support this or change a config somewhere?

Edit:
I updated to what should be the latest version from github and seem to have the same problem, also the same problem accessing habot it seems. To test, I switched to using myopenhab.org and https://home.myopenhab.org/gpstracker/owntracks and it seems to work so i’m not sure if I pulled the right copy or maybe what’s running in myopenhab isn’t in the main git repo? Since this seems more like an issue with myopenhab i’m going to start a new thread

Edit 2:
I managed to get it going and posted what I needed to do in issue 231 on github here

1 Like