Run device tracker, but poll only on conditions?

I’d like to make my device tracker tell when people (things in my case, but I track them as “people”) leave more rapidly.

Right now I have SNMP detecting when devices come onto the network reliably, the router sends a list of MAC addresses from the ARP table and it’s basically instant setting “home” without having to poll phones/tablets killing batteries or my increase network traffic.

The problem is the router holds them as “online” for up-to 20 minutes before purging inactive devices, I’d like to detect a device being carried out the door <= 5 minutes after leaving. I have tried reducing the ARP cache timeout on pfSense but even at 500 seconds with “consider_home” set to 180 seconds devices drop offline “away” for several minutes while they are asleep before showing back up as home, so clearly I need something more complex.

I’ve looked at the nmap plugin but that seems to return a list of hostnames that doesn’t work well since some are duplicates (e.g. all people with the same model smartphone have the same device name, how do I tell them apart?) and sometimes IP addresses are returned instead of hostnames (unsure why it’s inconsistent) plus polling the devices multiple times a minute keeps phones/tablets awake which DESTROYS battery life compared to just asking the router which is always on.

I’ve got an idea to “fix” these issues but I don’t know how to implement it.

First, I’d prefer nmap to only return MAC addresses (hopefully with a prefix to tell which tracker it’s from) OR only IP addresses. I’d prefer MAC addresses since those never change (people can change hostnames and supporting a fleet of static IPs is a pain)

Second, I’d like to ONLY run the nmap/ping tracker for ~5 minutes after some other action triggers, for example “if door open/closes, run nmap/ping tracker every 30 seconds for 5 minutes” so it can benefit from the increased refresh rate to know someone left <1 minute after they drop off the WiFi when someone has come/go and also benefit from the no-wakeup-for-polling if no doors are opening/closing.

Does anyone have ideas that may help rig up something like this, or other ideas how to accomplish a similar thing?