(Advize needed) Presence detection, one person multiple devices

Hi all!

I’ve been trying to figure out presence detection, and in simple terms succeeded using the Netgear Component and Owntracks. I have a side job reviewing smart watches for a Swedish publication however, forcing me (joyously) to use multiple phones depending on the OS and compatability of the Watch.

Best case scenario I would create a drop down menu, letting me select the phone I’m using for the day, however I’m not sure if this is possible? I’d like it if it wasn’t depending on my other devices beeing powered off as it’s easy to forget once in a while.

Any suggestion or example would be appriciated! Even random discussions on the subject or alternative tracking methods :grinning:

I’m really sorry if this is too similar to other requests on Presence detection. I’ve been looking at this one by @arsaboo but I’n not sure it would be the most effective method for me.

My wife and I are using Life360 for presence detection, and so far, it’s been the most reliable. We have nmap running as well, and both phones have the HA app installed, but it seems the most consistent state accuracy we’ve found is in Life360.

The question now is whether or not you can have more than one phone being tracked on a single user account.

Perhaps you could create multiple users in HA and then attach each phone to each user, then just track those users.

Have a look at person component:

There’s probably better ways but with my limited ability I would probably create a person and an input boolean for each phone and their respective device trackers. Then duplicate all presence automations for both phones and include their respective input booleans as a condition. Then you manually select which device you want to track against by turning the input boolean on.

You would also be able to automate the selection process with an automation that changes the status of the input boolean based on whether the deivice is ‘home’ or ‘not_home’. ie the android device is showing as away but the iphone is home so HA will automatically track against the android rather than the iphone.

This probably isn’t the most efficient way and if you have a lot of automations it could be a lot of work but I think it would be a way of doing it.

1 Like

With html5 you can send notification that include button.
Touching button may initiate action

You could use drop down menu but utilize html5 to select.

When device leaves area (home) you can have notification go to all your devices. “Are you using xxx phone today [yes] [no]” and this determines the device to be used.

There may be another notify integration that allows for action buttons

1 Like

I too found Life360 to be better than Owntracks. Unfortunately the app only supports one device per 360-account and I’m not that tempted to create several new fake emails… Thanks for the suggestion though!

But if I use more then one phone for Wi-Fi and GPS-tracking it gets confused. At least during my testing.
That was my initial plan as well.

I’ve been looking at ways to implement input booleans for this. I have a very limited experience creating them though. But I will check it out! thanks :hugs:

I wonder if one input boolean could be set to show presence detection based on each of the phones. The last updated simply Changes the single Boolean?

Edit: I realize that this isn’t a standard issue so I wouldn’t have expected a Quick-fix solution. Thanks for the replies!

does this help - Composite Device Tracker Platform

That actually sounds like it would do the trick.

Thanks! :grinning:

I’ll check it out.

Actually, I don’t think it will. That’s why I didn’t suggest it when I first saw your post. It’s designed to combine multiple device trackers on the same device, not multiple trackers from different devices. In your scenario, any phone left on and at home would still send updates that would be used, such that the composite tracker would constantly switch back and forth to home.

However, I could add a new, optional feature that requires movement of a GPS-based tracker. Currently, when a device tracker updates, it only uses the new data. But it could compare the new data to the old data and only use the new data if it shows movement from the old data. Specifically, it would compare the circle defined by the old location & gps_accuracy to the circle defined by the new location & gps_accuracy, and only use the update if these circles did not overlap.

Let me know if you would be interested in me doing this.

UPDATE: I implemented the feature. It was pretty easy. Looks like it works pretty well. I’ll release it in a new version soon.

UPDATE: Released as version 1.10.0.

1 Like

It shouldn’t get confused if you assign the devices to each person.

1 Like

As I understand it, he has multiple physical devices per pers…, er, human. If he ties the corresponding multiple device_tracker entities to the same person entity, then the person entity will jump back and forth to the different devices that will often physically be in different locations (e.g., he takes one with him but leaves the others at home.)

1 Like

You could probably implement the Bayesian Binary Sensor to determine the validity of the device’s reports. But now we’re getting into math, and … bleh.

1 Like

Wow that was Quick!
I read your post yesterday but didn’t have the time to respond. Thank You. I’ll give it a go as soon as the oppertunity arrives.

Been Reading up on how to install custom Components to Hassio which will be the first step. I’ll get back to You when I’ve tried it but really, thank you for the effort!

@arretx I was looking at the Bayesian Binary Sensor as well but it felt like overthinking it. It possibly would have been necessary though. As @pnbruckner said the Person Component got confused quickly and even decided to stick with a GPS location from a turned-off Galaxy S9 while my iPhone (using Wi-Fi tracking at the moment) was with me at the office. I appreciate you feedback!

Edit: Ok, installation was a breeze! Unfortunately the old iOS app don’t accept my Remote UI link so I’ll have to get the 2.0 beta running before I can see the progress (which I can’t do Before I get home).

1 Like

In my experience Bluetooth is the best tracker. I use it together with Owntracks with a Bayesian Sensor.

Do You use Bluetooth with a Raspberry Pi then? I’ve read mixed results on this.
I did contemplate it however, as both me and my fiancee use smartwatches Bluetooth is Always turned on.

for bluetooth have a look at https://github.com/andrewjfreyer/monitor

However, I found it poor, as bluetooth and 2.4 ghz wifi clash…

I currently have two devices set up (one Galaxy S9 using Owntracks and an iPhone X with the iOS-app). At the time of Writing the iOS app is the last to uppdate, zoning me at my office, while the S9 is staying at home seemingly without triggering the state. So far so good! :hugs:

It’s Amazing how quickly You managed to solve my one person-problem!
I’ll test it further with more devices but I just wanted to say how much I appreciate it.

1 Like