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

Don’t be afraid to try modulating your spoken phrases with punctuation (much of it thankfully unvoiced, as in this example:

This! (is) the S-O-N-O-S (plug-in) @ ? work!

Although there appears to be no Azure markup language at this level (only at the HTML POST / JSON layer), it’s fun getting creative to hear the voices emphasize, abbreviate, spell out, pause, etc. based on how you compose your requested phrase.

Wow, the SONOS 20071.1455 plug-in really, really, really wants its (sole) child device to go stand in the corner of “No Room”, no matter how many times I move it elsewhere. :wink:

Really? The plugin doesn’t set the room. How are you changing the room assignment?

I go into the child device’s ► menu, where you can change its name and Room assignment, and I place it in “Living Room” then Save.

Stays there about an hour, then I go take a nap, and it’s back in “No Room”

Repeat cycle about 3x since updating to 20071.1455. Want log? Based on what you’re saying, it’s a “me” problem.

P.S. Even the literal Android-based Sonos App knows it’s assigned to “Living Room” still, so at least that isn’t the culprit.

UPDATE: After 3 more tries (first moving it into an intermediate room, then to Living Room) it appears to be staying … for now!

These kind of odd things happen when you don’t have enough free space to save user_data, so you might want to check in on your partition space. I assume you did a hard refresh after modifying the device? That’s always a potential culprit as well, especially since 7.30, I’m finding.

OK, with a ton of help from @Jaggz, it looks like the satellite device issue is beginning to lay down. And the plugin is now a good bit more fault-tolerant.

The current update is now 20071.2100. I recommend that everyone go to this version, but particularly those users of beams/bars and anyone who has configured zone players as extra channel/surround speakers. Right now, the satellite devices are still visible, and not controllable. On the next wave, I’ll be trying to get those devices into hidden state.

Yep, happened AGAIN while out at dinner. Sonos device back to ‘No Room’. Weird! Will go get latest Github repo and do all the things. (Including, OMG so many hard refreshes it’s not funny at this point. :wink:

Admittedly I’ve been doing a ton of Reactor-ing, but haven’t gone overboard adding new devices or plug-ins lately. According to my current df -h in Putty:


…I’ve only bumped up from 16% to 25% full in /rootfs, and I don’t know enough to suspect any other problems with this utilization rate.

@rigpapa, I failed to mention (because I only just now confirmed my suspicion that…) the child Sonos device has been climbing in Dev_ID numbers all day. Starting at around 276 and is now at 300 and climbing.

Suggesting that something is removing it and replacing it constantly.

Think I’m gonna do another removal of the device (master and child), completely wipe of all files ‘Sonos’ from Vera, reboot, then do the Steps 4-10 (I mean 1-14) dance, and see if I can stabilize things with the latest repo.

STATUS UPDATE: Process complete. Did all the things, got new master Device going (#301), new child set up, TTS configured, tested OK, and holding firm at placement in “Living Room”. If squirreliness resumes, out it goes! :slight_smile:

Grab your log and ZIP/PM it to me before you do that, if you would…

1 Like

Ok. All in with 20071.2100!
Sonos TTS seems to be happy again.
Can you repost instructions and “code”
to stop the chime please. Seems it makes our dachshund “Sophie” bark!
:roll_eyes:
“It is configurable:”

  • On the Say action, you can set UseChime to 0 to disable the chime on a per-action basis;
  • System-wide, you can set the TTSChime state variable on the Sonos master device. It is a two- or three-element comma-separated list of filename, duration, and (optional) volume. The filename should be an MP3 file (any specs compatible/playable with Sonos) uploaded to /etc/cmh-ludl/ . The duration is the play duration of the file in whole seconds, rounded up. The volume (0-100) is optional–if not specified, the chime is played at the action’s directed volume; otherwise, the chime is always played at the specified configuration volume. If this [TTSChime] variable is set to none or any non-existent filename, no chime will sound (system wide)."
1 Like

Good Morning
Here’s a Sonos update report. Hope it helps.
20071.2100 is controling grouping and transport funtions well from my 9 Sonos devices.
Initially it showed “running 7 zones”. When I did the Discovery a phantom device was found which I deleted manually as rigpapa instructed. The Discovery also found my two hidden “rear” Play 1’s to report 9 zones. (7 devices & the 2 hidden devices.)
Some problems:
At the end of a scene involving Sonos TTS music starts playing but none was playing before the TTS.
2. Creating a Scene to turn the music on or off (manually) is not working for me. I use these Scenes with either MiniMote Remotes or GE Remotes.
Can only stop the music playing (not by choice after the TTS or for enjoyment) through the Vera Sonos device or the proprietary Sonos app… I have not installed Reactor yet.
I tried creating a New “Manual Trigger” Play or Stop Scene for a Sonos device. Each Sonos device correctly shows up as a device choice. I then select Stop or Play as the “Device Action” option.
It shows this in the Advaced Editor:
**#667 House Music Sonos Connect **
Service: urn:micasaverde-com:serviceId:MediaNavigation1
Play… ( or Stop)
The Scene runs but does not work even after a Hard Browser Refresh and Reload Engine.
Any Recomendations?
Is there perhaps a luup code I could try to run from the Scene instead?
Hope this info is helpful.
PS
I set the TTSChime state variable on the Sonos master device to “0” and
it silenced the Chime…

Can screenshot the “Advanced Editor” in each of your non-working scenes?

Hello
Been as crazy two days.
My Vera died from loss of memory.
Support got me back after a 3 hour phone tech support from Columbia.
We agreed to wait out a healthier time to update to latest firmware…
Went back to a working " not so heavy" back up from February. :slight_smile:
So …I am now once again reinstalling Sonos 2020 “the great rigpapa” from this thread.
Here’s the report.
Since I did the install correctly my Sonos device did not lose it’s original “February backed up” device #vera. (practice makes perfect) Since I never had seperate device #'s for all 9 of my Sonos devices I now have the old 298 # plus the 8 new child devices. So that new aspect worked fine in the update.
Oh BTW…Is the latest and greatest Version now “0develop-20072.1815”??? Thats what the zipped github download provided me with today.
As I need to tweek my TTS requests with new device #'s is the code below correct code for specifing these 5 devices?
Is the last number at the end (298) suppose to be the Master device #? In my case 639?
In the “pre-rigpapa” version I only installed one device for all the old code and used Group All for any additional zones…so my code always ended in 298…

luup.call_action(“urn:micasaverde-com:serviceId:Sonos1”, “Say”,
{ Text=“Door Open. Basement Door Open”, Volume=55,
GroupDevices="298,642,643,644,646”,SameVolumeForAll=“1” }, 298 or 639) ???
Now that I think of it… Is the last # the infamous “Sonos Driving Zone”?
I always saw Zone Drivin by blah blah blah previously and that usually screwed things up!
So I am glad to report I am up and running once these questions get ansered!!
Thanks again Patrick for your patience and expertise.

Hopefully I won’t need to after you read my next post!
:slight_smile:

The numbers keep rolling. As long the numbers are increasing from the last recommended version, you’re OK.

You provided:

luup.call_action(“urn:micasaverde-com:serviceId:Sonos1”, “Say”, 
  { Text=“Door Open. Basement Door Open”, Volume=55,
    GroupDevices="298,642,643,644,646",SameVolumeForAll=“1” }, 298 or 639)

If your intention is to announce on all zones, then don’t use GroupDevices, just use GroupZones="ALL".

Whatever zone you send the command to will be group coordinator for the announcement.

Gotcha…
I want these 5 of my 9 zones to talk.
But this code is not working in my Scenes…
I have TTS say tests working…

luup.call_action(“urn:micasaverde-com:serviceId:Sonos1”, “Say”,
{ Text=“Door Open. Basement Door Open”, Volume=55,
GroupDevices=“298,642,643,644,646”,SameVolumeForAll=“1” }, 298)

Also,
Found those 2 zip files I mentioned in earlier threads back again in my list of install files again since the reboot session today…

os.execute(“rm /etc/cmh-ludl/ Sonos-Vera-develop.zip”)
This is not working either…
And Finally… (sure, yeah, right, ha-ha) :slight_smile:
Any thoughts?
The light on from my motion code is working 24/7 now instead of only at night.
return luup.is_night() == true

I’m having trouble figuring out what you’re saying here. Anyway, if your Say actions in scenes aren’t working, go find them in the LuaUPnP log file and see if there are any messages logged with them. That’s always a go-to.

Looks like you have extra spaces in the code, although I can’t tell because you’re not using the forum formatting, either. When you post code, you can post short bits by putting a single back-tick ` before and after the string so `text like this` will look like this. For longer strings or multi-line code blocks, put three backticks ``` together on a line by itself, followed by your code, followed by three backticks again on a line by themselves, so:

```
– This multiline code block
os.execute( “rm /etc/cmh-ludl/Sonos-Vera-develop.zip” )
```

will end up looking like this:

-- This multiline code block
os.execute( "rm /etc/cmh-ludl/Sonos-Vera-develop.zip" )

And that not only preserves the quotes and keeps out other formatting, but makes the spaces more obvious.

The correct code is shown in the example above.

Sorry…
Where is the Forum Formatting Info?

Is this right below?


return luup.is_night() == true

Your corrected code to delete the files worked… Of Course…

Next Qustion:
How do I get UPNP log files…
I searched but didn’t see an explanation…
Thanks

Enter

<url_of_your_vera>/cgi-bin/cmh/log.sh?Device=LuaUPnP

in any browser.

Well, I gave you the formatting instructions for code in my reply. If you want addition information, try this: Markdown Reference

and this: Markdown Tutorial - Introduction