GPSTracker with Life360, OwnTracks and GPSLogger integration

Ok now i have the new version running with the new channels. But do i need the accuracy channel for the swich?

No, the accuracy channel is not needed for switches. It was just the simplest way to check the version. Try your phone or the Postman app and send location reports:

  • One from outside of the geofence
  • The next one from inside.

The switches are changed only when the border is crossed!

It looks like its working now. Two of three coordinations are working fine.

Thank you very much.

I’m new-born in the OH community, but since some months ago tried to study and construct an own OH system. Thank you a lot for the very helpful post in this place !
Now I have a difficulty with owntracks tracking and hope somebody could help me. I “successfully” made the binding (, items , thing and channels work with my phone, only the location channel missing from the tracker thing. I have removed all parts, cleaned the cache and tmp, rebuild, but no solution.
Has anybody some idea what to do?

you mean the “distance” channel ? You need to manually create it in PaperUI.

No, I have the following channels : Battery Level, Region Trigger, Last Seen, Accuracy, Home Distance and System Distance channels in PaperUI Configuration > Things > XYTracker

Is it really the Location channel missing ?
If so create another tracker thing, that should come with this channel by default.

The location channel uses system.location channel type which was introduced in OH 2.4.0+. Make sure your OH matches this version requirement. You can’t use this binding with OH 2.3.0 release version.

Yes, that’s why not works , my OH version:2.3.0-1

Thank you for your kindly help !

can you help me connect the app to i assume the UserID and pass is for, the url is i do not know what to put in the secret encryption key… i do know with the current info the status keeps trying to connect but errors out with 403

Use . This should work with your credentials.

that seemed to be part of the problem. i also notices i was on 2.3… after upgrading to 2.4 i lost the binding for owntracks… what am i missing now?

I figured it out… thank you for your quick help.

Any additional setup info regarding this? Really struggling getting it to work. Installed binding, setup Owntracks, Thing appeared automatically, just struggling with Geofencing setup. Any tips?

Set it up manually using info two posts down. Looks like the geofences showed up in Paper UI properly. Will test later, but think it’s going to work well.

Damn, thought I had it, but the geofence switched didnt seem to work. My PaperUI config:

and my items file:

Location        GPSTrackerJs_LastLocation_Jeff     "Location"           {channel="gpstracker:tracker:js:lastLocation"}
Number          GPSTrackerJs_BatteryLevel_Jeff     "Battery Level"      {channel="gpstracker:tracker:js:batteryLevel"}
DateTime        GPSTrackerJs_LastReport_Jeff       "Last Seen [%1$tA, %1$tm/%1$td/%1$tY %1$tH:%1$tM]"          {channel="gpstracker:tracker:js:lastReport"}
Number:Length   GPSTrackerJs_GpsAccuracy_Jeff      "Accuracy [%.0f ft]"           {channel="gpstracker:tracker:js:gpsAccuracy"}
Number:Length   GPSTrackerJs_DistanceSystem_Jeff   "Distance from Home [%.1f mi]"    {channel="gpstracker:tracker:js:distanceSystem"}
Switch          GPSTrackerJs_Jeff_Home             "Home"  (gPresentHome, gLocationStatusPersist)    {channel="gpstracker:tracker:js:regionTrigger" [profile="gpstracker:trigger-geofence", regionName="home"]}
Switch          GPSTrackerJs_Jeff_Work             "Work"  (gLocationStatusPersist)    {channel="gpstracker:tracker:js:regionTrigger" [profile="gpstracker:trigger-geofence", regionName="work"]}

I have home and work regions set up in the Owntracks app. They are set up as shared and have a 100m radius. I also see a little timestamp appear by each (in the app) when I cross the region. OH sees all the other data from the app, just not setting the geofence switches.

I see in the documentation that:

<<region_name>>/enter will update the switch state to ON
<<region_name>>/leave will update the switch state to OFF

Do the switches in the items file need to include the /enter or /leave info? I just don’t see that in any of the examples.

Thanks for the help. This is a really nice binding so far.

Using Postman, and enabing Trace logging I see:

2018-12-07 18:53:36.630 [DEBUG] [cker.internal.handler.TrackerHandler] - ConfigHelper transition event received: home
2018-12-07 18:53:36.631 [DEBUG] [cker.internal.handler.TrackerHandler] - Update base channels for tracker js from message: org.openhab.binding.gpstracker.internal.message.TransitionMessage@245ca2d4
2018-12-07 18:53:36.631 [TRACE] [cker.internal.handler.TrackerHandler] - lastLocation -> xxx,xxx
2018-12-07 18:53:36.636 [TRACE] [cker.internal.handler.TrackerHandler] - lastReport -> 2018-06-02T15:16:13.000-0400
2018-12-07 18:53:36.639 [TRACE] [cker.internal.handler.TrackerHandler] - gpsAccuracy -> 10.0
2018-12-07 18:53:36.640 [DEBUG] [cker.internal.handler.TrackerHandler] - Updating distance channels tracker js
2018-12-07 18:53:36.641 [TRACE] [cker.internal.handler.TrackerHandler] - Region System center distance from tracker location 48.5193629,17.2280611 is 7238113.940608322m

So it sure looks like the message is coming thru, just not changing the state of the switch item!

Edit edit:
Using OH 2.4.0.M7

No. In case you defined the regions in the app enter/leave events should be received with a transition message.
My suggestion is to turn on the debug for this binding and check if transition messages arrive when you cross the region boundary. You can use Postman if you are tired to take a walk. Make sure the region names are entered case sensitive.

1 Like

Thanks, please see my edited post above for additional info. Thanks!

Send one more message with event:leave and check the logs again. The binding needs the previous state value as the switch is changed only if the state is changed. This means that after restart only the second transition message will affect the switch…

No kidding. Sent a leave, then an enter and it’s working now (at least from Postman). I had manually set the switches to No prior to my testing. I had my Work switch set to On prior to leaving work, and hoped it would turn off but it didn’t.

What’s this all about?

Edit: Got overly excited, and I should of finished reading you post. Understood! Thanks!

Changing the switches (the items) manually doesn’t affect the binding’s internal state. It is changed only by a transition message…