This integration sends a mDNS message to defined hosts.
The device responds if it's connected to the network, even when in deep sleep, and an entry in the ARP cache is made and read.
Usefull as a device_tracker for your person integration to see if users are at home.
After installation you need to restart Home-Assistant before using the integration.
If you dont' have HACS installed yet, I highly recommend it.
or search for
iPhone Device Tracker
.
Download the iphonedetect
directory and place in your <config>/custom_component
Assign a static IP address to the device you want to track, probably in your router.
Alternative, set a manual IP in your device WiFi configuration.
Avoid automatically connect to differtent SSID's (2.4 and 5 ghz bands)
If you don't have My Home Assistant redirects set up, go to Settings -> Devices & Services
Click "Add integration" and search for iPhone Device Tracker
Give the entity a unique name
and enter its IP address.
This will create an entity device_tracker.<name>
Repeat the steps for additional entities.
You can change the consider home timeout per tracked device in the UI.
Default is 24 seconds.
You can change the IP address of the tracked device in the UI.
Private Wi-Fi address
The device private MAC address will remain the same for each network, as long as the network isn't recreated or rotating (iOS 18+) MAC is used.In other words, if a tracked device no longer can be found the user have propably recreated the connection to your Wi-Fi forcing a new random MAC address to be used.
Note that if your WiFi has different SSID for the 2.4 and 5 ghz bands, and the phone has private network enabled, two different MAC will be presented to the DHCP.
Most likely that will require the integration to track two IP's per user/Person.
So, for best result only have/connect to one SSID, turn off private network and assign static IP.
False or flaky not_home status
Especially when the network has multiple Access Points, tracked devices sometimes are marked as not_home when actually connected to the network. Increasing the consider home timeout might help this. Most likely it's a network issue though, try placing your AP's at different locations.Devices might auto-update during night, they of course then will be not_home for awhile.
Original idea from return01
Author is in no way affiliated with Apple Inc.
Author does not guarantee functionality of this integration and is not responsible for any damage.
All product names, trademarks and registered trademarks in this repository, are property of their respective owners.