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

[Feature Request] Add device IP address to attributes #1

Closed guice closed 4 years ago

guice commented 4 years ago

I noticed ARP Scanner is not adding the IP Address of a device to it's attributes, e.g.:

nmap_tracker

source_type: router
latitude: 38.80801184504557
longitude: -104.84741628170015
gps_accuracy: 0
scanner: NmapDeviceScanner
ip: 192.168.0.97
friendly_name: Ecovacs DEEBOT
icon: mdi:robot-vacuum

arpscan_tracker

source_type: router
latitude: 38.80801184504557
longitude: -104.84741628170015
gps_accuracy: 0
scanner: ArpScanDeviceScanner
friendly_name: Ecovacs DEEBOT
icon: mdi:robot-vacuum

It would be nice if it can add the device's current IP address. It does return in the arp table:

Address                  HWtype  HWaddress           Flags Mask            Iface
192.168.0.98             ether   44:07:0b:67:6b:43   C                     eno1
192.168.0.38             ether   64:16:66:22:27:16   C                     eno1
192.168.0.15             ether   30:fd:38:67:ea:2c   C                     eno1
192.168.0.60             ether   44:07:0b:c4:4b:21   C                     eno1
192.168.0.86                     (incomplete)                              eno1
[...]
cyberjunky commented 4 years ago

Sorry for this very late reply, just saw it while browsing the repo's. I will have a look should be easy I guess.

guice commented 4 years ago

Better late than never, I guess? Thanks!

cyberjunky commented 4 years ago

@guice can you try version 1.0.3? It will appear in HACS soon, or you can overwrite your device_tracker.py file with one from repo.

guice commented 4 years ago

Done, and I see it. Thanks!

Although, to be entirely honest: I now have a Unifi system, and I don't need arp anymore. But it's nice it's here now. :)

cyberjunky commented 4 years ago

@guice, oke I will remove it then.. just kidding.