Skip to content
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

Missing connection state awareness results in endless connection attempt loops (Android TV powered off) and log flooding #320

Open
bcutter opened this issue May 31, 2022 · 5 comments

Comments

@bcutter
Copy link

bcutter commented May 31, 2022

I discovered the same as this user here, unfortunately it seems he didn't raise an issue in this repo as recommended at the end of the issue:

Android TV integration very chatty in log when configured Android TV device is not available (turned off)
home-assistant/core#69672
(here the problem is already described)

Problem: python-androidtv constantly (every 80 seconds) trys to connect to the tv. If it is powered off, it will go on like forever. On every failed connect attempt an error is written to the log. This floods logs pretty fast pretty heavily.

This is what Home Assistant log contains for ONE single failed connection attempt:

Logger: androidtv.adb_manager.adb_manager_async
Source: /usr/local/lib/python3.9/site-packages/androidtv/adb_manager/adb_manager_async.py:298
First occurred: 30. Mai 2022, 16:21:17 (1445 occurrences)
Last logged: 00:50:11

Couldn't connect to xxx.xxx.xxx.xxx:5555. TcpTimeoutException: Connecting to xxx.xxx.xxx.xxx:5555 timed out (1.0 seconds)

This is what HA's GUI presents:
grafik

The experts from HA (see referenced issue) told this is nothing HA can fix but this only can to be done in this library repo.

By the way: Not related to #15

@JeffLIrion
Copy link
Owner

As long as HA continues to call setup with log_errors=True, this package will continue to log failed setup attempts. This should be fixed in HA.

@bcutter
Copy link
Author

bcutter commented Jun 1, 2022

Ah come on guys... you ping pong users from one side to the other :-D Why don't you talk with each other to find a solution ;-)

So here we go: home-assistant/core#72851

@JeffLIrion
Copy link
Owner

Until someone submits a fix, I suggest setting the log level to critical for the Android TV integration.

@bcutter
Copy link
Author

bcutter commented Jun 2, 2022

That's a workaround. So let's look/wait for a fix.

@kevincaradant
Copy link

kevincaradant commented Jan 23, 2023

Hi any news about this? :)

I have hundred and hundred message like that, just after 1 or 2 days :(.
The other thread is locked, I can't open it again

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants