HomeKit as a Presence Sensor

I figured this out. How do I test to see if it actually works when she leaves? Manually hitting the switch on her phone works. Can I test just by shutting down the phone?

If you set a automation in the Apple home app to switch the input_boolean off when she leaves and another to turn it on when coming home it will trigger in HA

Thanks Corey

16 posts were split to a new topic: Multiple presence detection methods

Has anyone figured out the correct way to transfer presence detection to a new iPhone? I canā€™t seem to get HomeKit to track my new iPhone and not the previous one.

Make sure the new phone is being used in the ā€˜My Locationā€™ setting in Location Services. On the new phone:

Settings > Privacy > Location Services > Share My Location > ā€˜Use This iPhone as My Locationā€™

HomeKit as a Presence Sensor has been working beautifully for the last month when I first set it up. However once I upgraded to iOS13 the updates seem to be delayed if they ever happen at all. Home trigger used to be done when I was passing by the neighbors house, now however I can make it all the way into my driveway and sit for 2 minutes and it still hasnā€™t been triggered.

Does anyone know what I might need to do to get working like it was before?

I am having similar problem. Was working great. However, after upgrading the apple TV to tvOS 13 and/or iphone to iOS13, it basically stopped working.

Seems to be working again consistently, starting from last week. Not sure what has changed.

Hey all.
Just curious - does everyone using an Apple TV have the ATV wireless or wired connection? I had massive problems when wired - when my phone was outside of home Wi-fi no HA devices would show in Home app (all would say Unreachable). But when I got home the Home app would show all devices properly again. This meant that when anyone went away from home the HA switch automation would activate as ATV didnā€™t know people had left

Iā€™m wired, and itā€™s been solid for so long I actually never even think about it anymore. Both my wife and I use it.

Same for me, last update somehow fixed i think.

I havenā€™t read all the comments, but this is my config: I have my router enabled as device tracker and added all MACs of Iphones etc. to known_devices. The device trackers are linked to persons and to have them show in Homekit I added this:

known_devices.yaml:

johnIphone:
  hide_if_away: false
  icon:
  mac: [MAC]
  name: johnIphone
  picture:
  track: true

joeIphone:
  hide_if_away: false
  icon:
  mac: [MAC]
  name: joeIphone
  picture:
  track: true
  
sarahIphone:
  hide_if_away: false
  icon:
  mac: [MAC]
  name: sarahIphone
  picture:
  track: true
  

configuration.yaml:

device_tracker:
  - platform: [name of supported router]
    host: [ip address]

homekit:
  filter:
    include_entities:
      - person.john
      - person.joe
      - person.sarah

The Automations are made in Homekit. It works perfectly.

I got a weird issue setting this up. Everything seems to work ok. I can toggle on/off from the app and browser while connected to my home network. However, if I am out of my network or just turn off wifi from the phone, it shows not responding. The weird issue is that all my other lights I have connected to HK works. Itā€™s only the this one switch shows not responding. I am not sure where to look.

Seems like I needed a reboot of Apple TV.

Detection no longer working reliably.

Since iOS 14 and probably around release .115.x, I have had troubles with using homekit as a presence sensor. I had been using it since 2018, with good success.

What happens is that currently the sensor may or may not get updated either on or off for presence .
anyone have any ideas? I am using an Apple TV 4K as the home hub, and using 2 iphones, a 7 and an iphone SE(first version). Both of the phones are updated to latest 14.x and the Apple TV is also updated to latest version for it.

I am also currently running HA core v.117.5 .

If anyone knows how to enable the appropriate debug in HA core, I might then be able to tell if the problem lies with iOS or HA.

Thanks in advance!

One thing to take into account is that the tracking only really reports if youā€™re near home. The Bayesian sensor is a good way to incorporate everything together along with conditional automation. Ie if you put your code in on the smart lock then youā€™re definitely home. Or if you are near home then the front door opens. Use wifi as another one. I kinda over engineered mine because Iā€™m a telecom project manager and engineer and this is my OCD outlet. Thought there was a real world need. Ie I may drive near the house on the way somewhere else due to the neighborhood cut through between two main thoroughfares. The other was my office is in a very central location and Iā€™d trigger my at work automations when i was in its area. Individual routines bear an impact like I am near home but havenā€™t gone in the house yet went straight to the garage for a smoke. Donā€™t have a code on the garage but have itā€™s motion sensor. The other thing was at least on HomeSeer my network monitor didnā€™t instantly pick me up though I think the unify monitor here does. I donā€™t have a code on the garage door but have a door sensor there. Stuff like that

Long shot but do you have ā€œPrivate Addressā€ enabled on the phones connected to your wifi network? This scrambles the WiFi MAC address so that tracking cannot be done. It caught me out when the family updated to iOS 14.

2 Likes

I did have Private Address enabled, so I have now re-enabled it. Now for testing to see if that was it.

Thanks for the hint!

Well, since I have disabled Private Address I have not seen any change in behavior.

Any other ideas how i can troubleshoot this? It used to be so reliable, and now is very hit and miss working.

Regards