We have moved at community.getvera.com

Author Topic: Getting Sonos working again  (Read 3006 times)

Offline Vera Plus user

  • Newbie
  • *
  • Posts: 19
  • Karma: +0/-0
Re: Getting Sonos working again
« Reply #15 on: January 15, 2019, 07:32:19 am »
OK

I tried to uninstall the UpNP server and made the changes you recommend but no changes for me.
---------------------------------------------
Now it works.

After I Uninstall the Sonos app and delete all "Sonos" files in my Vera via FTP and then Install the Sonos app again and load up sonos 1.4.2 it?s okey.

I have not installed the UpNp plugin.

This LUA don?t work yet

luup.call_action("urn:micasaverde-com:serviceId:Sonos1", "PlayURI",
                 {URIToPlay="TR:17553", Volume=30},
                 sonos_kok_device)

Where TR:17553 is a Tunein station but if I change the Radio station to a Playlist in Sonos it works.

luup.call_action("urn:micasaverde-com:serviceId:Sonos1", "PlayURI",
                 {URIToPlay="SQ:Party 1", Volume=30},
                 sonos_kok_device)
« Last Edit: January 15, 2019, 04:08:20 pm by Vera Plus user »

Offline Spanners

  • Sr. Member
  • ****
  • Posts: 265
  • Karma: +16/-5
Re: Getting Sonos working again
« Reply #16 on: January 19, 2019, 12:33:56 am »
I don't think your station ID is valid.

I tried: luup.call_action("urn:micasaverde-com:serviceId:Sonos1", "PlayURI", {URIToPlay="TR:44935", Volume=30}, 30)

And it worked fine (ABC Jazz Radio).

When I put your station ID into the Sonos HTTP API I get this response:

Code: [Select]
{"status":"error","error":"Got status 500 when invoking /MediaRenderer/AVTransport/Control","stack":"Error: Got status 500 when invoking /MediaRenderer/AVTransport/Control
\n    at Object.invoke (/node-sonos-http-api/node_modules/sonos-discovery/lib/helpers/soap.js:99:10)
\n    at Player.setAVTransport (/node-sonos-http-api/node_modules/sonos-discovery/lib/models/Player.js:725:15)
\n    at Object.tuneIn [as tunein] (/node-sonos-http-api/lib/actions/tunein.js:23:31)
\n    at handleAction (/node-sonos-http-api/lib/sonos-http-api.js:117:35)
\n    at HttpAPI.requestHandler (/node-sonos-http-api/lib/sonos-http-api.js:94:5)
\n    at /node-sonos-http-api/server.js:50:13
\n    at Server.finish (/node-sonos-http-api/node_modules/node-static/lib/node-static.js:111:13)
\n    at finish (/node-sonos-http-api/node_modules/node-static/lib/node-static.js:170:14)
\n    at /node-sonos-http-api/node_modules/node-static/lib/node-static.js:144:17
\n    at FSReqWrap.oncomplete (fs.js:158:21)"}

If I go to the Tunein Website with that ID I get a message saying "This Station is not currently available on Tunein".

« Last Edit: January 19, 2019, 12:35:28 am by Spanners »

Offline lakewoodjazz

  • Jr. Member
  • **
  • Posts: 53
  • Karma: +1/-0
Re: Getting Sonos working again
« Reply #17 on: January 19, 2019, 03:54:52 am »
Hi
I have 7 sonos devices ip addresses discovered by the 1.4 version of the Sonos app using the discovery patch. I only created one device. (#298) with the Sonos "Connect" being the default  When I select various zones to play in a group either for music or through TTS (responsive voice) issues occur. Usually stating.. "Driven by another zone" on the Settingd Page.

I have created varios tts scenes interrupting music or live tv to say via lua code. Example code is
 luup.call_action("urn:micasaverde-com:serviceId:Sonos1", "Say",
                 {Text="Door Open. Basement Door Open", Language="en", GroupZones="ALL",
                  Volume=55, SameVolumeForAll="true"},
                 298)
After successfully saying the text not all the groups return to my original configuration. I know it has been suggested to add each zone as a device number. Do I need 7 Sonos device numbers? Would I need to list all the device numbers seperatly in the code? Seems the "Group All" options are not working properly.

« Last Edit: January 19, 2019, 08:31:18 am by lakewoodjazz »

Offline Spanners

  • Sr. Member
  • ****
  • Posts: 265
  • Karma: +16/-5
Re: Getting Sonos working again
« Reply #18 on: January 24, 2019, 03:36:52 am »
@lakewoodjazz have you installed the 1.4.2 version of the plugin (manual install, review thread for file) or just the version from the Vera App Store?

I don't think you specifically need to have all Sonos speakers configured in Vera - I don't think it does anything to improve the issue you're seeing, there's no communication between plugin instances. But it does let you write code to specifically set the state of each device.

You might also want to look at the SavePlaybackContext and RestorePlaybackContext functions and see if that helps with your group changes.

Also, if you have any Stereo Pairs then all bets are off. There's been issues with those since day 1.

« Last Edit: January 24, 2019, 05:04:02 am by Spanners »

Offline lakewoodjazz

  • Jr. Member
  • **
  • Posts: 53
  • Karma: +1/-0
Re: Getting Sonos working again
« Reply #19 on: January 25, 2019, 12:08:00 am »
My Sonos vs is reading 1.4 but I did install your additional downloaded files from the September 4 post.
 I do have a pair of Play Ones linked together as rear speakers with a playbar.
They work (so far) in conjunction with the playbar in all ways. I will research the SPC & RPC gunctions you kindly mentioned. Thanks for keeping this app working!

Offline lakewoodjazz

  • Jr. Member
  • **
  • Posts: 53
  • Karma: +1/-0
Re: Getting Sonos working again
« Reply #20 on: February 03, 2019, 01:52:44 am »
Hi Spanners
I cant find the Functions you mentioned. Restore Playback Context or
 Save Playback Contest
IS TGR  luup.call_action("urn:micasaverde-com:serviceId:Sonos1", "Say",
                 {Text="Door Open. Apartment Front Door Open", Language="en-CA", GroupZones="House Music,Garage,Basement"
                  Volume=60, SameVolumeForAll="true"},
                 298)

Offline vzhivkov

  • Jr. Member
  • **
  • Posts: 55
  • Karma: +0/-0
Re: Getting Sonos working again
« Reply #21 on: February 12, 2019, 01:06:41 pm »
I tried version 1.4.2 but it doesn't find anything. Says scanning and nothing. Tried to enter the ip of the sonos manually - saves it and nothing - doesn't work. What am I doing wrong? Is it supposed to work with Sonos Beam?