Device tracker - home_interval or consider_home

I’m a little confused about two options to set up in device_tracker.

I’d like to use tracking without gps, because this drains the battery to fast.

so I think I will chose nmap.

in config.yaml:

device_tracker:
  - platform: nmap_tracker
    hosts: 192.168.1.170-176
    home_interval: 30
    consider_home: 180
    exclude:
      - 192.168.1.15

home_interval
(integer)(Optional)The number of minutes Nmap will not scan this device, assuming it is home, in order to preserve the device battery.

consider_home
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 don’t see the difference and why would home_interval drain the devices battery? Does this wake up the device? I thought I just looks if a device gets online under a certain ip address.

1 Like

Interested in this as well. Most importantly figuring out the optimal consider_home time people are using for decent iphone detection.

I commented out home_interval and just used consider_home (10 minutes) and it looks like it works. No false presence detection till now.

isn’t consider_home supposed to be in seconds?

From here:

consider_home accepts various time representations, (e.g., the following all represents 3 minutes: 180 , 0:03 , 0:03:00 )

home_interval is the amount of time nmap will wait between scans
consider_home is the length of time a device is allowed to be offline before HA says that it is away

So let’s say - hypothetically - that you set home_interval to 2 minutes and consider_home to 10 minutes. Nmap will scan every 2 minutes and make a not of the device’s status. If, after 10 minutes in a row, Nmap sees the device as away, then HA updates to show the device as Away. The scan keeps happening every two minutes, but it takes 10 minutes to change HA status.

home_interval probably ought to be scan_interval as the use of the word “home” is confusing.

All that said, I’m still trying to get presence detection to work right with nmap! :slight_smile:

3 Likes