Closed SaturnusDJ closed 3 years ago
I tried in 2 new/different environments.
The outcome is exactly the same. The logs are the same. All the same as above.
Used configuration.yaml:
logger:
default: warn
logs:
homeassistant.components.device_tracker: debug
custom_components.nmap_tracker: debug
device_tracker:
- platform: nmap_tracker
hosts:
- 192.168.1.3
consider_home: 180
timeout: 60
interval_seconds: 120
scan_options: "--host-timeout 2s"
debug_log_level: 5
http:
server_port: 8123
recorder:
history:
logbook:
So the logs should say the pc is down? I only see 'Processing 192.168.1.3 up' messages, nevertheless HA (?) does mark it as away from time to time.
Any idea?
Thanks. The last thing you mention seems to help. Stupid of me, I should have read the readme better, sorry.
I ran into another thing:
exclude:
- 192.168.1.2
- 192.168.1.4
This and many variant (no dashes, different indent, comma and/or space separated instead of list) somehow end up in the ip addresses being put at the very end of the nmap command with only the first ip addresses put after the --exclude
flag. Not sure if that is how it is expected.
But using
scan_options: "--exclude 192.168.1.2,192.168.1.4"
works fine.
Okay here is a test case, zoomed in at one device. Sorry, I cannot run HA with only nmap_device. If this is absolutely necessary then I might try a second instance tomorrow.
Problem: Device being marked as away while it is not. This is a cabled desktop pc without connection problems. I tried a lot of config options like
-F
, different or nost host timeout, no timeout,consider_home
of 300,interval_seconds
of 90, etc.Config:
HA log:
State of 192.168.1.3 in HA: Note here that from 00:56:48 - 01:02:30 the state was away, despite the text not mentioning this.
Manual nmap in exact same environment:
Host not excluded as sometimes happens in the HA setup.