Wear OS can not change entity state and sensors do not update

Hello,

I recently tried to explore the Wear OS app but encountered a few problems.
The setup worked for me so far and I am able to see the entities inside the Wear OS app. I also do get updates there when turning a light on for example.

Interestingly, I can not make any changes from the watch, when I press a button to turn something on or change the brightness, nothing happens.
I also don’t have any of the sensors which the watch should provide inside home assistant. The device is there and has a single entity (device_tracker.ticwatch_pro_4g).

Here is the log output of when I tried toggling a light from within the app.

11-29 09:48:27.795  6391  6391 D UrlRepository: localUrl is: false and usesInternalSsid is: false
11-29 09:48:27.815  1330  1623 W VibratorService: Failed to perform effect (5)
11-29 09:48:27.822   351   522 D SDM     : DisplayBase::BuildLayerStackStats: LayerStack layer_count: 3, app_layer_count: 2, gpu_target_index: 2, display type: 0
11-29 09:48:27.896   351   522 I chatty  : uid=1000(system) HwBinder:351_1 identical 3 lines
11-29 09:48:27.912   351   522 D SDM     : DisplayBase::BuildLayerStackStats: LayerStack layer_count: 3, app_layer_count: 2, gpu_target_index: 2, display type: 0
11-29 09:48:27.915  6391  6391 E HomePresenter: Exception when toggling entity
11-29 09:48:27.915  6391  6391 E HomePresenter: io.homeassistant.companion.android.common.data.integration.IntegrationException: Error calling integration request call_service
11-29 09:48:27.915  6391  6391 E HomePresenter: 	at io.homeassistant.companion.android.common.data.integration.impl.IntegrationRepositoryImpl.callService(IntegrationRepositoryImpl.kt:253)
11-29 09:48:27.915  6391  6391 E HomePresenter: 	at io.homeassistant.companion.android.common.data.integration.impl.IntegrationRepositoryImpl$callService$1.invokeSuspend(Unknown Source:15)
11-29 09:48:27.915  6391  6391 E HomePresenter: 	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
11-29 09:48:27.915  6391  6391 E HomePresenter: 	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
11-29 09:48:27.915  6391  6391 E HomePresenter: 	at android.os.Handler.handleCallback(Handler.java:873)
11-29 09:48:27.915  6391  6391 E HomePresenter: 	at android.os.Handler.dispatchMessage(Handler.java:99)
11-29 09:48:27.915  6391  6391 E HomePresenter: 	at android.os.Looper.loop(Looper.java:193)
11-29 09:48:27.915  6391  6391 E HomePresenter: 	at android.app.ActivityThread.main(ActivityThread.java:6680)
11-29 09:48:27.915  6391  6391 E HomePresenter: 	at java.lang.reflect.Method.invoke(Native Method)
11-29 09:48:27.915  6391  6391 E HomePresenter: 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
11-29 09:48:27.915  6391  6391 E HomePresenter: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
11-29 09:48:27.929   351   522 D SDM     : DisplayBase::BuildLayerStackStats: LayerStack layer_count: 3, app_layer_count: 2, gpu_target_index: 2, display type: 0
11-29 09:48:27.932   368  1255 D SurfaceFlinger: duplicate layer name: changing Surface(name=2585c3d Toast)/@0xd032b00 - animation-leash to Surface(name=2585c3d Toast)/@0xd032b00 - animation-leash#1
11-29 09:48:27.948   351   522 D SDM     : DisplayBase::BuildLayerStackStats: LayerStack layer_count: 4, app_layer_count: 3, gpu_target_index: 3, display type: 0
11-29 09:48:28.367   351   522 I chatty  : uid=1000(system) HwBinder:351_1 identical 23 lines
11-29 09:48:28.399   351   522 D SDM     : DisplayBase::BuildLayerStackStats: LayerStack layer_count: 4, app_layer_count: 3, gpu_target_index: 3, display type: 0
11-29 09:48:29.648  6391  6515 D WebSocketRepository: Websocket: onMessage (text)
11-29 09:48:29.657  6391  6515 D WebSocketRepository: Message number 6 received
11-29 09:48:29.658  6391  6515 I chatty  : uid=10072(io.homeassistant.companion.android) .myDomain.net/... identical 1 line
11-29 09:48:29.658  6391  6515 D WebSocketRepository: Message number 6 received
11-29 09:48:29.832   351   522 D SDM     : DisplayBase::BuildLayerStackStats: LayerStack layer_count: 4, app_layer_count: 3, gpu_target_index: 3, display type: 0
11-29 09:48:29.843  1330  3518 W NotificationService: Toast already killed. pkg=io.homeassistant.companion.android callback=android.app.ITransientNotification$Stub$Proxy@afdcead

I am also getting a lot of the following log outputs which relate to registering sensors failing, but I unfortunately did not find a message which tells me what’s the issue.

11-29 10:00:50.792  6391  6526 D UrlRepository: localUrl is: false and usesInternalSsid is: false
11-29 10:00:50.821  6391  6526 E SensorReceiver: Issue registering sensor next_alarm
11-29 10:00:50.821  6391  6526 E SensorReceiver: io.homeassistant.companion.android.common.data.integration.IntegrationException: Error calling integration request register_sensor
11-29 10:00:50.821  6391  6526 E SensorReceiver: 	at io.homeassistant.companion.android.common.data.integration.impl.IntegrationRepositoryImpl.registerSensor(IntegrationRepositoryImpl.kt:689)
11-29 10:00:50.821  6391  6526 E SensorReceiver: 	at io.homeassistant.companion.android.common.data.integration.impl.IntegrationRepositoryImpl$registerSensor$1.invokeSuspend(Unknown Source:15)
11-29 10:00:50.821  6391  6526 E SensorReceiver: 	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
11-29 10:00:50.821  6391  6526 E SensorReceiver: 	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
11-29 10:00:50.821  6391  6526 E SensorReceiver: 	at kotlinx.coroutines.internal.LimitedDispatcher.run(LimitedDispatcher.kt:42)
11-29 10:00:50.821  6391  6526 E SensorReceiver: 	at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:95)
11-29 10:00:50.821  6391  6526 E SensorReceiver: 	at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:570)
11-29 10:00:50.821  6391  6526 E SensorReceiver: 	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750)
11-29 10:00:50.821  6391  6526 E SensorReceiver: 	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:677)
11-29 10:00:50.821  6391  6526 E SensorReceiver: 	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664)
11-29 10:00:50.836  6391  6526 D UrlRepository: localUrl is: false and usesInternalSsid is: false

I already tried to connect with Bluetooth being turned off, but that doesn’t seem to make a difference. The logs are from when Bluetooth was turned off.
Does anybody have an idea or is there some additional information I can provide to help out?

anything special about your setup? Looks like the API calls are being blocked.

That was my guess as well, but as I didn’t see any logs on what’s blocked specifically and all the other devices seem to work fine I didn’t know how to check further there.

My Home Assistance instance is running as a virtual machine (Home Assistant OS 9.3) on my TrueNAS server. I also have my NGINX server on there which has the following configuration:

    server {
        server_name hass.myTld.net;

        proxy_buffering off;

        location / {
            proxy_pass http://localIp:localPort;
            proxy_set_header Host $host;
            proxy_redirect http:// https://;
            proxy_http_version 1.1;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header Upgrade $http_upgrade;
            proxy_set_header Connection $connection_upgrade;
        }

    

        listen 443 ssl; # managed by Certbot
        ssl_certificate /usr/local/etc/letsencrypt/live/hass.myTld.net-0002/fullchain.pem; # managed by Certbot
        ssl_certificate_key /usr/local/etc/letsencrypt/live/hass.myTld.net-0002/privkey.pem; # managed by Certbot
        include /usr/local/etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
        ssl_dhparam /usr/local/etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
    }

I always use hass.myTld.net to access the instance. The internal IP would work as well, but I only use the domain for convenience.
It is totally possible that something with that NGINX configuration is kind of messed up as I am no expert there, but it worked for me so far.

have you taken a look at this page?

I hadn’t so far but did so now.

I added external_url: hass.myTld.net to my configuration.yaml and also added proxy_set_header Host $host; to my NGINX configuration. But it does not seem like there was any change at all.

Phone App still works fine from out- and inside my network. Wear OS still updates the entitiy state when changed from e.g. the phone, but pressing buttons does not have any effect.

Any chance to find out the original error message for why the connection is blocked?