Composite Device Tracker Platform

You’d have to ask someone who knows something about Hassio.

It will work without numba. It will just be faster with it.

BTW, I didn’t try numba with timezonefinderL, but in theory, since it speeds up numpy, which both use, then it should make that faster, too. But, it’s probably fast enough without it.

I was thinking the best of both worlds so to speak. but if person | composite | multiple trackers adds nothing over composite | multiple, then no reason to add an extra layer.

I guess I’m asking your opinion as the author of the composite tracker…

I think in the future “Person” will be used to apply access/restrictions so then the extra layer might become useful.

As far as I can tell, at this point in time, there does not seem to be any advantage to using the person component if you’re already using my custom composite tracker to combine multiple device trackers. And, honestly, right now, if you only have one device tracker, I don’t see a reason to use the person component either. But I don’t think they’re done adding features to the person component, so my opinion may change in the future.

If that’s true, then yes, at that point it might become useful. But are you sure? I would think that user accounts would do that, which are different from person entities.

1 Like

Released 1.10.0

This adds a new, optional feature whereby updates from GPS-based trackers will only be used if movement is detected. Specifically, the update will only be used if the circle defined by the new GPS coordinates & accuracy does not overlap the circle defined by the previous GPS coordinates & accuracy. This can be helpful if using “input” trackers that correspond to physically different devices and one or more of them are, e.g., left at home.

To use the new feature add the following to your config:

require_movement: true
1 Like

I really hope I’m not being stupid here…

Twice today my composite has marked me as away and I can’t work out why.
image

My composite uses three entities all correctly showing me home all the time since yesterday evening.

Life360
image

Google Maps
image

Unifi router
image

@pnbruckner After som more expansive testing I really love the implementation You made possible! Thanks.

Now I just have to learn not to restart my Home Assistant when I’m not home, as that seems to default to the device marked as home, every time. Thats more of a “me error” than any thing else.

Thanks!

Sorry, I was on vacation/holiday and just got back. Do you have debug enabled at least for custom_components.composite.device_tracker? If so, you should see messages in home-assistant.log indicating when the composite tracker updates and from which other tracker it is updating. E.g.:

2019-08-09 08:43:27 DEBUG (SyncWorker_4) [custom_components.composite.device_tracker] Updating device_tracker.phil from device_tracker.google_maps_xxx

If you find the message that corresponds to the same time as when the composite changes to the wrong state, then you’ll know which “input” tracker it got that state from and you can then look more closely at that one.

No problem.

It hasn’t happened again, (or at least I haven’t noticed it!) so I am thinking it was a glitch somewhere.
Thanks for getting back to me.

You’re welcome!

When the integration first starts it will attempt to update the composite tracker based on the current state of the input trackers. The only way (I think) that the tracker will be set to home is if one of the input trackers is home at that point. As I just mentioned above, if you enable debug you can see when the composite is updated and from which input tracker it is updated.

In case it does happen again, make sure debug is enabled for at least the composite device_tracker, and maybe for the others as well. Then if/when it happens save home-assistant.log with the details of what happened. It would be good to know why this occurs.

It happens when I restart Home Assistant and one of the trackers are located at home. If I’m not misreading your statement that’s normal?

In that case it’s only an issue as long as I still set up automations when I’m not at home. Hopefully I won’t be tinkering forever (although it’s way to funny).

Yes, if when HA (re)starts one of the input trackers is home, then it’s completely normal for the composite tracker to also be home. If that input tracker should not be home at that point, then that’s where the problem lies – i.e., in that “input” tracker, not the composite.

So, is that what you’re experiencing after a restart? I.e., one of the input trackers’ state is home when it shouldn’t be? If so, out of curiosity, what type of tracker is it? Any idea why its state is home when it shouldn’t be?

Nope, sorry for the confusion. One of my phones were laying at home still turned on. So my question was originally if this was normal even though the one I was carrying had the latest update. It’s logical though that the require movement tag would reset after a restart.

Thank you for clarifying!

I am trying to move this to HACS but can’t find it.

What address and type should I be using to add the custom repository.

https://github.com/pnbruckner/ha-composite-tracker. It’s an integration.

Added and working. Thanks

1 Like

Tried to set up a new tracker with just a nmap tracker and a Bluetooth tracker.

Based on docs

If only non-GPS-based devices are in use, then the composite device will be ‘home’ if any of the watched devices are ‘home’/‘on’, and will be ‘not_home’ only when all the watched devices are ‘not_home’/‘off’.

I expect this to be home if either of them are home but this does not seem to be the case and composite tracker shows as away most of the time as if either one is away it shows as away.

Am I miss understanding anything.

Your expectations are correct.

What are the source_type attributes for the device_tracker entities the composite tracker is using? Are you seeing any warnings/errors?

You may want to set the logger level to debug for custom_components.composite.