News:

There is a soft-mute function which we use with the commands like "What song is this?" There is one for system volume, one for each of: MediaMonkey, XBMC, iTunes, MediaPortal.

Main Menu

Sonos.Play.share

Started by paulbeauvais, February 06, 2016, 02:35:06 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

paulbeauvais

I was hoping someone could give me a bit of help.

I am trying to use the Sonos.Play.Share command and I cannot get it to work.

The file I am trying to play is in the share specified in the sonos plugin.  Sonos TTS works so I know the share is set up correctly.

I have sent both just the file name and the full UNC path, still nothing.

Any suggestions?

Here is the data from the log:

2/6/2016 1:50:42 AM   540   Action ERROR: OpenSource.UPnP.UPnPInvokeException:  Internal Server Error
   at OpenSource.UPnP.UPnPService.InvokeSync(String MethodName, UPnPArgument[] InVarArr)
   at Jishi.Intel.SonosUPnP.SonosPlayer.Enqueue(SonosTrack track, Boolean asNext)
   at vcPlugin.SonosController.playType(String playType, String playValue, Boolean clearQ)

jitterjames

There seems to be a bug in the plugin.  Let me see what I can do.

paulbeauvais

I know this is not an open source program, but is there any thought to allowing others to code their own Plugins?  I would like to implement more Sonos features.  What you have is a great start, but there seems to be much more functionality in the upnp commands.


jitterjames

#3
Quote from: paulbeauvais on February 08, 2016, 12:35:14 PM
I know this is not an open source program, but is there any thought to allowing others to code their own Plugins?
Sure.  Anyone is welcome to make their own plugins.  I posted a template for a plugin over 3 years ago.  Since then nobody ever did anything with it, or if they did, they never shared it with us.

http://voxcommando.com/forum/index.php?topic=943.0

The template should work but could use some updates.

Quote from: paulbeauvais on February 08, 2016, 12:35:14 PM
I would like to implement more Sonos features.  What you have is a great start, but there seems to be much more functionality in the upnp commands.

Can you give a concrete example of something useful available in the UPnP api that we have overlooked?  I know the plugin can still use some improvement but I'm not aware of anything else in that api that would be really useful.

jitterjames

#4
Here's an updated version of the plugin with a few fixes.  The Sonos.Play.Share action should work correctly now.

unzip the contents into your plugins\Sonos directly.  Remember to ask Windows to "unblock" the dll by right clicking it, selecting "properties" and then "unblock".
http://www.thewindowsclub.com/unblock-file-windows-8

paulbeauvais

Thanks for the Sonos update.  I will give it a try.

Also, thanks for the plugin template.  I think I will make a test plugin around text manipulation just to give it a try.  I will send you a link when it is done.

Paul

jitterjames

You should create an icon and put it into the plugin directory.  The file should be named icon.png and it should be 45x45 pixels.  You can just copy an icon from another plugin to get started.

I also recommend you reference the new PluginInterface.dll (which you can find in the main VC folder after installing) and update your plugin project to use .Net 4.5.1 or later

Note that the assembly name is the name of your plugin and should match the folder name and the prefix of all your actions.  In the example I posted the plugin name is SamplePlugin

Let me know if you need any help.

paulbeauvais

same issue, and I took the same troubleshooting steps.

2/8/2016 6:13:16 PM   180   Action ERROR: x-rincon-playlist:RINCON_B8E937B8A8C601400#S://loft/wav/Alarm01.wav
OpenSource.UPnP.UPnPInvokeException:  Internal Server Error
   at OpenSource.UPnP.UPnPService.InvokeSync(String MethodName, UPnPArgument[] InVarArr)
   at Jishi.Intel.SonosUPnP.SonosPlayer.Enqueue(SonosTrack track, Boolean asNext)
   at vcPlugin.SonosController.playType(String type_value, Boolean clearQ)


Sonos TTS works so I know the share is set up right.

jitterjames

That is not working because you are trying to play a file, not a share.  A share is the root folder that you shared with the Sonos and then it scanned a whole bunch of files.  You would play a share if you wanted to hear everything in that folder and all of its subfolders.

To play a song use Sonos.SetUri with a path to the file that looks something like this:
x-file-cifs://nas/music/mp3/The%20Decemberists/Castaways%20and%20Cutouts/04%20A%20Cautionary%20Song.mp3

There is a command in the default Sonos configuration that plays songs.  You can use it as a reference but you need to generate xml for your songs and this is not enabled by default in the Sonos plugin settings because it can be quite slow.

paulbeauvais

I will try it out.  Thanks for the response.