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

I think everyone knows the answer to that question: the App Marketplace only offers the most recent published and approved version of the plugin. Prior releases are archived, and it is possible to install those prior releases, but when auto-update is on (or as recently suspected, there’s a bug in the handling of the auto-update flag), your Vera will make an effort to put you on the head release.

I don’t know how long you’ve been using 2.0; but it’s generally available for about three months. Your first post about it was just 3 days ago, and it wasn’t a bug report as much as a complaint about something not working the way you wanted it to, which I completely understand. If you’ve got other problems, I’m interested in hearing them, and possibly fixing them. I put a lot of time in here on a lot of plugins, and this one isn’t even mine, I just picked it up when it lost its maintainer. I do this because I want people in this community to be successful with Vera. It’s coming up on 5 years since the last version was released into the App Marketplace, and the problems with the old plugin were many, and many still continue today, but I’m hitting the worst and most troublesome first. The community has much more varied equipment and setups than I do, and I’ve already said elsewhere in this topic that because of the prohibitive cost of these devices, and the fact that I get no significant financial support from the community for this plugin, I cannot and will not buy every Sonos device to test with–in fact, the total retail price of all current Sonos products exceeds by several multiples the sum total of all donations I’ve ever received for all of my work here. The community is part of the process and always will be. If you have something substantive to add, please do. If I can get you happy on 2.0, or maybe a later version given the lateness of the hour in this case, I’ll do it. But don’t storm into the room at the 11th hour with vague missives about hosing your configuration or that you have “many more problems to report” and then don’t report them. That helps no one, and it certainly doesn’t predispose me to want to spend another minute trying to help.

If you really want to stay on 1.4, let me know and I’ll give you the necessary steps to decouple your installed plugin from the app marketplace so it never attempts to upgrade the plugin on your systems, and you’ll be good to go. Just know that I will not be supporting any version other than 2.0 or its progeny in future.

Edit: If you want to stay on 1.4, you have today and only today to let me know, because I’m posting the app for release tonight, and the changes to your system will need to be done before Vera approves the update.

6 Likes

For the time being, I will stay with 1.4. I do not keep auto Update checked. I’m not everybody, so I did not know the 2.0 Plugin would replace ver 1.4 with such a major upgrade. The ONLY reason I have stayed with Vera, at all, is for Sonos. I first tried updating the Sonos Plugin when you first released it because of the loss of RV (for me, RV went away March last year). I only wanted it to announce current music track, song, and number of tracks when starting a new play function. You know, “sombie” messages as you refer to them. This is what filled up the cache on my Vera Edge (the stand alone device I used to test the Plugin). I later tested it on one of my VeraPlus units 2 days ago, and that’s when I had the real problems. I have removed the 2.0 plugin using these steps {please let me know if I did something wrong:
1.) Removed uPnP and ran the removal code.
2.) Deleted the Sonos System device.
3.) Deleted all the Sonos files in /etc/cmh-ludl/ (about 28 of them)
4.) Deleted folder /www/sonos
5.) Reboot and Reinstalled 1.4 from “Install apps”
I downloaded the 1.4 files from My Vera to a folder as a backup (not lzo files).
Please let me know if I missed anything.

My problems that I had with 2.0 were as follows (only mentioning them as I encountered them). No need to try and resolve on my account.
1.) The first problem you know about. Fixed and understand how to prevent it. (Vera Edge)
2.) Group management. Can not control groups. Create one group, and 2.0 never forgets it to allow a newly defined group. Seems to get confused, like groups are cached somewhere.
3.) Erratic volume behavior when attempting to define groups for Music play, alerts play or TTS play. Just as a note, I used different volume for each speaker. Not sure if that is the reason I was having the problem.
4.) When playing TTS, volume recovery is slow, and music playing before TTS (say), will blast after the say command is complete, until settled seconds later. Voices for TTS are very soft in volume.
5.) Chime (I spent a day trying to get this one working). The chime is volume 10, and TTS is volume 5. Try to set volume for Chime in the app and it overrides the TTS volume. Finally turned if off.
6.) Last is erratic overall performance of my Sonos speakers with 2.0. It acts like it is sending the speakers action changes that can not be changed with my code. I’m sure I’m not saying that in a way that makes any sense.
Anyway, in conclusion, my panic is driven by the need for a functional Sonos system. It provides music listening enjoyment, and alerts me of numerous activities (about 237 to be exact). I am going blind, and will not have the ability to fix it later. This is the main reason why I have not read the previous 320 post on the 2.0 update.

I commend you on your herculean effort to upgrade the Sonos Plugin. I know it will be enjoyed by many. For me, it’s not just a cool thing to have, but a necessity. It’s too bad management at Vera has not taken a leadership role on this.

One question. One of the problems with Sonos on Vera is constant reboot. Does 2.0 help with that?
Again, Thank you for the time and effort.
Tom

OK. Thanks for these. I will look into them.

To complete the decoupling of your Sonos 1.4 plugin from the App Marketplace so you can stay on 1.4, you need to run the following in the Test Luup Code window:

changed = false
for k,v in pairs(luup.devices) do
    local p = luup.attr_get("plugin", k) or 0
    if tonumber(p) == 4226 then
        luup.attr_set("plugin", "", k)
        changed = true
    end
end
if changed then
    luup.reload()
end

This removes the association between the plugin and the device. After running this, you should be able to uninstall the plugin, which will not remove the plugin files or devices (now that you’ve decoupled them), but simply remove the registration of the plugin from the Vera (the key step to preventing upgrades).

When it’s all done, your devices should be left sitting there as they were, and the (1.4) plugin files will still be in /etc/cmh-ludl, and the system will run those devices from that code.

Is it possible to lower the chime volume! I’m finding it to be much louder than the voice.

The TTSChime state variable on the Sonos master device can be used to set the chime volume system-wide. That’s the best it does at the moment.

The format of this value is filename,duration,volume, with the volume being optional. If the volume is not specified, the TTS volume is used. Otherwise, the specified volume is used. The default value for this variable is Sonos_chime.mp3,3, so the default volume is the TTS volume.

Make sure you are on the most recent code.

The TTSChime variable was blank for me so I just inputted Sonos_chime.mp3,3, in the field and now the chime is at the same volume as the TTS.

Right, if you want a different chime volume you need to add it as the third value, otherwise the default volume (TTS volume) is used.