cyberjunky / home-assistant-arpscan_tracker

This component tracks devices using the arp-scan liinux command, it's very fast, and reasonably accurate.
MIT License
28 stars 4 forks source link

Can't find devices? #3

Closed derekoharrow closed 3 years ago

derekoharrow commented 3 years ago

I've got this installed ok and seems to be working, but I can't see any new device_tracker devices being added.

I'm running on HASS Core v0.117.3.

Here's my configuration.yaml settings:

device_tracker:
  - platform: arpscan_tracker
    interval_seconds: 60
    track_new_devices: true
    scan_options: "--interface eth0 192.168.1.0/24"

Here's an extract from a debug log, which clearly shows arp-scan working:

2020-11-08 15:55:02 DEBUG (SyncWorker_2) [custom_components.arpscan_tracker.device_tracker] Scanning...
2020-11-08 15:55:04 DEBUG (SyncWorker_2) [custom_components.arpscan_tracker.device_tracker] Scandata Interface: eth0, type: EN10MB, MAC: 00:15:5d:01:57:2e, IPv4: 192.168.1.14
Starting arp-scan 1.9.7 with 256 hosts (https://github.com/royhills/arp-scan)
192.168.1.10    a0:48:1c:d6:bb:38       Hewlett Packard
192.168.1.11    a0:48:1c:d6:bb:3a       Hewlett Packard
192.168.1.20    b8:27:eb:00:b0:fa       Raspberry Pi Foundation
192.168.1.21    b8:27:eb:00:b0:fa       Raspberry Pi Foundation
192.168.1.22    00:17:88:2a:61:8d       Philips Lighting BV
192.168.1.23    74:0a:bc:20:5c:07       LightwaveRF Technology Ltd
192.168.1.25    34:ea:34:e7:fb:f6       HangZhou Gubei Electronics Technology Co.,Ltd
192.168.1.26    ec:e5:12:00:7f:ac       tado GmbH
192.168.1.27    c8:2b:96:06:06:d1       Espressif Inc.
192.168.1.30    a8:3f:a1:81:02:47       IEEE Registration Authority
192.168.1.50    50:f5:da:51:e2:2f       Amazon Technologies Inc.
192.168.1.60    00:15:5d:01:57:20       Microsoft Corporation
192.168.1.61    00:15:5d:01:57:02       Microsoft Corporation
192.168.1.71    00:04:4b:b6:df:ac       NVIDIA
192.168.1.72    00:1d:ec:04:c1:e7       Marusys
192.168.1.120   94:9a:a9:2e:33:9f       Microsoft Corporation
192.168.1.120   94:9a:a9:2e:33:9f       Microsoft Corporation (DUP: 2)
192.168.1.176   04:5d:4b:da:52:b1       Sony Corporation
192.168.1.55    fc:a1:83:6c:96:a3       Amazon Technologies Inc.
192.168.1.76    cc:d4:2e:86:1f:82       (Unknown)
192.168.1.83    d8:8f:76:72:cf:65       Apple, Inc.
192.168.1.113   9c:b6:d0:8d:e7:41       Rivet Networks
192.168.1.115   10:02:b5:39:e7:ed       Intel Corporate
192.168.1.114   98:2c:bc:75:f8:e1       Intel Corporate
192.168.1.74    4c:17:44:6f:eb:e6       Amazon Technologies Inc.
192.168.1.252   78:d2:94:43:69:b5       NETGEAR
192.168.1.254   a0:40:a0:6d:ab:1a       NETGEAR
192.168.1.253   08:02:8e:9d:e8:04       NETGEAR
192.168.1.24    00:04:20:eb:f3:f1       Slim Devices, Inc.
192.168.1.21    b8:27:eb:55:e5:af       Raspberry Pi Foundation (DUP: 2)
192.168.1.51    7c:61:66:e5:93:f3       Amazon Technologies Inc.
192.168.1.53    40:b4:cd:a2:f9:47       Amazon Technologies Inc.
192.168.1.52    7c:61:66:8b:5e:2d       Amazon Technologies Inc.
192.168.1.82    d0:2b:20:a6:4f:20       Apple, Inc.
192.168.1.100   70:ea:5a:39:f9:d5       (Unknown)
192.168.1.110   5c:87:9c:cf:97:02       Intel Corporate
192.168.1.122   b8:8a:ec:6c:d9:ff       Nintendo Co.,Ltd
192.168.1.41    c8:2b:96:40:4e:86       Espressif Inc. (DUP: 1)
192.168.1.54    40:b4:cd:50:04:60       Amazon Technologies Inc. (DUP: 1)
192.168.1.42    60:01:94:91:3e:a0       Espressif Inc. (DUP: 1)
192.168.1.28    3c:e1:a1:62:6a:cf       Universal Global Scientific Industrial Co., Ltd. (DUP: 1)
192.168.1.51    7c:61:66:e5:93:f3       Amazon Technologies Inc. (DUP: 2)
192.168.1.52    7c:61:66:8b:5e:2d       Amazon Technologies Inc. (DUP: 2)
192.168.1.53    40:b4:cd:a2:f9:47       Amazon Technologies Inc. (DUP: 2)
192.168.1.82    d0:2b:20:a6:4f:20       Apple, Inc. (DUP: 2)
192.168.1.100   70:ea:5a:39:f9:d5       (Unknown) (DUP: 2)
192.168.1.110   5c:87:9c:cf:97:02       Intel Corporate (DUP: 2)
192.168.1.122   b8:8a:ec:6c:d9:ff       Nintendo Co.,Ltd (DUP: 2)

51 packets received by filter, 0 packets dropped by kernel
Ending arp-scan 1.9.7: 256 hosts scanned in 1.985 seconds (128.97 hosts/sec). 48 responded
2020-11-08 15:55:04 DEBUG (SyncWorker_2) [custom_components.arpscan_tracker.device_tracker] Arpscan successful
2020-11-08 15:55:04 DEBUG (SyncWorker_2) [custom_components.arpscan_tracker.device_tracker] arpscan last results [Device(mac='eth0,', name='eth0,', ip='Interface:', last_update=datetime.datetime(2020, 11, 8, 15, 55, 4, 836917, tzinfo=<DstTzInfo 'Europe/London' GMT0:00:00 STD>)), Device(mac='a0:48:1c:d6:bb:38', name='a0481cd6bb38', ip='192.168.1.10', last_update=datetime.datetime(2020, 11, 8, 15, 55, 4, 836917, tzinfo=<DstTzInfo 'Europe/London' GMT0:00:00 STD>)), Device(mac='a0:48:1c:d6:bb:3a', name='a0481cd6bb3a', ip='192.168.1.11', last_update=datetime.datetime(2020, 11, 8, 15, 55, 4, 836917, tzinfo=<DstTzInfo 'Europe/London' GMT0:00:00 STD>)), Device(mac='b8:27:eb:00:b0:fa', name='b827eb00b0fa', ip='192.168.1.20', last_update=datetime.datetime(2020, 11, 8, 15, 55, 4, 836917, tzinfo=<DstTzInfo 'Europe/London' GMT0:00:00 STD>)), Device(mac='b8:27:eb:00:b0:fa', name='b827eb00b0fa', ip='192.168.1.21', last_update=datetime.datetime(2020, 11, 8, 15, 55, 4, 836917, tzinfo=<DstTzInfo 'Europe/London' GMT0:00:00 STD>)), Device(mac='00:17:88:2a:61:8d', name='0017882a618d', ip='192.168.1.22', last_update=datetime.datetime(2020, 11, 8, 15, 55, 4, 836917, tzinfo=<DstTzInfo 'Europe/London' GMT0:00:00 STD>)), Device(mac='74:0a:bc:20:5c:07', name='740abc205c07', ip='192.168.1.23', last_update=datetime.datetime(2020, 11, 8, 15, 55, 4, 836917, tzinfo=<DstTzInfo 'Europe/London' GMT0:00:00 STD>)), Device(mac='34:ea:34:e7:fb:f6', name='34ea34e7fbf6', ip='192.168.1.25', last_update=datetime.datetime(2020, 11, 8, 15, 55, 4, 836917, tzinfo=<DstTzInfo 'Europe/London' GMT0:00:00 STD>)), Device(mac='ec:e5:12:00:7f:ac', name='ece512007fac', ip='192.168.1.26', last_update=datetime.datetime(2020, 11, 8, 15, 55, 4, 836917, tzinfo=<DstTzInfo 'Europe/London' GMT0:00:00 STD>)), Device(mac='c8:2b:96:06:06:d1', name='c82b960606d1', ip='192.168.1.27', last_update=datetime.datetime(2020, 11, 8, 15, 55, 4, 836917, tzinfo=<DstTzInfo 'Europe/London' GMT0:00:00 STD>)), Device(mac='a8:3f:a1:81:02:47', name='a83fa1810247', ip='192.168.1.30', last_update=datetime.datetime(2020, 11, 8, 15, 55, 4, 836917, tzinfo=<DstTzInfo 'Europe/London' GMT0:00:00 STD>)), Device(mac='50:f5:da:51:e2:2f', name='50f5da51e22f', ip='192.168.1.50', last_update=datetime.datetime(2020, 11, 8, 15, 55, 4, 836917, tzinfo=<DstTzInfo 'Europe/London' GMT0:00:00 STD>)), Device(mac='00:15:5d:01:57:20', name='00155d015720', ip='192.168.1.60', last_update=datetime.datetime(2020, 11, 8, 15, 55, 4, 836917, tzinfo=<DstTzInfo 'Europe/London' GMT0:00:00 STD>)), Device(mac='00:15:5d:01:57:02', name='00155d015702', ip='192.168.1.61', last_update=datetime.datetime(2020, 11, 8, 15, 55, 4, 836917, tzinfo=<DstTzInfo 'Europe/London' GMT0:00:00 STD>)), Device(mac='00:04:4b:b6:df:ac', name='00044bb6dfac', ip='192.168.1.71', last_update=datetime.datetime(2020, 11, 8, 15, 55, 4, 836917, tzinfo=<DstTzInfo 'Europe/London' GMT0:00:00 STD>)), Device(mac='00:1d:ec:04:c1:e7', name='001dec04c1e7', ip='192.168.1.72', last_update=datetime.datetime(2020, 11, 8, 15, 55, 4, 836917, tzinfo=<DstTzInfo 'Europe/London' GMT0:00:00 STD>)), Device(mac='94:9a:a9:2e:33:9f', name='949aa92e339f', ip='192.168.1.120', last_update=datetime.datetime(2020, 11, 8, 15, 55, 4, 836917, tzinfo=<DstTzInfo 'Europe/London' GMT0:00:00 STD>)), Device(mac='94:9a:a9:2e:33:9f', name='949aa92e339f', ip='192.168.1.120', last_update=datetime.datetime(2020, 11, 8, 15, 55, 4, 836917, tzinfo=<DstTzInfo 'Europe/London' GMT0:00:00 STD>)), Device(mac='04:5d:4b:da:52:b1', name='045d4bda52b1', ip='192.168.1.176', last_update=datetime.datetime(2020, 11, 8, 15, 55, 4, 836917, tzinfo=<DstTzInfo 'Europe/London' GMT0:00:00 STD>)), Device(mac='fc:a1:83:6c:96:a3', name='fca1836c96a3', ip='192.168.1.55', last_update=datetime.datetime(2020, 11, 8, 15, 55, 4, 836917, tzinfo=<DstTzInfo 'Europe/London' GMT0:00:00 STD>)), Device(mac='cc:d4:2e:86:1f:82', name='ccd42e861f82', ip='192.168.1.76', last_update=datetime.datetime(2020, 11, 8, 15, 55, 4, 836917, tzinfo=<DstTzInfo 'Europe/London' GMT0:00:00 STD>)), Device(mac='d8:8f:76:72:cf:65', name='d88f7672cf65', ip='192.168.1.83', last_update=datetime.datetime(2020, 11, 8, 15, 55, 4, 836917, tzinfo=<DstTzInfo 'Europe/London' GMT0:00:00 STD>)), Device(mac='9c:b6:d0:8d:e7:41', name='9cb6d08de741', ip='192.168.1.113', last_update=datetime.datetime(2020, 11, 8, 15, 55, 4, 836917, tzinfo=<DstTzInfo 'Europe/London' GMT0:00:00 STD>)), Device(mac='10:02:b5:39:e7:ed', name='1002b539e7ed', ip='192.168.1.115', last_update=datetime.datetime(2020, 11, 8, 15, 55, 4, 836917, tzinfo=<DstTzInfo 'Europe/London' GMT0:00:00 STD>)), Device(mac='98:2c:bc:75:f8:e1', name='982cbc75f8e1', ip='192.168.1.114', last_update=datetime.datetime(2020, 11, 8, 15, 55, 4, 836917, tzinfo=<DstTzInfo 'Europe/London' GMT0:00:00 STD>)), Device(mac='4c:17:44:6f:eb:e6', name='4c17446febe6', ip='192.168.1.74', last_update=datetime.datetime(2020, 11, 8, 15, 55, 4, 836917, tzinfo=<DstTzInfo 'Europe/London' GMT0:00:00 STD>)), Device(mac='78:d2:94:43:69:b5', name='78d2944369b5', ip='192.168.1.252', last_update=datetime.datetime(2020, 11, 8, 15, 55, 4, 836917, tzinfo=<DstTzInfo 'Europe/London' GMT0:00:00 STD>)), Device(mac='a0:40:a0:6d:ab:1a', name='a040a06dab1a', ip='192.168.1.254', last_update=datetime.datetime(2020, 11, 8, 15, 55, 4, 836917, tzinfo=<DstTzInfo 'Europe/London' GMT0:00:00 STD>)), Device(mac='08:02:8e:9d:e8:04', name='08028e9de804', ip='192.168.1.253', last_update=datetime.datetime(2020, 11, 8, 15, 55, 4, 836917, tzinfo=<DstTzInfo 'Europe/London' GMT0:00:00 STD>)), Device(mac='00:04:20:eb:f3:f1', name='000420ebf3f1', ip='192.168.1.24', last_update=datetime.datetime(2020, 11, 8, 15, 55, 4, 836917, tzinfo=<DstTzInfo 'Europe/London' GMT0:00:00 STD>)), Device(mac='b8:27:eb:55:e5:af', name='b827eb55e5af', ip='192.168.1.21', last_update=datetime.datetime(2020, 11, 8, 15, 55, 4, 836917, tzinfo=<DstTzInfo 'Europe/London' GMT0:00:00 STD>)), Device(mac='7c:61:66:e5:93:f3', name='7c6166e593f3', ip='192.168.1.51', last_update=datetime.datetime(2020, 11, 8, 15, 55, 4, 836917, tzinfo=<DstTzInfo 'Europe/London' GMT0:00:00 STD>)), Device(mac='40:b4:cd:a2:f9:47', name='40b4cda2f947', ip='192.168.1.53', last_update=datetime.datetime(2020, 11, 8, 15, 55, 4, 836917, tzinfo=<DstTzInfo 'Europe/London' GMT0:00:00 STD>)), Device(mac='7c:61:66:8b:5e:2d', name='7c61668b5e2d', ip='192.168.1.52', last_update=datetime.datetime(2020, 11, 8, 15, 55, 4, 836917, tzinfo=<DstTzInfo 'Europe/London' GMT0:00:00 STD>)), Device(mac='d0:2b:20:a6:4f:20', name='d02b20a64f20', ip='192.168.1.82', last_update=datetime.datetime(2020, 11, 8, 15, 55, 4, 836917, tzinfo=<DstTzInfo 'Europe/London' GMT0:00:00 STD>)), Device(mac='70:ea:5a:39:f9:d5', name='70ea5a39f9d5', ip='192.168.1.100', last_update=datetime.datetime(2020, 11, 8, 15, 55, 4, 836917, tzinfo=<DstTzInfo 'Europe/London' GMT0:00:00 STD>)), Device(mac='5c:87:9c:cf:97:02', name='5c879ccf9702', ip='192.168.1.110', last_update=datetime.datetime(2020, 11, 8, 15, 55, 4, 836917, tzinfo=<DstTzInfo 'Europe/London' GMT0:00:00 STD>)), Device(mac='b8:8a:ec:6c:d9:ff', name='b88aec6cd9ff', ip='192.168.1.122', last_update=datetime.datetime(2020, 11, 8, 15, 55, 4, 836917, tzinfo=<DstTzInfo 'Europe/London' GMT0:00:00 STD>)), Device(mac='c8:2b:96:40:4e:86', name='c82b96404e86', ip='192.168.1.41', last_update=datetime.datetime(2020, 11, 8, 15, 55, 4, 836917, tzinfo=<DstTzInfo 'Europe/London' GMT0:00:00 STD>)), Device(mac='40:b4:cd:50:04:60', name='40b4cd500460', ip='192.168.1.54', last_update=datetime.datetime(2020, 11, 8, 15, 55, 4, 836917, tzinfo=<DstTzInfo 'Europe/London' GMT0:00:00 STD>)), Device(mac='60:01:94:91:3e:a0', name='600194913ea0', ip='192.168.1.42', last_update=datetime.datetime(2020, 11, 8, 15, 55, 4, 836917, tzinfo=<DstTzInfo 'Europe/London' GMT0:00:00 STD>)), Device(mac='3c:e1:a1:62:6a:cf', name='3ce1a1626acf', ip='192.168.1.28', last_update=datetime.datetime(2020, 11, 8, 15, 55, 4, 836917, tzinfo=<DstTzInfo 'Europe/London' GMT0:00:00 STD>)), Device(mac='7c:61:66:e5:93:f3', name='7c6166e593f3', ip='192.168.1.51', last_update=datetime.datetime(2020, 11, 8, 15, 55, 4, 836917, tzinfo=<DstTzInfo 'Europe/London' GMT0:00:00 STD>)), Device(mac='7c:61:66:8b:5e:2d', name='7c61668b5e2d', ip='192.168.1.52', last_update=datetime.datetime(2020, 11, 8, 15, 55, 4, 836917, tzinfo=<DstTzInfo 'Europe/London' GMT0:00:00 STD>)), Device(mac='40:b4:cd:a2:f9:47', name='40b4cda2f947', ip='192.168.1.53', last_update=datetime.datetime(2020, 11, 8, 15, 55, 4, 836917, tzinfo=<DstTzInfo 'Europe/London' GMT0:00:00 STD>)), Device(mac='d0:2b:20:a6:4f:20', name='d02b20a64f20', ip='192.168.1.82', last_update=datetime.datetime(2020, 11, 8, 15, 55, 4, 836917, tzinfo=<DstTzInfo 'Europe/London' GMT0:00:00 STD>)), Device(mac='70:ea:5a:39:f9:d5', name='70ea5a39f9d5', ip='192.168.1.100', last_update=datetime.datetime(2020, 11, 8, 15, 55, 4, 836917, tzinfo=<DstTzInfo 'Europe/London' GMT0:00:00 STD>)), Device(mac='5c:87:9c:cf:97:02', name='5c879ccf9702', ip='192.168.1.110', last_update=datetime.datetime(2020, 11, 8, 15, 55, 4, 836917, tzinfo=<DstTzInfo 'Europe/London' GMT0:00:00 STD>)), Device(mac='b8:8a:ec:6c:d9:ff', name='b88aec6cd9ff', ip='192.168.1.122', last_update=datetime.datetime(2020, 11, 8, 15, 55, 4, 836917, tzinfo=<DstTzInfo 'Europe/London' GMT0:00:00 STD>))]

Where would I find the devices? Is there a reason I can't see them?

Thanks

DeadEnded commented 3 years ago

I find all the devices listed in CONFIGURATION - ENTITIES. Filter for Device and you should see them all listed as device_tracker.mac_address. I haven't added a new one in a while, but that's what I remember. You can modify them after discovery in the known_devices.yaml file in your HA config folder.

Cheers! DeadEnd

cyberjunky commented 3 years ago

@DeadEnded I was planning to rewrite it using the natice trackerentities instead of known_devices.yaml, but I lack time and don't want to re-edit all entities ;-D