Ios Presence Detection and Device Tracking

Home Assistant 0.92.2 and ios. Let’s try to keep this simple as all I want to do right now is have HA let me know if I am home or away. That’s it, nothing more right now. There does not seem to be much on the ios integration with HA by way of help.

Added “ios:” (without the quotes) to my configuration.yaml file. Added the HA ios app from the app store.

Restarted HA…shows an entity as “away” all the time. It never seems to actually update despite me being 5 feet away from the HA server.

According to the ios docs, all kinds of good stuff is supposed to happen automatically…it doesn’t seem like any of that happened.

Check the Location settings in the app.

Thanks @tom_l…I just double checked to make sure it was checked on my iPhone. It was.

So I just tried to update my location manually by hitting the arrow in the lower left hand corner of the iPhone App. Here is the error I got:

Location failed to update
Failed to send current location to server. The error was The operation couldn’t be completed. (io.robbie.Home-Assistant error 400.)

I know it is probably not the answer you are looking for, however I think the iOS 2.0 app will be released sometime in the future. The ios component will not be needed anymore with this new app as it uses the mobile_app: integration. Actionable Notifications can be made within the app so there would be no need to use the ios component at all. However, the requirements are that you must have iOS 12 or higher. (maybe 10 and 11 are supported as well, not sure though) iOS 9.x will no longer be supported in the new app. So if you have older ipads you can stay on those with the ‘old’ app.

I have been testing this out for some time now, and sometimes it breaks after an update (luckily it is easy to revert to an older version) but other than that it is actually a lot better than the ‘old’ app (I quote old as it is still the current released app).

It is also possible to have both the old app and new app installed, they won’t interfere as the 1.5.1 app uses the ios component and the 2.0 app uses the mobile_app component. Device trackers created with the new app will look like something this: device_tracker.a2718asfghwa5446a87wbvbash1 (I say this because it might be confusing otherwise). It will also be the last entity created in the known_devices.yaml, so if you really don’t know which one is which you could look there. You can not change this, you can however add a friendly name.

The notifications part will be different too, it will create new services like notify.mobile_app.iphone_thr33_d. What I mean is, you can just have both apps installed and create automations off both if needed. (I recently gone 2.0 all the way though).

How to do this then? Simple:
Step 1: https://testflight.apple.com/join/XCUga7ko (install this on your iphone and accept)
Step 2: login to your Home Assistant with the new app (you will find a beautiful new login screen)
Step 3: after logging in, you will notice there is no more arrow on the bottom and that the settings are gone. Pull down the entire view and it will refresh the app and send your location data with it (it is basically a refresh and location update in one). Settings can now be found in the hamburger menu next to the standard Home Assistant configuration in the UI.
Step 4: restart Home Assistant
Step 5: open the services panel in your dev-tools
Step 7: type mobile_app, you should see a new device like the example I show earlier notify.mobile_app.iphone_blablabla
Step 8: open the states list in your dev-tools
Step 9: search for the newly created device_traker, the one with a long string (bunch of numbers/letters)
Step 10: change all existing notification and device tracker entities you had with the mobile_app and new device tracker entities.
Step 11: Voila you are done, happy 2.0ing

@jimz011 thank you for that information. Seems very promising. But when I go to that link I get, “This beta isn’t accepting any new testers right now.”

But, I uninstalled the HA app from my iPhone and then reinstalled it. It found it and seems to be working.

Hm ok, I will ask Robbie about this, though, it might be possible that he is going to release it soon (maybe that is the reason).

Anyways glad to hear it works again!

I noticed that in my configuation.yaml GPS setting for “Location required to calculate the time the sun rises and sets”, is also used by the app’s Location Settings to track Entry/Exit. In my case I had a problem because I had arbitrarily set my location based on the nearest town for “sun rises and sets”, which meant I was never home