Version 1.5 (Release Candidate)

Version 1.5, now in the Github repository’s stable branch, is on its way to becoming the next official release in the App Marketplace and AltAppStore. The plugin has gone through some restructuring, and has support for the first wave of new requirements for upcoming firmware, and improved support for openLuup.

ALL USERS OF ANY PRIOR VERSION OF THE SONOS PLUGIN ARE ENCOURAGED TO UPGRADE TO THIS VERSION.

To install from Vera App Marketplace (upgrades and new installs):

This is now the preferred method for installing 1.5 release candidate. If you have previously installed from Github, no problem. You can use this method to upgrade to the latest.

Request the following URL in a browser on your local network, supplying your Vera local IP where indicated:

http://vera-local-ip/port_3480/data_request?id=action&serviceId=urn:micasaverde-com:serviceId:HomeAutomationGateway1&action=CreatePlugin&PluginNum=4226&Version=39446

Be patient. It may take a few moments for things to get started.

If you are installing the Sonos plugin for the first time (no existing Sonos devices), go into the “Settings” tab of your new Sonos device and use Discovery to find your first zone player. To create additional zone player devices, go to Apps > My apps > Sonos and click the “Create another” button (and then use Discovery on the new device).


Alternate Method: Install from Github (upgrades and new installs):

  1. Go to the repository’s stable branch, here: GitHub - toggledbits/Sonos-Vera at stable
  2. Click the green “Clone or download” button and choose “Download ZIP”. Save the ZIP archive somewhere.
  3. Unzip the archive.
  4. Open the uploader at Apps > Develop apps > Luup files
  5. Drag all of the files you unzipped (not the folder) to the “Upload” tool as a group.
  6. After Luup finishes uploading and reloads, hard-refresh your browser.

If your Sonos devices disappear during the process, don’t panic! Just reload Luup one more time (and hard refresh your browser after) and they should reappear.

If you are installing this plugin for the first time (uninstalled old version before installing this, or never installed before):

  1. Go to Apps > Develop apps > Create device
  2. For “Description” enter: Sonos
  3. For “UPnP Device Filename” enter (better: copy-paste): D_Sonos1.xml
  4. For “UPnP Implementation Filename” enter (copy-paste): I_Sonos1.xml
  5. Press the “Create device” button.
  6. Go to Apps > Develop apps > Test Luup Code (Lua)
  7. Enter and run: luup.reload()
  8. Hard refresh your browser. Do not skip this step.
  9. Go to the “Settings” tab in the new Sonos device, and use Discovery to find your first zone player. To create devices for additional zone players, repeat from step 7.
1 Like

Hello Patrick
I finally have had time to download your 1.5 version and overwrite my 1.4 Sonos install. All went well but I am still showing Sonos App as 1.4 version…??
Also have lost Responsive Voice. I have https://code.responsivevoice.org as the url and Responsive Voice is an option from the drop down but the url dissappears after I close the the app. When I reopen Vera and look the url is not listed but Responsive Voice remains as the default TTS option…
Any help getting my house talking again would be greatly appreciated. Also if Mary TTS is easy to install that would be fine. I do keep my PC running 24/7.
Regards
Wilbur
lakewoodjazz

Hi
Went to Variables page and noticed the plugin version as
1.5-19275. But the APP version shows 1.4.
Regards
Lakewoodjazz

You can ignore the APP version. This number is recorded into your user-data.json file at the time you download the plugin from the App Store. Since you manually upgraded the plugin by uploading files, the firmware won’t know it is updated. The variable page is what matters.

I have lost responsive voice.
Any help reinstalling would be greatly appreciated. No TTS No Scenes with lua TTS.
Perhaps Mary TTS ?

If you are considering mary TTS (which I tried) I found the voice quality to be quite poor. Instead if you want to go with a local TTS server, I would recommend using macOS along with this:

GitHub - jishi/node-sonos-http-api: An HTTP API bridge for Sonos easing automation. Hostable on any node.js capable device, like a raspberry pi or similar..

This means you need to have a mac on 24/7 though instead of some other linux server. By doing this I actually don’t even use the plugin to run my TTS. It is all sent by http command to the macOS server (scripted in lua) and then to sonos.

Start by looking at your log file. Find yoir Say actions and look for messages following them. There’s a good bit more logging in this version and it might answer the question for us.

Please explain how I access my log files.
Is that the verbose setting I see posted in threads?

Currently own Windows PC and Laptops…
So RV or Mary are my options right?
Microsoft TTT ended a few years ago I think… I would love to have a TTS that could use famous voices like John Wayne, Martin Luther King or Clint Eastwood!
Anyway…
After install of 1.5 I created a new device for my new beam.For the past few years I’ve only had one device created and all my speakers were discovered throgh that device (which was a Connect). In lua code for a TTS I used GroupZones=“ALL” and they would all talk. Is it more advantageous to create 7 devices? Also… 2 play ones are rear channels for a playbar TV set up. Does the 3 of them count as 1 device? Sonos says once connected with the play bar they act as one zone.
I saw a button on the Settings page that is set to off for “Debug”. Is that the log file Patrick has suggested I “take a look at”

Microsoft TTS moved to Bing. You can try that. I used it for some time. I am pretty sure it would be pretty straightforward for @rigpapa to make the plugin work with bing.
Running a laptop 24/7 may not be the best. My 24/7 MacOs server is… a PC desktop on which I installed macOS…

Thanks rafale77.
Can you tell me how to locate the log files rigpapa has suggested?
Are there any TTS methods to incorporate famous voices like Arnold Schwarzenegger?
:slight_smile:

Request this URL on a browser–local access only, no remote access; put your Vera’s local IP address where indicated: http://your-vera-local-ip/cgi-bin/cmh/log.sh?Device=LuaUPnP

You can then use your browser’s in-page search to find your “Say” actions (capitalized that way).

I am multilingual and the closest I have gotten to do this was to get the tts to speak in english with a french, german, chinese or japanese accents by picking a different countries voice… :grin:

OK
I found files through this url with my Vera ip address
http://your-vera-local-ip/cgi-bin/cmh/log.sh?Device=LuaUPnP
attached are some requests that are using my Sonos speakers IP addresses.
I hope they help figure out why I have no TTS Scenes working…
See attached pdf
Thanks
Wilbur
lakewoodjazzSonos Logs 10.14.19 LakewoodJazz.pdf (48.9 KB)

OK, what I need is for you to find a “Say” action in your logs (you can search for that string using your browser’s in-page search function, capitalized just as shown), and give me the Say action and a hundred or so lines that follow. It will look something like this (notice in particular the first line, which is the place to start):

08	10/14/19 19:31:20.051	JobHandler_LuaUPnP::HandleActionRequest device: 372 service: urn:micasaverde-com:serviceId:Sonos1 action: Say <0x7143b520>
08	10/14/19 19:31:20.051	JobHandler_LuaUPnP::HandleActionRequest argument DeviceNum=372 <0x7143b520>
08	10/14/19 19:31:20.051	JobHandler_LuaUPnP::HandleActionRequest argument serviceId=urn:micasaverde-com:serviceId:Sonos1 <0x7143b520>
08	10/14/19 19:31:20.052	JobHandler_LuaUPnP::HandleActionRequest argument action=Say <0x7143b520>
08	10/14/19 19:31:20.052	JobHandler_LuaUPnP::HandleActionRequest argument Text=I%20can%20speak! <0x7143b520>
08	10/14/19 19:31:20.052	JobHandler_LuaUPnP::HandleActionRequest argument Language=en-US <0x7143b520>
08	10/14/19 19:31:20.052	JobHandler_LuaUPnP::HandleActionRequest argument Engine=RV <0x7143b520>
08	10/14/19 19:31:20.052	JobHandler_LuaUPnP::HandleActionRequest argument SameVolumeForAll=false <0x7143b520>
50	10/14/19 19:31:20.053	luup_log:372: Sonos: Say action on device 372 text I%20can%20speak! <0x7143b520>
50	10/14/19 19:31:20.588	luup_log:372: Sonos: (tts) ResponsiveVoice created http://192.168.0.20/sonos/Say.372.mp3 <0x7143b520>
.
.
.

Thanks so much for your patience and expertise Patrick…
See attached logs.Log Files Lakewoodjazz.pdf (58.3 KB)

This log message
seems to be in common when the “Say” command fails……
Seems I need to change a setting in the User & Account Info???

luup_log:298: Sonos: warning: The Sonos TTS module requires that ‘Enable Unsafe Lua’ (under ‘Users & Account Info > Security’) be enabled in your controller settings. <0x71ea9520>

Well that’s a long way to go for (hopefully) a simple solution! Yes, indeed! Please enable that setting. The TTS module uses wget and curl to make requests to the remote APIs, so enabling this setting is necessary for those to function.

And I’m really, REALLY glad I put in that message, because without it, we’d still be hunting. (We may not be finished yet, but odds are good that will be all it needs.)

1 Like

Thought we had it but nope.
TTS says “Scene Succesful” but not Talking!
Yes I refreshed my browser…
:frowning:

Lakewoodjazz TTS Retry After Changed Setting.pdf (47.9 KB)

What does this mean? …
other then my TTS doest work!

LuaInterface::CallFunction_Job device 298
function SSonos1_Sonos1_Say_run failed [string “module(“L_SonosTTS”,
package.seeall)…”]:540: attempt to index field ‘URI’ (a nil value)