Device tracker ping weird behavior

Hi,

To track myself, I was using since the beginning of my HomeAssistant enrollement, a mix of a router device tracker and the ios location from the HA app.

Most of the time this work great. But here, I have 2 routers in the house to extend my wifi. My main is a DD-WRT router and the second one is a linksys router configured as an wifi access point.

My config in HA is related to my DDWRT router. So as long as I am connected to this one, I’m considered Home on this tracker. But when i’m in the garden and connected to the second router I’m considered Away.

That’s why I decided to try the ping device_tracker. My iphone has the same static IP on all my routers.

I then added a device_tracker ping but I get a lot of “false event”.

Here’s my configuration :

device_tracker:
  - platform: ping
    interval_seconds: 30
    consider_home: 1800
    hosts:
      iphone_martin_ping: 192.168.12.10
      iphone_sonia_ping: 192.168.12.11    

And here’s my last log :

|128457|device_tracker|device_tracker.iphone_martin_ping|home|2018-06-06 08:52:57.313
|128455|device_tracker|device_tracker.iphone_martin_ping|not_home|2018-06-06 08:52:40.230
|128291|device_tracker|device_tracker.iphone_martin_ping|home|2018-06-06 08:30:10.347
|128286|device_tracker|device_tracker.iphone_martin_ping|not_home|2018-06-06 08:29:50.227
|128105|device_tracker|device_tracker.iphone_martin_ping|home|2018-06-06 08:09:10.077

It’s look like the consider_home of 30 minutes (1800) do not work well.
While I get a “not_home” for my ping tracker, my router tracker tell that i’m still “home”.

Any idea ?
Is the ping device_tracker a reliable one ? should i use nmap rather than this ?

thanks

I was using both the UniFi and nmap (as ping) for device trackers. There was some overlap but it allowed me to track wired devices as well. Up until a few days ago things just went haywire, and I’m not sure what is going on. Maybe something odd with the latest update, as I also noticed it failing to make my 4 google speakers talk sometimes which is odd. So what I had to do to fix it was exclude the wireless devices via IP from the nmap tracker and just let the UniFi tracker do it’s thing even though its a bit slow on the “leaving” thing.