jjlawren / sonos_cloud

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

Unable to stop audio with media_stop service #12

Closed timknowlden closed 2 years ago

timknowlden commented 2 years ago

I am able to start media playing. In this instance a google hosted mp3. However using media_stop or turn_off service it will not stop it. I cannot stop it in the sonos app.

I have found the only way to stop is to play a TTS message.

jjlawren commented 2 years ago

There is currently not a way to stop audio playback once it has begun using this component. The intention for this custom component is to allow playing short TTS/alert sounds, not music or long-playing audio. The built-in Sonos integration should be used for music playback and controls.

timknowlden commented 2 years ago

There is currently not a way to stop audio playback once it has begun using this component. The intention for this custom component is to allow playing short TTS/alert sounds, not music or long-playing audio. The built-in Sonos integration should be used for music playback and controls.

Okay not a problem. I thought it would have been a good solution to couple with my electric fire to play audio of fire sounds at a low volume whilst it’s on. As this plays along side anything else that’s already on.

jjlawren commented 2 years ago

Interesting use-case that I hadn't considered. I'm not seeing an API call that allows us to cancel a clip in progress. Perhaps there's a clever way to play an empty clip on top of one that's already playing to "cancel" it, but it would take some experimenting.

timknowlden commented 2 years ago

Everyone has a unique case for sow integration 👍

Yes I will experiment and a short empty audio clip will probably do it.

jjlawren commented 2 years ago

Hi @timknowlden, have you had any luck with your experiments?

timknowlden commented 2 years ago

No I stopped going down that route and got a google home mini for £5 second hand and use that for the fire audio

jjlawren commented 2 years ago

Okay, thanks for the update. I'm going to close this issue for now as there's not a clear way to support the request.