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.
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.
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.
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.
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.
Chiming in to say that I’m having what I think is the same issue on my Google Pixel 9 Pro.
It seems that background updates aren’t working properly when not connected to WiFi. When I’m at work I’m only connected to Cellular data, and lately this has often resulted in no location update. Specifically my Zone is not updated.
I can see that my geocoded location is updated correctly, but HA is not recongnizing that my Zone has changed from Home to Work.
Opening the app and leaving it on for some minutes will eventually remedy the issue.
Clearing ALL app data will fix the issue temporarily. This however has the side-effect of creating new device and entity entries for my phone, breaking my phone-related automations…
The error logged in Location Tracking is “Failed to send data”. I unfortunately couldn’t find entries from that time in the “Show and Share Logs” section due to the limited number of entries available.
Edit: A few minutes after posting it happened again, and this time I managed to get log data from around that time.
11:26 is when “Failed to send data” occurred.
Log can be found here.
Also, for greater context, I do have my Home Assistant externally available through a Cloudflare Tunnel (requiring an mTLS cert). I was wondering if that was part of the problem and, while I do see some HTTP 403 errors in the logs, I do not believe it’s related to my Cloudflare mTLS, as the rest of the applicaiton works fine and my Cloudflare WAF logs are not showing any blocked attempts on its end either.
I cannot express how much I appreciate your help! I’m about a month into my HomeAssistant journey and community members such as yourself are why the ecosystem is so great.
ok heres the relevant failure thats the same for all calls that fail after it so not just location updates but also sensor updates appear to be failing:
02-15 13:14:06.973 16688 16749 E SensorReceiver: Error while getting core config to sync sensor status
02-15 13:14:06.973 16688 16749 E SensorReceiver: io.homeassistant.companion.android.common.data.integration.IntegrationException: retrofit2.HttpException: HTTP 403
02-15 13:14:06.973 16688 16749 E SensorReceiver: at io.homeassistant.companion.android.common.data.integration.impl.IntegrationRepositoryImpl.getConfig(IntegrationRepositoryImpl.kt:533)
02-15 13:14:06.973 16688 16749 E SensorReceiver: at io.homeassistant.companion.android.common.data.integration.impl.IntegrationRepositoryImpl$getConfig$1.invokeSuspend(Unknown Source:14)
02-15 13:14:06.973 16688 16749 E SensorReceiver: at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
02-15 13:14:06.973 16688 16749 E SensorReceiver: at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:99)
02-15 13:14:06.973 16688 16749 E SensorReceiver: at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:113)
02-15 13:14:06.973 16688 16749 E SensorReceiver: at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:89)
02-15 13:14:06.973 16688 16749 E SensorReceiver: at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:589)
02-15 13:14:06.973 16688 16749 E SensorReceiver: at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:823)
02-15 13:14:06.973 16688 16749 E SensorReceiver: at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:720)
02-15 13:14:06.973 16688 16749 E SensorReceiver: at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:707)
02-15 13:14:06.973 16688 16749 E SensorReceiver: Caused by: retrofit2.HttpException: HTTP 403
02-15 13:14:06.973 16688 16749 E SensorReceiver: at retrofit2.KotlinExtensions$await$2$2.onResponse(KotlinExtensions.kt:53)
02-15 13:14:06.973 16688 16749 E SensorReceiver: at retrofit2.OkHttpCall$1.onResponse(OkHttpCall.java:161)
02-15 13:14:06.973 16688 16749 E SensorReceiver: at okhttp3.internal.connection.RealCall$AsyncCall.run(RealCall.kt:529)
02-15 13:14:06.973 16688 16749 E SensorReceiver: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
02-15 13:14:06.973 16688 16749 E SensorReceiver: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)
02-15 13:14:06.973 16688 16749 E SensorReceiver: at java.lang.Thread.run(Thread.java:1012)
are you allowing all api traffic to the app? HA has a variety of different apis that the app uses
“are you allowing all api traffic to the app? HA has a variety of different apis that the app uses”
My Cloudflare WAF rule allows (if you have the correct mTLS cert or is coming from a Google IP address) access to my entire Home Assistant domain. So, I believe, it should have access to all of the APIs.
I’ve been checking my Cloudflare WAF log, wondering if that’s the problem, and I’m not seeing any blocked requests which is good as I installed and selected the mTLS certificate my WAF requires.
I believe I have the cert installed and selected correctly. The application itself works fine when I’m away from home and there aren’t any requests being blocked by my Cloudflare WAF.
the app itself is authenticated webview other pieces like location and sensor use APIs.
do you have widgets and/or use features like device controls? do those work remotely? in device controls can you see the state and control when not at home?