Version 1.5 (Release Candidate)

Hello,
I used V1.4 plugin to say messages on different triggers, it worked relatively fine.
Now I installed V1.5, I have the following problem: After playing a message, the music I was playing is not continuing anymore. Every time I have to go to the Sonos app and start whatever it was playing.
Is there a way to read what Sonos is playing, then send a message and continue whatever it was playing again?

What are you doing to play the message?

Because I didn’t get Google TTS to work properly (It only plays a few times, then it stops) I have created a set of MP3 files on my NAS. With a trigger I send a certain MP3 to the Sonos.

What action are you using?

luup.call_action(“urn:micasaverde-com:serviceId:Sonos1”, “Alert”, {URI=“x-file-cifs://192.168.2.9/music/mail.mp3”, Volume=60, Duration=5},321)

OK. I think that was relatively easy to find/fix. Please install the stable branch release from Github again, using the instructions previously provided. Just for clarity/assurance, that is just an incremental change to the latest 1.5 candidate, not the 2.0 others are installing for Azure TTS.

And while I’m here to say it, given the urgent nature of getting 2.0 to release, it’s unlikely that 1.5 will ever be released through the Vera App Marketplace, as I am now putting the bulk of my efforts into 2.0 released there.

Anyone seeking a stable update of the Sonos plugin that does not need TTS may upgrade to 1.5 (or continue using it). If you need TTS, however, I recommand installing Sonos Plugin 2.0.

3 Likes

I followed all the instructions, but unfortunately the problem is not solved. It looks like the duration parameter is not working like it should.
I also get the following error messages, after uninstalling and removing all the files doesn’t clear the messages anymore…
System error : Device: 195. Fail to load implementation file D_FUP_uuid RINCON_7838CA6BD5BA01400_MS.xml
System error : Device: 252. Fail to load implementation file D_FUP_uuid RINCON_307E5C9337F501400.xml

You’re getting the system error messages because you have UPnP enabled on the Vera. Those messages are coming from the Vera itself, not the plugin. You can turn that off (unless you have reasons to want your Vera to automatically detect UPnP devices). The plugin’s operation and Vera’s internal UPnP scanning are not related or dependent.

For the “Alert” action, look at your LuaUPnP log file and find the “Alert” actions being called, and see if there are any error messages that follow within 25-30 lines. Let me know what you see.

Ok, I get the following errors after sending a message:
02/23/20 16:46:01.519 luup_log:327: Sonos: error: setData() can’t set CurrentSection on 327 no SID! <0x772bf320>
01 02/23/20 16:46:01.525 luup_log:327: Sonos: error: setData() can’t set r:NextTrackURI on 327 no SID! <0x772bf320>
01 02/23/20 16:46:01.525 luup_log:327: Sonos: error: setData() can’t set r:NextTrackMetaData on 327 no SID! <0x772bf320>
01 02/23/20 16:46:01.526 luup_log:327: Sonos: error: setData() can’t set r:EnqueuedTransportURI on 327 no SID! <0x772bf320>
01 02/23/20 16:46:01.532 luup_log:327: Sonos: error: setData() can’t set r:EnqueuedTransportURIMetaData on 327 no SID! <0x772bf320>

Those aren’t errors. Those are warnings that data being returned in UPnP responses aren’t being saved, because they are not used or supported by the plugin. Anything other than those? Any Lua errors, or anything else in red or yellow nearby?

Maybe this isn’t the place to debug the whole thing… But as long nobody complains…
It’s getting very weird at this time… Now I have to reload the Engine every time before I can play the file a second time… But I get the error:
02/23/20 17:03:45.073 luup_log:327: Sonos: error: UPnP_request (Pause, urn:schemas-upnp-org:service:AVTransport:1): status=1 statusMsg=500 result=[<s:Envelope xmlns:s=“http://schemas.xmlsoap.org/soap/envelope/” s:encodingStyle=“http://schemas.xmlsoap.org/soap/encoding/”><s:Body><s:Fault>s:ClientUPnPError701</s:Fault></s:Body></s:Envelope>] <0x72966520>
50 02/23/20 17:03:45.074 luup_log:327: Sonos: Playing x-file-cifs://192.168.2.9/music/mail.mp3 on 327/0 <0x72966520>
06 02/23/20 17:03:45.101 Device_Variable::m_szValue_set device: 77 service: urn:futzle-com:serviceId:CountdownTimer1 variable: Remaining was: 2698 now: 2697 #hooks: 0 upnp: 0 skip: 0 v:0xeb9480/NONE duplicate:0 <0x75fe8520>
01 02/23/20 17:03:45.165 LuaInterface::CallFunction_Job device 327 function SSonos1_Sonos1_Alert_run failed [string “–[[…”]:2592: attempt to compare number with string <0x72966520>

This tells me you have not installed the update correctly, or you have an old version of the plugin files sitting uncompressed on your Vera together with the compressed ones.

Here is what I suggest:

  1. Copy/paste and run the following Luup code in Apps > Develop apps > Test Luup code:
    os.execute( "rm /etc/cmh-ludl/*_Sonos*" )
  2. Reinstall the 1.5 stable branch per the previous instructions.

Well if any of you folks feel like giving me a hand I would appreciate it. I was using the old plug in until responsive voice quit on me a few weeks ago. Today I upgraded the plugin to 1.5 and I still cant get TTS to work (within the sonos app) with responsive voice or any of the TTS lua scripts i have in place to work. When using TTS within the app I did get a chime once but that was it. Here is an exert from the log"

06 02/23/20 16:13:02.304 Device_Variable::m_szValue_set device: 316 service: urn:micasaverde-com:serviceId:HaDevice1 variable: PollRatings was: 4.60 now: 4.60 #hooks: 0 upnp: 0 skip: 0 v:(nil)/NONE duplicate:1 <0x765c8520>
06 02/23/20 16:13:02.304 Device_Variable::m_szValue_set device: 316 service: urn:micasaverde-com:serviceId:ZWaveNetwork1 variable: LastPollSuccess was: 1582491482 now: 1582492382 #hooks: 0 upnp: 0 skip: 0 v:(nil)/NONE duplicate:0 <0x765c8520>
06 02/23/20 16:13:02.305 Device_Variable::m_szValue_set device: 316 service: urn:micasaverde-com:serviceId:ZWaveNetwork1 variable: ConsecutivePollFails was: 0 now: 0 #hooks: 0 upnp: 0 skip: 0 v:(nil)/NONE duplicate:1 <0x765c8520>
06 02/23/20 16:13:11.506 Device_Variable::m_szValue_set device: 41 service: urn:micasaverde-com:serviceId:EnergyMetering1 variable: KWH was: 2.9260 now: 2.9310 #hooks: 0 upnp: 0 skip: 0 v:0x122ed28/NONE duplicate:0 <0x765c8520>
06 02/23/20 16:13:11.507 Device_Variable::m_szValue_set device: 41 service: urn:micasaverde-com:serviceId:EnergyMetering1 variable: KWHReading was: 1582492331 now: 1582492391 #hooks: 0 upnp: 0 skip: 0 v:(nil)/NONE duplicate:0 <0x765c8520>
08 02/23/20 16:13:20.473 JobHandler_LuaUPnP::HandleActionRequest device: 399 service: urn:micasaverde-com:serviceId:Sonos1 action: Say <0x71f87520>
08 02/23/20 16:13:20.474 JobHandler_LuaUPnP::HandleActionRequest argument DeviceNum=399 <0x71f87520>
08 02/23/20 16:13:20.474 JobHandler_LuaUPnP::HandleActionRequest argument serviceId=urn:micasaverde-com:serviceId:Sonos1 <0x71f87520>
08 02/23/20 16:13:20.474 JobHandler_LuaUPnP::HandleActionRequest argument action=Say <0x71f87520>
08 02/23/20 16:13:20.474 JobHandler_LuaUPnP::HandleActionRequest argument Text=test%2C%20please%20say%20hi <0x71f87520>
08 02/23/20 16:13:20.474 JobHandler_LuaUPnP::HandleActionRequest argument Language=eng-us <0x71f87520>
08 02/23/20 16:13:20.475 JobHandler_LuaUPnP::HandleActionRequest argument Engine=RV <0x71f87520>
08 02/23/20 16:13:20.475 JobHandler_LuaUPnP::HandleActionRequest argument Volume=44 <0x71f87520>
08 02/23/20 16:13:20.475 JobHandler_LuaUPnP::HandleActionRequest argument SameVolumeForAll=false <0x71f87520>
50 02/23/20 16:13:20.476 luup_log:399: Sonos: Say action on device 399 text test%2C%20please%20say%20hi <0x71f87520>
50 02/23/20 16:13:20.846 luup_log:399: Sonos: (tts) ResponsiveVoice created http://192.168.0.99/sonos/Say.399.mp3 <0x71f87520>
08 02/23/20 16:13:30.360 JobHandler_LuaUPnP::HandleActionRequest device: 399 service: urn:micasaverde-com:serviceId:Sonos1 action: Say <0x71f87520>
08 02/23/20 16:13:30.360 JobHandler_LuaUPnP::HandleActionRequest argument DeviceNum=399 <0x71f87520>
08 02/23/20 16:13:30.360 JobHandler_LuaUPnP::HandleActionRequest argument serviceId=urn:micasaverde-com:serviceId:Sonos1 <0x71f87520>
08 02/23/20 16:13:30.361 JobHandler_LuaUPnP::HandleActionRequest argument action=Say <0x71f87520>
08 02/23/20 16:13:30.361 JobHandler_LuaUPnP::HandleActionRequest argument Text=test%2C%20please%20say%20hi <0x71f87520>
08 02/23/20 16:13:30.361 JobHandler_LuaUPnP::HandleActionRequest argument Language=eng-us <0x71f87520>
08 02/23/20 16:13:30.361 JobHandler_LuaUPnP::HandleActionRequest argument Engine=RV <0x71f87520>
08 02/23/20 16:13:30.361 JobHandler_LuaUPnP::HandleActionRequest argument Volume=44 <0x71f87520>
08 02/23/20 16:13:30.362 JobHandler_LuaUPnP::HandleActionRequest argument GroupZones=ALL <0x71f87520>
08 02/23/20 16:13:30.362 JobHandler_LuaUPnP::HandleActionRequest argument SameVolumeForAll=true <0x71f87520>
50 02/23/20 16:13:30.363 luup_log:399: Sonos: Say action on device 399 text test%2C%20please%20say%20hi <0x71f87520>
50 02/23/20 16:13:30.364 luup_log:399: Sonos: (tts) speaking phrase from cache: http://192.168.0.99/sonos/ttscache/RV/eng-us/55/1.mp3 <0x71f87520>
04 02/23/20 16:13:32.263 <0x765c8520>
02 02/23/20 16:13:32.263 Device_Basic::AddPoll 193 poll list full, deleting old one <0x765c8520>
06 02/23/20 16:13:32.264 Device_Variable::m_szValue_set device: 193 service: urn:micasaverde-com:serviceId:HaDevice1 variable: PollRatings was: 4.90 now: 4.90 #hooks: 0 upnp: 0 skip: 0 v:(nil)/NONE duplicate:1 <0x765c8520>
06 02/23/20 16:13:32.264 Device_Variable::m_szValue_set device: 193 service: urn:micasaverde-com:serviceId:ZWaveNetwork1 variable: LastPollSuccess was: 1582491512 now: 1582492412 #hooks: 0 upnp: 0 skip: 0 v:(nil)/NONE duplicate:0 <0x765c8520>
06 02/23/20 16:13:32.265 Device_Variable::m_szValue_set device: 193 service: urn:micasaverde-com:serviceId:ZWaveNetwork1 variable: ConsecutivePollFails was: 0 now: 0 #hooks: 0 upnp: 0 skip: 0 v:(nil)/NONE duplicate:1 <0x765c8520>
08 02/23/20 16:13:39.013 JobHandler_LuaUPnP::HandleActionRequest device: 399 service: urn:micasaverde-com:serviceId:Sonos1 action: Say <0x72187520>
08 02/23/20 16:13:39.014 JobHandler_LuaUPnP::HandleActionRequest argument DeviceNum=399 <0x72187520>
08 02/23/20 16:13:39.014 JobHandler_LuaUPnP::HandleActionRequest argument serviceId=urn:micasaverde-com:serviceId:Sonos1 <0x72187520>
08 02/23/20 16:13:39.014 JobHandler_LuaUPnP::HandleActionRequest argument action=Say

RV is dead. The two verified* working TTS remaining for Sonos are MARY and AZURE (Microsoft cloud service). Azure is only supported by 2.0. There’s a separate thread for that.

Edit: Google and OSX may work, but I haven’t tried them, and I won’t be spending time on them in the foreseeable future.

that would explain it. Headed to 2.0 then.

Thanks for the information

Hello!
I’m trying to get my SONOS works- and no use. I have grouped sonos (Home theater) -Sonos Palybase, Sub and 2x One. I’s Associated Product: 192.168.1.34 - i’ve took it from SONOS Preference.
When i try to discover it- no use. When i manually add the IP - it is the same - take a lok at the screenshots 2020-04-10_16-35-16.png — Yandex.Disk
2020-04-10_16-36-03.png — Yandex.Disk
Can you help me- what i’m doing wrong? Please.

I’m going to suggest you take this over to the SONOS 2.0 thread.

I am completely stumped, and would appreciate any guidance.

I just updated the Sonos plugin to v1.5 - thank you @rigpapa for picking up the development of this. With v1.4 I had a few scenes to play music…they grouped some Sonos players, set a volume in each zone and then played a “favorite.” They worked fine. I decided to upgrade all my Sonos components, and found I was dead in the water with v1.4 of the Plugin, so I updated to v1.5. Installation went fine, and the plug-in devices in Vera are working perfectly. However, in re-building my scenes using the advanced editor, and using the exact same commands I was using with v1.4, I seem to have lost all control over setting individual zone volumes. SetVolume has no effect. SetGroupVolume will work, but that doesn’t help me, as I need different volume levels in each of the rooms. Setting a volume for a particular zone using the Vera device created by the plug-in works just fine.

Is there any reason why SetVolume would have stopped working? Any thoughts on what I may be doing wrong. Here’s what my simple script using the Advanced Scene Editor looks like…

The SetVolume commands have no effect. This sequence of commands worked just fine under the old plug-in. I’ve spent hours testing different ordering of these commands, adding delays and trying different commands, with no success.

Any guidance would be appreciated.

Have you considered upgrading to v 2.0 of this plug-in? Installing Sonos Plugin 2.0 (development/pre-release) for Azure TTS access

@LibraSun, I have not tried that - I certainly can. However, the guidance from @rigpapa on that thread is to only install that beta version if you need TTS, and I don’t. v1.5 was marked as “stable” so I assumed I should stick with that one. But I’ll give 2.0 a try tomorrow to see if it somehow resolves the issue.

Thanks.

1 Like