Android pixel 6 pro - location failed to send when not on wifi

I’m having issues with my location not being updated when I’m not on wifi. In the companion app logs I see " background location failed to send"

I have the app connected to cloud in the settings and it works fine to control devices but I see this issue as soon as I turn off WiFi.

As soon as WiFi is back on it starts sending the location again.

Data saver is turned off and app has full access to my location all the time.

Any pointers?

Thanks
Stu

settings > companion app > select your server

confirm your settings here, if you have teh Use Cloud option checked try to uncheck it and check the URL there.

So I turned off the use HA cloud option and made sure the URL was set to my ha cloud URL manually which is actually a custom URL but fully validated and all works fine when accessing either via app or browser but still get the failed to send message in the location debugging.

Any other thoughts?

yes whats the failure from the logs?

https://companion.home-assistant.io/docs/troubleshooting/faqs/#device-tracker-is-not-updating-in-android-app

these steps go over proper settings annd looking at logs and tracking history

Ok, so I tried all this and did nothing but did the starting fresh and that works although I’m oddly having notification issues with android phone - iPhone works fine

Using the developer tools service and automations iget the following error
“Failed to call service notify.notify. Device not connected to local push notifications”

The notifications work fine if I send to the specific android device though.

Persistent connection is set to never

I am having the exact same situation (Pixel 7 Pro). I am new to HA so this is the first time I’m setting up the companion app. Companion app does not update unless I’m at my home location. I have followed all steps in the troubleshooting post.

Insterstingly, I am coming to HA because I have been having issues with location tracking with my Smartthings system for a while. Now I am starting to think it is a phone issue.

Logs on the companion app say “background location - Failed to send”

Now look at the logs from the previous menu under troubleshooting you should see the actual error there. It will help give a clue as to what’s going on.

Determined my issue was a lack of HA cloud implementation.

I thought the GPS device tracking could be used without cloud, similar to the notify service.

The app needs a way to send data back to the server

I have a similar problem.
I’m using Nabu Casa cloud connection and can manage all aspects of my HA from anywhere.
My phone with companion app only reports location successfully while at home, and has Location failed to send messages when away.

My wife’s phone reports wherever she is, and so do my children’s, so this can work.

I was the first to install the companion app, while setting up HA, and I probably messed with the settings.

End result is that from HA point of view, I never leave home, home is always occupied, and the heating never turns down.

What do I need to do on my phone?

First update both HA and the app. Next log it of the and log back in. Sure that fix the issue?

I deleted the app and reinstalled it, after first checking that I could log in to Nabu Casa and retrieve my URL.
Login to the app, while away from home, via Nabu Casa worked seamlessly.
Location now works and there is nobody home.

My wife is also using a Google Pixel device (Pixel 7a) and has similar issues.
When on the home wifi the location updates without problem.
When on mobile data the location does not update, while I can still turn on/off my lights etc?
Like others here when I look in “Troubleshooting” in the “Location tracking” history I have the error “Background l Location * Failed to send”.

Similarly other device data (like whether the ringer mode is normal or silent) do not update.
I didn’t change any setting just clicked around a bit in the server connection setting in the home assistant companion app and now it seems to be working.

We’ll be going out soon so I’ll see if location tracking works well now.

Well at least I occasionally got location updates this time on my wife’s phone (though only a tenth of the frequency with which my own phone sent updates).
Her phone also still showed errors.
Here’s an example:
05-20 13:14:15.515 12283 29162 E LocBroadcastReceiver: Caused by: java.net.ConnectException: failed to connect to ha.qaudrilant.a599.ae/54.115.6.208 (port 443) from /18.78.169.118 (port 42032) after 10000ms: isConnected failed: ECONNREFUSED (Connection refused)

But on other occassions the logs just says it failed without giving any reason:

05-20 17:02:19.343  4734  4734 D LocBroadcastReceiver: Received location update.
05-20 17:02:19.346  4734  4734 D ForegrndServiceLauncher: Check if service HighAccuracyLocationService is running. Service running = false
05-20 17:02:19.347  4734  4781 D LocBroadcastReceiver: Last Location: 
05-20 17:02:19.347  4734  4781 D LocBroadcastReceiver: Coords:(40.7502529, 2.3464987)
05-20 17:02:19.347  4734  4781 D LocBroadcastReceiver: Accuracy: 20.0
05-20 17:02:19.347  4734  4781 D LocBroadcastReceiver: Bearing: 0.0
05-20 17:02:19.347  4734  4781 D LocBroadcastReceiver: Begin evaluating if location update should be skipped
05-20 17:02:19.347  4734  4781 D LocBroadcastReceiver: Received location that is 1045 milliseconds old, 1716217338302 compared to 1716217339347 with source fused
05-20 17:02:19.355  4734  4781 D ServerConnectionInfo: localUrl is: true, usesInternalSsid is: false, usesWifi is: false
05-20 17:02:19.411  4734  4781 E LocBroadcastReceiver: Could not update location for 1.

More logs here: SUCCESFULL UPDATE:05-20 15:26:59.621 12283 12283 D LocBroadcastReceiver: Rec - Pastebin.com