jjlawren / sonos_cloud

Sonos cloud API integration for Home Assistant with improved TTS/alerts handling
121 stars 5 forks source link

Speakers seem unavailable #34

Open Steveelliott111 opened 2 years ago

Steveelliott111 commented 2 years ago

Noticed I wasnt getting TTS announcements on door open etc.

The speakers the app creates are all showing as unavailable (hence no tts announcements) but the 'real' sonos speakers are all working correctly in HA

Pulled from log : (Far as I'm aware i've not changed any credentials)

2022-09-06 21:27:18.258 ERROR (MainThread) [custom_components.sonos_cloud] Household request failed (401): {"fault":{"faultstring":"Invalid Access Token","detail":{"errorcode":"keymanagement.service.invalid_access_token"}}}

jjlawren commented 2 years ago

It could be a transient error on the Sonos side or your credentials may have actually expired somehow. Have you tried reloading the integration or just restarting HA?

tpantano commented 2 years ago

I have seen the same issue occur about 3 times over the past month or so. One time it fixed itself. Other 2 times I ended up deleting the integration and re-adding it to get it to work again.

Edit: Reloading the integration or restarting HA did not solve the problem for me.

Znegl commented 2 years ago

I just started getting the same error, so no I have no doorbell 🙈

Could it be lack of some token refresh or similar? It has worked flawlessly for months until now, so an expired token seems likely.

Restarting the integration and restarting home assistant doesn't resolve the error.

markus-lassfolk commented 2 years ago

Experiencing the same issue. Have had the integration working for quite some time, and then suddenly getting invalid access token out of the blue every 1-3 days. Where removing and readding the integration fixes the problem for a day or two, until it has to be redone.

jjlawren commented 2 years ago

The token refresh logic relies on HA core which has been quite reliable in my experience. This feels like a transient issue with the Sonos hosts, but I don't have hard data to back that up. Is everyone that's seeing this getting identical log entries?

If you hit this, set the logger for this integration (custom_components.sonos_cloud) to debug and reload the integration (or restart HA with the debug logger in your config).

markus-lassfolk commented 2 years ago

Debug log;
filtered.txt

mbuerki84 commented 2 years ago

I have also the same issue... Since HA has changed to the registration information (not necessary in configuration.yaml)