Sonos Driver Released

Topics for MLServer Device Drivers
User avatar
CinemarDave
Site Admin
Site Admin
Posts: 10535
Joined: Fri Feb 07, 2003 8:56 am
Location: Planet Earth
Contact:

Sonos Driver Released

Postby CinemarDave » Wed Jul 03, 2013 6:06 pm

A V4 driver supporting all Sonos Players has been released. This driver is a member of the AV Family of drivers.

You will find this driver a fairly complete emulation of the Sonos Windows App. You will have full control over all the major player functions with the exception of the premium radio services like Pandora, SiriusXM, Last.FM etc. Sonos does not expose the code to browse these services. However, there is as easy work around. If you create Sonos Favorites for these stations you are able to play them by browsing the Sonos Favorites and accessing them in that manner.

All of the features of our media apps are built into the driver. So along with Sonos Player control you'll also get fan art, lyrics and cover art for the playing music.

I only have one Sonos player to experiment with. It will be interesting to see how this plays with a whole house full of players. Communication with the Sonos involves a lot of network traffic and it all happens on background threads.

There is no configuration required for the driver. All your Sonos devices will automatically be discovered as they broadcast their existence on the network. Since a Sonos Player only does this broadcast once every 15 minutes it will take up to 15 minutes for the driver to find all the players on your network. This 15 minute process only happens during the initial scan of the system. Once the driver adds the player into the Family Manager it will remain their on further restarts of MLServer.

Sample Sonos scenes have been added to the MainLobby Sample scenes and both the iPad and Android sample web apps.

Here's some screen shots of the Sonos iPad scenes.
You do not have the required permissions to view the files attached to this post.

Texsun
Member
Member
Posts: 87
Joined: Mon Dec 15, 2008 6:28 pm
Location: DFW, Texas
Contact:

Re: Sonos Driver Released

Postby Texsun » Fri Jul 05, 2013 6:06 pm

Very nice Dave!

I'm getting an error: InitMainform - Error at InitMainForm at line #190 - Only one usage of each socket address (protocol/network/port) is normally permitted.

rileydog
Expert
Expert
Posts: 667
Joined: Wed Jun 02, 2004 12:25 am
Location: Kalamazoo, Michigan
Contact:

Re: Sonos Driver Released

Postby rileydog » Sun Jul 07, 2013 7:57 am

This is totally great. Great job. I had to put the sonos in discover mode (press mute and volume up at the same time) for the plugin to record the two devices. Thanks!

User avatar
CinemarDave
Site Admin
Site Admin
Posts: 10535
Joined: Fri Feb 07, 2003 8:56 am
Location: Planet Earth
Contact:

Re: Sonos Driver Released

Postby CinemarDave » Sun Jul 07, 2013 5:27 pm

Yeah you can do that to force the discovery but it should have eventually found them. 15 minutes is forever when you're waiting for it.

User avatar
CinemarDave
Site Admin
Site Admin
Posts: 10535
Joined: Fri Feb 07, 2003 8:56 am
Location: Planet Earth
Contact:

Re: Sonos Driver Released

Postby CinemarDave » Sun Jul 07, 2013 5:28 pm

Texsun you cannot have the Sonos Windows app running at the same time on the MLServer PC. They both try to listen on the same ports and one will lose out.

Texsun
Member
Member
Posts: 87
Joined: Mon Dec 15, 2008 6:28 pm
Location: DFW, Texas
Contact:

Re: Sonos Driver Released

Postby Texsun » Mon Jul 08, 2013 7:00 pm

CinemarDave wrote:Texsun you cannot have the Sonos Windows app running at the same time on the MLServer PC. They both try to listen on the same ports and one will lose out.


Well, I didn't have the sonos windows app running on the mlserver pc, but I did have copies of it running on two other computers. I shut those down and restarted mlserver and it worked this time. Thanks

User avatar
CinemarDave
Site Admin
Site Admin
Posts: 10535
Joined: Fri Feb 07, 2003 8:56 am
Location: Planet Earth
Contact:

Re: Sonos Driver Released

Postby CinemarDave » Mon Jul 08, 2013 7:03 pm

Running on other PCs is ok. Something was running on the MLServer PC that was listening on the same UDP ports. Are you a Homeseer user? Perhaps the Homeseer Sonos plugin?

Texsun
Member
Member
Posts: 87
Joined: Mon Dec 15, 2008 6:28 pm
Location: DFW, Texas
Contact:

Re: Sonos Driver Released

Postby Texsun » Mon Jul 08, 2013 7:46 pm

I was running Homeseer previously when it wouldn't discover and shut it down prior to the successful attempt. I don't have the sonos plug in for homeseer, but I bet you're right that it was listening in on that port. I'll have to see what may not be working on Homeseer now.

Also, Is there some additional steps to be able to use the sonos via iPad or MLclient? I have the latest mlserver version and the latest sample scenes for the client, but the sonos devices that show in the sonos driver do not appear in either the client or iPad.

User avatar
CinemarDave
Site Admin
Site Admin
Posts: 10535
Joined: Fri Feb 07, 2003 8:56 am
Location: Planet Earth
Contact:

Re: Sonos Driver Released

Postby CinemarDave » Mon Jul 08, 2013 8:00 pm

Since the AV Family Index will be different for all users you'll need to edit the "Tools" section on the sample scenes so that it lists your Sonos devices then you can select the active one to control.

snickers1
Member
Member
Posts: 50
Joined: Thu Sep 27, 2012 6:47 pm
Contact:

Re: Sonos Driver Released

Postby snickers1 » Fri Nov 08, 2013 10:13 pm

not sure why i am getting this error
i am using the new player 1 and bridge it found both but get this error
You do not have the required permissions to view the files attached to this post.

User avatar
CinemarDave
Site Admin
Site Admin
Posts: 10535
Joined: Fri Feb 07, 2003 8:56 am
Location: Planet Earth
Contact:

Re: Sonos Driver Released

Postby CinemarDave » Sat Nov 09, 2013 10:51 am

Since it is happening every 5 seconds it must be associated with the sleep timer routine trying to check the device to see if it is in sleep timer countdown mode. The new devices must not have that feature. Install the Sonos driver I just released and see if those messages go away.

snickers1
Member
Member
Posts: 50
Joined: Thu Sep 27, 2012 6:47 pm
Contact:

Re: Sonos Driver Released

Postby snickers1 » Sat Nov 09, 2013 11:01 am

CinemarDave wrote:Since it is happening every 5 seconds it must be associated with the sleep timer routine trying to check the device to see if it is in sleep timer countdown mode. The new devices must not have that feature. Install the Sonos driver I just released and see if those messages go away.


ok it got a little better i think now just getting this
You do not have the required permissions to view the files attached to this post.

snickers1
Member
Member
Posts: 50
Joined: Thu Sep 27, 2012 6:47 pm
Contact:

Re: Sonos Driver Released

Postby snickers1 » Mon Nov 11, 2013 2:28 pm

ok now it looks like this

and if i launch the ipad scene in the browser it is just blank

i ma probably missing something simple :(
You do not have the required permissions to view the files attached to this post.

User avatar
CinemarDave
Site Admin
Site Admin
Posts: 10535
Joined: Fri Feb 07, 2003 8:56 am
Location: Planet Earth
Contact:

Re: Sonos Driver Released

Postby CinemarDave » Mon Nov 11, 2013 4:43 pm

>>> if i launch the ipad scene in the browser it is just blank

If that ever happens it means the the html file that is trying top be accessed does not exist. Double check that the Sonos html files are in the project folder. The other messages are because a default Sonos device has not been selected.

erikhimber
Expert
Expert
Posts: 872
Joined: Wed Jun 11, 2003 8:54 pm
Location: West Palm Beach, FL
Contact:

Re: Sonos Driver Released

Postby erikhimber » Mon Nov 11, 2013 6:18 pm

Hey Dave,

Lots of questions on this driver, does not seem to functioning quite right for me. Please call me when you have a moment. I'll pm you with my cell #.
Thanks.
Erik


Return to “MLServer 4 Device Drivers”

Who is online

Users browsing this forum: No registered users and 1 guest