Presence sensor when on WiFi

I know that with Life360 going south for this that using your phone as a presence sensor seems to be a thorn in the rear for a while. But to me, there has to be some sort of solution to this. Something I thought of is, can the app simply detect when I'm on my home WiFi network? It would mean that I'd have to be at the house, as opposed to just in the geofence, but at least when I pull in the driveway, my lights will turn on in the house.

I have it set to change the mode between home and away depending on my phone's location, and it's so hit or miss if it will work. Often times, I get home, and no mode change, but if I open the app, it will suddenly realize I'm home and change modes.

Tagging @moncho1138 since this is related to the app.

I use Home Assistant to watch for iOS joining WiFi and it is 100% accurate.

BUTTT, You can use iOS shortcuts to watch for specific SSID connections and trigger Apple HomeKit sensors. If you have HomeKit, just add a couple of virtual switches, share them with HomeKit as a sensor, and have fun.

Here is the HA sensor YAML, but you could make it work on a Raspberry Pi if you have one on your network.

Using an iPhone like this will draw some extra power, but my thinking is that at home power is usually available, so it does not really matter. Some people may care though.

Note the actual printf 'steves' here doesn't matter... :slight_smile:

  - binary_sensor:
      name: iphone_ping_bloodtick
      command: >
        IP="10.0.0.71"; 
        ping -c 1 -W 1 $IP > /dev/null 2>&1 && echo success || 
        (printf "Steve Jobs" | nc -u -w2 $IP 5353; ip neigh show nud reachable nud delay | grep -i "$IP" > /dev/null 2>&1 && echo success) ||
        (printf "Steve Wozniak" | nc -w2 $IP 62078; ip neigh show nud reachable nud delay | grep -i "$IP" > /dev/null 2>&1 && echo success || echo fail)
      device_class: connectivity
      payload_on: "success"
      payload_off: "fail"
      unique_id: "binary_sensor_iphone_ping_bloodtick"

A related method can depend on how you provide your WiFi. If you have a Ubiquiti-based network it's API can be polled to check if particular clients are connected (or not) allowing you to use that for presence (I much prefer it over geofencing). Other systems may allow for similar methods.

I use "iPhone WiFi Presence Sensor" driver for detecting my Andriod phone connecting to my WiFi. You can find it in HPM. It was built by Joel Wetzel

It works well for myself and my wife on Andriod phones.

1 Like

iOS enters deep sleep to save power, so pings or http requests fail. I don’t think Hubitat has any other way to check route tables to see if an Apple device is on the network. That’s why tracking them on net is tricky.

You can try this is you are on Android.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.