On the iPhone, the app needs to be configured to always allow location access. This will randomly trigger, at any given time, a warning popup on the iphone saying âHome Assistant has been using your location in the background, do you want to let it,â
My wife would hit no since it sounded âscaryâ and her phone would stop updating the location. When I finally told her you need to hit always allow, I stopped having issues.
I realize that, but the point is that an option pops up randomly to the user to revoke that permission at any time. Once the app stops working in the background and is put to sleep, it generally stops updating everything, including the battery, and you will get the exact result âseen in your pictureâ.
I donât think itâs too much to ask the user of that phone, âhey do any weird pop-ups come up, and what do you click when you see them?â To rule this out.
Short of that, are there any log errors around the phone, and have you checked the event log in the iPhone app itself by going to app configuration, debugging, event log for issues?
That is correct, i made my wife allways says allways allow when those appear. As i did with my phone, a quick trip in the settings on here phone says âtillatelse for plassering â allwaysâ and âbakgrunnsoppdatering/background updateâ = Active.
Checking the log, it seems fine (its in norwegian) but basicly it says if some siginificant update has occured its pulling that, etc. however in HA the device tracker is allways showing as home. And have been for 3 days. Even though we have been gone and done stuff each day.
If the phone is off the wifi and on the cell network, can you access home assistant from it to control things through the app? If not check that the internal url, external url, and ssid are configured properly.
If this event happened outside the home ssid should say ânoneâ.
I recall having an issue with the internal url and ssid with the ios app in the past. I dont even configure an internal url and ssid and just use the external url which links to my duckdns address. Also make sure you specify https in the external url.
If this doesnât fix it, are you using VPN, reverse proxy, I r nabu casa for external access to further troubleshoot those?
Sorry for jumping in, I have a similar issue with my iPhone and location not updating.
The location history shows changes. The geocoded entity shows locations. But Iâm only ever âhomeâ or âawayâ, Iâm never in zones Iâve created.
I can control HA while on cellular. But my app or phone just doesnât seem to deal with zones! Zones is turned on in location settings, everything is turned on.
Do you have any ideas what I can try to fix this? Thank you!
I dont use zones myself. Are you defining them with the ui or by yaml?
Maybe you need to increase the radius beyond the default 100 meters?
Also, youâre looking at the state of the phone device tracker itself, and not the person it is linked to right? Thereâs a difference here in how zones are handled by the device tracker vs person entities.
I just tried adding a zone and it shows up under the location settings screen in the IOS app. When you go to app configuration, location, do all your zones show up there on that screen? If the zones donât show up there, then there is a connection issue between your Home Assistant instance and the IOS app that needs to be resolved.
If it is there, next time you are in one of the zones, go the the app configuration, location and then click âupdate locationâ. This will force a location update and should get the location to recognize as beintg in the zone.
Also on the location screen in the app configuration, make sure your settings are as follows:
Location Permission - Always
Location Accuracy - Full
Background Refresh - Enabled
All options under âupdate sourcesâ should be enabled.
Also, make sure that the appâs access to âlocation in the backgroundâ is âalways allowâ - here is the Apple link I posted above for more details.
Hopefully changing one of these settings gets it working again.
Everything was enabled, zones were there, all permissions, everything. But it didnât work, still. So as a last resort I stopped my device tracker, deleted all entities related to my phone, deleted the phone device and entities under the companion app integration, everything. Deletd the app from my phone, then restarted HA.
After that I reinstalled the app, and as if by magic everything works like a charm. What went wrong in the first place I donât know. Why I didnât try this sooner is even a bigger mystery.
Exactly, stressing the âchangingâ word, regardless what those settings shows.
It happens not the first time, to me that after updating the application HA stopped updating the location regardless that location settings remained âAlwaysâ. It was enough to turn this settings to âNeverâ and then back to âAlwaysâ to make it working.
BTW this bug is really old right now.
@zacwest sorry for tagging you. Donât know how to contact you otherwise. I have logs from iPhone in question, saved just before re-enabling location settings. If you feel it could help nailing down the root cause, please let me know. For obvious reasons Iâm not going to share it publicly.
You can attach them here, please include a text document describing the issue.
It sounds like multiple things are happening in this thread:
a device tracker which stopped updating until resetting the integration. this makes me suspicious that the device had multiple integrations and the old one stopped updating, or the user account had multiple device trackers attached to it
some kind of bug where the location permission setting doesnât work for Always though it looks like it does
For the first one it would be worthwhile to check my assumptions there.
For the second one; thereâs a lot to unpack. We are almost certainly unable to affect the system-level preference for Always. However, if you delete the app at all and reinstall, when we request âAlwaysâ the system will actually lie to the app - it will show as Always until it does the annoying background prompt. Could be this depending on timing.
Hi all, apologies for reviving this thread. If you prefer I create a new one, please let me know and I will do so. Also apologies for any weird punctuation and spelling, Iâm on mobile.
So after reporting my issue was fixed, about 25 days ago, my issue is back, strong as ever.
IPhone XR, latest iOS companion app.
Issue: my device tracker (and my âpersonâ related to it) are only ever âhomeâ or âawayâ, and never in any of the zones I have created.
I can access HA when not on my home Wi-fi.
all permissions are enabled.
geocoded location is correct
location history is correct, itâll even show my purple circle within a blue/green zone circle.
And yet, I am not registered as being inside a zone.
I donât know how long it was working for, I wfh and donât go out much. I am getting a bit frustrated with this though.
My OH has no issues with their pixel-something Android phone.
Apart from deleting my phone from HA, deleting the companion app, and reinstalling both⌠is there anything I can try? That worked last time, but for only a little while it seems.
Iâve tried OwnTracks months ago, but that never seemed to connect/talk to HA properly, it didnât work well.
Iâm starting to think I just have to live with faulty presence detecting.