home-assistant / iOS

:iphone: Home Assistant for Apple platforms
https://companion.home-assistant.io
Other
1.48k stars 283 forks source link

Device tracking does not work anymore #2583

Open markusspa opened 4 months ago

markusspa commented 4 months ago

Model Name: iPhone 14 Pro & iPhone 12 Pro

Software Version: iOS 17.3.1

App version: Home Assistant Companion App 2024.1 (2024.535)

Home Assistant Core Version: 2024.2.1

Description of the bug: The location of my device is not updating anymore. That is why I am always home although I left the home zone. I checked all preferences in iOS settings as well as the settings of the HA App (Location, Background activities, ...). VPN works well. My girlfriend has exactly the same problem.

The activity protocol in the app shows a lot of errors. Perhaps it helps to solve the problem. The errors are always the same:

Expected behaviour: When I am leaving the home zone, Home Assistant changes my status into "away".

bgoncal commented 4 months ago

Was this working at some point with the same VPN setup? When do you connect to the VPN? As a possible quick fix can you reboot your iphone?

markusspa commented 4 months ago

Yes, it was. The VPN setup did not change and it works. When I am away, I have access to Home Assistant, dashboards and I am able to control everything. But the location is not updating. A restart of my phone was not successful. I know from others who have the same problem, too (Android and iOS).

NielsAutomation commented 4 months ago

Same problem here (also IOS). My setup is without a VPN.

bgoncal commented 4 months ago

Checkout location history and share what you see there please. Also you can enable notifications for when you enter and exite zones, if you do that, let me know how it goes. https://github.com/home-assistant/iOS/assets/5808343/d78c2056-0b40-45bc-abb1-3be6914f26c3

NielsAutomation commented 4 months ago

It looks like I solved it on one of the iPhones. After some digging, I saw an error in the companion app (Webhook failed with status code 503). After deleting the server from the app and reconnecting it it worked again.

For the people who don't know where you can find the logs from the companion app:

markusspa commented 4 months ago

Thanks @NielsAutomation! It seems to work for me, too.

alexwhittemore commented 4 months ago

This happened to me after the latest update. Only if I delete my server and try to re-add it, I see this:

image

Edit: it turns out my problem was that something about my current setup is causing HA to come back up very slowly and haphazardly, and a couple of integrations weren’t properly loaded yet, including mobile devices which wasn’t clear to me at first.

A couple full system restarts later and there’s no specific issue with mobile devices.

the-misterlas commented 4 months ago

Also seeing an issue with multiple iOS device locations not updating.

iOS 17.3.1 HA 2024.2.2

koburg commented 1 month ago

Yes me to two iPhones 16 Pro also not updating this has been working flawless for long time but not in last 2-3 months

bgoncal commented 5 days ago

Check your logs, if you have webhook 503 error, please delete the mobile app integration or delete the server in HA app and add it back