Homekit not recognizing iPhone location?

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

check known_device.yaml and disable as required

Done. Thanks guys, everything is working except that only my Home Assistant iOS app no longer knows when I am home or when I am away… happened around the same time I was configuring iCloud…(which is working great by the way), unfortunately my iOS app iphone instance is showing up in the known devices and although not configured this way, it is expecting to be tracked. My wife’s iPhone appears as a trackable iOS device from her HA app as well. Weird as my HA app is also giving me notifications when I enter zones ( set this up for testing purposes ) when I am away from home.

Hope thats not too confusing. Ordinarily my iOS app interacts with HA as a notify device… not a known_device as far as I know. I must have input something odd into my configuration for that to show up. Right now, it should only be tracking through iCloud, and the router, (turned off bluetooth tracking). I think the issue started around the time I changed device IDs/ turned off bluetooth tracking as I was having duplicate name errors for my phone instances once I added iCloud support.