GPSTracker with Life360, OwnTracks and GPSLogger integration

Did you update to #1380 and installed the jar instead from PaperUI?
I would like to check as well.

I have done the following now:

  1. Removed the thing (my phone)
  2. Uninstalled the binding via PaperUI
  3. Updated openHAB to#1380
  4. Downloaded the latest jar from https://openhab.jfrog.io/openhab/libs-pullrequest-local/org/openhab/binding/org.openhab.binding.gpstracker/2.4.0-SNAPSHOT/
  5. Let the binding discover the phone and did the setup from scratch (even deleted and re-created my items)
  6. Played with Postman > no luck

I guess this confirms Markus findings.
how/where can I download jar version 2.4.0.201810050950 to test?

can you send the logs from the binding start?

Something is wrong here. I downloaded the jar as well (till now I was playing with the locally built jar) and it doesn’t work either. Can you try my local build? Can I share it somehow with you?

2018-10-05 21:45:10.562 [DEBUG] [org.openhab.binding.gpstracker      ] - BundleEvent STOPPING - org.openhab.binding.gpstracker
2018-10-05 21:45:10.617 [DEBUG] [org.openhab.binding.gpstracker      ] - ServiceEvent UNREGISTERING - {org.eclipse.smarthome.core.thing.profiles.ProfileFactory, org.eclipse.smarthome.core.thing.profiles.ProfileAdvisor, org.eclipse.smarthome.core.thing.profiles.ProfileTypeProvider}={service.id=659, service.bundleid=274, service.scope=bundle, component.name=org.openhab.binding.gpstracker.internal.profile.GPSTrackerProfileFactory, component.id=465} - org.openhab.binding.gpstracker
2018-10-05 21:45:10.671 [DEBUG] [org.openhab.binding.gpstracker      ] - ServiceEvent UNREGISTERING - {org.eclipse.smarthome.core.thing.binding.ThingHandlerFactory, org.eclipse.smarthome.config.core.ConfigOptionProvider}={service.id=661, service.bundleid=274, service.scope=bundle, component.name=org.openhab.binding.gpstracker.internal.GPSTrackerHandlerFactory, component.id=466} - org.openhab.binding.gpstracker
==> /var/log/openhab2/events.log <==
2018-10-05 21:45:10.680 [hingStatusInfoChangedEvent] - 'gpstracker:tracker:c1' changed from ONLINE to UNINITIALIZED
2018-10-05 21:45:10.704 [hingStatusInfoChangedEvent] - 'gpstracker:tracker:c1' changed from UNINITIALIZED to UNINITIALIZED (HANDLER_MISSING_ERROR)
==> /var/log/openhab2/openhab.log <==
2018-10-05 21:45:10.710 [DEBUG] [er.internal.GPSTrackerHandlerFactory] - Deactivating GPSTracker Binding
2018-10-05 21:45:10.722 [DEBUG] [er.internal.GPSTrackerHandlerFactory] - GPSTracker callback servlet stopped on /gpstracker/owntracks
2018-10-05 21:45:10.728 [DEBUG] [er.internal.GPSTrackerHandlerFactory] - GPSTracker callback servlet stopped on /gpstracker/gpslogger
2018-10-05 21:45:10.760 [DEBUG] [org.openhab.binding.gpstracker      ] - ServiceEvent UNREGISTERING - {javax.servlet.ServletContext}={osgi.web.version=2.4.0.201810051108, osgi.web.contextpath=/, service.id=662, osgi.web.symbolicname=org.openhab.binding.gpstracker, service.bundleid=274, service.scope=singleton, osgi.web.contextname=default} - org.openhab.binding.gpstracker
2018-10-05 21:45:10.800 [DEBUG] [org.openhab.binding.gpstracker      ] - ServiceEvent UNREGISTERING - {org.eclipse.smarthome.config.discovery.DiscoveryService, org.openhab.binding.gpstracker.internal.discovery.TrackerDiscoveryService}={service.id=660, service.bundleid=274, service.scope=bundle, component.name=org.openhab.binding.gpstracker.internal.discovery.TrackerDiscoveryService, component.id=467} - org.openhab.binding.gpstracker
2018-10-05 21:45:10.816 [DEBUG] [org.openhab.binding.gpstracker      ] - BundleEvent STOPPED - org.openhab.binding.gpstracker
2018-10-05 21:45:10.822 [DEBUG] [org.openhab.binding.gpstracker      ] - BundleEvent STARTING - org.openhab.binding.gpstracker
2018-10-05 21:45:10.902 [DEBUG] [org.openhab.binding.gpstracker      ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.core.thing.profiles.ProfileFactory, org.eclipse.smarthome.core.thing.profiles.ProfileAdvisor, org.eclipse.smarthome.core.thing.profiles.ProfileTypeProvider}={service.id=667, service.bundleid=274, service.scope=bundle, component.name=org.openhab.binding.gpstracker.internal.profile.GPSTrackerProfileFactory, component.id=471} - org.openhab.binding.gpstracker
2018-10-05 21:45:10.989 [DEBUG] [er.internal.GPSTrackerHandlerFactory] - Initializing callback servlets
2018-10-05 21:45:11.050 [DEBUG] [org.openhab.binding.gpstracker      ] - ServiceEvent REGISTERED - {javax.servlet.ServletContext}={osgi.web.version=2.4.0.201810051108, osgi.web.contextpath=/, service.id=670, osgi.web.symbolicname=org.openhab.binding.gpstracker, service.bundleid=274, service.scope=singleton, osgi.web.contextname=default} - org.openhab.binding.gpstracker
2018-10-05 21:45:11.058 [DEBUG] [er.internal.GPSTrackerHandlerFactory] - Started GPSTracker Callback servlet on /gpstracker/owntracks
2018-10-05 21:45:11.067 [DEBUG] [er.internal.GPSTrackerHandlerFactory] - Started GPSTracker Callback servlet on /gpstracker/gpslogger
2018-10-05 21:45:11.076 [DEBUG] [org.openhab.binding.gpstracker      ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.core.thing.binding.ThingHandlerFactory, org.eclipse.smarthome.config.core.ConfigOptionProvider}={service.id=669, service.bundleid=274, service.scope=bundle, component.name=org.openhab.binding.gpstracker.internal.GPSTrackerHandlerFactory, component.id=472} - org.openhab.binding.gpstracker
2018-10-05 21:45:11.081 [DEBUG] [org.openhab.binding.gpstracker      ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.config.discovery.DiscoveryService, org.openhab.binding.gpstracker.internal.discovery.TrackerDiscoveryService}={service.id=668, service.bundleid=274, service.scope=bundle, component.name=org.openhab.binding.gpstracker.internal.discovery.TrackerDiscoveryService, component.id=473} - org.openhab.binding.gpstracker
2018-10-05 21:45:11.087 [DEBUG] [org.openhab.binding.gpstracker      ] - BundleEvent STARTED - org.openhab.binding.gpstracker
2018-10-05 21:45:11.125 [DEBUG] [cker.internal.handler.TrackerHandler] - Tracker handler created: c1
2018-10-05 21:45:11.186 [TRACE] [cker.internal.handler.TrackerHandler] - Existing distance channel for system. No change.
==> /var/log/openhab2/events.log <==
2018-10-05 21:45:11.187 [hingStatusInfoChangedEvent] - 'gpstracker:tracker:c1' changed from UNINITIALIZED (HANDLER_MISSING_ERROR) to INITIALIZING
2018-10-05 21:45:11.192 [hingStatusInfoChangedEvent] - 'gpstracker:tracker:c1' changed from INITIALIZING to ONLINE

Try this pls:
https://drive.google.com/file/d/1yW8NtdbVPnLwiC2hXIUy2xawlUsOZvd9/view?usp=sharing

==> /var/log/openhab2/openhab.log <==
2018-10-05 21:57:08.830 [DEBUG] [org.openhab.binding.gpstracker      ] - BundleEvent STOPPING - org.openhab.binding.gpstracker
2018-10-05 21:57:08.916 [DEBUG] [org.openhab.binding.gpstracker      ] - ServiceEvent UNREGISTERING - {org.eclipse.smarthome.core.thing.binding.ThingHandlerFactory, org.eclipse.smarthome.config.core.ConfigOptionProvider}={service.id=672, service.bundleid=274, service.scope=bundle, component.name=org.openhab.binding.gpstracker.internal.GPSTrackerHandlerFactory, component.id=475} - org.openhab.binding.gpstracker
==> /var/log/openhab2/events.log <==
2018-10-05 21:57:08.925 [hingStatusInfoChangedEvent] - 'gpstracker:tracker:c1' changed from ONLINE to UNINITIALIZED
==> /var/log/openhab2/openhab.log <==
2018-10-05 21:57:08.937 [DEBUG] [er.internal.GPSTrackerHandlerFactory] - Deactivating GPSTracker Binding
==> /var/log/openhab2/events.log <==
2018-10-05 21:57:08.944 [hingStatusInfoChangedEvent] - 'gpstracker:tracker:c1' changed from UNINITIALIZED to UNINITIALIZED (HANDLER_MISSING_ERROR)
==> /var/log/openhab2/openhab.log <==
2018-10-05 21:57:08.951 [DEBUG] [er.internal.GPSTrackerHandlerFactory] - GPSTracker callback servlet stopped on /gpstracker/owntracks
2018-10-05 21:57:08.957 [DEBUG] [er.internal.GPSTrackerHandlerFactory] - GPSTracker callback servlet stopped on /gpstracker/gpslogger
2018-10-05 21:57:08.995 [DEBUG] [org.openhab.binding.gpstracker      ] - ServiceEvent UNREGISTERING - {javax.servlet.ServletContext}={osgi.web.version=2.4.0.201810051834, osgi.web.contextpath=/, service.id=673, osgi.web.symbolicname=org.openhab.binding.gpstracker, service.bundleid=274, service.scope=singleton, osgi.web.contextname=default} - org.openhab.binding.gpstracker
2018-10-05 21:57:09.008 [DEBUG] [org.openhab.binding.gpstracker      ] - ServiceEvent UNREGISTERING - {org.eclipse.smarthome.config.discovery.DiscoveryService, org.openhab.binding.gpstracker.internal.discovery.TrackerDiscoveryService}={service.id=671, service.bundleid=274, service.scope=bundle, component.name=org.openhab.binding.gpstracker.internal.discovery.TrackerDiscoveryService, component.id=474} - org.openhab.binding.gpstracker
2018-10-05 21:57:09.039 [DEBUG] [org.openhab.binding.gpstracker      ] - ServiceEvent UNREGISTERING - {org.eclipse.smarthome.core.thing.profiles.ProfileFactory, org.eclipse.smarthome.core.thing.profiles.ProfileAdvisor, org.eclipse.smarthome.core.thing.profiles.ProfileTypeProvider}={service.id=674, service.bundleid=274, service.scope=bundle, component.name=org.openhab.binding.gpstracker.internal.profile.GPSTrackerProfileFactory, component.id=476} - org.openhab.binding.gpstracker
2018-10-05 21:57:09.060 [DEBUG] [org.openhab.binding.gpstracker      ] - BundleEvent STOPPED - org.openhab.binding.gpstracker
2018-10-05 21:57:09.065 [DEBUG] [org.openhab.binding.gpstracker      ] - BundleEvent STARTING - org.openhab.binding.gpstracker
2018-10-05 21:57:09.098 [DEBUG] [org.openhab.binding.gpstracker      ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.config.discovery.DiscoveryService, org.openhab.binding.gpstracker.internal.discovery.TrackerDiscoveryService}={service.id=675, service.bundleid=274, service.scope=bundle, component.name=org.openhab.binding.gpstracker.internal.discovery.TrackerDiscoveryService, component.id=477} - org.openhab.binding.gpstracker
2018-10-05 21:57:09.128 [DEBUG] [er.internal.GPSTrackerHandlerFactory] - Initializing callback servlets
2018-10-05 21:57:09.166 [DEBUG] [org.openhab.binding.gpstracker      ] - ServiceEvent REGISTERED - {javax.servlet.ServletContext}={osgi.web.version=2.4.0.201810051834, osgi.web.contextpath=/, service.id=677, osgi.web.symbolicname=org.openhab.binding.gpstracker, service.bundleid=274, service.scope=singleton, osgi.web.contextname=default} - org.openhab.binding.gpstracker
2018-10-05 21:57:09.172 [DEBUG] [er.internal.GPSTrackerHandlerFactory] - Started GPSTracker Callback servlet on /gpstracker/owntracks
2018-10-05 21:57:09.182 [DEBUG] [er.internal.GPSTrackerHandlerFactory] - Started GPSTracker Callback servlet on /gpstracker/gpslogger
2018-10-05 21:57:09.192 [DEBUG] [org.openhab.binding.gpstracker      ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.core.thing.binding.ThingHandlerFactory, org.eclipse.smarthome.config.core.ConfigOptionProvider}={service.id=676, service.bundleid=274, service.scope=bundle, component.name=org.openhab.binding.gpstracker.internal.GPSTrackerHandlerFactory, component.id=478} - org.openhab.binding.gpstracker
2018-10-05 21:57:09.208 [DEBUG] [org.openhab.binding.gpstracker      ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.core.thing.profiles.ProfileFactory, org.eclipse.smarthome.core.thing.profiles.ProfileAdvisor, org.eclipse.smarthome.core.thing.profiles.ProfileTypeProvider}={service.id=678, service.bundleid=274, service.scope=bundle, component.name=org.openhab.binding.gpstracker.internal.profile.GPSTrackerProfileFactory, component.id=479} - org.openhab.binding.gpstracker
2018-10-05 21:57:09.217 [DEBUG] [org.openhab.binding.gpstracker      ] - BundleEvent STARTED - org.openhab.binding.gpstracker
2018-10-05 21:57:09.246 [DEBUG] [cker.internal.handler.TrackerHandler] - Tracker handler created: c1
2018-10-05 21:57:09.273 [TRACE] [cker.internal.handler.TrackerHandler] - Existing distance channel for system. No change.
==> /var/log/openhab2/events.log <==
2018-10-05 21:57:09.274 [hingStatusInfoChangedEvent] - 'gpstracker:tracker:c1' changed from UNINITIALIZED (HANDLER_MISSING_ERROR) to INITIALIZING
2018-10-05 21:57:09.282 [hingStatusInfoChangedEvent] - 'gpstracker:tracker:c1' changed from INITIALIZING to ONLINE

It works now! Yay!
The switch is changing states when sending updates with the phone and Postman

Which version is this? My local from Google Drive?

Yes, sorry - I should have mentioned this.
Downloaded the jar, restarted the binding and it works

Switched the log back to INFO and I now see the expected events in the log:

2018-10-05 22:05:04.206 [vent.ChannelTriggeredEvent] - gpstracker:tracker:c1:regionTrigger triggered System/leave

The big question now is why the centrally built version different and how I can force the rebuild. I don’t have any changes in the local repo…

I wish I could help with that - maybe @mstormi has an idea?

Force pushed everything again. It’s building now. Hope this time it will be better…

Happy to test once it’s done.
Do you plan to add an Accuracy-channel anytime soon? This would be great for visualization in Habpanel.

@Chrishab @mstormi
Thank you both for testing and feedbacks! I hope you’ll find this binding useful.

1 Like

There is no really a plan. It can be extended in no time if you think it is useful. I’m not using Habpanel - how would it help the visualization?

Thanks for providing this. I’ve been using the old mqttitude binding to run some presence related functions in my house but got annoyed by owntracks’ lack of reliability (using MQTT) so I’m happy to make use of yours.

I’m not sure though about if the compile in latest (#1381) works. Still using that one you temporarily provided here. And your PR is still open. Will wait with testing for #1382 as that’s to include another set of ESH fixes.
#6295 also isn’t fixed yet.

For habpanel there are several ways to show a map with markers on it (locations).
With Accuracy the map would show a circle showing how accurate the measurement was.
See https://community.openhab.org/t/custom-widget-map/39225/4 for an example.

1 Like

@Chrishab
I see… Give me me few minutes…

1 Like

Yes, actually very useful! Thank you for this. I especially like the fact that no MQTT server is needed.
Like @mstormi I will wait for the corrected snapshot binding though.