Combining device tracker - router + owntracks

Is it possible to combine mulitple device trackers?

I’ve configured multiple routers since I have a bunch at home, nmap and owntracks. For some reason it doesn’t seem to switch to owntracks ever…

- platform: nmap_tracker
  hosts:
    - 192.168.178.0/24
    
- platform: tplink
  host: 192.168.178.8
  username: 
  password: 
  
- platform: tplink
  host: 192.168.178.4
  username:
  password: 
  
- platform: owntracks
  max_gps_accuracy: 200
  waypoints: True

Owntrack added the following:

patrick_e6653:
  hide_if_away: false
  mac:
  name: patrick
  picture:
  track: true
  vendor:

So I filled in the rest of the info but that seems to break owntrack.
Any clue what I’m doing wrong?

If OwnTrack added to the known_devices.yaml then that means you’re getting signal from owntracks over mqtt for sure. When you say “filled in the rest of the info…[breaks] owntrack” what do you mean exactly?

patrick_e6653:
  hide_if_away: true
  mac: 40:B8:37:B0:xx:xx
  name: patrick
  picture:
  track: true
  vendor: Sony Mobile Communications AB

Like that

Sorry… 2nd part of the question maybe wasn’t so clear.

  • What do you mean by “breaks”?
  • Do you start seeing errors in the owntracks app (or mqtt)?
  • What happens in Home Assistant that makes you think something’s broken?

The popup when I click on home/not home always says source type: router, never another source. If I split them up it does indicate GPS

I’ve set up both router and Owntracks tracking just like you. Things I’ve noticed are that when HA restarts it adds the device to known_devices from the router AND owntracks. In my case the only difference is the ‘Vendor’ tag. If I ignore the device from the router and only use the device from owntracks then presence is detected from both owntracks and the router. I would try using only the owntracks device inside the known_devices and see if things will work for you. ie (delete the router device and only use OT. You’ll need to make changes in other .yamls to only reference the OT device)

mind you, I’ve only had HA for about 6 days so YMMV

You can combine both entries into one device by removing the router entry and adding the mac address from the router entry into the owntracks entry, then both services will update the same known device entry. The issue comes from the fact that then the services will both be overwriting that status, so most probably the router will be updating more frequently than owntracks will and therefore you will only see the status from the router when looking through the UI. This will especially impact you if you have zones set up for other locations that owntracks will update, the router will overwrite your zone location status with just “away”. I don’t think there is anything you can do about it, so I would just use one or the other. Currently I use router tracking for devices for other family members but use owntracks for my own tracking, I just set the router entry for my phone in known_devices.yaml to track: false so that only owntracks updates my device location.

Hope that helps.

5 Likes