Open cometchaser opened 3 months ago
same here.
Hi, i have this problem too. (Home Assistant OS with Core 2024.9.2). NMAP finds the right IPs but can not get the mac's of the devices and fails.
2024-09-23 12:54:47.754 DEBUG (SyncWorker_7) [homeassistant.components.nmap_tracker] Scanning ['192.168.50.0/24'] with args: -sn -PE --exclude 192.168.40.50 --reason -v
2024-09-23 12:54:49.159 DEBUG (SyncWorker_7) [homeassistant.components.nmap_tracker] Finished scanning ['192.168.50.0/24'] with args: -sn -PE --exclude 192.168.40.50 --reason -v
2024-09-23 12:54:49.180 INFO (MainThread) [homeassistant.components.nmap_tracker] No MAC address found for 192.168.50.1
2024-09-23 12:54:49.198 INFO (MainThread) [homeassistant.components.nmap_tracker] No MAC address found for 192.168.50.50
2024-09-23 12:54:49.218 INFO (MainThread) [homeassistant.components.nmap_tracker] No MAC address found for 192.168.50.88
2024-09-23 12:54:49.235 INFO (MainThread) [homeassistant.components.nmap_tracker] No MAC address found for 192.168.50.140
2024-09-23 12:54:49.259 INFO (MainThread) [homeassistant.components.nmap_tracker] No MAC address found for 192.168.50.141
2024-09-23 12:54:49.281 INFO (MainThread) [homeassistant.components.nmap_tracker] No MAC address found for 192.168.50.225
So, It updated to 2024.10 and still face the problem:
024-10-04 10:19:06.085 DEBUG (SyncWorker_13) [homeassistant.components.nmap_tracker] Scanning ['192.168.2.0/24'] with args: -F -T4 --min-rate 10 --host-timeout 15s --exclude 192.168.2.254 --reason -v
2024-10-04 10:19:12.965 DEBUG (SyncWorker_13) [homeassistant.components.nmap_tracker] Finished scanning ['192.168.2.0/24'] with args: -F -T4 --min-rate 10 --host-timeout 15s --exclude 192.168.2.254 --reason -v
2024-10-04 10:19:13.979 WARNING (MainThread) [homeassistant.components.nmap_tracker] No MAC address found for 192.168.2.1
2024-10-04 10:19:14.989 WARNING (MainThread) [homeassistant.components.nmap_tracker] No MAC address found for 192.168.2.3
2024-10-04 10:19:16.008 WARNING (MainThread) [homeassistant.components.nmap_tracker] No MAC address found for 192.168.2.10
Any ideas?
I had the same issue and I've just added missing mac addresses to the arp table manually:
arp -v -i <eth_interface> -s <hostname> <mac_address>
not ideal, but solves the issue.
@stickpin , can you please share which file/line you changed. This will help other folks who are running into same issue.
It's not a file. just a regular ssh to the Home Assistant instance.
Not sure what is your setup is and if this workaround applies to you, but in my case all the IPs that I monitor with Nmap are static, so I've just created a file arp_table
and run the following command:
arp -v -i eth0 -f arp_table
- replace eth0
with your interface
arp_table file format is:
<hostname> <mac address>
for example:
mycomputer.local 44:33:32:22:11:22
myphone.local 22:33:32:22:11:44
mytablet.local 11:33:32:22:11:33
I am planning to run it with init.d
every time the system boots and it will do the trick.
And here is init.d update_arp_table script:
#!/bin/sh
### BEGIN INIT INFO
# Provides: update-arp-table
# Required-Start: $network
# Required-Stop:
# Default-Start: 2 3 4 5
# Default-Stop:
# Short-Description: Load ARP table at boot
# Description: Loads ARP table from /root/arp_table to eth0 interface on boot.
### END INIT INFO
# Path to the ARP table file
ARP_TABLE="/root/arp_table"
# Define the start function
start() {
echo "Loading ARP table to eth0 from $ARP_TABLE"
/usr/sbin/arp -v -i eth0 -f $ARP_TABLE
}
# Define the stop function (not required but placeholder)
stop() {
echo "Stopping arp_script (no action required)"
}
# Parse the command line argument
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
stop
start
;;
*)
echo "Usage: /etc/init.d/arp_script {start|stop|restart}"
exit 1
;;
esac
exit 0
The problem
Hi
I wanted to use the Nmap Tracker to monitor my network. However, no devices are found. I am using Homeassistant in version 2024.8.0.
In the logs I only find the note that no MAC address was found for the respective devices:
This problem looked similar to #87623. But this one should be solved.
I tried to fix my problem by following https://github.com/home-assistant/core/issues/87623#issuecomment-1422701870 and add
to
/usr/src/homeassistant/homeassistant/components/nmap_tracker/__init__.py
. But it doesn't fix to problem. Also the installation ofapk add arping
doesn't fix the issue.What version of Home Assistant Core has the issue?
core-2024.8.0
What was the last working version of Home Assistant Core?
core-2024.8.0
What type of installation are you running?
Home Assistant Container
Integration causing the issue
nmap tracker
Link to integration documentation on our website
https://www.home-assistant.io/integrations/nmap_tracker/
Diagnostics information
No response
Example YAML snippet
No response
Anything in the logs that might be useful for us?
No response
Additional information
No response