jjlawren / sonos_cloud

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

Provider cloud not found (unknown_error) #40

Closed PedroKTFC closed 1 year ago

PedroKTFC commented 1 year ago

I am trying the text to speach example given in the instructions:

service: media_player.play_media
data:
  entity_id: media_player.kitchen
  media_content_id: media-source://tts/cloud?message=I am very loud
  media_content_type: music
  extra:
    volume: 80

However, when I try it in Developer Tools>Services I get a "Provider cloud not found error" and the following in the log:

Logger: homeassistant.components.websocket_api.http.connection Source: components/websocket_api/connection.py:150 Integration: Home Assistant WebSocket API (documentation, issues) First occurred: 10:23:21 (4 occurrences) Last logged: 13:57:26

[2584235168] Error handling message: Provider cloud not found (unknown_error) from xx.xx.xx.xx (Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:108.0) Gecko/20100101 Firefox/108.0) [2582515920] Error handling message: Provider cloud not found (unknown_error) from xx.xx.xx.xx (Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:108.0) Gecko/20100101 Firefox/108.0) [2545034600] Error handling message: Provider cloud not found (unknown_error) from xx.xx.xx.xx (Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:108.0) Gecko/20100101 Firefox/108.0)

I imagine I'm making a basic mistake but I've no idea what? Can anyone help?

jjlawren commented 1 year ago

That URL tries to use the Nabu Casa cloud TTS provider: https://www.home-assistant.io/integrations/cloud/

If you're using a different TTS service, you'd swap out that cloud part of the URL. For example with google_translate or one of the other TTS integrations: https://www.home-assistant.io/integrations/#text-to-speech.

PedroKTFC commented 1 year ago

Thanks for the quick reply. All sorted now. As an aside, which might help others, I couldn't work out the precise syntax to get it to work in Developer Tools>Services. However, as I'm using this in an automation (for when my Nest doorbell rings - I want a loud message telling me it's rung so I don't miss it), I looked at what the automations GUI was producing in the yaml. So for reference the Google translate syntax is (with my message, other messages are available! :o):

media_content_id: >-
    media-source://tts/google_translate?message=There%27s+someone+at+the+door%21%0AThere%27s+someone+at+the+door%21%0AFor+crying+out+loud%21+There%27s+someone+at+the+door%21%0A