Forums - Windows library

18 posts / 0 new
Last post
Windows library
robin.keith
Join Date: 25 Jan 16
Posts: 2
Posted: Mon, 2016-01-25 14:07

Hi there,

 I'm interested in writing a Windows (desktop) app to control my Panasonic allplay speaker.  Is there a regular java or .net sdk/library availiable for allplay? Or is it possible to convert the android sdk to a standard java package.

Thanks

Robin

  • Up1
  • Down0
daniel.tai Moderator
Join Date: 19 Oct 15
Location: San Jose
Posts: 32
Posted: Mon, 2016-01-25 16:06

Hi Robin,

Unfortunately, there is currently no plans for a windows version of the AllPlay SDK, unless OEMs push us to.  However, AllPlay is built on top of AllJoyn, which has a windows SDK.  More work is required on your side to discover AllPlay's AllJoyn interface and communicate.  For more information, please see AllSeen Alliance's website and download the try out AllJoyn SDK.

https://allseenalliance.org/framework/download

Thanks

Daniel

  • Up1
  • Down0
robin.keith
Join Date: 25 Jan 16
Posts: 2
Posted: Tue, 2016-01-26 13:57

Thanks, I'll check that out. Are there any plans to release the android libs as open source (or just release the source)? that would go a long way to helping build a windows allplay lib on top of alljoyn.

thanks.

R

  • Up0
  • Down0
dotMorten
Join Date: 4 Feb 16
Posts: 14
Posted: Thu, 2016-02-04 14:24

I just managed to remote-control my Gramofon AllPlay player using the AllJoyn "IoT Explorer" Microsoft has in the Windows Store.

After that it's actually a pretty easy shot to write your own player using the AllJoyn studio to auto-generate the code needed!

MSDN/Channel 9 has pretty good documentation on how here:

https://channel9.msdn.com/Blogs/Internet-of-Things-Blog/Using-the-AllJoy...

 

  • Up1
  • Down0
glennpierce
Join Date: 20 May 15
Posts: 13
Posted: Sun, 2016-02-14 12:34

So if I were to create a alljoyn app, is it possible to play a synced song to multiple speaker or a zone just using alljoyn ?

Or is Allplay click required for that.

Thanks

  • Up0
  • Down0
daniel.tai Moderator
Join Date: 19 Oct 15
Location: San Jose
Posts: 32
Posted: Mon, 2016-02-15 09:01

Hi,

Once you try out windows alljoyn and understand how it works, you should be able to see the alljoyn interface to allow you to group multiple speakers and play to a speaker.  Once the group is created, playing to the player you called the command on to play a song, and it will be synchronized to other speakers.  Synchronization is done internally, as this is proprietary.

Thanks

Daniel

  • Up0
  • Down0
dotMorten
Join Date: 4 Feb 16
Posts: 14
Posted: Mon, 2016-02-15 11:48

@daniel.tai

Is the grouping inside the net.allplay.ZoneManager interface? (ie CreateZone and SetZoneLead).

If I want to make my own AllPlay player, for instance throw a service on a raspberry pi that does essentially what the Gramofon does, how would I implement this "proprietary sync" ?

  • Up0
  • Down0
glennpierce
Join Date: 20 May 15
Posts: 13
Posted: Tue, 2016-03-15 15:01

Hi I ended up creating Python bingings for Alljoyn located at

https://github.com/glennpierce/alljoyn_python

There is also a basic app to control my allplay speakers there.

The zone is the problem due to lack of documentation.

The introspection data for the only two methods are

<method name="CreateZone">
       <arg name="slaves" type="as" direction="in"/>
       <arg name="zoneId" type="s" direction="out"/>
       <arg name="timestamp" type="i" direction="out"/>
       <arg name="slaves" type="a{si}" direction="out"/>
     </method>
 
      <method name="SetZoneLead">
       <arg name="zoneId" type="s" direction="in"/>
       <arg name="timeServerIp" type="s" direction="in"/>
       <arg name="timeServerPort" type="q" direction="in"/>
       <arg name="timestamp" type="i" direction="out"/>
     </method>
 
 
What are the strings that I pass to CreateZone for the slaves ?. I have tried the device ids but I get an error ?
Also can I just ignore the return timestamp, timeServerIp and timeServerPort
 
Thanks
  • Up0
  • Down0
daniel.tai Moderator
Join Date: 19 Oct 15
Location: San Jose
Posts: 32
Posted: Wed, 2016-03-16 10:35

Hi glennpierce,

Since you are controlling speakers, you do not need to implement SetZoneLead, this is for player only, but you are on the right track to implement CreateZone.

You are half right on putting the device id for slaves, and what you need to do is to put in the format of net.allplay.MediaPlayer.i<deviceID>.  Sorry for the lack of doc here.

Do you need to keep in mind of CreateZone's timestamp, as you don't need to parse the output slaves if the timetamp is older than the latest.  You will get a signal onZoneChanged from lead player session, which contains the same data.  This is sent to all sessions connected to the lead player.  So if you have another instance of an app somewhere, itself can also update according to the data.

Hope this helps.

Daniel

 

  • Up0
  • Down0
glennpierce
Join Date: 20 May 15
Posts: 13
Posted: Thu, 2016-03-17 07:59

Thanks Daniel

I can comfirm using IOT AllJoyn client I can set up a zone with create zone and it works :) Thank you

Unfortunatly my python client and C++ test does not. I have a couple of quick quieries 

1, Are the device ids always constant. Could they ever change ?

2, When I send the device strings using my client the speaker responds with

ER_BUS_REPLY_IS_ERROR_MESSAGE which is unknown error.

I have tried looking a any error functions but they all return empty . Do you know of anyway to get the errors. I guess it is speaker dependent ?

I am sending like this 

char* devices[2] =  { "net.allplay.MediaPlayer.i4a360b3d-95c5-4b67-9728-c2f74b875625", "net.allplay.MediaPlayer.i9f5cf275-d33a-4ae6-8c57-c39d0487be3f"};
MsgArg arg;
arg.Set("as", 2, devices);
 
The error occurs of the following MethodCal()
 
Which I think is correct. Hard to tell without a proper error reply.

 

Thanks. So close now

 

  • Up0
  • Down0
glennpierce
Join Date: 20 May 15
Posts: 13
Posted: Thu, 2016-03-17 08:45

Slight update I can get errors now. I was doing something wrong.

The error is

('org.alljoyn.Bus.Blocked', 'Remote method call blocked -- destination does not exist.  Destination = net.allplay.MediaPlayer')

Need to look in why now.

 

  • Up0
  • Down0
glennpierce
Join Date: 20 May 15
Posts: 13
Posted: Fri, 2016-03-18 11:59

Worked this out.

Works great. Thanks

  • Up0
  • Down0
glennpierce
Join Date: 20 May 15
Posts: 13
Posted: Thu, 2016-03-24 13:14

I just wanted to let people know what is possible using the Alljoyn libraries

https://github.com/glennpierce/moped is my fork of the Mopidy web frontend.

I added to the settings to allow users to chose the combination of speakers they want to play to.

Being a web interface I no longer have to mess around with mobile clients. I have Modpiy installed on my Raspberry Pi2 with Kodi so its always on and available.

By looking at my code it would be easy to create something for Windows

  • Up1
  • Down0
glennpierce
Join Date: 20 May 15
Posts: 13
Posted: Sun, 2016-04-03 04:00

Hi I had one more query about the Alljoyn API.

I have the Panaonic range of Allplay speakers ? Are they the only brand on the market ?

But the Alljoyn Signals do not work. Except the OnZoneChanged signal.

I have been try to get notifications for PlayStateChanged etc but I get nothing.

I have also tried to get it to workk with the windows program IOT Alljoyn subscribing to all the singals but

again I only see a response for OnZoneChanged.

Am I mis understanding when the other signals are sent.

I subscribe to the signals and then play stop songs to test.

May Panasonic don't implemt these ?

Thanks.

 

 

 

 

 

 

 

 

 

  • Up0
  • Down0
daniel.tai Moderator
Join Date: 19 Oct 15
Location: San Jose
Posts: 32
Posted: Mon, 2016-04-04 09:54

Hi,

There are about 20 different brands of AllPlay speakers in different parts of the world.  Panasonic only release their speakers in Europe and Japan.  I believe Bayan Audio and House of Marley may release their SKUs soon.  

As for the signal, instropection the interface of net.allplay.MediaPlayer, and you should get the list of signal to listen to.  OnZoneChanged is from net.allplay.ZoneManager, and that is different of MediaPlayer.  Please make sure you get the correct InterfaceDescription from the bus. during registeration.

Thanks

Daniel 

  • Up0
  • Down0
glennpierce
Join Date: 20 May 15
Posts: 13
Posted: Mon, 2016-04-04 15:14

Thanks

I think I figured out the problem.

 

I will look out for the new speakers. I was judging it by searching amazon (UK) for allplay and only seeing Panasonic.

 

  • Up0
  • Down0
dotMorten
Join Date: 4 Feb 16
Posts: 14
Posted: Tue, 2016-05-24 11:31

I have some .NET code for Windows 10 Universal that works with the Gramofon - I assume it should work with the other AllPlay devices too.

I've shared it here: https://github.com/dotMorten/AllPlayNet/

Still a work in progress, but most functionality is there (or easy to add the few missing calls - let me know if you want me to add something specific first).

  • Up0
  • Down0
dotMorten
Join Date: 4 Feb 16
Posts: 14
Posted: Sun, 2016-05-29 17:11

Sorry... ended up putting it in a larger alljoyn library here: https://github.com/dotMorten/AllJoynClientLib

  • Up1
  • Down0
or Register

Opinions expressed in the content posted here are the personal opinions of the original authors, and do not necessarily reflect those of Qualcomm Incorporated or its subsidiaries (“Qualcomm”). The content is provided for informational purposes only and is not meant to be an endorsement or representation by Qualcomm or any other party. This site may also provide links or references to non-Qualcomm sites and resources. Qualcomm makes no representations, warranties, or other commitments whatsoever about any non-Qualcomm sites or third-party resources that may be referenced, accessible from, or linked to this site.