Author Topic: Sonos.Play.share  (Read 3634 times)

0 Members and 1 Guest are viewing this topic.

paulbeauvais

  • Jr. Member
  • **
  • Posts: 22
  • Karma: 2
    • View Profile
Sonos.Play.share
« on: February 06, 2016, 02:35:06 AM »
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)
« Last Edit: February 06, 2016, 02:57:47 AM by paulbeauvais »

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Sonos.Play.share
« Reply #1 on: February 06, 2016, 11:32:12 AM »
There seems to be a bug in the plugin.  Let me see what I can do.

paulbeauvais

  • Jr. Member
  • **
  • Posts: 22
  • Karma: 2
    • View Profile
Re: Sonos.Play.share
« Reply #2 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?  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

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Sonos.Play.share
« Reply #3 on: February 08, 2016, 03:28:58 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.

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.
« Last Edit: February 08, 2016, 03:29:41 PM by nime5ter »

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Sonos.Play.share
« Reply #4 on: February 08, 2016, 04:01:49 PM »
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
« Last Edit: February 08, 2016, 04:10:16 PM by jitterjames »

paulbeauvais

  • Jr. Member
  • **
  • Posts: 22
  • Karma: 2
    • View Profile
Re: Sonos.Play.share
« Reply #5 on: February 08, 2016, 04:35:41 PM »
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

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Sonos.Play.share
« Reply #6 on: February 08, 2016, 04:58:31 PM »
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

  • Jr. Member
  • **
  • Posts: 22
  • Karma: 2
    • View Profile
Re: Sonos.Play.share
« Reply #7 on: February 08, 2016, 07:15:14 PM »
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

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Sonos.Play.share
« Reply #8 on: February 08, 2016, 08:42:33 PM »
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

  • Jr. Member
  • **
  • Posts: 22
  • Karma: 2
    • View Profile
Re: Sonos.Play.share
« Reply #9 on: February 08, 2016, 11:11:34 PM »
I will try it out.  Thanks for the response.