JOHLC / pfSense-FauxAPI-ha

!DEPRECIATED! A custom component for Home Assistant that interfaces with FauxAPI installed on a pfSense device
MIT License
16 stars 2 forks source link

#Question: Can I get hostnames of clients connected to each interface? #19

Open everything-tech-related opened 3 years ago

everything-tech-related commented 3 years ago

I want to setup a presence detection that uses hostnames instead of IP. How would i accomplish that. I already have the basic sensors working

**Is your feature request related to a problem?no]

Describe the solution you'd like A clear and concise description of what you want to happen.

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

Additional context Add any other context or screenshots about the feature request here.

JOHLC commented 3 years ago

While this may be possible I was not able to figure out how to do it with fauxapi.

Why not utilize nmap? ref: https://nmap.org/book/man.html ref: https://www.home-assistant.io/integrations/nmap_tracker/

Example:

➜  ~ nmap -v -sn 192.168.1.2
Starting Nmap 7.91 ( https://nmap.org ) at 2021-07-05 13:21 EDT
Initiating ARP Ping Scan at 13:21
Scanning 192.168.1.2 [1 port]
Completed ARP Ping Scan at 13:21, 0.02s elapsed (1 total hosts)
Initiating Parallel DNS resolution of 1 host. at 13:21
Completed Parallel DNS resolution of 1 host. at 13:21, 0.00s elapsed
Nmap scan report for MYCOMPUTER.domain.local (192.168.1.2)
Host is up (0.00070s latency).
MAC Address: A8:5E:45:99:99:99 (Asustek Computer)
Read data files from: /usr/bin/../share/nmap
Nmap done: 1 IP address (1 host up) scanned in 0.13 seconds
           Raw packets sent: 1 (28B) | Rcvd: 1 (28B)
everything-tech-related commented 3 years ago

Only able to get devices on my .0.1 AP not the .1.1 nor .2.1

JOHLC commented 2 years ago

Only able to get devices on my .0.1 AP not the .1.1 nor .2.1

That sounds like a NAT or firewall issue.

travisghansen commented 2 years ago

I'm working on a new integration (that doesn't require faux api). I've currently got over 100+ sensors available on a basic pfSense machine (the numbers go up based on how many interfaces, etc you have). I'll be implementing device_tracker as well using a pfSense api which gets the arp table (this is similar to how the opnsense integration works). I'm not quite ready to implement it just yet as I'm still putting a bow on the sensor platform but let me know if you're interested in testing.

travisghansen commented 2 years ago

Device tracker support using the arp table implemented here: https://github.com/travisghansen/hass-pfsense