AllPlay binding: Looking for testers

@dominicdesu: First of all thanks a lot for the binding and the great support to get this working, i really love what all of you are doing here :slight_smile:

after my last message above i didnt check my allplay devices anymore, was playing with my Amazon Echo & Dot instead. The only thing i did was yesterday a “apt-get install openhab2” by mistake which installed the latest snapshot.

Today I wanted to test your new binding and thus logged into my openhab2 server again, a bit surprised the addons folder was empty. So i checked PaperUI, Allplay binding was not shown there, neither with a “list:bundle” in Karaf - It seems when I tried to clean up the hickup I had before i successfully uninstalled all versions of Allplay somehow, unfortunately i didnt document what exactly I did. I did shutdown and restart the VM yesterday as my QNAP needs expansion and it runs faster without virtual machines running - For this I used the “poweroff” command of the VM manager, but this should not have broken anything.

Anyway, I turned on debugging again for Allplay and Tchaikovsky, stopped openhab, deleted the logfiles in /var/log, and started openhab again. Once it was running for a bit I copied the new Allplay binding into the addons folder and started testing. As mentioned before I currently only use “EGLivingGramofon” and “EGTVGramofon”, the other two players are allways powered off. With PaperUI I was able to control EGTVGramofon, but not EGLivingGramofon, so I tried to access this one through Spotify on an iPad which worked fine - But in PaperUI still only EGTVGramofon is showing up.

I then tried to search for new Allplay things using PaperUI (hoping the “missing” one will show up online again after this), and again karaf crashed although it seems openhab restarted itself after this (about 16:17 in the log file). This time two hs_err_pid files were created (one at 16:17, the other at 16:18), I attached both as well as the openhab log file.

hs_err_pid18770.log.pdf (120.2 KB)
hs_err_pid19557.log.pdf (170.6 KB)
openhab.log.pdf (99.2 KB)

209 | Active   |  80 | 2.0.0.201701151645    | HABPanel User Interface
210 | Resolved |  80 | 2.0.0.201701151645    | openHAB Paper UI Theme Fragment, Hosts: 196
211 | Active   |  80 | 2.0.0.201701131807    | AllPlay Binding

Thanks again !

Max

Hi @Max1968, thanks for the detailed description and the log files! I’ll need some time to analyse this. The crash occurs when the disconnect method is called on the native library but I have currently no clue why. Will report back when I know more.

@Max1968, would you mind to try the updated binding once more? I have added more logging output and changed the logic a little bit. It is very difficult to see what’s going wrong in your system :-/

Here is the updated binding:
https://drive.google.com/file/d/0B5RwWQEiYx5tSlU4WWVJdjNON1U/view?usp=sharing

Would be great if you could provide the log files again after replacing/adding the binding.

Thanks, Dominic

@dominicdesu of course, glad to test “my” issue :slight_smile:
Situation before:

Allplay running,

openhab> bundle:list
START LEVEL 100 , List Threshold: 50
 ID | State    | Lvl | Version               | Name
-----------------------------------------------------------------------------------------------------
....
175 | Active   |  80 | 2.0.0.201701131807    | AllPlay Binding
....

copied over the new binding:

root@KGTec1Openhab2Server:/usr/share/openhab2/addons# ls -l
total 4168
-rw-r--r--+ 1 nobody  nogroup 4165065 Jan 13 19:07 org.openhab.binding.allplay-2.0.0-SNAPSHOT.jar
-rw-r--r--  1 openhab openhab   97792 Jan 10 14:32 org.openhab.ui.iconset.climacons-2.0.0-SNAPSHOT.jar
-rw-rw-r--  1 openhab openhab      70 Jan 20 04:26 README
root@KGTec1Openhab2Server:/usr/share/openhab2/addons# mv /tmp/org.openhab.binding.allplay-2.0.0-SNAPSHOT.jar .
root@KGTec1Openhab2Server:/usr/share/openhab2/addons# ls -l
total 4168
-rw-rw-rw-+ 1 openhab openhab 4165365 Jan 22 18:17 org.openhab.binding.allplay-2.0.0-SNAPSHOT.jar
-rw-r--r--  1 openhab openhab   97792 Jan 10 14:32 org.openhab.ui.iconset.climacons-2.0.0-SNAPSHOT.jar
-rw-rw-r--  1 openhab openhab      70 Jan 20 04:26 README
root@KGTec1Openhab2Server:/usr/share/openhab2/addons#

Karaf crashed:

19:13:11.690 [DEBUG] [org.openhab.binding.allplay         ] - BundleEvent STOPPING - org.openhab.binding.allplay
19:13:11.696 [DEBUG] [org.openhab.binding.allplay         ] - ServiceEvent UNREGISTERING - {org.eclipse.smarthome.config.discovery.DiscoveryService}={component.name=org.openhab.binding.allplay.discovery, component.id=140, service.id=266, service.bundleid=175, service.scope=bundle} - org.openhab.binding.allplay
19:13:11.700 [DEBUG] [org.openhab.binding.allplay         ] - ServiceEvent UNREGISTERING - {org.eclipse.smarthome.core.thing.binding.ThingHandlerFactory}={component.name=org.openhab.binding.allplay.internal.AllPlayHandlerFactory, component.id=141, service.id=267, service.bundleid=175, service.scope=bundle} - org.openhab.binding.allplay
19:13:11.703 [DEBUG] [org.openhab.binding.allplay         ] - ServiceEvent UNREGISTERING - {org.eclipse.smarthome.core.audio.AudioSink}={service.id=270, service.bundleid=175, service.scope=singleton} - org.openhab.binding.allplay
19:13:11.705 [INFO ] [me.event.ThingStatusInfoChangedEvent] - 'allplay:speaker:44d8a58b-4144-4a13-8533-5a5e119fdbec' changed from OFFLINE: Waiting for speaker to be discovered to UNINITIALIZED (HANDLER_MISSING_ERROR)
19:13:11.705 [DEBUG] [org.openhab.binding.allplay         ] - ServiceEvent UNREGISTERING - {org.eclipse.smarthome.core.audio.AudioSink}={service.id=271, service.bundleid=175, service.scope=singleton} - org.openhab.binding.allplay
19:13:11.706 [INFO ] [me.event.ThingStatusInfoChangedEvent] - 'allplay:speaker:5bb542e6-1198-4afb-bcd8-d91a611708f6' changed from ONLINE to UNINITIALIZED (HANDLER_MISSING_ERROR)
19:13:11.707 [DEBUG] [nding.allplay.handler.AllPlayHandler] - Disconnecting from speaker EGLivingGramofon (5bb542e6-1198-4afb-bcd8-d91a611708f6)
19:13:11.707 [DEBUG] [ovsky.discovery.SpeakerAboutListener] - SpeakerAnnouncedListener org.openhab.binding.allplay.handler.AllPlayHandler@338c5c85 has been removed
19:13:11.707 [DEBUG] [ikovsky.discovery.SpeakerBusListener] - SpeakerAnnouncedListener org.openhab.binding.allplay.handler.AllPlayHandler@338c5c85 has been removed
19:13:11.709 [DEBUG] [org.openhab.binding.allplay         ] - ServiceEvent UNREGISTERING - {org.eclipse.smarthome.core.audio.AudioSink}={service.id=268, service.bundleid=175, service.scope=singleton} - org.openhab.binding.allplay
19:13:11.714 [INFO ] [me.event.ThingStatusInfoChangedEvent] - 'allplay:speaker:4d56f675-1187-4bb2-ab40-a63b52d0c86c' changed from OFFLINE: Waiting for speaker to be discovered to UNINITIALIZED (HANDLER_MISSING_ERROR)
19:13:11.716 [DEBUG] [org.openhab.binding.allplay         ] - ServiceEvent UNREGISTERING - {org.eclipse.smarthome.core.audio.AudioSink}={service.id=269, service.bundleid=175, service.scope=singleton} - org.openhab.binding.allplay
19:13:11.722 [INFO ] [me.event.ThingStatusInfoChangedEvent] - 'allplay:speaker:e204fd21-161d-418e-ac44-438d018037e7' changed from OFFLINE: Waiting for speaker to be discovered to UNINITIALIZED (HANDLER_MISSING_ERROR)
19:13:11.725 [DEBUG] [lplay.internal.AllPlayHandlerFactory] - Deactivating AllPlayHandlerFactory
19:13:11.725 [DEBUG] [de.kaizencode.tchaikovsky.AllPlay   ] - Disconnecting from AllJoyn bus :Ct0mWUFa.3
Connection to localhost closed by remote host.
Connection to localhost closed.
pi@KGTec1Openhab2Server:~$

reconnected to Karaf, new Allplay Bundle is active:

openhab> bundle:list
START LEVEL 100 , List Threshold: 50
 ID | State    | Lvl | Version               | Name
-----------------------------------------------------------------------------------------------------
....
175 | Active   |  80 | 2.0.0.201701221717    | AllPlay Binding
....
Hosts: 197
openhab>

in PaperUI both Gramofon now show online:

I then did some basic test with the previously lost speaker, it seems to be working fine now
 will do some more testing during the next days.

logs attached - I did change the binding at about 19:13, but attached all from midnight today as there was lots of reconnects going on before which might be interesting as well.

hs_err_pid17705.log.pdf (123.4 KB)
openhab.log.pdf (277.5 KB)

Many errors after installing “Allplay binding”!!

I want to use it with my “NuPrime WR-100” Adapter and a Lenco PlayLink 4.

I installed Allplay binding yesterday (on Windows (x86) 32 bit). Now I get lots of errors:

20:38:47.271 [ERROR] [org.openhab.binding.allplay         ] - [org.openhab.binding.allplay.internal.AllPlayHandlerFactory(219)] The activate method has thrown an exception
java.lang.UnsatisfiedLinkError: C:\Openhab2\userdata\cache\org.eclipse.osgi\216\0\.cp\lib\x86\win\alljoyn_java.dll: Can't find dependent libraries
[...]
20:38:47.343 [WARN ] [org.openhab.binding.allplay         ] - FrameworkEvent WARNING - org.openhab.binding.allplay
org.osgi.framework.ServiceException: org.apache.felix.scr.impl.manager.SingleComponentManager.getService() returned a null service object
[...]
20:38:47.372 [ERROR] [org.openhab.binding.allplay         ] - [org.openhab.binding.allplay.internal.AllPlayHandlerFactory(219)] The activate method has thrown an exception
java.lang.NoClassDefFoundError: Could not initialize class de.kaizencode.tchaikovsky.AllPlay
[...]
20:38:47.415 [WARN ] [org.openhab.binding.allplay         ] - FrameworkEvent WARNING - org.openhab.binding.allplay
org.osgi.framework.ServiceException: org.apache.felix.scr.impl.manager.SingleComponentManager.getService() returned a null service object
[...]
20:38:47.419 [ERROR] [org.openhab.binding.allplay         ] - [org.openhab.binding.allplay.internal.AllPlayHandlerFactory(219)] The activate method has thrown an exception
java.lang.NoClassDefFoundError: Could not initialize class de.kaizencode.tchaikovsky.AllPlay

and so on, and so on


The alljoyn_java.dll is in above mentioned folder, but nothing else. Is this correct?

Error: “Can’t find dependent libraries” Where are these libraries located?

Is there any help for me?

Thanks a lot!

Hi @Celaeno1, which Windows are you using? (10, 8, 7
 ?)

@dominicdesu Windows 10, 32 bit

Thanks, I need to check if I can compile the 32-bit library manually. The issue can be caused if the debug version of the library has been used (https://ask.allseenalliance.org/question/1770/running-java-samples/).

@dominicdesu Ok, thank you very much! I will await your results

I tested with Windows 10, 64 bit, and Java JRE 32-bit installed --> allplay is running!
But I need it for 32-bit (both Windows and JRE)!

@dominicdesu Did you have time to check it?

@Celaeno1, I started but ran into some issues. I’ll try to provide an updated version for testing until the end of this week.

@dominicdesu Ok, That sounds good. Thank you very much.

Hi @Celaeno1,
this is a little but confusing. I found an issue in the binding regarding the 64bit version, which means the 64bit version on Windows shouldn’t be working

Anyway, I fixed this issue and also updated the 32 and 64bit native libraries to the latest version. Would you mind testing it on your 32bit machine and checking if it works? Unfortunately I only have 64bit.

Here is the link to the binding: https://drive.google.com/file/d/0B5RwWQEiYx5tOU9BNVpwRmdRN1k/view?usp=sharing

Just extract it and drop it in the addons folder. Please make sure to uninstall the old allplay binding before.

Thanks,
Dominic

@dominicdesu Thanks for your effort, but it is still not running. I get the same error!

@Celaeno1, thanks for the feedback. I have now installed a virtual machine running Windows 10 32bit and experienced the same issue as you.
It seems that the native library depends on the Microsoft “Visual C++ Redistributable fĂŒr Visual Studio 2015” (download here). After installing this package, the AllPlay binding worked in the virtual machine.
Does this resolve the issue for you? Then I would add this information to the readme of the binding.

1 Like

@dominicdesu I got it running! Thank you very much!

  1. Copied your Testing-Snapshot to addons folder
  2. Installed Visual C++ Redistributable fĂŒr Visual Studio 2015
  3. Rebooted PC

Now its running!

Should it also work with the normal binding?

@Celaeno1 yes, seems like the issue was only the missing Visual C++ libraries. On my VM it is working with the normal binding as well. I’ll update the documentation accordingly! Thanks for reporting this problem!

Thanks again for your effort. :slight_smile:

Now I finally could test the binding. Seems to be OK so far !!

But when I group two speakers (with my APP) and listen in “Party Mode” (=all playing the same source simultaneously), then only the first speaker of this group is showing all information in OH2. Control (Play/Pause, Volume/Mute) is also possible for second speaker!

Is it also possible to show (or select) grouped speakers, e.g. ‘Group’: “Speaker1 + Speaker2 + 
”?

In some APPs you can select (AUX IN) as “input source”, is it possible to add this feature?

Thank you very much!

Additional information: After uninstalling your “testing snapshot”, reinstalling “normal allplay binding” and reinstalling “Visual C++ Redistr
” I got the same error again!
Now I’m using your “testing snapshot” again. It’s running!

Yes the multiroom functionality is not yet implemented/defined. This would be the next step in the implementation after the issue with the Gramophon speakers is resolved.

That depends if the input source is included in the AllJoyn/AllPlay protocol or if some vendor-specific approach is used. I haven’t found this option yet in the AllPlay protocol and unfortunately there is very few documentation freely available. If somebody knows the method I need to call in order to change the input I’d be happy to implement it


Strange, I tested it in my VM with the “official” binding and it seemed to work. Anyhow, I made a PR which has been merged 3 days ago with the same changes as I did in the testing snapshot. So, if you download the latest version from the addon repository now, it should be the one with the latest libraries.