We have moved at community.getvera.com

Author Topic: Beta 3 version of the Sonos plugin released  (Read 10627 times)

Offline lolodomo

  • Moderator
  • Master Member
  • *****
  • Posts: 3484
  • Karma: +74/-10
Beta 3 version of the Sonos plugin released
« on: February 16, 2014, 05:15:29 am »
A new update of the Sonos plugin is now available.
You can download the ZIP file at the bottom of this page: http://code.mios.com/trac/mios_sonos-wireless-music-systems/browser/tags/beta3#
Please note that the "services" subdirectory in this archive is unnecessary.

Here are the changes:
  • Improove the way to run TTS (silence file no more required) + TTS code moved in a library
  • New available engine for TTS: OSX TTS server
  • New parameter Engine for the Say action
  • New variable DefaultEngineTTS: default TTS engine; default value is GOOGLE; other possible value is OSX_TTS_SERVER
  • New variable DefaultLanguageTTS: default language (2 characters) used by TTS; default value is "en" meaning "english"
  • Changed: when calling SetURIToPlay / PlayURI with a Sonos playlist, the playlist now replaces the current queue content
  • New: playback of a Sirius station with the following URI format in PlayURI command: SR:<stationID>
  • New: bridge is now not considered as a usual zone
  • New variable CheckStateRate: delay in minutes between automatic state checks; default value is 0 meaning no automatic check
  • New variable DebugLogs; default value is 0; value set to 1 enables log of additional debug information
  • Changed: log of debug information
  • New: better handling of Play:3 pairs
  • Improove performance of XML parsing
  • Improove performance when browsing content (queue content) + abort timeout in case of very big queue
  • Suppress services not helpful for the final user
  • Changed: new format (reduced size of the value) for the variables SavedQueues, FavoritesRadios and Queue
  • Changed: files renamed for AVTransport and RenderingControl services
  • Fix value for variable Title for a TuneIn radio station
  • Fix escaping of XML special characters
  • Variable DiscoveryResult reset at reload if set to "scanning"
  • UI player tab: Truncate long items in pick lists
  • UI Settings tab: display of identity for discovered Sonos changed
  • UI Settings tab: current Sonos is now selected by default in the "discover" pick list
  • UI Help tab: version of the plugin displayed
  • UI Help tab: fixed URL for the forum


Installation part of the wiki page has now been updated.
http://code.mios.com/trac/mios_sonos-wireless-music-systems/wiki/WikiStart#

For users that used a previous version of the plugin, I would recommend that you delete unused files after new installation:
- all files matching S_Sonos* in the directory /etc/cmh-ludl except S_Sonos1.xml.lzo and S_SonosGroupRenderingControl1.xml.lzo
- file Sonos_silence.mp3 in the directory /etc/cmh-ludl
- file Sonos_silence.mp3 in the directory /www
« Last Edit: February 16, 2014, 06:06:38 am by lolodomo »

Offline lolodomo

  • Moderator
  • Master Member
  • *****
  • Posts: 3484
  • Karma: +74/-10
Re: Beta 3 version of the Sonos plugin released
« Reply #1 on: February 16, 2014, 06:01:35 am »
There are still 4 topics requiring work:
  • Restoring queue content (after TTS): when the queue contains items from a paying service: for a technical reason I still ignore, it looks like the required service key is notified to the Sonos official application but not to our plugin
  • Restoring queue content (after TTS): it could take a lot of time if the queue content to be restored is big
  • Moving TTS UI in a new tab to let the user selects the engine and setup the engine parameters
  • Management of pairs

This ordered list matches my priorities.
I would like to handle the first 3 topics before releasing the plugin on the app store.
« Last Edit: February 16, 2014, 06:28:44 am by lolodomo »

Offline lolodomo

  • Moderator
  • Master Member
  • *****
  • Posts: 3484
  • Karma: +74/-10
Re: Beta 3 version of the Sonos plugin released
« Reply #2 on: February 16, 2014, 02:32:02 pm »
Restoring queue content (after TTS): when the queue contains items from a paying service: for a technical reason I still ignore, it looks like the required service key is notified to the Sonos official application but not to our plugin

I was fully wrong, I was just not looking at the right place (tag). What we need is provided. 8)
« Last Edit: February 16, 2014, 03:10:16 pm by lolodomo »

Offline lolodomo

  • Moderator
  • Master Member
  • *****
  • Posts: 3484
  • Karma: +74/-10
Re: Beta 3 version of the Sonos plugin released
« Reply #3 on: February 16, 2014, 03:12:46 pm »
Restoring queue content (after TTS): when the queue contains items from a paying service: for a technical reason I still ignore, it looks like the required service key is notified to the Sonos official application but not to our plugin

I was fully wrong, I was just not looking at the right place (tag). What we need is provided. 8)

It is now fixed, I hope that the fix will work with any Sonos service using the Sonos queue. As an example, it is working with Amazon Cloud Player service.
The fix is not included in the beta 3 version but is available in the "in development" version (trunk) and will of course be included in next release.

Offline lolodomo

  • Moderator
  • Master Member
  • *****
  • Posts: 3484
  • Karma: +74/-10
Re: Beta 3 version of the Sonos plugin released
« Reply #4 on: February 16, 2014, 03:18:57 pm »
Restoring queue content (after TTS): it could take a lot of time if the queue content to be restored is big

At least one reason is that I am using the action AddURIToQueue rather than the action AddMultipleURIsToQueue, that is one call for each queue item rather than one unique call.
If your queue has for example 100 items, it will produce 100 calls to AddURIToQueue that will produce 100 notifications of queue update that will produce 100 calls to browse the queue content !!! That's clearly not optimal :)
Why I did it like that ? Because I don't know how to use the action AddMultipleURIsToQueue :) But I will search.

Offline parkerc

  • Beta Testers
  • Sr. Hero Member
  • *****
  • Posts: 2479
  • Karma: +35/-48
  • Life Moves Pretty Fast....
Re: Beta 3 version of the Sonos plugin released
« Reply #5 on: February 16, 2014, 04:32:00 pm »
Hi @lolodomo

Quote
For users that used a previous version of the plugin, I would recommend that you delete unused files after new installation:
- all files matching S_Sonos* in the directory /etc/cmh-ludl except S_Sonos1.xml.lzo and S_SonosGroupRenderingControl1.xml.lzo
- file Sonos_silence.mp3 in the directory /etc/cmh-ludl
- file Sonos_silence.mp3 in the directory /www/

What would happen if you did not delete them?

Offline lolodomo

  • Moderator
  • Master Member
  • *****
  • Posts: 3484
  • Karma: +74/-10
Re: Beta 3 version of the Sonos plugin released
« Reply #6 on: February 17, 2014, 05:16:44 am »
Restoring queue content (after TTS): it could take a lot of time if the queue content to be restored is big

At least one reason is that I am using the action AddURIToQueue rather than the action AddMultipleURIsToQueue, that is one call for each queue item rather than one unique call.
If your queue has for example 100 items, it will produce 100 calls to AddURIToQueue that will produce 100 notifications of queue update that will produce 100 calls to browse the queue content !!! That's clearly not optimal :)
Why I did it like that ? Because I don't know how to use the action AddMultipleURIsToQueue :) But I will search.

IFor your information, I finally succeeded to use AddMultipleURIsToQueue. So the second point should be closed very soon.

Offline lolodomo

  • Moderator
  • Master Member
  • *****
  • Posts: 3484
  • Karma: +74/-10
Re: Beta 3 version of the Sonos plugin released
« Reply #7 on: February 17, 2014, 05:27:48 am »
Hi @lolodomo

Quote
For users that used a previous version of the plugin, I would recommend that you delete unused files after new installation:
- all files matching S_Sonos* in the directory /etc/cmh-ludl except S_Sonos1.xml.lzo and S_SonosGroupRenderingControl1.xml.lzo
- file Sonos_silence.mp3 in the directory /etc/cmh-ludl
- file Sonos_silence.mp3 in the directory /www/

What would happen if you did not delete them?

Nothing bad at least for all files except S_SonosAVTransport1.xml and S_SonosRenderingControl1.xml. For these two files, if you keep them, you will be in the case that you have two services files for the same service type AVTransport:1. As the two files (S_SonosAVTransport1.xml and S_AVTransport1.xml) are identical, my assumption is that it will work well but I am not 100% sure.
I could think about a new action to check and delete all old unused service files.

Offline RexBeckett

  • Beta Testers
  • Master Member
  • *****
  • Posts: 3891
  • Karma: +483/-12
Re: Beta 3 version of the Sonos plugin released
« Reply #8 on: February 17, 2014, 06:42:36 am »
I upgraded to Beta3_161 and everything is working well. The TTS now seems more responsive and returns to the previous program stream quicker. Great work!

Offline jimpapa

  • Sr. Member
  • ****
  • Posts: 454
  • Karma: +28/-1
Re: Beta 3 version of the Sonos plugin released
« Reply #9 on: February 20, 2014, 03:31:33 pm »
Also installed and got TTS working with the OSX TTS server...

VERY cool.. thanks so much for this.. My Sonos addiction is never going to be fixed now :)

Offline lolodomo

  • Moderator
  • Master Member
  • *****
  • Posts: 3484
  • Karma: +74/-10
Re: Beta 3 version of the Sonos plugin released
« Reply #10 on: February 20, 2014, 05:06:35 pm »
Also installed and got TTS working with the OSX TTS server...

 8)

Offline parkerc

  • Beta Testers
  • Sr. Hero Member
  • *****
  • Posts: 2479
  • Karma: +35/-48
  • Life Moves Pretty Fast....
Re: Beta 3 version of the Sonos plugin released
« Reply #11 on: February 21, 2014, 05:26:37 pm »
Hi @lolodomo

I've just updated to your latest release but I see this when I try a TTS command. Any ideas?

UPDATE - A few more reloads has solved it, but rather than delete this I thought I'd leave it here for information, should it be of help to others
« Last Edit: February 21, 2014, 06:48:50 pm by parkerc »

Offline lolodomo

  • Moderator
  • Master Member
  • *****
  • Posts: 3484
  • Karma: +74/-10
Re: Beta 3 version of the Sonos plugin released
« Reply #12 on: February 21, 2014, 07:45:37 pm »
There are still 4 topics requiring work:
  • Restoring queue content (after TTS): when the queue contains items from a paying service: for a technical reason I still ignore, it looks like the required service key is notified to the Sonos official application but not to our plugin
  • Restoring queue content (after TTS): it could take a lot of time if the queue content to be restored is big

I finally found an ultra efficient way to manage queue saving and restoring, simply through a Sonos playlist (saved queue).
The change will be really noticeable. I will make more tests but I think it will be fast more or less whatever the size of the queues.

Offline parkerc

  • Beta Testers
  • Sr. Hero Member
  • *****
  • Posts: 2479
  • Karma: +35/-48
  • Life Moves Pretty Fast....
Re: Beta 3 version of the Sonos plugin released
« Reply #13 on: February 22, 2014, 04:56:29 am »
Hi @lolodomo

The Sonos error message "Unable to play Say.5.mp3 - the track is not encoded correctly" is back again.  A reload of Vera seems to fix it, but it does seems to come back again. 

You have to look at the Sonos Controller (official app) to see this error message.
« Last Edit: February 22, 2014, 05:03:09 am by parkerc »

Offline lolodomo

  • Moderator
  • Master Member
  • *****
  • Posts: 3484
  • Karma: +74/-10
Re: Beta 3 version of the Sonos plugin released
« Reply #14 on: February 22, 2014, 07:52:01 am »
Hi @lolodomo

The Sonos error message "Unable to play Say.5.mp3 - the track is not encoded correctly" is back again.  A reload of Vera seems to fix it, but it does seems to come back again. 

You have to look at the Sonos Controller (official app) to see this error message.

Sorry, it does never happen for me.
Is there special characters in your text ? I mean, are you sure that Google produces a file not empty ?

That being said, I could add a test to check that the file is not empty before trying to play it.