I uploaded ‘chime.mp3’ to my local media folder. If I go into the media player, I can get the file to play to the correct speaker, HOWEVER, a service call does nothing. Where is my error?
Sonos doesn’t like http links. Have the Sonos controller app open on a device and watch the speaker you are trying to play to. When you do the service call, you should see a message in the Sonos controller app say something about “could not connect”. I’ve only gotten my service calls to work with https links. Not sure why the media browser works though… Of course that means you have to have a valid ssl cert for Sonos to recognize and connect.
Also, I split out my commands when I play something on my Sonos. I set the volume, then I send the play call. announce isn’t needed for music, only tts and even then it’s implied and hardcoded in a tts command.
This is not true, plain HTTP links work just fine. If you’re having issues using them, there is some other reason the Sonos devices are unable to connect to the host in your URL.
Your media_content_id is likely not quite correct. Easiest way to validate is to start creating a new automation (you won’t need to use/save it). Select “Play media” as the Action, choose a Sonos device, and them select the media you want to play. Switch to YAML and you’ll see the generated service call.
In my case, I have media_source configured like this:
this is my 2 service calls, i played the file then watched the id in the services and got the right entity id and it’s working , when i try to save the call service for an automation or script i get error mesage
here is my call service yaml
there’s a question mark at the end of the file name, it was in the entity id when i looked it up, i tired with and without it , i can’t save
i’m so mad, it took me a whole night to get it to work and i was happy when it start working, but unfortunately I wasn’t happy for a long time because I couldn’t save
For future reference, the error message complained about “Message malformed” but no one can determine if your service calls have proper YAML syntax because you didn’t post them in YAML format.
I was able to get Sonos local media to work, but mounting the media file messed up my frigate storage.
I used this in my config,yaml and it worked to call local mp3 but frigate stopped working,
my setup is supervisor HA , my main config/ install on a sata ssd, and i moved data disk to another nvme ssd.
So now all my media is stored on the 2nd ssd, but the configuration is on the first one.
how can I mount the media directory on the 2nd ssd, any help will be really appreciated.
I don’t know if you’ve figured this out or not, but I got local MP3s working by using WinSCP to put my files in /root/homeassistant/www/ then using the following to play on the Sonos: