Author Topic: openLuup: Sonos  (Read 17910 times)

Offline jcsv75

  • Jr. Member
  • **
  • Posts: 86
  • Karma: +3/-0
Re: openLuup: Sonos
« Reply #75 on: December 05, 2016, 02:08:14 pm »
Hi Tommi,

I am afraid an easy installable Sonos package for Openluup is not available yet. Hopefully someday.

I managed to get through the installation process quite far but I got stuck with the 3 questions I posted above. I am hoping that either @Cudanet or @Explorer will have a look at this thread as they seem to have it all running.

For now what I have managed to do is to install the Sonos plugin on my vera lite. I also have a fully working TTS engine running on a Windows virtual box. The engine is called Mary TTS and I am using the voice called Poppy. This is the best and clearest voice in my opinion.

From Openluup/Altui I have a created a couple of scenes whereby I simply call the sonos device id on my vera. This works great without any noticable delays.

cheers,

Offline CudaNet

  • Hero Member
  • *****
  • Posts: 1401
  • Karma: +42/-10
  • Chimichanga !
Re: openLuup: Sonos
« Reply #76 on: December 07, 2016, 03:01:14 pm »
Sorry for the late response, work is insane (for whatever reason). I'm afraid I won't be able to provide you with a solution. Credit goes to Explorer and AK for making the necessary adjustments to get Sonos working (multiple devices). However, in my case, I couldn't get TTS to operate correctly. Due to my schedule, I wasn't able to assist in identifying the root cause. I've successfully been using the NodeJS for quite some time now (I posted the solution somewhere, perhaps in this thread)

--Cuda

Hello,

First of all thanks a lot for providing these updated files and instructions. I have a pair of Sonos Play1 speakers and I have installed the Sonos plugin succesfully on Openluup. However I am a bit stuck when it comes to using the TTS function. See my detailled questions below. FYI, I am using the Mary TTS engine which is working correctly if I send it a test TTS phrase via it's web page.

Thanks a lot for any hints and tips! :)

Jacques


I_Sonos1.xml
Store TTS Say.dev.mp3 file to the /www/cmh subfolder folder. This is to be able to create a symbolic link in the /etc/cmh-ludl folder for use with the openLuup HTTP server. Eliminates the need for a web server when used with openLuup. Should be compatible with native vera folder structure. The external URL for Sonos would look like: http://host:port/cmh/Say.device.mp3

  • How do a create a /www/cmh subfolder? FYI, I am using a ready-made Debian server openluup/altui installation with virtual box.
  • Where do I find the Say.dev.mp3 file? Or should I create it myself?

Added ability to set the port number and leave the IP blank. This is to set port to 3480 for Sonos TTS callbacks, and have openLuup serve the audio file: http://host:3480/cmh/Say.device.mp3. Previously, the routerPort was only set if the routerIP variable was not blank.

  • Where do I need to set this port number? In the Sonos plugin? In any scenes that I want to use TTS actions in?

To use with openLuup, simply run the L_UPnPProxyDaemon.lua file. There is no need to create a device, unless you want to see the status. If you choose to create a UPnPProxy device to monitor the proxy status, just make sure to have /etc/init.d/ folder (this is where the plugin will look for and place the daemon control script).

I have succesfully installed the UPnP proxy plugin and created a device. The device says 'Status = running' but there are no other parameters. Is this normal?

  • How do I run the L_UPnPProxyDaemon.lua exactly?
  • Do I need to create this /etc/init.d/ folder manually?
  • I have succesfully installed the UPnP proxy plugin and created a device. The device says 'Status = running' but there are no other parameters. Is this normal?
openLuup, AltUI, Zway and HomeWave, enough said...

Offline reneboer

  • Hero Member
  • *****
  • Posts: 1380
  • Karma: +79/-30
Re: openLuup: Sonos
« Reply #77 on: February 05, 2017, 11:07:06 am »
Hi,

I gave this a shot again and pulled a few versions together to this. I have this running on my Pi, including TTS.

I just uploaded the UPNP proxy found above, and took that Sonos source as a start for the attached zip, and uploaded that. Then create the two devices manually.

In the /etc/cmh-ludl folder I created a folder called cmh.

In the Sonos Variables you must set the RouterPort to 3480.

This version also includes the ResponsiveVoice TTS, with the rate and pitch parameters. You can configure this all in the TTS settings.

This version also works on Vera, but in the L_SonosTTS.lua code you must set the SAY_OUTPUT_FILE variable to its orginal value again.

Cheers Rene
2xVeraLite, VeraEdge, openLuup, ALTUI, 20 switches, 10 dimmers, 20 sensors, 10 scene controllers, 1 Harmony Hub, many plug-ins. Not enough time.

Offline reneboer

  • Hero Member
  • *****
  • Posts: 1380
  • Karma: +79/-30
Re: openLuup: Sonos
« Reply #78 on: February 08, 2017, 07:44:57 am »
Hi,

Little update on my Sonos use on openluup. I found that using port 3480 is causing quite a long pause before you hear the text being spoken. It also seems that the openLuup server is tied up with streaming the mp3 to the player quite a bit and then not responding to other things.

So I decided to have the apache sever that runs on my Pi for remote access to ALTUI and Imperihome already to handle this instead.

To do this I created a folder /www/cmh and created a virtual host definition for port 8080 on the /www folder. In the Sonos plugin I changed SAY_OUTPUT_FILE back to the standard value and set the RouterPort variable to 8080.

Works like a charm and for a sort text (50 characters) it starts playing the moment I give the Say command, no more 2-3 second pause.

If anyone wants to know how to configure the apache server for this then let me know.

Cheers Rene
2xVeraLite, VeraEdge, openLuup, ALTUI, 20 switches, 10 dimmers, 20 sensors, 10 scene controllers, 1 Harmony Hub, many plug-ins. Not enough time.

Offline CudaNet

  • Hero Member
  • *****
  • Posts: 1401
  • Karma: +42/-10
  • Chimichanga !
Re: openLuup: Sonos
« Reply #79 on: February 11, 2017, 09:50:31 am »
@Reneboer,

Apologies for not responding sooner, this is greatness.. Many thanks for diving in and working to resolve this.. I've been using the NodeJS version for so long that it's found itself running on the same Pi as openLuup. It's time for me to give this a go but looking at your latest post (Sonos) it sounds as if 3480 is giving some issues. I'll keep an eye on this thread and see if/how this gets resolved...

--CN

Hi,

I gave this a shot again and pulled a few versions together to this. I have this running on my Pi, including TTS.

I just uploaded the UPNP proxy found above, and took that Sonos source as a start for the attached zip, and uploaded that. Then create the two devices manually.

In the /etc/cmh-ludl folder I created a folder called cmh.

In the Sonos Variables you must set the RouterPort to 3480.

This version also includes the ResponsiveVoice TTS, with the rate and pitch parameters. You can configure this all in the TTS settings.

This version also works on Vera, but in the L_SonosTTS.lua code you must set the SAY_OUTPUT_FILE variable to its orginal value again.

Cheers Rene
openLuup, AltUI, Zway and HomeWave, enough said...

Offline akbooer

  • Moderator
  • Master Member
  • *****
  • Posts: 6153
  • Karma: +275/-69
  • "Less is more"
Re: openLuup: Sonos
« Reply #80 on: February 11, 2017, 09:58:34 am »
I may not be understanding this fully, but if you don't HAVE to use port 3480, then absolutely do not do so.  The same advice would apply to other A/V devices like cameras, etc.
3x Vera Lite-UI5/Edge-UI7, 25x Fibaro, 23x TKB, 9x MiniMote, 2x NorthQ Power, 2x Netatmo, 1x Foscam FI9831P, 9x Philips Hue,
Razberry, MySensors Arduino, HomeWave, AltUI, AltHue, DataYours, Grafana, openLuup, ZWay, ZeroBrane Studio.

Offline rafale77

  • Hero Member
  • *****
  • Posts: 1247
  • Karma: +62/-23
Re: openLuup: Sonos
« Reply #81 on: December 05, 2017, 02:26:45 am »
An old thread but I have been trying to get this event proxy to work and it will not work on ubuntu (which openluup runs perfectly fine on). The upnp proxy was written to really work on openwrt and I keep on running into os related errors due to different files and instructions required...
openLuup (97 devices, 134 scenes, 20 apps) controlling HomeAss + VeraPlus (138 zwave nodes, 8 Zigbee nodes, 205 devices, 20 scenes , 2 app) Bridged to Homekit and Alexa. VeraPlus ExtRooted!

Offline rafale77

  • Hero Member
  • *****
  • Posts: 1247
  • Karma: +62/-23
Re: openLuup: Sonos
« Reply #82 on: May 26, 2018, 10:20:05 am »
So it appears that some updates to the SONOS has made some changes so now the device volume and mute controls no longer work. If the Sonos are in a group, the group volume command still works but not the buttons on the plugin device. I have not been able to make the mute buttons work at all either group or ungrouped.
openLuup (97 devices, 134 scenes, 20 apps) controlling HomeAss + VeraPlus (138 zwave nodes, 8 Zigbee nodes, 205 devices, 20 scenes , 2 app) Bridged to Homekit and Alexa. VeraPlus ExtRooted!