I have started to use the ALTSonos plugin to run TTS over my sonos. Announcements, etc But one flaw I have seen is that you must play the sound/TTS over a Group ID. The problem lies in that the group ID will change over time and there is not way via Luup code to retrieve it. When ever I pair speakers via a group, in the Sonos App, the Group ID number will change. Or if I create a
local ALTUI_DEVICE_NO = 850
local ALTUI_DEVICE_SID = “urn:upnp-org:serviceId:altui1”
local ALTSONOS_DEVICE_NO = 879
local ALTSONOS_DEVICE_SID = “urn:upnp-org:serviceId:altsonos1”
local GROUP_ID_KITCHEN = “RINCON_B8******:725”
Is there a way to have TTS over a “Player ID”? New Action?
luup.call_action(ALTUI_DEVICE_SID, “SayTTS”, {newMessage = EVENT_MESSAGE, newVolume = EVENT_VOLUME, newPlayerName = “Kitchen”}, ALTUI_DEVICE_NO)
Is it possible to get Group ID via new action based on Friendly name? New Action?
resultCode, resultString, job, returnArguments = luup.call_action(ALTSONOS_DEVICE_SID, “GetGroupID”, { playerName= “Kitchen”} , ALTSONOS_DEVICE_NO)
With the Group ID changing, it will be impossible to really use Sonos, unless I am missing something.
[quote=“kyle.dawson, post:1, topic:200315”]I have started to use the ALTSonos plugin to run TTS over my sonos. Announcements, etc But one flaw I have seen is that you must play the sound/TTS over a Group ID. The problem lies in that the group ID will change over time and there is not way via Luup code to retrieve it. When ever I pair speakers via a group, in the Sonos App, the Group ID number will change. Or if I create a
local ALTUI_DEVICE_NO = 850
local ALTUI_DEVICE_SID = “urn:upnp-org:serviceId:altui1”
local ALTSONOS_DEVICE_NO = 879
local ALTSONOS_DEVICE_SID = “urn:upnp-org:serviceId:altsonos1”
local GROUP_ID_KITCHEN = “RINCON_B8******:725”
Is there a way to have TTS over a “Player ID”? New Action?
luup.call_action(ALTUI_DEVICE_SID, “SayTTS”, {newMessage = EVENT_MESSAGE, newVolume = EVENT_VOLUME, newPlayerName = “Kitchen”}, ALTUI_DEVICE_NO)
Is it possible to get Group ID via new action based on Friendly name? New Action?
resultCode, resultString, job, returnArguments = luup.call_action(ALTSONOS_DEVICE_SID, “GetGroupID”, { playerName= “Kitchen”} , ALTSONOS_DEVICE_NO)
With the Group ID changing, it will be impossible to really use Sonos, unless I am missing something.[/quote]
v 0.12 includes a change that enables you to pass a playerID instead of a groupID; the action will affect the group currently owning that player. please note the UPNP parameter name change
I get same error if I use the Action from ALTUI SayTTS or if I use my own luup code. It creates the MP3, but when it looks to run the AudioClip, it fails. When I try the AudioClip from the ALTSonos Action directly, it works. I think you updated the parms in ALTSonos but in ALTUI, does not pass new name? groupID_playerID
I updated local copy L_ALTUI.lua and seems to works now.
local params = {urlClip=uri, Duration=estDuration}
if (groupDevices ~= “”) then
params[“groupID_playerID”]= groupDevices
else
params[“groupID_playerID”]= “ALL”
end
I get same error if I use the Action from ALTUI SayTTS or if I use my own luup code. It creates the MP3, but when it looks to run the AudioClip, it fails. When I try the AudioClip from the ALTSonos Action directly, it works. I think you updated the parms in ALTSonos but in ALTUI, does not pass new name? groupID_playerID
I updated local copy L_ALTUI.lua and seems to works now.
local params = {urlClip=uri, Duration=estDuration}
if (groupDevices ~= “”) then
params[“groupID_playerID”]= groupDevices
else
params[“groupID_playerID”]= “ALL”
end[/quote]
yes I also updated ALTUI.
please note these ALTSONOS evolutions:
v 0.12 : Ability to pass a playerID in the UPNP api where a groupID is expected. the api will affect the group currently owning the player
v 0.13 : respect Volume parameter in AudioClip UPNP action if specified ( set new volume and restore old one after )