iPhone WiFi Presence Sensor for Hubitat
A virtual presence sensor for Hubitat that checks if an iPhone is on the WiFi network.
Note: iPhones can put their WiFi to sleep, so you should not use this as your only way of detecting presence. However, it can be used to augment other presence sensors. Interpret results this way:
- If this sensor shows "present", the iPhone is DEFINITELY present.
- If this sensor shows "not present", the iPhone may or may not be present. We don't know.
I only have iPhone devices to test with, but other users have reported it working with the following Android devices. I cannot provide support for Android myself though.
- Nexus 5x
- Pixel XL
- Pixel XL2
- Pixel 3XL
- Nokia 6
- Note 9
- Moto Z2play
- Amazon Fire 7 tablet (2019)
IMPORTANT: If you update to iOS 14, by default it has a feature that randomizes your IP address. This will break this presence sensor. To fix this:
- Go into your Wifi settings
- Choose the settings for your home network
- Turn OFF the "Private Address" feature
The best way to install this code is by using Hubitat Package Manager and then skipping to step 6 after installing the package.
However, if you need to install manually:
- Open your Hubitat web page
- Go to the "Drivers Code" page
- Click "+ New Driver"
- Paste in the contents of iPhoneWiFiPresenceSensor.groovy
- Click "Save"
- Go to the "Devices" page
- Click "+ Add Virtual Device"
- Set "Device Name" and "Device Network Id" to anything you like. Set "Type" to "iPhone Wifi Presence Sensor".
- Click "Save Device"
- On the device list, click the name of your new sensor
- Set "IP Address" to the local static IP address of the iPhone.
- Click "Save Preferences"