Installing Sonos Plugin 2.0 (development/pre-release) for Azure TTS access

OK Did Steps 4-10 then 14…
Master has found 11 devices and Settings page says creating devices.
Control page says running 0 devices.
I will wait a few more minutes then do steps 12-14…
FYI
I notice there is no Sonos device listed under My Apps…

Run the following code in Apps > Develop apps > Test Luup code:

os.execute("Rotate_Logs.sh 1")
os.execute("Reload.sh")

Then wait about 60 seconds, and grab the log file: http://your-vera-local-ip/cgi-bin/cmh/log.sh?Device=LuaUPnP

I’ll PM you an email address where you can send it.

OK. Thanks for the logs. I think I’ve got all.

All Sonos plugin 2.0 users should upgrade to the latest version: 20060.2005. Repeat steps 4-10 only in the instructions in the head post of this topic.

1 Like

As usual rigpapa is a huge resourse for our Vera Community.
Some questions and observations after the update to Azure last night.
As we discussed I needed to add new Sonos device numbers to my TTS lua code scences.
So before going to bed I changed my lua code scenes over to the new device number.
My TTS scenes worked this morning saying “Good Morning it is 10am” and then gave me the Dark Sky weather at 10:30am!

  • But after a few initial scene played TTS scenes began working sporadically …

Also noticed: The 20060.2005 update installed 11 child devices.

2 child devices were not any of my devicies so I deleted them this morning after I changed my scenes to the new device numbers. 2 of the devices are showing cant detect device . They are the L & R rear channels connected to my Playbar. I remember reading in the forum that that is a known issue. I do have full access via my Sonos app to them when home and dont care if they are part of Vera TTS.
Question: Should I delete them for now until a work around is found.?
Question: Do i need to adjust the lua code discrepancies below in addition to the device #?
I have noticed a new device type , plus an additional “:” since updated and my new Azure language is “en-US-JessaNeural”
Perhaps this is why my TTS scenes are not consistantly working?
Here is a sample of my new lua code attempt which has not worked…
:frowning:
luup.call_action**(“urn:schemas-micasaverde-com:device:Sonos:1”, “Say”,
{Text=“Rigpapa is a star”, Language=“en-US-JessaNeural”, GroupZones=“ALL”,
Volume=60, SameVolumeForAll=“true”},
667)
Here is a sample of my previous TTS Scene lua code with the new updated device # that works sporadically.
luup.call_action(“urn:micasaverde-com:serviceId:Sonos1”, “Say”,
{Text=“Rigpapa is a star”, Language=“en-CA”, GroupZones=“ALL”,
Volume=45, SameVolumeForAll=“true”},
667)
Question:
Could you show me how to add the additional zones to the abovelua code?
Perhaps just 3 zones (667 & 668 & 664) ?
Is it ok to still use when desired:
GroupZones=“ALL”, Volume=45, SameVolumeForAll=“true”}
Lastly:
What does it mean when a Zone is Driven by another Zone?
Since the upgrade my House Connect is being “driven by” my Play 1 Garage speaker?
That Sonos connect is the 667 device # above that connects to a previous in-ceiling whole house pseaker system. I would like devoce# 667 to to be the driving speaker if possible.
Again thatns for your help Patrick
Wilbur

No, but go into the Advanced > Params on those devices and set invisible to 1 and that should get them out of sight while we figure out the rest.

Leave the Languge parameter off/blank and let it default to whatever you’ve chosen in the TTS master settings.

Since you used “ALL” for GroupZones, I don’t really know what you mean here, because “ALL” would include those zones.

It means it’s grouped with another zone; the other zone is the group controller. Since you specified “ALL”, the plugin is making a temporary group that includes all of the configured Sonos devices. The device number to which you send the Say command will be the group coordinator.

You can just send the TTS command to device 667. I must be missing something about what you’re asking, because that should be obvious. And if you just want it to go only to 667, leave GroupZones blank rather than supplying “ALL”.

Can you post the contents of your ZoneGroupState state variable? Get it from Advanced > Variables on any working Sonos plugin zone device, and go into “Edit” and copy the text from there to make sure you have the most up-to-date copy. Thanks!

I appreciate your help and patience. Having our house talk (if we wnat it to) when I set a scene makes HA more fun and functional for my wife and I.

  1. “go into the Advanced > Params on those devices and set invisible to 1 and that should get them out of sight while we figure out the rest.”

Done.

Question:
Will the Current Status :frowning: “2 Devices Not Connected” have to remain on the Dashboard until the new work around for rear speakers is found?

  1. “Leave the Languge parameter off/blank and let it default to whatever you’ve chosen in the TTS master settings.”

Languge parameter off/blank like this below? If so does that mean I don’t need to specify Languge parameter code for any of my other TTS scene requests?

luup.call_action**(“urn:schemas-micasaverde-com:device:Sonos:1”, “Say”,
{Text=“Rigpapa is a star”,GroupZones=“ALL”,
Volume=60, SameVolumeForAll=“true”},667)

  1. Would this code enable the TTS to reach Device # 667,664,670 ?
    Sometimes I want only 2 or 3 zones for the TTS. Do I seperate them in the call action with commas?

luup.call_action(“urn:micasaverde-com:serviceId:Sonos1”, “Say”,
{Text=“Door Open. Basement Door Open”,
Volume=55, SameVolumeForAll=“true”}, 667, 664, 670)

4.Does the luup.call require the new words schemas- ?
Does the luup.call require Sonos:1
These are new parameters I noticed since last nights update.

luup.call_action(“urn:micasaverde-com:serviceId:Sonos1”
luup.call_action**(“urn:schemas-micasaverde-com:device:Sonos:1”

5.Below is the Zone Group State for my Sonos Connect device# 667:

Cheers!

No Language parameters is needed on any TTS requests.

No… use GroupDevices for the additional devices, like this:

luup.call_action(“urn:micasaverde-com:serviceId:Sonos1”, “Say”, 
   { Text=“Door Open. Basement Door Open”, Volume=55,
      GroupDevices="667,664,670", SameVolumeForAll=“1” }, 667)

Nothing new here. All call_action calls (aka “action invocations”) have always required you to specify the service ID of the action. The service ID for the “Say” action is urn:micasaverde-com:serviceId:Sonos1 as it was for all prior versions of this plugin.

NOTE: You still owe me the contents of the ZoneGroupState variable I requested in my previous post. Please see above.

Thanks!
I’m learning alot supreme Jedi Master
:slight_smile:
Hard Refresh took away the :frowning: “2 Devices Not Connected” that we are hiding…
Seems the Zone Group State cut and paste didn’t stick…
Trying Again…

 Zone Group State for my Sonos Connect device# 667:

<ZoneGroupState><ZoneGroups><ZoneGroup Coordinator="RINCON_B8E9379242E201400" ID="RINCON_B8E9379242E201400:23248"><ZoneGroupMember UUID="RINCON_B8E9379242E201400" Location="http://192.168.1.18:1400/xml/device_description.xml" ZoneName="House Music" Icon="x-rincon-roomicon:living" Configuration="1" SoftwareVersion="54.2-72160" SWGen="1" MinCompatibleVersion="53.0-00000" LegacyCompatibleVersion="36.0-00000" BootSeq="195" TVConfigurationError="0" HdmiCecAvailable="0" WirelessMode="0" WirelessLeafOnly="0" HasConfiguredSSID="1" ChannelFreq="2462" BehindWifiExtender="0" WifiEnabled="1" Orientation="0" RoomCalibrationState="4" SecureRegState="3" VoiceConfigState="0" MicEnabled="0" AirPlayEnabled="0" IdleState="1" MoreInfo=""></ZoneGroupMember></ZoneGroup><ZoneGroup Coordinator="RINCON_B8E93790B8DC01400" ID="RINCON_B8E93790B8DC01400:22471"><ZoneGroupMember UUID="RINCON_B8E93790B8DC01400" Location="http://192.168.1.22:1400/xml/device_description.xml" ZoneName="Deck Speakers" Icon="x-rincon-roomicon:garage" Configuration="1" SoftwareVersion="54.2-72160" SWGen="1" MinCompatibleVersion="53.0-00000" LegacyCompatibleVersion="36.0-00000" BootSeq="41" TVConfigurationError="0" HdmiCecAvailable="0" WirelessMode="0" WirelessLeafOnly="0" HasConfiguredSSID="1" ChannelFreq="2462" BehindWifiExtender="0" WifiEnabled="1" Orientation="0" RoomCalibrationState="4" SecureRegState="3" VoiceConfigState="0" MicEnabled="0" AirPlayEnabled="0" IdleState="1" MoreInfo=""></ZoneGroupMember></ZoneGroup><ZoneGroup Coordinator="RINCON_347E5C9CF43B01400" ID="RINCON_347E5C9CF43B01400:3175755869"><ZoneGroupMember UUID="RINCON_347E5C9CF43B01400" Location="http://192.168.1.24:1400/xml/device_description.xml" ZoneName="Patio" Icon="x-rincon-roomicon:patio" Configuration="1" SoftwareVersion="54.2-72160" SWGen="1" MinCompatibleVersion="53.0-00000" LegacyCompatibleVersion="36.0-00000" BootSeq="22" TVConfigurationError="1" HdmiCecAvailable="1" WirelessMode="0" WirelessLeafOnly="0" HasConfiguredSSID="1" ChannelFreq="2462" BehindWifiExtender="0" WifiEnabled="1" Orientation="0" RoomCalibrationState="4" SecureRegState="3" VoiceConfigState="0" MicEnabled="0" AirPlayEnabled="1" IdleState="1" MoreInfo=""></ZoneGroupMember></ZoneGroup><ZoneGroup Coordinator="RINCON_347E5CA0078C01400" ID="RINCON_347E5CA0078C01400:3283714885"><ZoneGroupMember UUID="RINCON_347E5CA0078C01400" Location="http://192.168.1.7:1400/xml/device_description.xml" ZoneName="Studio" Icon="x-rincon-roomicon:living" Configuration="1" SoftwareVersion="54.2-72160" SWGen="1" MinCompatibleVersion="53.0-00000" LegacyCompatibleVersion="36.0-00000" BootSeq="7" TVConfigurationError="0" HdmiCecAvailable="0" WirelessMode="0" WirelessLeafOnly="0" HasConfiguredSSID="1" ChannelFreq="2462" BehindWifiExtender="0" WifiEnabled="1" Orientation="0" RoomCalibrationState="4" SecureRegState="3" VoiceConfigState="0" MicEnabled="0" AirPlayEnabled="1" IdleState="1" MoreInfo=""></ZoneGroupMember></ZoneGroup><ZoneGroup Coordinator="RINCON_B8E93776C0DA01400" ID="RINCON_B8E93776C0DA01400:29054"><ZoneGroupMember UUID="RINCON_B8E93776C0DA01400" Location="http://192.168.1.14:1400/xml/device_description.xml" ZoneName="Family Room" Icon="x-rincon-roomicon:family" Configuration="1" SoftwareVersion="54.2-72160" SWGen="1" MinCompatibleVersion="53.0-00000" LegacyCompatibleVersion="36.0-00000" HTSatChanMapSet="RINCON_B8E93776C0DA01400:LF,RF;RINCON_5CAAFD6E50BE01400:LR;RINCON_5CAAFD6E4BA001400:RR" BootSeq="159" TVConfigurationError="0" HdmiCecAvailable="0" WirelessMode="0" WirelessLeafOnly="0" HasConfiguredSSID="1" ChannelFreq="2437" BehindWifiExtender="0" WifiEnabled="0" Orientation="0" RoomCalibrationState="4" SecureRegState="3" VoiceConfigState="0" MicEnabled="0" AirPlayEnabled="0" IdleState="1" MoreInfo=""><Satellite UUID="RINCON_5CAAFD6E4BA001400" Location="http://192.168.1.21:1400/xml/device_description.xml" ZoneName="Family Room" Icon="x-rincon-roomicon:family" Configuration="1" Invisible="1" SoftwareVersion="54.2-72160" SWGen="1" MinCompatibleVersion="53.0-00000" LegacyCompatibleVersion="36.0-00000" HTSatChanMapSet="RINCON_B8E93776C0DA01400:LF,RF;RINCON_5CAAFD6E4BA001400:RR" BootSeq="162" TVConfigurationError="0" HdmiCecAvailable="0" WirelessMode="0" WirelessLeafOnly="0" HasConfiguredSSID="1" ChannelFreq="2462" BehindWifiExtender="0" WifiEnabled="1" Orientation="0" RoomCalibrationState="5" SecureRegState="3" VoiceConfigState="0" MicEnabled="0" AirPlayEnabled="0" IdleState="1" MoreInfo=""></Satellite><Satellite UUID="RINCON_5CAAFD6E50BE01400" Location="http://192.168.1.17:1400/xml/device_description.xml" ZoneName="Family Room" Icon="x-rincon-roomicon:family" Configuration="1" Invisible="1" SoftwareVersion="54.2-72160" SWGen="1" MinCompatibleVersion="53.0-00000" LegacyCompatibleVersion="36.0-00000" HTSatChanMapSet="RINCON_B8E93776C0DA01400:LF,RF;RINCON_5CAAFD6E50BE01400:LR" BootSeq="165" TVConfigurationError="0" HdmiCecAvailable="0" WirelessMode="0" WirelessLeafOnly="0" HasConfiguredSSID="1" ChannelFreq="2462" BehindWifiExtender="0" WifiEnabled="1" Orientation="0" RoomCalibrationState="5" SecureRegState="3" VoiceConfigState="0" MicEnabled="0" AirPlayEnabled="0" IdleState="1" MoreInfo=""></Satellite></ZoneGroupMember></ZoneGroup><ZoneGroup Coordinator="RINCON_B8E937B892CE01400" ID="RINCON_B8E937B892CE01400:1646880105"><ZoneGroupMember UUID="RINCON_B8E937B892CE01400" Location="http://192.168.1.20:1400/xml/device_description.xml" ZoneName="Garage" Icon="x-rincon-roomicon:garage" Configuration="1" SoftwareVersion="54.2-72160" SWGen="1" MinCompatibleVersion="53.0-00000" LegacyCompatibleVersion="36.0-00000" BootSeq="40" TVConfigurationError="0" HdmiCecAvailable="0" WirelessMode="0" WirelessLeafOnly="0" HasConfiguredSSID="1" ChannelFreq="2437" BehindWifiExtender="0" WifiEnabled="0" Orientation="0" RoomCalibrationState="4" SecureRegState="3" VoiceConfigState="0" MicEnabled="0" AirPlayEnabled="0" IdleState="1" MoreInfo=""></ZoneGroupMember></ZoneGroup><ZoneGroup Coordinator="RINCON_949F3E1EEABC01400" ID="RINCON_949F3E1EEABC01400:29474"><ZoneGroupMember UUID="RINCON_949F3E1EEABC01400" Location="http://192.168.1.30:1400/xml/device_description.xml" ZoneName="Basement" Icon="x-rincon-roomicon:living" Configuration="1" SoftwareVersion="54.2-72160" SWGen="1" MinCompatibleVersion="53.0-00000" LegacyCompatibleVersion="36.0-00000" BootSeq="50" TVConfigurationError="0" HdmiCecAvailable="0" WirelessMode="0" WirelessLeafOnly="0" HasConfiguredSSID="1" ChannelFreq="2437" BehindWifiExtender="0" WifiEnabled="0" Orientation="0" RoomCalibrationState="4" SecureRegState="3" VoiceConfigState="0" MicEnabled="0" AirPlayEnabled="0" IdleState="1" MoreInfo=""></ZoneGroupMember></ZoneGroup></ZoneGroups></ZoneGroupState>

Also PM’d to you the file.
Regards

1 Like

OK. Travelling for a week starting tomorrow, so I can’t really dig in to any of that anyway until I get back.

Gotcha.
Be safe and again
MANY THANKS FROM ALL OF US.

My default setting has the system wide field blank. And there is no option on the individual say action.

Something amiss? …what should be filled on the master sonos for the default chime?


If blank it uses the default file and duration.

Ok. Was blank and not getting the sound. How do I troubleshoot?

If the chime doesn’t play, it means it can’t even reach Azure. Check the log file for messages.

I’m travelling and will not be available most of the next week.

I had a look at the log, nothing popped out at me. (I’m horrible at reading logs, not sure what to look for)

I did notice that the Sonos_Chime.mp3 was absent.

What is a good way to share logs? I tried on here but 1 second of logs was 500000000 characters and can only do 35000.

If the file is missing then perhaps all were not copied at install?

For log, run os.execute("Rotate_Logs.sh 1") in Apps > Develop apps > Test Luup code. Then try your Say action 2-3 times, then pull the log… should be shorter.

What i meant to say is that I did not see the file in the logs when i ctrl-f searched. I do see the file in the luup files.

I’m not sure why but here is something strange:

  1. I downloaded the sonos_chime.mp3 from luup.files in vera.
  2. Tried to play it and got an error that it cannot play.
  3. Re-downloaded the files from Git-hub.
  4. Played the file no problem.
  5. Followed steps 4-10 to upload back to vera.
  6. Redownloaded from luup files again.
  7. Tried to play and it is no longer playable ???

Ok I did what you suggested, But still having problems pasting entire log here. The vera-forum window is freezing and I have to reboot firefox. Not sure I’m checking the logs in the right place…
I navigate to: http://xxx.xxx.xxx.xxx/cgi-bin/cmh/log.sh?Device=LuaUPnP

I sent an email with logs to reactor-logs@toggledbits.com

Gee… Thanks again Rigpapa…
I not a wealthy person but more than happy to make a donation, might someone please be able to share a link to donate to Rigpapa
Thanks again for the community support!

Here’s the link you requested re Rigpapa - Donations | toggledbits

2 Likes