Device Tracker with PFSENSE router

Got it working!

Really? how, what was the problem?

1 Like

Seems like the copy pasting change the command somehow, so i went back to your origian post and wrote it instead. Sorry about that!

so question, how do I group all these?

Well, first thing if you don’t want to have all of them show up you can change your config to the following.

device_tracker:
   - platform: pfsense
     track_new_devices: False

Then delete anything inside of the know_devices.yaml in your config folder that you don’t want. This will mean that any new devices that end up in the arp table won’t be tracked. However you can manually add things to the known_devices.yaml as well.

Anything that is left at that point will still show up in the top like that, but you can move them to a group by doing this doing this https://home-assistant.io/components/group/

Awesome!! Thanks!!

Great job by the way! :slight_smile:

1 Like

Thanks. Let me know if you run in to any problems. I still have test cases to write so it will be a few days before I open up a pull request.

Great, I´ll play around with this and report back if i encounter any issues :slight_smile:

thanks again!

Got this setup and working on my pizero. Detects my NAS, Desktop and WAN_DHCP. All of which are wired into the switch that my PFsense box it connected to. Anything connected to my access point (wired or wireless) is not detected.

edit: one wireless device has been detected now.

Okay, that could be a difference in the file format. Could you send me your arp.tmp file?

So it picked up my wife’s phone overnight and our car when it started. I have about 30 WiFi devices so it’s odd what it is picking up.

It is a bit slow at marking people as gone. It was 15-20 minutes before my wife’s phone and car were marked as away this AM.

I’ll send my file over tonight.

Yeah the timeout is going to be slow, that is how long the lease takes to expire. Probably something configurable in pfsense.

How´s your setup, have you changed your lease time?

No, I didn’t change anything. I am more interested in getting a quick Home response than I am an away. But I guess it would be possible to filter things out that are about to expire? So the lease time doesn’t need to be changed.

How is this different than using SNMP? I have this set up with my pfsense router and it works great.

- platform: snmp
  host: 192.168.1.1
  community: public
  baseoid: 1.3.6.1.2.1.4.22.1.2
  interval_seconds: 30
  consider_home: 120
4 Likes

I guess it isn’t, was anything required to get SNMP setup on the pfSense side?

I don’t remember if SNMP was on by default or not. Services->SNMP menu, click Enable, select LAN interface to bind to at the bottom, put a random string in the community input (and match it in the HA inputs).

Hmmmm that does seem easier lol.

This is neat but I suspect it also falls victim to the iOS aggressive sleep of the WIFI when the phone is sitting around? So in other words it won’t do much better than the local nmap tracker? I guess I fail to understand what problem this solves?

I’ve resorted to the “UDP ping” method to wake an iOS device first which seems to work well; with the small cost of some battery life.

I don’t know that this solves any problem, the only thing would be one point of truth, no pings or network scans. Basically no extra traffic to the clients that are being tracked. Although the iOS issue is probably still and issue, yes and it looks like SNMP might already be fulfilling this.