Homekit not recognizing iPhone location?

Hi, I am currently experiencing a few problems getting Homekit to recognize my phone when it comes near my home. It seems to work for my wife’s iPhone but not my own, and I set her home app up (ha). I have installed the HA app on my iphone as well as being the primary registered user for our Homekit.

I have set it up so that when I arrive home, Homekit ideally automates an input_boolean in home assistant to switch from off to on, and vice versa when I leave. For some strange reason it seemingly doesn’t see my location at all to initiate the automation. Although i am clearly home in the HA UI in device_tracker.iphone via my router and bluetooth.

Any ideas, or setting that I may have messed up on the iOS side getting this running? Thanks!

Have you done this;

Thanks, I have gone through it all in the link provided, and everything is verified to be setup correctly. At the moment Homekit is showing occupancy detected in the home. Likely do to the Home Assistant router and bluetooth device_trackers running showing me as home.

Nothing is having any effect on the input_boolean switch through the Home app in iOS. I’ll fiddle with it some more (reboots etc), before I remove myself and re-add myself to iCloud as a last resort.

edit: I have also checked my “Share location from” setting in iPhone settings, and deleted all old phones i have owned, which were still there. And verified my current phone is the one sharing location. All Homekit instances in Location Services are on as well.

Let’s first figure out where the cause of the problem is located. You’ve created an automation in Homekit, triggering the input_boolean. Does this work when you test the automation in the Home app?

It does. I select “test this automation”, while looking at my Home Assistant UI the boolean switches instantly to on. Reverse is true with the “Leaving” automation test.

So it seems your home(kit) app on your phone does not get your location right or is not able to communicate with homekit hub (ipad, appletv, ipod) when you’re not at home. Did you check this?

HI.

have you set up the home assistant companion app on your iphones, as well as the ios component and the apple icloud pressence detection for your devices. these links link helped me alot.

@cheynespc but these are totaly different things. Homekit presence has nothing to do with the HA app, IOS component or icloud. Unless I’m mistaken @HiFi wants to use this;

1 Like

Thanks for the help. I signed out of iCloud altogether, and re-signed in, and it seems to have done the trick, I’ll know more today as I leave home, but yesterday, it accurately knew when I was away, as well, I was able to control lights etc remotely. My user name in Homekit has changed from my first name to my iCloud email address but, thats not a big deal, it seems to be working.

The only thing now that I am confused about functionality-wise in Homekit is that I was under the impression that Homekit was able to track your location indifferent zones via HA. If my wife or I are at designated work zones, there isn’t anything reflective of that in the Home Assistant UI like we were able to do when we used cloudMQTT and Owntracks. I thought since we had Apple products, in the hopes of simplifying the setup, the Homekit would take its place through iCloud tracking. Unfortunately, I just don’t know the proper setup if this is possible.

Homekit is presence detection not location tracking like Owntracks. I don’t think it supports different zones as in different locations. That’s probably why the app is called Home :wink:

ha, you are probably right. I was hoping since the iPhone has a “Significant Locations” feature, it was incorporated into Homekit as well. Cloudmqtt/owntracks it will have to be i guess. I’ll have to see if i can set up mqtt from home which would be my preference. Thanks

I am using a combination of modules as stated before, I found the iCloud app useful for zones and alerts me when home or at family’s or friends. The HomeKit app in apple will activate when u arrive or leave locations when setting up the automations in the apple HomeKit iOS app I use this to send alerts when kids home from school etc. I use a lot of automations in the HomeKit app as everyone in family can easily use and create there own

Digressed again

Retry icloud

EDIT

as stated in hassio components

" The icloud platform allows you to detect presence using the iCloud service. iCloud allows users to track their location on iOS devices.

It does require that your device is registered with “Find My iPhone”.

To integrate iCloud in Home Assistant, add the following section to your configuration.yaml file: "

# Example configuration.yaml entry
device_tracker:
  - platform: icloud
    username: USERNAME
    password: PASSWORD
    account_name: accountname

icloud has better features than using the ios component alone and will automattically add your new devices and more stats for each ios device in HA.

icloud details

Untitled

1 Like

I hadn’t checked for an iCloud component, I must have missed that when I first read your post. That’s great! Thank you. I think the icloud_set_interval may be just the thing to update location away from home. I don’t necessarily need it to update a lot unless I significantly move out of a location when I am away, which is fine, as it states it cannot be used as a device_tracker. (Although looking at your example, you clearly can).

The iOS component itself with Homekit has been working awesome once I reach the driveway for presence detection, though. :slight_smile:

1 Like

image

(Triggered means home )

Do u have something like this if not check out

My github of HomeKit yaml

Home-Assistant/ homekit.yaml

device_tracker_YOURAPPLEDEVICE add to your homekit includes:

Actually, yes, I have that now in my Homekit. For both my wife and I.

1 Like

beautiful. :slight_smile:

Thank you again for the help!

1 Like

Ran into a little hiccup with the authentication:

“Please choose your trusted device by entering the index from this list: 0: SMS to **********;”

The phone has received the normal 6 digit code for verification but all that happens once input under “trusted device” is the configurator is called and thats it… nothing changes. The iCloud Configurator remains and errors state " Error configuring service <ServiceCall configurator.configure (c:........etc) in info.

I’ll keep working on it… not exactly sure what the “index from this list: 0” is supposed to mean. What index and what list. A little cryptic to me.

1 Like

restart and try again mine worked 2nd go if i recall

1 Like

Thanks that worked… needed to type in “0” first then SMS text code came through… working now. Somewhat. Multiple devices with same name now on network in the info panel. I think there is a fix for that somewhere. Likely something to do with the bluetooth and router device_tracker that are currently being used perhaps. Almost there… ha