Location Tracking
Track device location
Last updated
Track device location
Last updated
Location Tracking will send the device's coordinates (lat/lng) to your Hub. Similar to Apple's "Find My" service or Life360 -- except no 3rd party server involved. The location is only sent to your Hubitat Hub.
NOTE: This is an advanced feature and for many the Presence Tracking (Geofence) feature is all you need.
The major difference is Presence Tracking is only interested if you're inside or outside a predefined area (geofence). It will only notify the Hub when that happens.
Location Tracking passes the actual device location (lat/lng) continuously to the Hub -- allowing the Hub to do more with that location.
Install and configure the "My Location" device driver on your Hub
In HD+, open More Settings -> Location Tracking
Make sure HD+ has all of the permissions it needs.. including Location (allow all the time), Physical activity and unrestricted battery
Select your "My Location" device to notify
Optional - add presence support
permissions needed:
Install the "My Location" device driver on your Hub
@wecoyote5 wrote a driver which you can install either from Hubitat Package Manager (it's not there yet but should be soon) or manually from here
Create a new virtual device with "My Location" device type.. give it any name
Optional - In the driver preferences, set the presence zone name to "home". It can be set to anything but you'll need to use the same name in HD+
Add the new device to MakerAPI so HD+ can see it
Create a new location under Presence Tracking and assign it a name
Use the same name as you set in the My Location driver (above)
For now HD+ is relying 100% on Android's Physical activity API (side-note: I'm not even sure this is available on all versions of Android). It'll notify HD+ when the user is doing some kind of activity like driving/walking/etc and HD+ will fetch & send the current location to the Hub.
I tested on a Pixel 7 and was a little surprised to see fairly frequent updates being made. It's entirely possible this won't work as well on a Samsung phone but I will keep testing and can adjust the logic from there.
Because I'm relying on the Physical activity API the battery drain should be low. I'll try to add more options which can increase the frequency of updates -- but at the cost of battery life. Either way though, this feature is still a work in progress.
If you want to stop HD+ from doing Location Tracking, you just need to remove the connected Device
long-press on Device and select YES to the prompt