-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Integration stops working randomly #28
Comments
I've finished the Apple TV rewrite and will focus next on the Android TV. Not having any command errors in the logs is suspicious. I have a Shield TV as well and try to reproduce it. It's possible that some return state isn't checked or a disconnect event is missed... |
Hi Markus, did you manage to find the problem ? This is really weird as the driver receives the commands order and seem to process them with no error : |
Update : while started (and not working) commands responded again after 20 minutes Could it be related to keys press / release mechanism ? |
I couldn't reproduce it so far, but I've also been working on PR #34 for a while which changed the connection & reconnection logic. Maybe it's fixed, otherwise I'll investigate it further after the new features have been merged. |
I have just set up your modifications in an external driver and configured it as my main entity for the Shield. I'll let you know |
I could reproduce two issues where communication breaks and no error is returned for several minutes from the communication library:
I'm a bit surprised about the first case, since I thought there's a keep-alive ping in the background. Maybe that changed, or I confuse it with the Android TV integration in Home Assistant. I'll investigate it after the multi-device PR is merged. |
AndroidTVRemote.send_key_command doesn't always raise ConnectionClosed Relates to #28
One issue is in the
I've added a transport check workaround and will most likely submit a patch for the |
This module logs everything in DEBUG level, even connection errors! Enable logging to better analyze dead connections. Relates to #28
The case when network interface changes (LAN to WIFI) should not occur in my setup (plugged in ethernet) but I guess that my ISP router may sometimes have dropouts. There is indeed no reconnection logic in the library which should be done on lower level inside the library. |
I've started a new branch Changed IP addresses are still only handled after wakeup of the remote. Devices are disconnected before sleep, then reconnected after wakeup. IP change detection is included in the initial connection logic. Unfortunately the reconnection task of androidtvremote2 only has a callback handler for authentication errors and doesn't provide more events. It can only be stopped by calling disconnect(). |
Hi Markus, # Internal driver mode
profile_path = os.path.join(api.config_dir_path, "config/profiles")
# External driver mode
if not os.path.exists(profile_path):
profile_path = "config/profiles"
device_profile.load(profile_path) |
This is already handled with ENV variables: https://github.com/unfoldedcircle/integration-python-library?tab=readme-ov-file#environment-variables and implemented in the Python integration library. The profile loading path is currently not correct and will fix it tomorrow:
it may not contain the |
Ok thanks it works |
Description
Hi,
my android (shield) TV integration stops working randomly
From the logs I have this repetitive warning, don't know why I have this as Android does not support now playing image:
then key pressed but nothing happens on AndroidTV's side :
Here are the logs :
UCR2_logs_2024-03-08.zip
How to Reproduce
1/ Launch an activity with TV + Android TV (nvidia shield) integration + HT receiver (media player entity from home assistant)
2/ Use the shield : navigate through menus, launch media
3/ After a while (happens randomly), the commands are not processed (play, pause, down arrow...)
I have set up the remote to go to sleep after 30min. In the activities I didn't enable the option to prevent sleeping, so maybe the remote goes to sleep during 2/ and 3/
Expected behavior
Android TV integration keeps on working
Integration version
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: