Where am I?

Presence detection is a fundamental part of home automation and it was the reason I first got started. I wanted to turn certain lights on after dark when I was out for added security. I also added door sensors and cameras to get alerts based on whether I’m home. 

This is the second part of my look at the Android app for Home Assistant, and this time I’ll be looking at whether it can replace Owntracks, my incumbent location tracker.

Home Assistant has a number of presence detection integrations, and they fall into two categories.

The first is simple presence detection: are you home or not? Typically these use things like bluetooth sensors, or checking routers to determine whether your phone is connected to your home network.

The second category goes beyond presence detection to actual location tracking. GPSLogger and Owntracks fall into this category. Presence detection lets you set up automations such as “turn the light on when I get home” while location tracking gives you the option of automations such as “turn the heating up when I leave work”.

Full location tracking is a tradeoff between battery life and responsiveness. The more frequently the app checks for location, the more accurate it is but at the expense of battery life. I have Owntracks set to “significant changes monitoring mode”. According to the documentation:

“This standard tracking mode is aimed at everyday usage for location tracking in the background. It uses a balanced power location request that gathers a new location fix every 15 minutes. Location data from other apps is reused and published as soon as it arrives but at most every 10 seconds.”

I have location history switched on for the Google account on my phone, so there should be plenty of location data for Owntracks to reuse.

I have a sensor on my front door and it’s set to give me a notification if the door opens when I’m away. Clearly the 15 minute location fix isn’t much use for determining that I’m home before I actually open the door. The default radius of the home zone in Home Assistant is 100m, and you don’t need to be Usain Bolt to cover 100m in less than 15 minutes.

That’s where the second part comes in – reusing location data from other apps. Tracking will be more accurate as long as the background updates from other apps are frequent enough. GPSLogger has a similar option, which it refers to as “passive”.

It works most of the time, although I’ve found that recently it’s not updating as often as I’d like. I tried increasing the home zone radius to 150m to see if that helped it to register being at home sooner, but I still found myself getting alerts because it didn’t think was home by the time I opened the front door. I tried various tuning options within Owntracks, but I reached a point of diminishing returns where the constant effort to make changes was outweighing the benefit I got.

So how does the Home Assistant app compare? I’ve set it to use background location tracking and switched off the “single accurate location” sensor, as I figured that combination was likely to be the equivalent of Owntrack’s significant change modes. It turns out to do a much better job.

On a recent walk, I left the house at 13:08 and returned at 13:34, based on the time between closing the front door when I left and opening it when I returned.

As a very rough estimate, I’d guess it takes me  couple of minutes at most to walk beyond the 150m home zone – it’s not quite a straight line walk. I’d expect the trackers to take a few minutes to register that I’m away, but equally I’d expect them to register me at home before I arrived.

The Home Assistant app thought I left at 13:13 and returned at 13:31.

Owntracks thought I left at 13:21 and returned at 13:37

That’s just one example, but I’ve found that Home Assistant is consistently more accurate. Maybe I’ve been too cautious with the settings in Owntracks. The Home Assistant app certainly uses more battery, although it’s impossible to determine how much of that is due to the reporting of the other sensors I covered in my previous post. That’s not to say it uses a worrying amount of battery – around 1% – 2% per day – and it’s a reasonable trade off for the amount of information that it gives.

Owntracks does have one nice feature that I’ll miss. It has a persistent notification which allows you to send an immediate report of your location and to cycle between monitoring modes. The modes include the significant changes mode that I use but also a manual monitoring mode. The manual mode is handy for temporarily switching off location reporting.

I sometimes used it if I was popping out to the nearest shop and knew I wouldn’t be out for long. There wouldn’t be any point in my automations kicking in for the sake of a such a  short period, especially if  I was using them to control the heating.

I also used it when I was going to be out all day and knew my location wasn’t going to be useful for automations. I could easily switch off location tracking once I’d registered that I was away, which helped to save battery. A similar quick toggle in the Home Assistant app would be useful.

That’s not a compelling enough feature to keep me using Owntracks. I might be able to find the right combination of settings to get it working better for me without killing the battery, but the Home Assistant app just works out of the box.

That’s one dedicated app that I’ve been able to replace with the Home Assistant app, and in the next instalment I’ll be looking at whether Home Assistant can replace Pushover for notifications.

in Mobile

Related Posts

Add a Comment

Your email address will not be published. All comments will be reviewed.

This site uses Akismet to reduce spam. Learn how your comment data is processed.