Sonos Play mp3 from URL

682 views
Skip to first unread message

Arjuna Wol

unread,
May 28, 2015, 10:52:19 AM5/28/15
to open...@googlegroups.com

Hey Guys,
I have added my SONOS system to Eclipse SmartHome /Openhab 2 with the PaperUI. I am able to start it via the rule:

------
rule "say"
when
    Item googletexttospeech_gTTS_GoogleTextToSpeech_StatusText changed
then
    Thread::sleep(1000)    sendCommand(sonos_zoneplayer_RINCON_B8E93781285601400_control, PLAY)
end
-------

But actually I don't want the SONOS just to start... I also want to commit the path (or URL) of the File?! Is this possible with PLAYURI? How does it work?

Thanks for help!!!
Arjuna

Kai Kreuzer

unread,
Jun 16, 2015, 10:07:53 AM6/16/15
to open...@googlegroups.com, span...@ist-willig.de
Hi Arjuna,

sorry for my late reply.
Yes, you can use the "playuri" channel to have Sonos playing a given audio file. The content that you have to send is an http url as a string, e.g. "http://192.168.0.20:8080/audio/myfile.mp3".
So far, openHAB does not offer any feature to expose files from the file system through the webserver, so you would have to set this up yourself (use some computer on your local network with a webserver that provides the files you want to play).

Hope this helps!

Best regards,
Kai
Reply all
Reply to author
Forward
0 new messages