"Unable to send zone event to Home Assistant"

I started receiving an error about a week ago when entering / leaving my “home” zone on home assistant. The message is “Unable to send zone event to Home Assistant”. This is happening on android, phone is a Samsung S20+

Has anyone else seen this? I’m hesitant to post my logs here as it also has my location.

You can just remove the coordinates and show the error. We need the actual error to see what it is.

Got the same error. Where can I find the logs about this? “Configuration” → “Logs” I do not see the message. Thanks.

App configuration has a different log section specific to the app

Unfortunately there is no log entry to this message in the app logs. I am referring to App ConfigurationShow and Share Logs. But the logs are rather old there and get overwritten every day. Is there a possibility to see older logs? Generally. Should this work without Home Assistant Cloud?

You need to reproduce the issue then immediately grab the logs.

I think I am missing a general point here.

Should this work without Home Assistant Cloud?

Because when I am out of the zone I clearly have no connection to the HA and therefore maybe can not send the event? Hence, my question above.

Is it possible to realize Presence Detection with the app and no HA Cloud?

Thanks

your device needs a way to send data back home, whether its HA cloud or your own setup…without having your instance externally accessible you should not expect the app to be able to send data back home

The nebu casa cloud isn’t required for sending data back to your home assistant instance. If your home assistant instance is not open outside of your own network, then yes, your phone won’t be able to send zone updates to home assistant. If you can manage your home assistant instance outside of your network, then you should be able to send zone updates back to home assistant.

Now before this topic gets too full of unrelated information: I modified my location sensors in the home assistant app on my phone and something seems to have fixed it, I think it was enabling single accurate location, even though background location was enabled and location zone was enabled, however enabling this setting has caused considerable battery drain.

Edit: Actually may have been enabling high accuracy mode that caused the battery drain. I need to play around with it more but I think it’s going to creep out my neighbors walking back and forth down the street.

Not sure if you have seen it but give the following page a read through should help you understand location settings better :slight_smile:

1 Like

Started happening again, I’ve played around with the settings and can’t figure it out.

Here’s the log: Dropbox - homeassistant_companion_log_5-11-2021_21-2-33.txt - Simplify your life

Failed to connect is the error, it’s having issues talking to some nabu casa server it seems.

I think that might be unrelated? I’m looking at the message at the tail end of the log:

06-11 21:02:19.912 32089 32089 D LocBroadcastReceiver: Received geofence update.
06-11 21:02:19.920 32089 32089 D UrlRepository: localUrl is: false and usesInternalSsid is: false
06-11 21:02:21.999 32089 32089 E LocBroadcastReceiver: Unable to send event to Home Assistant
06-11 21:02:22.008 32089 32089 D Toast   : show: caller = io.homeassistant.companion.android.sensors.LocationSensorManager$handleGeoUpdate$1.invokeSuspend:513 
06-11 21:02:22.008 32089 32089 I Toast   : show: focusDisplayId = 0, isFocusInDesktop = false mCustomDisplayId=-1 isDexDualMode=false
06-11 21:02:22.008 32089 32089 I Toast   : show: isActivityContext = false

that log message is incomplete, look at the one above that with the complete traceback

06-11 20:47:25.479 32089 18902 E LocBroadcastReceiver: Could not update location.
06-11 20:47:25.479 32089 18902 E LocBroadcastReceiver: io.homeassistant.companion.android.common.data.integration.IntegrationException: java.net.ConnectException: Failed to connect to hooks.nabu.casa/54.160.54.138:443
06-11 20:47:25.479 32089 18902 E LocBroadcastReceiver: 	at io.homeassistant.companion.android.common.data.integration.impl.IntegrationRepositoryImpl.updateLocation(IntegrationRepositoryImpl.kt:183)
06-11 20:47:25.479 32089 18902 E LocBroadcastReceiver: 	at io.homeassistant.companion.android.common.data.integration.impl.IntegrationRepositoryImpl$updateLocation$1.invokeSuspend(Unknown Source:15)
06-11 20:47:25.479 32089 18902 E LocBroadcastReceiver: 	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
06-11 20:47:25.479 32089 18902 E LocBroadcastReceiver: 	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)
06-11 20:47:25.479 32089 18902 E LocBroadcastReceiver: 	at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:571)
06-11 20:47:25.479 32089 18902 E LocBroadcastReceiver: 	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750)
06-11 20:47:25.479 32089 18902 E LocBroadcastReceiver: 	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:678)
06-11 20:47:25.479 32089 18902 E LocBroadcastReceiver: 	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:665)
06-11 20:47:25.479 32089 18902 E LocBroadcastReceiver: Caused by: java.net.ConnectException: Failed to connect to hooks.nabu.casa/54.160.54.138:443
06-11 20:47:25.479 32089 18902 E LocBroadcastReceiver: 	at okhttp3.internal.connection.RealConnection.connectSocket(RealConnection.kt:297)
06-11 20:47:25.479 32089 18902 E LocBroadcastReceiver: 	at okhttp3.internal.connection.RealConnection.connect(RealConnection.kt:207)
06-11 20:47:25.479 32089 18902 E LocBroadcastReceiver: 	at okhttp3.internal.connection.ExchangeFinder.findConnection(ExchangeFinder.kt:226)
06-11 20:47:25.479 32089 18902 E LocBroadcastReceiver: 	at okhttp3.internal.connection.ExchangeFinder.findHealthyConnection(ExchangeFinder.kt:106)
06-11 20:47:25.479 32089 18902 E LocBroadcastReceiver: 	at okhttp3.internal.connection.ExchangeFinder.find(ExchangeFinder.kt:74)
06-11 20:47:25.479 32089 18902 E LocBroadcastReceiver: 	at okhttp3.internal.connection.RealCall.initExchange$okhttp(RealCall.kt:255)
06-11 20:47:25.479 32089 18902 E LocBroadcastReceiver: 	at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.kt:32)
06-11 20:47:25.479 32089 18902 E LocBroadcastReceiver: 	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
06-11 20:47:25.479 32089 18902 E LocBroadcastReceiver: 	at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.kt:95)
06-11 20:47:25.479 32089 18902 E LocBroadcastReceiver: 	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
06-11 20:47:25.479 32089 18902 E LocBroadcastReceiver: 	at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.kt:83)
06-11 20:47:25.479 32089 18902 E LocBroadcastReceiver: 	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
06-11 20:47:25.479 32089 18902 E LocBroadcastReceiver: 	at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.kt:76)
06-11 20:47:25.479 32089 18902 E LocBroadcastReceiver: 	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
06-11 20:47:25.479 32089 18902 E LocBroadcastReceiver: 	at io.homeassistant.companion.android.common.data.HomeAssistantRetrofit$special$$inlined$-addInterceptor$1.intercept(OkHttpClient.kt:1089)
06-11 20:47:25.479 32089 18902 E LocBroadcastReceiver: 	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
06-11 20:47:25.479 32089 18902 E LocBroadcastReceiver: 	at okhttp3.internal.connection.RealCall.getResponseWithInterceptorChain$okhttp(RealCall.kt:201)
06-11 20:47:25.479 32089 18902 E LocBroadcastReceiver: 	at okhttp3.internal.connection.RealCall$AsyncCall.run(RealCall.kt:517)
06-11 20:47:25.479 32089 18902 E LocBroadcastReceiver: 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
06-11 20:47:25.479 32089 18902 E LocBroadcastReceiver: 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
06-11 20:47:25.479 32089 18902 E LocBroadcastReceiver: 	at java.lang.Thread.run(Thread.java:923)
06-11 20:47:25.479 32089 18902 E LocBroadcastReceiver: 	Suppressed: java.net.SocketException: Software caused connection abort
06-11 20:47:25.479 32089 18902 E LocBroadcastReceiver: 		at java.net.SocketInputStream.socketRead0(Native Method)
06-11 20:47:25.479 32089 18902 E LocBroadcastReceiver: 		at java.net.SocketInputStream.socketRead(SocketInputStream.java:119)
06-11 20:47:25.479 32089 18902 E LocBroadcastReceiver: 		at java.net.SocketInputStream.read(SocketInputStream.java:176)
06-11 20:47:25.479 32089 18902 E LocBroadcastReceiver: 		at java.net.SocketInputStream.read(SocketInputStream.java:144)
06-11 20:47:25.479 32089 18902 E LocBroadcastReceiver: 		at com.android.org.conscrypt.ConscryptEngineSocket$SSLInputStream.readFromSocket(ConscryptEngineSocket.java:945)
06-11 20:47:25.479 32089 18902 E LocBroadcastReceiver: 		at com.android.org.conscrypt.ConscryptEngineSocket$SSLInputStream.processDataFromSocket(ConscryptEngineSocket.java:909)
06-11 20:47:25.479 32089 18902 E LocBroadcastReceiver: 		at com.android.org.conscrypt.ConscryptEngineSocket$SSLInputStream.access$100(ConscryptEngineSocket.java:731)
06-11 20:47:25.479 32089 18902 E LocBroadcastReceiver: 		at com.android.org.conscrypt.ConscryptEngineSocket.doHandshake(ConscryptEngineSocket.java:241)
06-11 20:47:25.479 32089 18902 E LocBroadcastReceiver: 		at com.android.org.conscrypt.ConscryptEngineSocket.startHandshake(ConscryptEngineSocket.java:220)
06-11 20:47:25.479 32089 18902 E LocBroadcastReceiver: 		at okhttp3.internal.connection.RealConnection.connectTls(RealConnection.kt:379)
06-11 20:47:25.479 32089 18902 E LocBroadcastReceiver: 		at okhttp3.internal.connection.RealConnection.establishProtocol(RealConnection.kt:337)
06-11 20:47:25.479 32089 18902 E LocBroadcastReceiver: 		at okhttp3.internal.connection.RealConnection.connect(RealConnection.kt:209)
06-11 20:47:25.487 32089 18902 E LocBroadcastReceiver: 		... 19 more
06-11 20:47:25.487 32089 18902 E LocBroadcastReceiver: Caused by: java.net.ConnectException: failed to connect to hooks.nabu.casa/54.160.54.138 (port 443) from /:: (port 0) after 10000ms: connect failed: ENETUNREACH (Network is unreachable)
06-11 20:47:25.487 32089 18902 E LocBroadcastReceiver: 	at libcore.io.IoBridge.connect(IoBridge.java:142)
06-11 20:47:25.487 32089 18902 E LocBroadcastReceiver: 	at java.net.PlainSocketImpl.socketConnect(PlainSocketImpl.java:142)
06-11 20:47:25.487 32089 18902 E LocBroadcastReceiver: 	at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:390)
06-11 20:47:25.487 32089 18902 E LocBroadcastReceiver: 	at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:230)
06-11 20:47:25.487 32089 18902 E LocBroadcastReceiver: 	at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:212)
06-11 20:47:25.487 32089 18902 E LocBroadcastReceiver: 	at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:436)
06-11 20:47:25.487 32089 18902 E LocBroadcastReceiver: 	at java.net.Socket.connect(Socket.java:621)
06-11 20:47:25.487 32089 18902 E LocBroadcastReceiver: 	at okhttp3.internal.platform.Platform.connectSocket(Platform.kt:120)
06-11 20:47:25.487 32089 18902 E LocBroadcastReceiver: 	at okhttp3.internal.connection.RealConnection.connectSocket(RealConnection.kt:295)
06-11 20:47:25.487 32089 18902 E LocBroadcastReceiver: 	... 20 more
06-11 20:47:25.487 32089 18902 E LocBroadcastReceiver: Caused by: android.system.ErrnoException: connect failed: ENETUNREACH (Network is unreachable)
06-11 20:47:25.487 32089 18902 E LocBroadcastReceiver: 	at libcore.io.Linux.connect(Native Method)
06-11 20:47:25.487 32089 18902 E LocBroadcastReceiver: 	at libcore.io.ForwardingOs.connect(ForwardingOs.java:94)
06-11 20:47:25.487 32089 18902 E LocBroadcastReceiver: 	at libcore.io.BlockGuardOs.connect(BlockGuardOs.java:138)
06-11 20:47:25.487 32089 18902 E LocBroadcastReceiver: 	at libcore.io.ForwardingOs.connect(ForwardingOs.java:94)
06-11 20:47:25.487 32089 18902 E LocBroadcastReceiver: 	at libcore.io.IoBridge.connectErrno(IoBridge.java:173)
06-11 20:47:25.487 32089 18902 E LocBroadcastReceiver: 	at libcore.io.IoBridge.connect(IoBridge.java:134)
06-11 20:47:25.487 32089 18902 E LocBroadcastReceiver: 	... 28 more

Edit: In fact this is the first traceback we see, all other errors are missing the traceback which suggests this is the main error, device is unable to send data to the expected location

I’m not sure if you have solved your problem yet, but here is a possible solution:

If you don’t want to use a remote access to HA, just use your wifi connection to detect your presence.
you can use Bluetooth too, but the range is lesser.
( ASUSWRT, DD-WRT, Bluetooth Tracker, etc)

if you manage to have a remote access to HA don’t forget to turn on your 3G if you want to send info to HA

So I never figured out what the issue was. I ended up factory resetting my phone and it works as expected now. I have no idea what setting or change caused the issue for me.