rkoshak / sensorReporter

A python based service that receives sensor inputs and publishes them in various ways.
Apache License 2.0
105 stars 41 forks source link

ARP Scanner #61

Closed markrad closed 6 years ago

markrad commented 6 years ago

Added a new sensor that use the arp command to scan for a specific MAC address. The idea being that when you arrive home and your phone connects to the Wi-Fi you can report to OpenHab that this person is now present. It's pretty quick to see a device arriving. When one leaves though it will take a little while to recognize it due to the time to live of the ARP cache. Only works on Linux.

I've only barely tested this but it shouldn't impact anything else.

rkoshak commented 6 years ago

I have got to figure out why I'm not getting email notifications for these things.

So the Dash Button uses network sniffing to capture the ARP packets as they are generated. Would this approach work for that and/or would that approach also work? It seems like we should be able to merge the two assuming that they can be made to work the same.

I'll go ahead and merge this one for now though. We can open a new issue and a new PR to merge the two if you think it is advisable.

markrad commented 6 years ago

I wasn't aware that the dash button was using a similar function. I'll take a look at it and see if there is a better way to structure this. It'll be a while though because I'll be traveling next week.