Overland-iOS
Overland-iOS copied to clipboard
Support for Home Assistant
I've been thinking about adding native support for Home Assistant so that you can use this app for presence detection there. I'm curious if anyone is interested in this feature.
The way I was thinking about making it work is that the app would no longer log historical location data, but would just push the most recent location to Home Assistant at the defined settings.
Please thumbs up or comment here if you're interested.
Would that sunset the Compass integration or do you see both features working at the same time?
It would definitely be an optional addition! I'm always going to keep using the Compass integration myself, logging my full history.
There is now a mode to store and send only the latest location (#121).
To actually complete this feature, it will require some more work. Overland could pretend to be OwnTracks and send data in the same format, using Home Assistant's existing OwnTracks integration.
I've done this before with a proxy script on my server. Here's the PHP code that translates the Overland format to OwnTracks for Home Assistant:
$owntracks = [
'_type' => 'location',
'lat' => $last['geometry']['coordinates'][1],
'lon' => $last['geometry']['coordinates'][0],
'tst' => strtotime($last['properties']['timestamp']),
'acc' => $last['properties']['horizontal_accuracy'] ?? null,
'batt' => isset($last['properties']['battery_level']) ? round($last['properties']['battery_level']*100) : null,
'topic' => 'owntracks/'.$_GET['user'].'/phone'
];
This has been working fine for a number of years, so it should be simple enough to translate this to the app. We'll probably have to use the "Device ID" field as the "user" in the topic.