NMAP interval

I recently activated the NMAP device tracker component and realized that the default scan interval was way to short so I included the home_interval option to my config file and restarted:

- platform: nmap_tracker
    hosts:
      - 192.168.1.8
      - 192.168.1.21
      - 192.168.1.126
    home_interval: 10

Unfortunately it doesn’t seem to make any difference, it seems the scan runs every 12-13 seconds anyway:

Jun 19 11:59:04 homeassistant hass[15943]: INFO:homeassistant.components.device_tracker.nmap_tracker:nmap scan successful
Jun 19 11:59:17 homeassistant hass[15943]: INFO:homeassistant.components.device_tracker.nmap_tracker:Scanning...
Jun 19 11:59:17 homeassistant hass[15943]: INFO:homeassistant.components.device_tracker.nmap_tracker:nmap scan successful
Jun 19 11:59:29 homeassistant hass[15943]: INFO:homeassistant.components.device_tracker.nmap_tracker:Scanning...
Jun 19 11:59:30 homeassistant hass[15943]: INFO:homeassistant.components.device_tracker.nmap_tracker:nmap scan successful
Jun 19 11:59:41 homeassistant hass[15943]: INFO:homeassistant.components.device_tracker.nmap_tracker:Scanning...
Jun 19 11:59:42 homeassistant hass[15943]: INFO:homeassistant.components.device_tracker.nmap_tracker:nmap scan successful
Jun 19 11:59:54 homeassistant hass[15943]: INFO:homeassistant.components.device_tracker.nmap_tracker:Scanning...
Jun 19 11:59:54 homeassistant hass[15943]: INFO:homeassistant.components.device_tracker.nmap_tracker:nmap scan successful

What am I doing wrong?

From https://home-assistant.io/components/device_tracker/ I think the parameter you need to change is interval_seconds

2 Likes

That is correct if you/he are trying to set how frequently nmap performs the scan. ‘home_interval’ sets the duration that a device is marked “Home” after it is found during a scan.

Usually the 'interval_seconds will be relatively small, say 15-30 seconds and the ‘home_interval’ will be somewhat larger like 120 or 300 seconds.

- platform: nmap_tracker
  hosts:
    - 192.168.1.63-255
    - 192.168.2.1-255
  track_new_devices: yes
  interval_seconds: 15
  consider_home: 180
2 Likes