NMAP not finding certain devices

Running HA in docker with NMAP and net-tools installed. platform: nmap_tracker

Most devices are found, but:
The router is only found when other computers are turned off OR when scanning the hole 192.168.1.0/24 instead of the single host 192.168.1.1.
The HA host itself is not found with network ip or loopback ip.
The modem behind the router is not found.
The ISP device behind the modem is not found.

WHILE when entering the console of the HA container via Portainer and running nmap manually on those IP’s it does work. :confused:

Okkkkkk. For the router and HA host ip I dont know, except that documentation already said the latter would be problematic…but the ‘behind router devices’ obviously are more than one hop away thus MAC would never be detected from the HA device.

Now onto finding solutions.

For anybody reading this topic; the obvious solution is to ping those devices.

E.g.

  - platform: ping
    hosts:
      ABC: 192.168.2.1
      XYZ: 192.168.100.1

You can also ping the HA host if you like. (While NMAP runs into problems when trying to detect the HA host.)

The only annoying thing is you have to include the hostname before the ip and there are no dashes in front of entries, which is different from normal formatting. The given hostname will be added to known_devices.yaml if not there yet.