I’m sharing a small widget I just (re-)designed to control my multiroom system, trying to make it as generic as possible:
It doesn’t make any assumptions about your items, so you have to configure them individually with the props. Only the artist, track and player control item are required;
The track progress/track duration time are notably available with the Spotify binding, if you’re looking for them;
The icons on the bottom left will appear as you specify the items;
The “volume” icon will replace the controls by a slider to adjust the volume;
The “multiroom” icon will bring up the command options with the standard action sheet - so make sure the item you specify has some.
I especially like the the exchange mechanic of the player-controls with the volume slider - it still retains a compact widget then.
I also recognized that it might be beneficial to use more generic elements as you don’t have to mess around too much with all the custom classes and styles then to make it work in the different themes.
val String filename = "Alexa_RADIO_Kitchen_Favorite"
// if (xxxxsxx.state == 0 )
// logInfo(filename, "xxxxxxx")
// received update
rule "Alexa Kitchen Radio Favorite"
when
Item KitchenRoom_Favorite_Radio_Alexa received command
then
switch(KitchenRoom_Favorite_Radio_Alexa.state)
{
case 100 : {
// Zoo Radio
Al_KitchenRoom_RadioStationId.sendCommand("s78170")
KitchenRoom_Favorite_Radio_Alexa_string.sendCommand("Zoo Radio")
logInfo(filename, "Zoo Radio")
}
case 1 : {
// Republic Radio s78249
// Fly Radio s266902
Al_KitchenRoom_RadioStationId.sendCommand("s266902")
KitchenRoom_Favorite_Radio_Alexa_string.sendCommand("Fly Radio")
logInfo(filename, "Fly Radio ")
}
case 2 : {
// Imagine FM
Al_KitchenRoom_RadioStationId.sendCommand("s79446")
KitchenRoom_Favorite_Radio_Alexa_string.sendCommand("Imagine FM")
logInfo(filename, "Imagine FM")
}
case 3 : {
// North Radio
Al_KitchenRoom_RadioStationId.sendCommand("s133388")
KitchenRoom_Favorite_Radio_Alexa_string.sendCommand("North Radio")
logInfo(filename, "North Radio")
}
case 4 : {
// Plus Radio
Al_KitchenRoom_RadioStationId.sendCommand("s102465")
KitchenRoom_Favorite_Radio_Alexa_string.sendCommand("Plus Radio")
logInfo(filename, "Plus Radio")
}
case 5 : {
// RADIOCOSMO
Al_KitchenRoom_RadioStationId.sendCommand("s6659")
KitchenRoom_Favorite_Radio_Alexa_string.sendCommand("COSMO RADIOC")
logInfo(filename, "RADIOCOSMO")
}
case 6 : {
// Rainbow
Al_KitchenRoom_RadioStationId.sendCommand("s87077")
KitchenRoom_Favorite_Radio_Alexa_string.sendCommand("Rainbow")
logInfo(filename, "Rainbow")
}
case 7 : {
// Rock Radio
Al_KitchenRoom_RadioStationId.sendCommand("s9406")
KitchenRoom_Favorite_Radio_Alexa_string.sendCommand("Rock Radio")
logInfo(filename, "Rock Radio")
}
case 8 : {
// RSO
Al_KitchenRoom_RadioStationId.sendCommand("s54732")
KitchenRoom_Favorite_Radio_Alexa_string.sendCommand("RSO")
logInfo(filename, "RSO")
}
case 9 : {
// Velvet 96.8 FM
Al_KitchenRoom_RadioStationId.sendCommand("s168619")
KitchenRoom_Favorite_Radio_Alexa_string.sendCommand("Velvet 96.8 FM")
logInfo(filename, "Velvet 96.8 FM")
}
case 10 : {
// Antenne Bayern Chillout
Al_KitchenRoom_RadioStationId.sendCommand("s96745")
KitchenRoom_Favorite_Radio_Alexa_string.sendCommand("Bayern Chillout")
logInfo(filename, "Antenne Bayern Chillout")
}
case 11 : {
// ANTENNE BAYERN Lovesongs
Al_KitchenRoom_RadioStationId.sendCommand("s104096")
KitchenRoom_Favorite_Radio_Alexa_string.sendCommand("BAYERN Lovesongs")
logInfo(filename, "ANTENNE BAYERN Lovesongs")
}
case 12 : {
// ANTENNE BAYERN 90er Hits
Al_KitchenRoom_RadioStationId.sendCommand("s231123")
KitchenRoom_Favorite_Radio_Alexa_string.sendCommand("BAYERN 90er Hits")
logInfo(filename, "ANTENNE BAYERN 90er Hits")
}
case 13 : {
// ANTENNE BAYERN Classic Rock Live
Al_KitchenRoom_RadioStationId.sendCommand("s104094")
KitchenRoom_Favorite_Radio_Alexa_string.sendCommand("BAYERN Classic Rock")
logInfo(filename, "ANTENNE BAYERN Classic Rock Live")
}
case 14 : {
// 80s80s christmas
Al_KitchenRoom_RadioStationId.sendCommand("s258389")
KitchenRoom_Favorite_Radio_Alexa_string.sendCommand("80s christmas")
logInfo(filename, "80s christmas")
}
case 15 : {
// Christmas
Al_KitchenRoom_RadioStationId.sendCommand("s302328")
KitchenRoom_Favorite_Radio_Alexa_string.sendCommand("Christmas")
logInfo(filename, "Christmas")
}
case 16 : {
// Christmas Radio
Al_KitchenRoom_RadioStationId.sendCommand("s299546")
KitchenRoom_Favorite_Radio_Alexa_string.sendCommand("Christmas Radio")
logInfo(filename, "Christmas Radio")
}
case 17 : {
// Athens Party +
Al_KitchenRoom_RadioStationId.sendCommand("s187567")
KitchenRoom_Favorite_Radio_Alexa_string.sendCommand("Athens Party +")
logInfo(filename, "Athens Party +")
}
case 18 : {
// Athens Party
Al_KitchenRoom_RadioStationId.sendCommand("s103538")
KitchenRoom_Favorite_Radio_Alexa_string.sendCommand("Athens Party")
logInfo(filename, "Athens Party")
}
case 19 : {
// Athens Party RNB
Al_KitchenRoom_RadioStationId.sendCommand("s187570")
KitchenRoom_Favorite_Radio_Alexa_string.sendCommand("Athens Party RNB")
logInfo(filename, "Athens Party RNB")
}
case 20 : {
// 92.9 Kiss
Al_KitchenRoom_RadioStationId.sendCommand("s6183")
KitchenRoom_Favorite_Radio_Alexa_string.sendCommand("92.9 Kiss")
logInfo(filename, "92.9 Kiss")
}
case 21 : {
// Athens Deejay FM
Al_KitchenRoom_RadioStationId.sendCommand("s80307")
KitchenRoom_Favorite_Radio_Alexa_string.sendCommand("Athens Deejay")
logInfo(filename, "Athens Deejay FM")
}
case 22 : {
// Diesi FM
Al_KitchenRoom_RadioStationId.sendCommand("s49386")
KitchenRoom_Favorite_Radio_Alexa_string.sendCommand("Diesi FM")
logInfo(filename, "Diesi FM")
}
case 23 : {
// Dromos FM
Al_KitchenRoom_RadioStationId.sendCommand("s87064")
KitchenRoom_Favorite_Radio_Alexa_string.sendCommand("Dromos FM")
logInfo(filename, "Dromos FM")
}
case 24 : {
// Easy 97.2
Al_KitchenRoom_RadioStationId.sendCommand("s291260")
KitchenRoom_Favorite_Radio_Alexa_string.sendCommand("Easy 97.2")
logInfo(filename, "Easy 97.2")
}
case 25 : {
// Ellinadiko FM
Al_KitchenRoom_RadioStationId.sendCommand("s109115")
KitchenRoom_Favorite_Radio_Alexa_string.sendCommand("Ellinadiko FM")
logInfo(filename, "Ellinadiko FM")
}
case 26 : {
// Heart FM
Al_KitchenRoom_RadioStationId.sendCommand("s103550")
KitchenRoom_Favorite_Radio_Alexa_string.sendCommand("Heart FM")
logInfo(filename, "Heart FM")
}
case 27 : {
// Kiss 91.1 FM
Al_KitchenRoom_RadioStationId.sendCommand("s116740")
KitchenRoom_Favorite_Radio_Alexa_string.sendCommand("Kiss 91.1 FM")
logInfo(filename, "Kiss 91.1 FM")
}
case 28 : {
// LOVE
Al_KitchenRoom_RadioStationId.sendCommand("s15774")
KitchenRoom_Favorite_Radio_Alexa_string.sendCommand("LOVE")
logInfo(filename, "LOVE")
}
case 29 : {
// Mad Radio
Al_KitchenRoom_RadioStationId.sendCommand("s18299")
KitchenRoom_Favorite_Radio_Alexa_string.sendCommand("Mad Radio")
logInfo(filename, "Mad Radio")
}
case 30 : {
// Melodia FM
Al_KitchenRoom_RadioStationId.sendCommand("s15782")
KitchenRoom_Favorite_Radio_Alexa_string.sendCommand("Melodia FM")
logInfo(filename, "Melodia FM")
}
case 31 : {
// Music 89.2
Al_KitchenRoom_RadioStationId.sendCommand("s133390")
KitchenRoom_Favorite_Radio_Alexa_string.sendCommand("Music 89.2")
logInfo(filename, "Music 89.2")
}
case 32 : {
// Palmos FM
Al_KitchenRoom_RadioStationId.sendCommand("s154544")
KitchenRoom_Favorite_Radio_Alexa_string.sendCommand("Palmos FM")
logInfo(filename, "Palmos FM")
}
case 33 : {
// Paradise Radio
Al_KitchenRoom_RadioStationId.sendCommand("s102452")
KitchenRoom_Favorite_Radio_Alexa_string.sendCommand("Paradise Radio")
logInfo(filename, "Paradise Radio")
}
case 34 : {
// Rock FM
Al_KitchenRoom_RadioStationId.sendCommand("s15809")
KitchenRoom_Favorite_Radio_Alexa_string.sendCommand("Rock FM")
logInfo(filename, "Rock FM")
}
case 35 : {
// Rythmos 949
Al_KitchenRoom_RadioStationId.sendCommand("p1095544")
KitchenRoom_Favorite_Radio_Alexa_string.sendCommand("Rythmos 949")
logInfo(filename, "Rythmos 949")
}
}
end
items
Number KitchenRoom_Favorite_Radio_Alexa "Alexa KitchenRoom Radio Favorite"
String KitchenRoom_Favorite_Radio_Alexa_string "Alexa KitchenRoom Radio Favorite String"
can you explain the multiroom icon.
I use some sort of snapcast to control all the volumes across my place but probably need to set it up correctly to your widget.
Yeah, it’s not “really” multiroom, it’s just that I have an item with rules reacting to it, which will configure some preset links between the rooms… I always have the same music source, I just choose in which room it plays. There’s no individual volume control, I have a page dedicated to that.
Note that you can modify the widget and repurpose this button to something else, like open a popup with playlist/radio buttons…
@Mike_s1 In my case that would be an Image item linked to a spotify:player:<myaccount>:albumImage channel
but it’s sort of a shortcut since while I use Spotify often as my source it’s not always the case. I have a Yamaha multiroom setup but the Yamaha Receiver binding for instance, AFAIK, doesn’t expose proper Image channels unfortunately, which could be used with this widget.