Nmap stop working within 2 days

I am using nmap to detect my presence with this code.

device_tracker:
  - platform: nmap_tracker
    hosts:
      - 192.168.0.10
    home_interval: 5    
    consider_home: 180
    scan_options: "--privileged -sP"

Nmap is working well once home assistant is restarted.
But after working about 2 days, nmap stop working.
I mean that namp is still away althought after I returned home and WiFi is connected.
So I have to regularly restart RaspBerry Pi to keep the system working well.

I don’t know where the problem is
Do I have to change scan_option? or Do I have to change my wired router or wireless router?

How do I find out what to do to solve the problem.

This issue is worth a review. Others on Home Assistant are seeing similar problems.

Agree that would seem the correct issue, no response form any core Dev though?

All nmap trackers disfunctional is rather a breaking change…

Ping still works fine, but that is hardly a substitute.

Hope this gets some traction soon, hence this response.

Ha 108.3 Rpi4 Hassio

So is there any news on this? Just updated to 109.6 (from 106.6) and NMAP has just completely stopped working without any log errors. This has broken quite a few automations and such

I’m using nmap for more than a year, never had any issues with it ?

Can not complain about NMAP either, all my printers work switching on/off via it :slight_smile:
Running core in venv, occasionally use betas (as during last 2 Covid stay-home months :frowning: ).
Best, JR

I have the exact same issue.
Completely new installation of hassio (110.5 on a rPi4) with a bunch of hue lights and not much else. I have the same setup working on a rPi 3B (109.6) without issues.

I restart it and it works for a few hours or a day then all the lan devices is set to not_home.

1 Like

I’ve been using NMAP for 3-4 years, no issues. Recently (within the last month or two since upgrading) NMAP has stopped working. Works for an hour or so after a reboot and then stops working.

Currently I’m trying to attempt tweaking the settings by only scanning a specific set of IPs, but this is not ideal .

I have the same issue too, on two different installations, one is at a club and it would be very useful to have some presence history to assist with CV19 tracing if needed.

Same issue here since 113 upgrade

It seems to be working OK on 113.1 for me now - hmmm, that might not be true… I may have just lost track of time, I think I still have the issue…

fairly old topic but since the update to Ubuntu 20.04 LTS nmap keeps failing…

ps showed me a zombie process and all further rescanning did not work.

as discussed here and already mentioned before here: https://github.com/home-assistant/core/issues/33281 killing the nmap process did the trick for me…

I merged everything into a package: nmap_workaround.yaml

thanks and credits to Leosirth