samuelspagl / ha_samsung_soundbar

YASSI (Yet another Samsung Soundbar integration) is a HomeAssistant integration for Samsung Soundbars.
https://ha-samsung-soundbar.vercel.app
MIT License
44 stars 2 forks source link

[BUG] Unnecessary error logging #20

Closed tjorim closed 8 months ago

tjorim commented 9 months ago

Setting up this integration almost gave me a heart attack. While the integration set up correctly, it still logged a bunch of messages as ERROR. E.g. in config_flow.py: line 27 (it even logs the opposite of what happened), line 33 and line 36. It also seems to log credentials which might accidentally get posted in issues here, maybe it's better to redact those?

samuelspagl commented 9 months ago

Also agree here, this should be changed. I'll try to add it to the current working branch.

alexdelprete commented 9 months ago

Also agree here, this should be changed. I'll try to add it to the current working branch.

I installed this a couple of days ago, and the log has become unreadable (too many errors) ever since. I have a LOT of errors/warnings, and don't know if it's normal having all these. Maybe they sould not be errors, but I didn't look at the code yet to be sure about that:

2024-03-03 00:51:46.764 WARNING (MainThread) [homeassistant.helpers.entity] Update of media_player.soundbar_living is taking over 10 seconds
2024-03-03 00:51:46.764 WARNING (MainThread) [homeassistant.components.media_player] Updating samsung_soundbar media_player took longer than the scheduled update interval 0:00:10
2024-03-03 00:52:00.091 ERROR (MainThread) [custom_components.samsung_soundbar.api_extension.SoundbarDevice] [samsung_soundbar] Error: _update_soundmode exceeded a retry counter of 10
2024-03-03 00:52:03.373 ERROR (MainThread) [custom_components.samsung_soundbar.api_extension.SoundbarDevice] [samsung_soundbar] Error: _update_advanced_audio exceeded a retry counter of 10
2024-03-03 00:52:10.101 ERROR (MainThread) [custom_components.samsung_soundbar.api_extension.SoundbarDevice] [samsung_soundbar] Error: _update_soundmode exceeded a retry counter of 10
2024-03-03 00:52:13.349 ERROR (MainThread) [custom_components.samsung_soundbar.api_extension.SoundbarDevice] [samsung_soundbar] Error: _update_advanced_audio exceeded a retry counter of 10
2024-03-03 00:52:20.035 ERROR (MainThread) [custom_components.samsung_soundbar.api_extension.SoundbarDevice] [samsung_soundbar] Error: _update_soundmode exceeded a retry counter of 10
2024-03-03 00:52:23.346 ERROR (MainThread) [custom_components.samsung_soundbar.api_extension.SoundbarDevice] [samsung_soundbar] Error: _update_advanced_audio exceeded a retry counter of 10
2024-03-03 00:52:30.179 ERROR (MainThread) [custom_components.samsung_soundbar.api_extension.SoundbarDevice] [samsung_soundbar] Error: _update_soundmode exceeded a retry counter of 10
2024-03-03 00:52:33.428 ERROR (MainThread) [custom_components.samsung_soundbar.api_extension.SoundbarDevice] [samsung_soundbar] Error: _update_advanced_audio exceeded a retry counter of 10
2024-03-03 00:52:40.063 ERROR (MainThread) [custom_components.samsung_soundbar.api_extension.SoundbarDevice] [samsung_soundbar] Error: _update_soundmode exceeded a retry counter of 10
2024-03-03 00:52:43.335 ERROR (MainThread) [custom_components.samsung_soundbar.api_extension.SoundbarDevice] [samsung_soundbar] Error: _update_advanced_audio exceeded a retry counter of 10
2024-03-03 00:52:50.302 ERROR (MainThread) [custom_components.samsung_soundbar.api_extension.SoundbarDevice] [samsung_soundbar] Error: _update_soundmode exceeded a retry counter of 10
2024-03-03 00:52:53.608 ERROR (MainThread) [custom_components.samsung_soundbar.api_extension.SoundbarDevice] [samsung_soundbar] Error: _update_advanced_audio exceeded a retry counter of 10
2024-03-03 00:53:00.123 ERROR (MainThread) [custom_components.samsung_soundbar.api_extension.SoundbarDevice] [samsung_soundbar] Error: _update_soundmode exceeded a retry counter of 10
2024-03-03 00:53:03.403 ERROR (MainThread) [custom_components.samsung_soundbar.api_extension.SoundbarDevice] [samsung_soundbar] Error: _update_advanced_audio exceeded a retry counter of 10
2024-03-03 00:53:06.886 WARNING (MainThread) [homeassistant.helpers.entity] Update of media_player.soundbar_living is taking over 10 seconds
2024-03-03 00:53:06.898 WARNING (MainThread) [homeassistant.components.media_player] Updating samsung_soundbar media_player took longer than the scheduled update interval 0:00:10
2024-03-03 00:53:20.279 ERROR (MainThread) [custom_components.samsung_soundbar.api_extension.SoundbarDevice] [samsung_soundbar] Error: _update_soundmode exceeded a retry counter of 10
2024-03-03 00:53:23.603 ERROR (MainThread) [custom_components.samsung_soundbar.api_extension.SoundbarDevice] [samsung_soundbar] Error: _update_advanced_audio exceeded a retry counter of 10
2024-03-03 00:53:30.703 ERROR (MainThread) [custom_components.samsung_soundbar.api_extension.SoundbarDevice] [samsung_soundbar] Error: _update_soundmode exceeded a retry counter of 10
2024-03-03 00:53:34.014 ERROR (MainThread) [custom_components.samsung_soundbar.api_extension.SoundbarDevice] [samsung_soundbar] Error: _update_advanced_audio exceeded a retry counter of 10
2024-03-03 00:53:40.288 ERROR (MainThread) [custom_components.samsung_soundbar.api_extension.SoundbarDevice] [samsung_soundbar] Error: _update_soundmode exceeded a retry counter of 10
2024-03-03 00:53:43.530 ERROR (MainThread) [custom_components.samsung_soundbar.api_extension.SoundbarDevice] [samsung_soundbar] Error: _update_advanced_audio exceeded a retry counter of 10
2024-03-03 00:53:50.315 ERROR (MainThread) [custom_components.samsung_soundbar.api_extension.SoundbarDevice] [samsung_soundbar] Error: _update_soundmode exceeded a retry counter of 10
2024-03-03 00:53:53.560 ERROR (MainThread) [custom_components.samsung_soundbar.api_extension.SoundbarDevice] [samsung_soundbar] Error: _update_advanced_audio exceeded a retry counter of 10
2024-03-03 00:54:00.292 ERROR (MainThread) [custom_components.samsung_soundbar.api_extension.SoundbarDevice] [samsung_soundbar] Error: _update_soundmode exceeded a retry counter of 10
2024-03-03 00:54:03.551 ERROR (MainThread) [custom_components.samsung_soundbar.api_extension.SoundbarDevice] [samsung_soundbar] Error: _update_advanced_audio exceeded a retry counter of 10
2024-03-03 00:54:10.348 ERROR (MainThread) [custom_components.samsung_soundbar.api_extension.SoundbarDevice] [samsung_soundbar] Error: _update_soundmode exceeded a retry counter of 10
2024-03-03 00:54:13.670 ERROR (MainThread) [custom_components.samsung_soundbar.api_extension.SoundbarDevice] [samsung_soundbar] Error: _update_advanced_audio exceeded a retry counter of 10
2024-03-03 00:54:20.285 ERROR (MainThread) [custom_components.samsung_soundbar.api_extension.SoundbarDevice] [samsung_soundbar] Error: _update_soundmode exceeded a retry counter of 10
2024-03-03 00:54:23.533 ERROR (MainThread) [custom_components.samsung_soundbar.api_extension.SoundbarDevice] [samsung_soundbar] Error: _update_advanced_audio exceeded a retry counter of 10
2024-03-03 00:54:33.026 ERROR (MainThread) [custom_components.samsung_soundbar.api_extension.SoundbarDevice] [samsung_soundbar] Error: _update_soundmode exceeded a retry counter of 10
2024-03-03 00:54:36.346 ERROR (MainThread) [custom_components.samsung_soundbar.api_extension.SoundbarDevice] [samsung_soundbar] Error: _update_advanced_audio exceeded a retry counter of 10
tjorim commented 9 months ago

I installed this a couple of days ago, and the log has become unreadable (too many errors) ever since. I have a LOT of errors/warnings, and don't know if it's normal having all these. Maybe they sould not be errors, but I didn't look at the code yet to be sure about that:

This is a different issue (I also just noticed it) please open a new one.

samuelspagl commented 9 months ago

I’ll fix both of them when I am back from my vacation (I’m already in vacation for some while therefore I was not responding as fast)

Just to keep you informed :)

alexdelprete commented 9 months ago

This is a different issue (I also just noticed it) please open a new one.

It's unnecessary logging for me. :)

I’ll fix both of them when I am back from my vacation

No worries, and thanks for the feedback. :)

samuelspagl commented 8 months ago

This is a different issue (I also just noticed it) please open a new one.

It's unnecessary logging for me. :)

I’ll fix both of them when I am back from my vacation

No worries, and thanks for the feedback. :)

Okay so I took a look at your log and have to say that I would also advise to create a new issue for that, because it is not exactly unnecessary. I'll open a new issue for you, but will need a bit more information :)

samuelspagl commented 8 months ago

@tjorim I changed the logging statements and my log looks clean.

I'm going to release this MR now but feel free to reopen this issue if you still have something left.