using Sonos One (with latest 10.6.1 firmware) also with Alexa functionality and stuff.
Is the Sonos One not capable of using echo stuff like “announcement”?
my things:
Bridge amazonechocontrol:account:binders "Amazon Account" @ "daheim"
{
Thing echo echo_Kueche "Alexa" @ "Küche" [serialNumber="G09xxxxxxxxxxxxx"]
Thing echo echo_Schlafen "Alexa" @ "Schlafen" [serialNumber="e6xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"]
}
My items:
// Commands
String Echo_Kueche_Announcement "Announcement" (Alexa_Kueche) {channel="amazonechocontrol:echo:binders:echo_Kueche:announcement"}
String Echo_Kueche_TTS "Text to Speech" (Alexa_Kueche) {channel="amazonechocontrol:echo:binders:echo_Kueche:textToSpeech"}
...
String Echo_Schlafen_Announcement "Announcement" (Alexa_Schlafen) {channel="amazonechocontrol:echo:binders:echo_Schlafen:announcement"}
String Echo_Schlafen_TTS "Text to Speech" (Alexa_Schlafen) {channel="amazonechocontrol:echo:binders:echo_Schlafen:textToSpeech"}
In my rule, I let the announcement go through with 100% and then the volume is set back to previous level automagically.
import org.eclipse.smarthome.model.script.ScriptServiceUtil
var Timer tFamCal_1
var Timer tFamCal_2
var Timer tFamCal_3
var Timer tFamCal_4
var Timer tFamCal_5
var Timer tFamCal_6
val echoAnnouncement = [ String room, String announcement |
var echos = newArrayList("Kueche", "0")
// which room is the announcement?
if (room != "all" && room != "") {
echos.set(0, room)
} else {
echos.set(0, "Kueche")
echos.set(1, "Schlafen")
}
// make the announcement
echos.forEach[ echo |
if (echo != "0") {
var CurrentAnnouncment = ScriptServiceUtil.getItemRegistry?.getItem("Echo_"+echo+"_Announcement")
var jsoncmd = '{ "sound": true, "speak": "'+announcement+'", "title": "Announcement", "volume": 100}'
CurrentAnnouncment.sendCommand(jsoncmd)
}
]
logInfo("echoAnnouncement", "echos: [{}]",echos)
]
rule "Announcement testen"
when
Item Echo_TestItem received update
then
echoAnnouncement.apply("all", "das ist ein Test")
end
now if I trigger the Echo_TestItem
, the Announcements go through, the echo (Gen3) in the “Kueche” triggers the announcement as expected, the one in “Schlafen” does nothing… but not quite, if music plays on “Schlafen” it will get louder (too short for the “das ist ein Test” sentence…) and gets back to previous level - sort of intended.
So, is the Sonos One not able to “announce” something? because the Echo_Schlafen_TTS
item works. But why does it change the volume then?