esphome / feature-requests

ESPHome Feature Request Tracker
https://esphome.io/
413 stars 26 forks source link

Wifi probe request logging. #2051

Open assimilat opened 1 year ago

assimilat commented 1 year ago

Describe the problem you have/What new integration you would like

I would like to be able to be able to capture wifi probe requests(0x4000), their associated mac addrs, target SSIDs, and RSSIs The same way esphome can do scans for beaconing access points.

Please describe your use case for this integration and alternatives you've tried:

Esphome is great as-is, and has a pile of components to aid in position/presence detection, but with real time location tracking on an individual level, the more metrics the better, and being able to track a person via motion sensors is great, but to pin an ID on that person would be amazing. Probe requests, of course arent meant for that, and the accuracy isnt the best, but coupled with several other sensors like PIR/magnetic door switches and use that data to help narrow down exactly who triggered what.

This has been done with esp32 boards already here:

https://github.com/ETS-PoliTO/esp32-sniffer

So the hardware is capable, and i hope that with the existing set of wifi components in esphome, and a clear example of how it works in the repo listed above, it wouldnt be a huge leap to implement it as something that could be triggered via the home assistant api (or anything else really)

Additional context

assimilat commented 1 year ago

Just a question to tack onto this. Would there be any way to just create a general sniffer component linked to something like nmaps npcap library (as i under stand it, it doesnt require nearly as much overhead)? Im not sure how much work that would be, but it seems to me that a component that can filter sniffed packets would be much simpler. That might be something to add to a core library so that components could be written to filter captured packets, and then return specific data from them. I dunno, let me know if i should refile the request, or if that is insane.

EDIT: It seems there is a basic example of such a thing here: https://github.com/espressif/esp-idf/tree/master/examples/network/simple_sniffer