Unreliable presence detection?

Hi guys, I just noticed something wrong with my presence detection setup.

Both my wife and me have iPhones that I use to track the presence with the Netgear component and the iCloud component.

I use two methods because the iPhones sometimes disconnect from the wifi, probably for battery reasons, so I wanted a backup method that filled the gap.

My wife was out of home and her status changed to “home” few times for several minutes, I looked at the map and her “icon” wasn’t on the map, so it meant HA thought she was home. If I looked at the GPS coordinates, they were correct (out of home).

What could it be?

You should post your yaml. A blanket question like this isn’t going to get anyone to respond.

Thanks, I haven’t posted it because the config is super basic.

device_tracker:
  - platform: netgear
    host: 10.0.0.1
    username: admin
    password: xxxxxxxxxx
    new_device_defaults:
      track_new_devices: False
  - platform: icloud
    username: xxxxxxxxxx
    password: !secret icloud_f_password
    account_name: fez
  - platform: icloud
    username: xxxxxxxxxxxx
    password: !secret icloud_c_password

Yes but in your original post you imply that you are using 2 device trackers together to determine whether someone is home or not.

Yes that’s what I’m doing, the config shows them, there’s the netgear tracker, and the two icloud trackers one for each iphone.

So how are you determining which one to use for your automations?

It did everything by itself, it automatically recognized the same MAC address (I guess) and joined the two trackers so that I see a single “device” in the dashboard.

I haven’t configured anything else.

here’s a screenshot of how the “mixed” device looks like

That must be a new feature, in the past device configurations complained if I had 2 presence devices with the same mac. I would remove one of the 2 trackers and watch it’s behavior. Most likely, your netgear thinks you are home and it’s overriding the location of the icloud. When this happens again, look at the state of the device inside netgear and the gps location (which comes from the icloud).

Yeah, looking at the image, its getting it’s info from the router

Right now it’s getting the info from the router because I’m at home. From my understanding, Netgear takes precedence because it’s less battery intensive (actually, not battery intensive at all).

I guess you are right, but I wonder how can it gets the information wrong, since it just checks for the device to be connected to the NAT…

you may just want to use icloud with this option in your device tracker:

consider_home [uses platform setting] Seconds to wait till marking someone as not home after not being seen. Allows you to override the global consider_home setting from the platform configuration on a per device level.

If I get rid of the netgear tracker the icloud one will use way more battery :frowning:

I’m reading on this forum that the netgear tracker seems quite bugged… I’m now trying to configure the nmap tracker to see if it gets better.

@FezVrasta
Regarditg the “wife not home but presence show her home”

You would need to know her location from home at that time.
icloud may not have had precise gps at that moment and reported coordinate that was within your “home zone”.

Nope she was way too far and the GPS coordinates were precise. It was for sure a problem with the Netgear component.

I use to do it that way but now I separate them and put them into a group. I think it’s because there is a default number for this

consider_home
180 Seconds to wait till marking someone as not home after not being seen. This parameter is most useful for households with Apple iOS devices that go into sleep mode while still at home to conserve battery life. iPhones will occasionally drop off the network and then re-appear. consider_home helps prevent false alarms in presence detection when using IP scanners such as Nmap. consider_home accepts various time
representations, (E.g. the following all represents 3 minutes: 180, 0:03, 0:03:00)

I use the iOS app location and nmap on my home network combined together to work out home or not. Seems to work reasonably well, though I wish it would work out that we’d left a bit quicker. Seems to take 15mins or so.

Just a thought, your wife wasn’t accessing home assistant via the ios app at the time was she?
Seeing the phone request from outside the network in the Netgear modem shouldn’t change the tracker status but if it’s as buggy as you say…

Nope she doesn’t have the iOS app.