Author Topic: Sonos not responding to commands from Vera UI7  (Read 2766 times)

Offline TheHvistendahls

  • Newbie
  • *
  • Posts: 3
  • Karma: +0/-0
Sonos not responding to commands from Vera UI7
« on: October 12, 2017, 08:52:34 am »
So i finally decided to work on my home automation set up again.
I have a VeraLite with the latest firmware 1.7.987 and UI7. I know I should use UI5 instead, but don't want to downgrade at this point.

So I have followed other posts. Installed the Sonos plug in and tried this with and without the UPNP Event Proxy App installed.

I get my Sonos units discovered and connected.
I can press Play in vera once, sometimes also Pause or Stop. Yey, it Works.
After that I cann't control the Sonos again though. None of the buttons work. It says command is sent successful, but nothing happens.
I tried changing the settings, but they cant be changed. Doesn't save them.

All Sonos have a reserved IP that don't change.
All Sonos can be controlled from the Sonos App on my Windows computer or Android phone.
Just seems unstable.

Any advice? Been working on different ways to do this for days now. Just want the Sonos Devices to be stable so I can start to work on the Say command through my Sonos Devices.

Offline amg0

  • Sr. Hero Member
  • ******
  • Posts: 2935
  • Karma: +192/-8
Re: Sonos not responding to commands from Vera UI7
« Reply #1 on: November 27, 2017, 04:11:59 am »
in latest firmware VERA made change to the implementation such that port_49451 does not work any more

you can fix the issue by changing the javascript file of the plugin and replace
OLD line
new Ajax.Request (command_url+'/data_request', {

by NEW line
new Ajax.Request (data_request_url, {

Offline TheHvistendahls

  • Newbie
  • *
  • Posts: 3
  • Karma: +0/-0
Re: Sonos not responding to commands from Vera UI7
« Reply #2 on: December 02, 2017, 09:15:55 am »
Hi amg0

Thank you for replying to my post.
I have edited the file J_Sonos1.js and uploaded it through apps, develope apps in the Vera UI7.
Didnt change much though. Sonos still not responding.
Any additional steps I need to do?
Do you have a working setup?

Offline amg0

  • Sr. Hero Member
  • ******
  • Posts: 2935
  • Karma: +192/-8
Re: Sonos not responding to commands from Vera UI7
« Reply #3 on: December 02, 2017, 10:36:12 am »
these are my files

Offline lionelandjen

  • Jr. Member
  • **
  • Posts: 57
  • Karma: +1/-2
Re: Sonos not responding to commands from Vera UI7
« Reply #4 on: December 04, 2017, 12:25:29 pm »
Cool, those files worked.  thanks! 

Offline lionelandjen

  • Jr. Member
  • **
  • Posts: 57
  • Karma: +1/-2
Re: Sonos not responding to commands from Vera UI7
« Reply #5 on: December 04, 2017, 12:51:04 pm »
The files worked to ADD a device, which is great.  however the device shows State: "OFF" but I know it's not, since it's playing music ... right now through the sonos app on my phone.  but Vera doesn't seem to be aware. 

any ideas?

PS. One more edit: the other sonos we have had setup previously is still working just fine, showing the current song playing, etc.

« Last Edit: December 04, 2017, 01:12:49 pm by lionelandjen »

Offline Beakon

  • Newbie
  • *
  • Posts: 4
  • Karma: +0/-0
Re: Sonos not responding to commands from Vera UI7
« Reply #6 on: December 08, 2017, 02:11:45 pm »
Same for me, after uploading amg0:s files I can now again discover and add my sons speakers again but they are not controllable from Vera nor to they mirror the current state but are always marked as "off".

Offline a-lurker

  • Hero Member
  • *****
  • Posts: 839
  • Karma: +57/-8
Re: Sonos not responding to commands from Vera UI7
« Reply #7 on: December 08, 2017, 05:00:47 pm »
@amg0

The zip file above contains two files: the  J_Sonos1.js  file and the  L_Sonos1.lua  file. I note that the lua file is the same file as is distributed as part of version 1.4 of the SONOS plugin. Were changes made to the Lua file?? If so may be the wrong one has been zipped up?
« Last Edit: December 28, 2017, 03:36:39 am by a-lurker »

Offline amg0

  • Sr. Hero Member
  • ******
  • Posts: 2935
  • Karma: +192/-8
Re: Sonos not responding to commands from Vera UI7
« Reply #8 on: December 08, 2017, 07:28:41 pm »
I made no changes to the lua. I did not really check it but a similar fix may be required. basically port_49451 should not be used and be replaced by using port_3480

Offline Heber

  • Newbie
  • *
  • Posts: 4
  • Karma: +0/-0
Re: Sonos not responding to commands from Vera UI7
« Reply #9 on: December 27, 2017, 07:05:25 am »
With these files I could discover my Sonos zones but I cant seem to be able to select them. Any suggestions?

Offline jricher

  • Newbie
  • *
  • Posts: 4
  • Karma: +0/-0
Re: Sonos not responding to commands from Vera UI7
« Reply #10 on: December 27, 2017, 05:54:22 pm »
Veralite: U17,firmware: 1.7.987  I also have uploaded the 2 files from the zip file (thank you amg0) J_Sonos1.js and L_Sonos1.lua. Not sure where to change the port to _3480 . In Settings "discover" works and I can Select my Sonos play (Static IP). Selected zone is blank, IP: is Blank, State show Off, The "check now" button doesn't work. State Auto Check is set to ON frequency 5 minutes.
Sonos Shows Off Line even though I am playing music from the sonos app on my phone. Can the Device Simulator be used to debug the D_IPhone.json File? I get Missing property device _type and missing Control code for control. Where do I change the port to _3480?
 I am a I.T. manager with a software background, not a LUUP developer by any means, but I can get by. Any thoughts on what I should try. I'm not afraid to modify code.

Offline jricher

  • Newbie
  • *
  • Posts: 4
  • Karma: +0/-0
Re: Sonos not responding to commands from Vera UI7
« Reply #11 on: December 27, 2017, 06:06:16 pm »
I was able to control my Sonos play by manually adding the IP address in the Advanced IP field. All good for now!

Offline Heber

  • Newbie
  • *
  • Posts: 4
  • Karma: +0/-0
Re: Sonos not responding to commands from Vera UI7
« Reply #12 on: December 28, 2017, 05:00:48 am »
After a reinstall and a bunch of restarts the trick of manually adding the IP to the advance menu seemed to work. Thanks for the tip!

Offline Styxman

  • Sr. Newbie
  • *
  • Posts: 32
  • Karma: +1/-2
Re: Sonos not responding to commands from Vera UI7
« Reply #13 on: January 13, 2018, 07:54:20 pm »
Hi all -- I've tried everything in this (and other threads) to get my Sonos to work.  I can't install the patch, I can't discover devices, putting IP in Advanced/IP or in the New IP box doesn't work.  I've uninstalled both Sonos and UPnP proxy.  Would really like to get this working....anyones help would be greatly appreciated.  Running UI7 w/ latest firmware.

Many thanks

Offline ALcALoIDe

  • Jr. Member
  • **
  • Posts: 68
  • Karma: +1/-1
Re: Sonos not responding to commands from Vera UI7
« Reply #14 on: January 23, 2018, 07:10:06 pm »
When I finally retrofitted my apartment using cat6 cables all over, bought 6 Sonos, set everything up and when I installed Sonos plug in, no more support and not working anymore...  :'( :'( :'(
Vera Plus UI7 and lots of zwave devices