I have several devices that are in my router, cell phones. I want to know when they connect, and disconnect from the wifi. I want to know be able to have these notifications, without installing home assistant onto the devices.
Looking online, I know this is possible, but I cannot find any blueprint or way to do this.
I want to use this as a way when people are coming and going from where I live.
I have spent the past few days trying to do this, I have made some progress. Mostly videos That talk about functionality, but not how to. Articles that talk about functionality, but not how to do it.
First, you should investigate and see if there’s an integration for your router (typically done by brand or firmware).
If that’s not available, you could use the Ping (ICMP) integration. This will only work if you assign static IP’s to your phone/s or use DHCP reservations.
There is an optional API, so you can import data about specific devices. There’s a post about it here.
Pi.Alert has it’s own notification system, so you may not need to go through HA.
Edit: Yet another option is the Bermuda integration, which tracks devices via Bluetooth. You can do it right down to room level, but a simple home/away is possible.
Also @robertsaron that screen looks an awful like the NetAlertX app which is in HA and will do the trick for you. An integration for your router brand would be easier though if it existed.
Also if you want excellent person location tracking home/not home etc. my HALP! integration would be of help to you, but also read through the documentation there (and this help file included) to understand how to track people’s devices by WiFi connection which includes instructions for stopping the anonymyzed Mac address which is required for making a phone stick to an IP address you assign it on the router
Correct. NetAlertX is a fork of Pi.Alert - and there are several versions of that.
True. The Bermuda docs have instructions for getting round this with the Bluetooth MAC. Pi.Alert seems to use several tracking methods - devices are marked as having random MACs but it still manages to track them.
I’ve used NetAlertX and the TP-Link Deco integration (I use Deco M5 mesh wifi).
NetAlertX does the job, but I find it slower to flag changes to HA. The TP-Link integration, while limited to a specific vendor hardware subset, provides a load more detail, such as signal strength, upload/download speed, associated AP, etc. and is much faster to report devices being online and offline.
Re. @CaptTom’s comment on private MAC addresses: I believe most mobile OSes (certainly iOS and Android), if using private MAC addresses, tend to retain the same MAC address for each SSID they connect to. This stops you tracking devices between locations, but should ensure that they always present the same MAC address when they return to a previously associated network. If it’s a problem you should be able to disable Private MAC address use on a per-SSID basis, so ask your family nicely if you can set that up on their phones, explaining that you’re using it to track their home/away status.
FWIW, I use the TP-Link Deco integration to track the mobile phones of my family, and associate them with the Person entity, changing Home/Away status accordingly. It’s very reliable and responds fast enough that, when I pull the car onto our driveway at night, my phone connects to the house wifi and an automation turns the hall light on before I get out of the car usually.
If your router expose the arp tables over SNMP, then HA have integrations for this standard protocol.
There are SMNP browsers/walks/trees for looking at what is available from the router and Asus might also provide a MIB file, which is a number to text translation of the tree branches, so it is easier for a human to read it.
You also need to find the routers timeouts for the arp table, so you know if it is just a few minutes or hours you are working with.
The more advanced routers typically allow you to adjust the timeouts too.
Arp tables are a passive method, since the router keeps the table up to date whenever the device transmit network packets.
Other methods like ping require the device to be awake in some state to function and that can prevent sleep and drain batteries fast.
My Routers has the ASUS WRT intergration. I just punch in the info, and HA pulls it in. The only notification on the ASUS mobile app is when I get notified when a new device connects to my router.
I am sorry for the late response. I spent this past week days trying to figure out how to get HA VM in virtual box to auto start when the computer turns on. It is finally working.
This is the name of the router I have that I got off of amazon. This thing is amazing.
ASUS ROG Rapture WiFi 6 Gaming Router (GT-AX11000) - Tri-Band 10 Gigabit Wireless Router, 1.8GHz Quad-Core CPU, WTFast, 2.5G Port, AiMesh Compatible, Included Lifetime Internet Security, Aura RGB
If there is an app for this in Home Assistant that will do what I want that would be great. I will around on the blueprints, and the home presence system that someone linked.
I have HALP installed, and that is way more than I need. I just want to know when someone enters or leaves the Home zone, basically when the WIFI is connected or not connected to their phone.
I want to do this, with out installing the Home Assistant app onto the device.
If you are stalking, the default settings on most modern phones (by design to prevent exactly this activity), both Apple and Android are for random MAC addresses for connectivity, a feature that can be disabled if you have physical access to the phone and the settings page. While you are in there, associating the device with a corresponding IP Address on your DHCP configuration page and making it static on the router will make tracking ever so more simple for you. This is far less obtrusive than an added app such as HomeAssistant Companion and no added load on your battery - actually slightly faster as the router doesn’t have to wade through the DHCP table to find a new address to allocate. A quick way to find who has which is to change the SSID password and wait who squeals, and you can check, right there and then in their phone settings, and allocate a fixed IP addtess for their exclusive use while you are updating their SSID password. You should update passwords anyway on a regular basis in case the password leaks due to malware or carelessness or loss of a configured device.
A word for others considering this: Better get permission and up-front discussion than beg forgiveness or unwelcome attention from the police is my strong advice to you if you are doing this for illegal activity. Not everybody likes being tracked, some very strongly so. A black eye, jail time, appearance on a sexual offenders list are possible outcomes. Be wise - just because you can doesn’t mean you should. Work in a woman’s refuge shelter for a week, or ask a female teenager and you too will understand.
There are other methods for detecting presence, some more overt, others covert, that are worth investigating.
Rubs hands with glee. A potential reverse victim? A Darwin Awards coming up? An empty bank account? Hackers heaven.
At least, your router password, necessary for your automation will be readily accessible. This is the keys to the kingdom for horizontal traversal to your (and unsuspecting trusting visitors) devices.
Folks, don’t hook up your home automation like this for anybody to access at whim. Do you leave your phone number and address on the back of the toilet door at the local bus station?
If all you want is to detect somebody with a phone, with WiFi enabled, without connecting to your network, just approaching your premises, then a SDR radio receiver, tuned to 2.4 and 5Ghz WiFi and BlueTooth frequency ranges should be a cheap detector with no password or connection issue. The USB dongle versions should be sensitive enough without a lot of fuss, and all you have to do is measure a rise and fall in signal level across the entire band. Anonymous, not stalking.