unfoldedcircle / feature-and-bug-tracker

Feature and bug tracker repository for Unfolded Circle products
25 stars 0 forks source link

Connection to Dock not established #44

Open otherguy opened 1 year ago

otherguy commented 1 year ago

Is there an existing issue for this?

Description

So far I only have 3 types of devices added: Android TV, the same TV with manually recorded IR codes and a couple of Philips Hue lights.

When the remote goes to sleep, and I pick it up again, I sometimes cannot control my devices with the remote. When that happens, I see 3 different issues, depending on the device I‘m trying to control:

After waiting a couple of minutes (and not letting the remote go to sleep), it reconnects to the dock and starts working again.

How to Reproduce

I cannot reproduce this reliably. Once the issue happened, and the remote reconnects to the dock, the issue doesn‘t happen again for a while.

Nevertheless, here are the steps:

  1. Control any device with the remote
  2. Put the remote down and wait for it to go to sleep
  3. Wait some more time (10 minutes?)
  4. Wake the remote by picking it up
  5. Try to control the same device again

Expected behavior

The remote should be able to control any device immediately after picking it up.

System version

1.1.2

What part of the system affected by the problem?

Integration

Additional context

No response

vistalba commented 1 year ago

I have this issue too from time to time. Don't know how to reproduce exactly. Sometimes after sleep it is just not working and I've to restart the remote.

Yezariael75 commented 1 year ago
  1. After sleep it re-establishes connection to dock, so you have to wait some seconds before using it. You can set the deep sleep timer to 30 minutes in configuration, but battery will only hold about 1 day for me
  2. same
  3. I already opened an Issue for this. After sleep the Android TV integration does not work anymore until restart of the remote: https://github.com/unfoldedcircle/bug-reports/issues/34
zehnm commented 1 year ago

We'll release an update this week which improves the dock reconnection in certain environments. The Philips Hue integration also gets a bigger update, which won't loose the configured entities anymore.

conrad-nash commented 1 year ago

This is happening for me as well, I'm on the latest version of the remote and dock software.

vistalba commented 1 year ago

I running in to this issue multiple times a day. It's quite annoying. Any workaround known so far? Currently I have to use multiple remotes.

Thebuz commented 1 year ago

Same for me NVIDIA Shield internal server error after waking from sleep, restarting the remote makes it work again most of the time. UCR2_logs_2023-10-08.txt

zehnm commented 1 year ago

Same for me NVIDIA Shield internal server error after waking from sleep, restarting the remote makes it work again most of the time. UCR2_logs_2023-10-08.txt

According to the provided core service logs, it seems as the Android TV integration is no longer responding because of this error entry Error connecting to driver ws://127.0.0.1:8096: ServiceUnavailable("Failed to connect to host: Connection refused (os error 111)"). This is one of those should not happen bugs :-) @Thebuz Can you provide the "Android TV integration" logs? I fear that the integration crashed but hope it's an easy fix.

zehnm commented 1 year ago

As a tempoary workaround for the dock connection issue after remote wakeup:

Please try to configure the dock with the assigned IP address (plain IP address is sufficient, full WebSocket URL is not required). Example:

image

This will disable the mDNS resolver and only use the configured IP address to reconnect to the dock.

A manually set dock IP address is a workaround, if your log shows the following error multiple times after a wakeup and the dock can't be connected within a few seconds:

Error connecting to dock ws://uc-dock-xxxxxxxxxxxx.local:946/: ServiceUnavailable("Failed to connect to host: 
Failed resolving hostname: failed to lookup address information: Temporary failure in name resolution")

Attention: using an IP address for the dock with DHCP won't work anymore if your DHCP server / router decides to assign another IP address, or if you change the dock connection from WiFi to LAN (or vice versa).

How to find out the dock IP address:

Please report back, if this improved or even solved the dock connection issues. We continue working on the "name resolution failures" issues, which happen in certain network environments.

Thebuz commented 1 year ago

Same for me NVIDIA Shield internal server error after waking from sleep, restarting the remote makes it work again most of the time. UCR2_logs_2023-10-08.txt

According to the provided core service logs, it seems as the Android TV integration is no longer responding because of this error entry Error connecting to driver ws://127.0.0.1:8096: ServiceUnavailable("Failed to connect to host: Connection refused (os error 111)"). This is one of those should not happen bugs :-) @Thebuz Can you provide the "Android TV integration" logs? I fear that the integration crashed but hope it's an easy fix.

So, The Log file is empty when choosing just Android TV integration :/

UCR2_logs_2023-10-09.txt

vistalba commented 1 year ago

As a tempoary workaround for the dock connection issue after remote wakeup:

Please try to configure the dock with the assigned IP address (plain IP address is sufficient, full WebSocket URL is not required). Example:

image

This will disable the mDNS resolver and only use the configured IP address to reconnect to the dock.

A manually set dock IP address is a workaround, if your log shows the following error multiple times after a wakeup and the dock can't be connected within a few seconds:

Error connecting to dock ws://uc-dock-xxxxxxxxxxxx.local:946/: ServiceUnavailable("Failed to connect to host: 
Failed resolving hostname: failed to lookup address information: Temporary failure in name resolution")

Attention: using an IP address for the dock with DHCP won't work anymore if your DHCP server / router decides to assign another IP address, or if you change the dock connection from WiFi to LAN (or vice versa).

How to find out the dock IP address:

  • check your router / DHCP server, which IP address was assigned to the dock. Host name starts with: UC-Dock
  • The dock is advertised with mDNS service name _uc-dock._tcp.

    • On macOS:

    • Discovery DNS-SD Browser

    • command line: dns-sd -Z _uc-dock._tcp

    • Linux:

    • command line: avahi-browse -d local _uc-dock._tcp --resolve -t

Please report back, if this improved or even solved the dock connection issues. We continue working on the "name resolution failures" issues, which happen in certain network environments.

Did this since the remote was configured when it arrived. IP is manual DHCP configured, so the dock and the remote does get the same ip address all the time. The issue still occours for me. I guess it is an issue because the wifi is disconnected when the remote is in sleep mode. After picking up it isn't fast enought to re-establish the connection until I press the first button. But it is annoying, as it should just work.

Edit: may you should allow to set manual IP on remote & dock itself. So DHCP delay can be ruled out.

martonborzak commented 1 year ago

Same for me NVIDIA Shield internal server error after waking from sleep, restarting the remote makes it work again most of the time. UCR2_logs_2023-10-08.txt

According to the provided core service logs, it seems as the Android TV integration is no longer responding because of this error entry Error connecting to driver ws://127.0.0.1:8096: ServiceUnavailable("Failed to connect to host: Connection refused (os error 111)"). This is one of those should not happen bugs :-) @Thebuz Can you provide the "Android TV integration" logs? I fear that the integration crashed but hope it's an easy fix.

So, The Log file is empty when choosing just Android TV integration :/

UCR2_logs_2023-10-09.txt

Try choosing DEBUG as log level and export it again.

Thebuz commented 1 year ago

Same for me NVIDIA Shield internal server error after waking from sleep, restarting the remote makes it work again most of the time. UCR2_logs_2023-10-08.txt

According to the provided core service logs, it seems as the Android TV integration is no longer responding because of this error entry Error connecting to driver ws://127.0.0.1:8096: ServiceUnavailable("Failed to connect to host: Connection refused (os error 111)"). This is one of those should not happen bugs :-) @Thebuz Can you provide the "Android TV integration" logs? I fear that the integration crashed but hope it's an easy fix.

So, The Log file is empty when choosing just Android TV integration :/ UCR2_logs_2023-10-09.txt

Try choosing DEBUG as log level and export it again.

That worked 👍
UCR2_logs_2023-10-09 atv debug.txt

conrad-nash commented 1 year ago

Using IP seems to have improved things for me, I'm now able to pick up the sleeping remote and use the buttons immediately.

zehnm commented 1 year ago

Edit: may you should allow to set manual IP on remote & dock itself. So DHCP delay can be ruled out.

That's in the backlog, but no ETA yet.

Ragin-LundF commented 1 year ago

I'm facing the same issue. It doesn't matter, in my case, if I use WLAN or LAN connection.

At the moment, the remote is completely unusable. It is not possible to navigate smart TV menus, increase/decrease the volume or perform other simple tasks.

UCR2_logs_2023-10-14.txt

Yezariael75 commented 1 year ago

As a tempoary workaround for the dock connection issue after remote wakeup: Please try to configure the dock with the assigned IP address (plain IP address is sufficient, full WebSocket URL is not required). Example:

image

This will disable the mDNS resolver and only use the configured IP address to reconnect to the dock. A manually set dock IP address is a workaround, if your log shows the following error multiple times after a wakeup and the dock can't be connected within a few seconds:

Error connecting to dock ws://uc-dock-xxxxxxxxxxxx.local:946/: ServiceUnavailable("Failed to connect to host: 
Failed resolving hostname: failed to lookup address information: Temporary failure in name resolution")

Attention: using an IP address for the dock with DHCP won't work anymore if your DHCP server / router decides to assign another IP address, or if you change the dock connection from WiFi to LAN (or vice versa). How to find out the dock IP address:

  • check your router / DHCP server, which IP address was assigned to the dock. Host name starts with: UC-Dock
  • The dock is advertised with mDNS service name _uc-dock._tcp.

    • On macOS:

    • Discovery DNS-SD Browser

    • command line: dns-sd -Z _uc-dock._tcp

    • Linux:

    • command line: avahi-browse -d local _uc-dock._tcp --resolve -t

Please report back, if this improved or even solved the dock connection issues. We continue working on the "name resolution failures" issues, which happen in certain network environments.

Did this since the remote was configured when it arrived. IP is manual DHCP configured, so the dock and the remote does get the same ip address all the time. The issue still occours for me. I guess it is an issue because the wifi is disconnected when the remote is in sleep mode. After picking up it isn't fast enought to re-establish the connection until I press the first button. But it is annoying, as it should just work.

Edit: may you should allow to set manual IP on remote & dock itself. So DHCP delay can be ruled out.

Didn't change anything for me.

Thebuz commented 1 year ago

Slight update, when I start or stop an activity with AndroidTV actions in it, the Remote still performs those actions, it's only when I press buttons that I get "internal server error"

Ver. 1.4.2