Hi,
As i was keen to give me Veralite the image of some verbal intelligence @Guessed helped me with an earlier version of the Sonos Plugin to create some dynamic speech (See here http://forum.micasaverde.com/index.php/topic,11269.0.html)
I’m going to update this first section with any new dynamic ‘say’ commands i’ve pulled together.
[size=12pt]The Talking Sonos Clock[/size]
http://forum.micasaverde.com/index.php/topic,12408.msg90986.html#msg90986
[size=12pt]Period Of The Day Welcome[/size]
http://forum.micasaverde.com/index.php/topic,12408.msg92210.html#msg92210
[size=12pt]Check The Status Of The Lights[/size]
http://forum.micasaverde.com/index.php/topic,12408.msg92209.html#msg92209
[size=12pt]Random Words[/size]
http://forum.micasaverde.com/index.php/topic,12408.msg159478.html#msg159478
[size=12pt]Simon Says Game[/size]
http://forum.micasaverde.com/index.php/topic,12408.msg161152.html#msg161152
[size=12pt]All Zones Message[/size]
http://forum.micasaverde.com/index.php/topic,12408.msg159525.html#msg159525
—ooo000ooo—
[size=12pt]What’s The Temperature ? [/size]
This was my first one and testing it again, it still works, and it’s great how Google & Sonos can tell me the temperatures of my kids rooms now…
[code]url = require(“socket.url”)
local AV_DEV = 5
local LS_SID = “urn:micasaverde-com:serviceId:Sonos1”
local MN_SID = “urn:micasaverde-com:serviceId:MediaNavigation1”
local TEMP_SID = “urn:upnp-org:serviceId:TemperatureSensor1”
local benTemp = luup.variable_get(TEMP_SID,“CurrentTemperature”, 42)
local emmaTemp = luup.variable_get(TEMP_SID,“CurrentTemperature”, 48)
local lang = “en”
local speak = url.escape(string.format("Ben’s Room is currently at %s degrees, and emmers is at %s ", benTemp, emmaTemp))
luup.call_action(LS_SID, “SetURIToPlay”, {URIToPlay = string.format(“x-rincon-mp3radio://translate.google.com/translate_tts?tl=%s&q=%s”, lang, speak)},AV_DEV)
luup.call_action(MN_SID, “Play”, {},AV_DEV)[/code]
Feel free to evolve this script and share any examples you might create here for others to use.