rmoesbergen / openwrt-ha-device-tracker

OpenWRT device tracker for Home Assistant that actually works
101 stars 18 forks source link

Multiple Access Points - Detected as not_home when roaming #35

Closed xraive closed 1 year ago

xraive commented 1 year ago

First I would like to say great job on this amazing tracker. I wanted to point out thatI have multiple access points and I wanted to know how to deal with a devices changing accdess points. Right now the tracker marks me as not_home when I switch access points whenever I move around the house. Is there anyway that this can be fixed or is this the expected behaviour and I must do something in Home Assistant to account for that?

Thank you in advance.

rmoesbergen commented 1 year ago

Hi @xraive ,

You can do this by setting the following in your config file:

ap_name: If you have only one access point, leave as "". If this runs on multiple access points, give a name here, e.g. "ap1". The mac address of every Wi-Fi device will be prefixed with this name in HA.

In HA you'll get an entity for every device connected to every access point (e.g. ap1, ap2, etc.). You then link the devices with the same mac address, but with a different AP prefix to one 'Person' in HA. This way the Person will remain online while roaming and only go offline when the device is not connected to any AP. Hope this helps.