question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Wear OS: Can't connect to Home Assistant instance over Bluetooth

See original GitHub issue

Home Assistant Android version: WearOS version beta-1626-edc4142 Phone version beta-1626-edc4142-full Android version: WearOS 2.33 Android 11 Phone model: OnePlus 7 Pro Home Assistant version: core-2021.11.2 Last working Home Assistant release (if known): None. Description of problem: Wear OS can’t find my Home Assistant instance. It neither shows up in the list nor lets me manually connect. Works fine on WiFi (with disabled Bluetooth) or with the phone and other devices in my network.

Traceback (if applicable, to get the logs you may refer to: https://companion.home-assistant.io/docs/troubleshooting/faqs/#android-crash-logs): unavailable

Screenshot of problem: unavailable - there is a sad cloud icon with the message “Could not connect” but it vanished too fast to screenshot

Additional information No public instance, i.e. no Nabu Casa Not using a VPN - neither phone nor watch After a successful log in over WiFi and switching back to Bluetooth, the list of buttons is empty and it just shows the titles. Update for version beta-1626-edc4142: After a successful log in over WiFi and switching back to Bluetooth, there is a title “Loading” and a primary button “Please wait while we load your entities” but nothing ever happens.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:130 (41 by maintainers)

github_iconTop GitHub Comments

3reactions
Unfocusedcommented, Nov 21, 2021

I was having this issue too. I managed to get some logs, but didn’t see anything relevant. Unfortunately, life got in the way, and in the meantime I lost the logs (I could try again if need be).

However, a little research lead to a possible explanation: When the watch is connected to a phone via Bluetooth, the phone proxies all network requests, but for some reason connection requests to IPs on the local subnet can fail, while requests to internet IPs work fine.

An example: https://stackoverflow.com/questions/46696280/android-wear-2-wifi-local-network-access/48411322

Coincidentally at the time I was also starting to trail using Home Assistant Cloud. And indeed using the cloud URL on my watch works fine over Bluetooth, yet a direct local connection fails.

But assuming all that is accurate, I don’t understand why everyone isn’t hitting this bug. It could be a difference in subnet routing tables on different phones.

I don’t have a background in coding for Android or WearOS, but given what I’ve read, the possible solutions I’ve seen are:

  • Requiring using Home Assistant Cloud, and using it even when on the home network
  • Forcing the connection to be over WiFi, via requesting high bandwidth mode (which besides being a battery drain, & not working on watches without WiFi, it would presumably also mean it wouldn’t work when the phone is connected to the home network via VPN)
  • Detect when network requests are sent over Bluetooth & use the Home Assistant app on the phone to proxy the requests

I realise the aim for the WearOS app is to be a standalone app (which I applaud), but for anyone to hit this issue they have to be already relying on a connection to their phone at the time anyway.

2reactions
jpelgromcommented, Nov 2, 2022

Due to requirements for the login, it is no longer completely standalone. After logging in, the app can be used without a connected phone.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Wear OS - "Could not connect" - Home Assistant Community
I've installed the app on my Wear OS watch (Ticwatch Pro 3 GPS). ... Wear OS: Can't connect to Home Assistant instance over...
Read more >
Wear OS not reaching Home Assistant local server ... - Reddit
Wear OS not reaching Home Assistant local server through public IP/DDNS over bluetooth when phone is connected to LAN. Hello everyone,.
Read more >
Set up Google Assistant on your watch - Android - Wear OS by ...
To ask Google Assistant for help, press and hold the Power button or the Home button, depending on your device. When your watch...
Read more >
Create and run a wearable app - Android Developers
The Wear OS emulator pairing assistant makes it easier to manage and connect Wear emulators. You can pair multiple Wear devices with a...
Read more >
Wear OS by Google 17+ - App Store
Bluetooth is dropped ALL THE TIME. Doesn't matter the distance. As a matter of fact, I just restarted my watch, re-paired the watch...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found