http control multiroom & tunein

Hi,

I am very excited of the diy boards and would like to build a multiroom audio system based on the units. unfortunately I just struggled while trying to control the unit via http commands in following situations:

  1. grap several units together to start a synched multiroom audio experience.
  2. change tunein stations

as these are must have feature for me (without using the app) I would appreciate theese features to come via firmware update very soon. Can you give an estimation, whether theese features will come or not?

Thanks.

Hi @Ralfgr

To create multiroom group, you can use this HTTPAPI: http://192.168.10.106/httpapi.asp?command=ConnectMasterAp:JoinGroupMaster:eth192.168.10.109
the first 106 is IP of slave, and 109 is IP of master

For the second issue, the device is designed to receive source from APP, and you can use the HTTPAPI to send radio link directly. I think it’s enough when you write the program to control the device. So you get the radio link by some method and push it to device for playback. You can manage the radio links on your program easily. The API to start playback: http://192.168.10.109/httpapi.asp?command=setPlayerCmd:play:http://89.223.45.5:8000/progressive-flac

ps: Do not forget to change the IP address of device

Hi @zpl1025
thanks for you helpful answers on my questions - that works just fine now.
When setting up a playback of a radiostream via API the station information doesn’t appear in the app. Is there a way of getting the infos?

Thanks

nope, to set the music information, you need to use the upnp method, it’s a bit complicated and I’ll send later on next Monday.

1 Like

You can send a custom UPNP package to create a queue, the command is trying to send with a curl command, you could run the script in linux shell, or execute it in WSL. And remember to change the IP address with a real one.

IP=192.168.10.101
QUEUE_NAME='custom_radio'
RADIO_TITLE='Title'
RADIO_ALBUM='Album'
RADIO_ARTIST='Artist'
RADIO_COVER_URL='https://pic2.zhimg.com/80/v2-dee2930ca3571ead58fb830df0b6bc11_720w.jpg'
RADIO_PLAY_URL='http://89.223.45.5:8000/zed-flac'

curl -s -X POST 'http://'$IP':59152/upnp/control/PlayQueue1' -H 'SOAPACTION: "urn:schemas-wiimu-com:service:PlayQueue:1#CreateQueue"' -H 'Content-Type: text/xml;charset="utf-8"' -d '<s:Envelope s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Body><u:CreateQueue xmlns:u="urn:schemas-wiimu-com:service:PlayQueue:1"><QueueContext>&lt;?xml version=&quot;1.0&quot;?&gt;&lt;PlayList&gt;&lt;ListName&gt;'$QUEUE_NAME'&lt;/ListName&gt;&lt;ListInfo&gt;&lt;Radio&gt;1&lt;/Radio&gt;&lt;SourceName&gt;OnlineMusic&lt;/SourceName&gt;&lt;PicUrl&gt;&lt;/PicUrl&gt;&lt;TrackNumber&gt;1&lt;/TrackNumber&gt;&lt;SearchUrl&gt;&lt;/SearchUrl&gt;&lt;Quality&gt;0&lt;/Quality&gt;&lt;/ListInfo&gt;&lt;Tracks&gt;&lt;Track1&gt;&lt;URL&gt;'$RADIO_PLAY_URL'&lt;/URL&gt;&lt;Source&gt;OnlineMusic&lt;/Source&gt;&lt;Key&gt;&lt;/Key&gt;&lt;Id&gt;&lt;/Id&gt;&lt;Metadata&gt;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&amp;lt;DIDL-Lite xmlns:dc=&amp;quot;http://purl.org/dc/elements/1.1/&amp;quot; xmlns:upnp=&amp;quot;urn:schemas-upnp-org:metadata-1-0/upnp/&amp;quot; xmlns:song=&amp;quot;www.wiimu.com/song/&amp;quot; xmlns:custom=&amp;quot;www.wiimu.com/custom/&amp;quot; xmlns=&amp;quot;urn:schemas-upnp-org:metadata-1-0/DIDL-Lite/&amp;quot;&amp;gt;&amp;lt;upnp:class&amp;gt;object.item.audioItem.musicTrack&amp;lt;/upnp:class&amp;gt;&amp;lt;item&amp;gt;&amp;lt;song:id&amp;gt;&amp;lt;/song:id&amp;gt;&amp;lt;song:albumid&amp;gt;&amp;lt;/song:albumid&amp;gt;&amp;lt;song:singerid&amp;gt;&amp;lt;/song:singerid&amp;gt;&amp;lt;dc:title&amp;gt;'$RADIO_TITLE'&amp;lt;/dc:title&amp;gt;&amp;lt;upnp:artist&amp;gt;'$RADIO_ARTIST'&amp;lt;/upnp:artist&amp;gt;&amp;lt;upnp:album&amp;gt;'$RADIO_ALBUM'&amp;lt;/upnp:album&amp;gt;&amp;lt;res&amp;gt;'$RADIO_PLAY_URL'&amp;lt;/res&amp;gt;&amp;lt;upnp:albumArtURI&amp;gt;'$RADIO_COVER_URL'&amp;lt;/upnp:albumArtURI&amp;gt;&amp;lt;/item&amp;gt;&amp;lt;/DIDL-Lite&amp;gt;&lt;/Metadata&gt;&lt;/Track1&gt;&lt;/Tracks&gt;&lt;/PlayList&gt;</QueueContext><QueuePolicy>1</QueuePolicy></u:CreateQueue></s:Body></s:Envelope>' 

the UPNP package to start the playback, make sure the QUEUE_NAME is the one you’ve created:

IP=192.168.10.101
QUEUE_NAME='custom_radio'

curl -s -X POST 'http://'$IP':59152/upnp/control/PlayQueue1' -H 'SOAPACTION: "urn:schemas-wiimu-com:service:PlayQueue:1#PlayQueueWithIndex"' -H 'Content-Type: text/xml;charset="utf-8"' -d '<s:Envelope s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Body><u:PlayQueueWithIndex xmlns:u="urn:schemas-wiimu-com:service:PlayQueue:1"><QueueName>'$QUEUE_NAME'</QueueName><Index>1</Index></u:PlayQueueWithIndex></s:Body></s:Envelope>'
1 Like