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

Multiple errors happening while updating the device status #22

Closed samuelspagl closed 5 months ago

samuelspagl commented 8 months ago

Description

This is an issue @alexdelprete mentioned in another issue.

          > 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

_Originally posted by @alexdelprete in https://github.com/samuelspagl/ha_samsung_soundbar/issues/20#issuecomment-1975509927_

samuelspagl commented 8 months ago

Please provide the HomeAssistant version, what type of Soundbar you own and whether all of the features implemented in this integration are also supported in your SmartThings App.

alexdelprete commented 8 months ago

HA 2024.3 - Samsung HW-Q90R firmware 1012.6

This is what I see in the app:

samuelspagl commented 8 months ago

Do all of the settings you can adjust in the Homeassistant device work for you?

alexdelprete commented 8 months ago

Volume works even though it doesn't reflect the real volume level, the input_preset seems to work, sound_mode_preset list is empty, eq_preset list is populated, bassmode/nightmode/voice_amplifier don't work and throw an error.

image

samuelspagl commented 8 months ago

Okay so the volume does not reflect the real value because you probably have a "max Volume" set. This setting is not "capping" the volume but readjusting the slider of the media_player entity to the new scaling.

Can you go through your SmartThings App and exactly list every feature you can adjust there?

I'm thinking about adding a service to display the raw json for the update process to make debugging a bit easier, but lets see :)

samuelspagl commented 8 months ago

And do you have the latest firmware for your Soundbar?

alexdelprete commented 8 months ago

you probably have a "max Volume" set.

I don't remember setting it, but now I checked and can't reconfigure the integration to modify it.

Can you go through your SmartThings App and exactly list every feature you can adjust there?

I can set what you see in this screenshot: volume, music services, input, equalizer, woofer level, sleep timer.

image

I'm thinking about adding a service to display the raw json for the update process to make debugging a bit easier

Seems like a good idea. the API doesn't provide a discovery function to list the available functionality? If not, a JSON structure you can parse to check the available functionality?

And do you have the latest firmware for your Soundbar?

Yes, I'm always on latest. But it's been a while since they upgraded it. Last time was the introduction of the eARC functionality for both the soundbar and the QE65Q90R tv. It was a big updated we waited for a long time.

Thanks for the help.

samuelspagl commented 8 months ago

I can set what you see in this screenshot: volume, music services, input, equalizer, woofer level, sleep timer.

Okay so you're missing the Soundmode feature also in the SmartThings app.

Seems like a good idea. the API doesn't provide a discovery function to list the available functionality? If not, a JSON structure you can parse to check the available functionality?

Nope to both. Some things I could probably infer, like if the list for soundmodes is empty, then its likely that there is no soundmode. But others will be difficult, especially since I can't just try it out, as my soundbar supports all of these things.

I am thinking about adding a checklist to the configuration, where you can select which features are supported. But I dunno, let's see.

alexdelprete commented 8 months ago

Nope to both. Some things I could probably infer, like if the list for soundmodes is empty, then its likely that there is no soundmode. But others will be difficult, especially since I can't just try it out, as my soundbar supports all of these things.

Really bad API design for Samsung. :(

I am thinking about adding a checklist to the configuration, where you can select which features are supported. But I dunno, let's see.

Yes, it would be a good idea, so we can disable functionalities that aren't available.

Headkillah commented 8 months ago

@samuelspagl I have the same errors and some more.

I´m using HA 2024.3.1, my soundbar isHW-Q995B with F/W HW-Q995BWWB-1010.0. I can set almost everything that I can set in the app. And i often get the following message:

Logger: homeassistant.components.media_player
Quelle: helpers/entity_platform.py:985
Integration: Mediaplayer (Dokumentation, Probleme)
Erstmals aufgetreten: 19. März 2024 um 16:02:31 (27 Vorkommnisse)
Zuletzt protokolliert: 08:05:24

Updating samsung_soundbar media_player took longer than the scheduled update interval 0:00:10

And this errors:

Logger: custom_components.samsung_soundbar.api_extension.SoundbarDevice
Quelle: custom_components/samsung_soundbar/api_extension/SoundbarDevice.py:96
Integration: Samsung Soundbar (Dokumentation, Probleme)
Erstmals aufgetreten: 19. März 2024 um 16:33:30 (10 Vorkommnisse)
Zuletzt protokolliert: 07:08:26

[samsung_soundbar] Error: _update_woofer exceeded a retry counter of 10
[samsung_soundbar] Error: _update_advanced_audio exceeded a retry counter of 10
[samsung_soundbar] Error: _update_equalizer exceeded a retry counter of 10
[samsung_soundbar] Error: _update_soundmode exceeded a retry counter of 10

The following warning has been appearing more frequently recently:

Logger: homeassistant.helpers.entity
Quelle: helpers/entity.py:1597
Erstmals aufgetreten: 19. März 2024 um 11:30:37 (5 Vorkommnisse)
Zuletzt protokolliert: 19. März 2024 um 18:59:29

Entity media_player.barry (<class 'custom_components.samsung_soundbar.media_player.SmartThingsSoundbarMediaPlayer'>) is using deprecated supported features values which will be removed in HA Core 2025.1. Instead it should use <MediaPlayerEntityFeature.PAUSE|VOLUME_SET|VOLUME_MUTE|TURN_ON|TURN_OFF|VOLUME_STEP|SELECT_SOURCE|STOP|PLAY|SELECT_SOUND_MODE: 89485>, please create a bug report at https://github.com/samuelspagl/ha_samsung_soundbar/issues and reference https://developers.home-assistant.io/blog/2023/12/28/support-feature-magic-numbers-deprecation
Entity None (<class 'custom_components.browser_mod.media_player.BrowserModPlayer'>) is using deprecated supported features values which will be removed in HA Core 2025.1. Instead it should use <MediaPlayerEntityFeature.PAUSE|SEEK|VOLUME_SET|VOLUME_MUTE|TURN_ON|TURN_OFF|PLAY_MEDIA|STOP|PLAY|BROWSE_MEDIA: 152463>, please report it to the author of the 'browser_mod' custom integration and reference https://developers.home-assistant.io/blog/2023/12/28/support-feature-magic-numbers-deprecation
samuelspagl commented 8 months ago

Hi @Headkillah,

But do the controls generally work for you? (Despite what the log is saying?)

Which version of the integration are you using? Because this should be fixed in the latest master release (0.3.0)

Headkillah commented 8 months ago

Hey @samuelspagl

Yeah, generally the controls are working :) I had version 0.2.0 installed and did not see (no notification from HA) that version 0.3.0 was released. Now I have the new version and will see if the errors continue to occur. I will post an update if something happens... :)

Headkillah commented 8 months ago

@samuelspagl

With 0.3.0 i'm getting this errors:


Quelle: custom_components/samsung_soundbar/api_extension/SoundbarDevice.py:121
Integration: Samsung Soundbar (Dokumentation, Probleme)
Erstmals aufgetreten: 15:53:37 (1 Vorkommnisse)
Zuletzt protokolliert: 15:53:37

[samsung_soundbar] Error: _update_equalizer exceeded a retry counter of 10```

```Logger: homeassistant.components.media_player
Quelle: helpers/entity_platform.py:985
Integration: Mediaplayer (Dokumentation, Probleme)
Erstmals aufgetreten: 15:53:37 (2 Vorkommnisse)
Zuletzt protokolliert: 16:24:47

Updating samsung_soundbar media_player took longer than the scheduled update interval 0:00:10```
diegocjorge commented 8 months ago

Same here, my soundbar is the HW-Q990C running the latest firmware (1004.034):

Logger: homeassistant.components.media_player Source: helpers/entity_platform.py:985 integration: Media player (documentation, issues) First occurred: March 25, 2024 at 15:57:20 (5819 occurrences) Last logged: 14:16:07

Updating samsung_soundbar media_player took longer than the scheduled update interval 0:00:10

2024-03-27 08:27:54.890 WARNING (MainThread) [homeassistant.components.media_player] Updating samsung_soundbar media_player took longer than the scheduled update interval 0:00:10
2024-03-27 08:27:54.891 WARNING (MainThread) [homeassistant.helpers.entity] Update of media_player.samsung_soundbar_q990c is taking over 10 seconds
2024-03-27 08:27:59.569 ERROR (MainThread) [custom_components.samsung_soundbar.api_extension.SoundbarDevice] [samsung_soundbar] Error: _update_woofer exceeded a retry counter of 10
2024-03-27 08:28:09.846 ERROR (MainThread) [custom_components.samsung_soundbar.api_extension.SoundbarDevice] [samsung_soundbar] Error: _update_soundmode exceeded a retry counter of 10
2024-03-27 08:28:14.686 ERROR (MainThread) [custom_components.samsung_soundbar.api_extension.SoundbarDevice] [samsung_soundbar] Error: _update_advanced_audio exceeded a retry counter of 10
2024-03-27 08:28:14.893 WARNING (MainThread) [homeassistant.components.media_player] Updating samsung_soundbar media_player took longer than the scheduled update interval 0:00:10
2024-03-27 08:28:14.893 WARNING (MainThread) [homeassistant.helpers.entity] Update of media_player.samsung_soundbar_q990c is taking over 10 seconds
2024-03-27 08:28:19.484 ERROR (MainThread) [custom_components.samsung_soundbar.api_extension.SoundbarDevice] [samsung_soundbar] Error: _update_woofer exceeded a retry counter of 10
2024-03-27 08:28:29.908 ERROR (MainThread) [custom_components.samsung_soundbar.api_extension.SoundbarDevice] [samsung_soundbar] Error: _update_soundmode exceeded a retry counter of 10
2024-03-27 08:28:34.747 ERROR (MainThread) [custom_components.samsung_soundbar.api_extension.SoundbarDevice] [samsung_soundbar] Error: _update_advanced_audio exceeded a retry counter of 10
2024-03-27 08:28:34.896 WARNING (MainThread) [homeassistant.components.media_player] Updating samsung_soundbar media_player took longer than the scheduled update interval 0:00:10
2024-03-27 08:28:34.897 WARNING (MainThread) [homeassistant.helpers.entity] Update of media_player.samsung_soundbar_q990c is taking over 10 seconds
diegocjorge commented 8 months ago

IMG_2065 IMG_2066 IMG_2067 IMG_2068 IMG_2069

diegocjorge commented 8 months ago

Certain features may be enabled, disabled, or have varying options depending on the current sound mode. Does your integration refresh the list of available modes periodically, or is it only updated once when the soundbar is added?

EDIT: Just realized that the woofer level setting is just gone from the Smartthings app, they must have removed that in the latest firmware update

EDIT2: Sorry, the Woofer level setting is still present, but it can only be adjusted when the soundbar is turned on. When the soundbar is off, this setting is not visible in the app.

That could be the reason it fails to update.

samuelspagl commented 8 months ago

That could be the reason it fails to update.

That could certainly be true.

I'll try to take a closer look at it as soon as possible, still I have quite a few things on my plate currently :)

samuelspagl commented 7 months ago

Hi there,

So some things changes on Samsungs side (still in need to confirm whether it is a bug or a feature), and therefore the update process of the custom capabilities is broken. This happened probably on the 26th of march. To accommodate this, I released a new alpha version of the Integration that makes it possible in the configuration as well as reconfiguration to enable / disable the custom capabilities entities (and therefore also the update process).

At the current timing, your issue is probably linked to #26.

The current plan is to enhance the configuration settings quite a bit, so that you can maybe even, let the entities be created but can disable just the update process, or to add services for those custom capabilities (like eq, soundmodes etc.).

tanker11 commented 7 months ago

Same issue here with a lot of counter errors.

thearchitectuk commented 7 months ago

Just to add that I'm getting all of these too! Snipaste_2024-04-20_18-27-06 It's just flooding my HA log :-(

samuelspagl commented 7 months ago

@thearchitectuk Yeah this is common 😅, please take a look at #26 and install the latest alpha version of this integration.

This version features a new settings workflow, where you can enable / disable the entities (and therefore the update process) for the custom capabilities. I also added service calls for the custom capabilities to still enable setting the values.

I still wait for a response from Samsung 😅, but until that time, I can't do much about it.

thearchitectuk commented 7 months ago

Thanks! I'm a bit naive with all this, how do I update 0.3.0 to an Alpha version please? Sorry, I can't work out how.

Cheers Samuel 🙂


From: Samuel Spagl @.> Sent: 22 April 2024 2:24 PM To: samuelspagl/ha_samsung_soundbar @.> Cc: Arko @.>; Mention @.> Subject: Re: [samuelspagl/ha_samsung_soundbar] Multiple errors happening while updating the device status (Issue #22)

@thearchitectukhttps://github.com/thearchitectuk Yeah this is common 😅, please take a look at #26https://github.com/samuelspagl/ha_samsung_soundbar/issues/26 and install the latest alpha version of this integration.

This version features a new settings workflow, where you can enable / disable the entities (and therefore the update process) for the custom capabilities. I also added service calls for the custom capabilities to still enable setting the values.

I still wait for a response from Samsung 😅, but until that time, I can't do much about it.

— Reply to this email directly, view it on GitHubhttps://github.com/samuelspagl/ha_samsung_soundbar/issues/22#issuecomment-2069416042, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AISUGWUYRN73IWDILIB3GVTY6UFPLAVCNFSM6AAAAABESHUAWSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANRZGQYTMMBUGI. You are receiving this because you were mentioned.Message ID: @.***>

samuelspagl commented 7 months ago

Don't worry :)

Here's the link to the HACS documentation: https://hacs.xyz/docs/faq/select_version/

thearchitectuk commented 7 months ago

Don't worry :)

Here's the link to the HACS documentation: https://hacs.xyz/docs/faq/select_version/

Thanks Samuel!

I have updated, however, it only works if all 4 entities are disabled. I thought you only had to disable one to fix the logging issue?

If I just have 2 enabled, I get this error at the top right (behind the popped up box). Did I miss something? :) Thanks bud.

Snipaste_2024-04-26_16-43-53

samuelspagl commented 5 months ago

I will close this with the merge of #28. Feel free to reopen if something is still left. The issue with the Samsung API will be reopened by myself and pinned :)