rocket4321/nmap_tracker

Use this as replacement for 2021.9 nmap tracker UI?

Closed this issue · 3 comments

In HA 2021.9 devs made the stupid choice of only allowing to configure nmap_tracker via the user interface which is a horribly slow process. I found this project and wonder if this can be used to revert back to earlier behaviours. I downloaded and renamed this project to nmap_tracker_original to try and start it as custom_component. It does not seem to work... The device_tracker entries presence are not being updated.

Is this possible?

It seems possible. I kept the name at nmap_tracker (as is the purpose of this project) and indeed removed known_devices.yaml, then it started working. After the component is running the content from the old file can be put in the new file.

My old HA config was:

  - platform: nmap_tracker
    interval_seconds: 120
    consider_home: 180
    home_interval: 5
    scan_options: "-sn"
    hosts:
    - 192.168.1.0/24

Plus some excludes.
I thought this means: Every 120 seconds a new scan. Mark devices as away after 180 seconds, or is it 5 minutes?
Anyways, with these settings, devices get false away states. What settings are suggested?

The initial base config at https://github.com/rocket4321/nmap_tracker/blob/main/use-cases.rd also results in false aways.

In general, possible issues found:

  1. Invalid config for [device_tracker.nmap_tracker]: [home_interval] is an invalid option for [device_tracker.nmap_tracker]. Check: device_tracker.nmap_tracker->home_interval. (See ?, line ?).

The const.py file suggests that home_interval is a valid setting for this component (I hardcoded it to 5 for now there). Maybe it errors because it is not a valid setting for HA's default nmap_tracker?

  1. Is it me or is a scan sometimes not started at HA start, but after HA start + the interval_seconds value.

Idk...I feel like something is off. Manual scan takes 15-30 sec. until result. But here the result is only 'publish' (devices gets home state) after the 120 sec of interval_seconds.

You start with the troubleshooting on the readme...

True, this is a bit messy of me.

Here: #4