AllPlay binding: Looking for testers

Hi Guys,

i’m trying to get Allplay to work on OpenHab 2.1 Release - unfortunately, i get errors when starting the binding (version 2.1.0 as from remote repo)

2017-09-19 00:34:30.185 [ERROR] [org.openhab.binding.allplay         ] - [org.openhab.binding.allplay.internal.AllPlayHandlerFactory(271)] The activate method has thrown an exception
java.lang.NoClassDefFoundError: Could not initialize class de.kaizencode.tchaikovsky.AllPlay
	at org.openhab.binding.allplay.internal.AllPlayHandlerFactory.activate(AllPlayHandlerFactory.java:101)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.8.0_131]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)[:1.8.0_131]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.8.0_131]
	at java.lang.reflect.Method.invoke(Method.java:498)[:1.8.0_131]
	at org.apache.felix.scr.impl.inject.BaseMethod.invokeMethod(BaseMethod.java:224)[31:org.apache.felix.scr:2.0.6]
	at org.apache.felix.scr.impl.inject.BaseMethod.access$500(BaseMethod.java:39)[31:org.apache.felix.scr:2.0.6]
	at org.apache.felix.scr.impl.inject.BaseMethod$Resolved.invoke(BaseMethod.java:617)
	at org.apache.felix.scr.impl.inject.BaseMethod.invoke(BaseMethod.java:501)[31:org.apache.felix.scr:2.0.6]
	at org.apache.felix.scr.impl.inject.ActivateMethod.invoke(ActivateMethod.java:302)[31:org.apache.felix.scr:2.0.6]
	at org.apache.felix.scr.impl.inject.ActivateMethod.invoke(ActivateMethod.java:294)[31:org.apache.felix.scr:2.0.6]
	at org.apache.felix.scr.impl.manager.SingleComponentManager.createImplementationObject(SingleComponentManager.java:297)[31:org.apache.felix.scr:2.0.6]
	at org.apache.felix.scr.impl.manager.SingleComponentManager.createComponent(SingleComponentManager.java:108)[31:org.apache.felix.scr:2.0.6]
	at org.apache.felix.scr.impl.manager.SingleComponentManager.getService(SingleComponentManager.java:906)[31:org.apache.felix.scr:2.0.6]
	at org.apache.felix.scr.impl.manager.SingleComponentManager.getServiceInternal(SingleComponentManager.java:879)[31:org.apache.felix.scr:2.0.6]
	at org.apache.felix.scr.impl.manager.AbstractComponentManager.activateInternal(AbstractComponentManager.java:748)[31:org.apache.felix.scr:2.0.6]
	at org.apache.felix.scr.impl.manager.AbstractComponentManager.enableInternal(AbstractComponentManager.java:674)[31:org.apache.felix.scr:2.0.6]
	at org.apache.felix.scr.impl.manager.AbstractComponentManager.enable(AbstractComponentManager.java:429)[31:org.apache.felix.scr:2.0.6]
	at org.apache.felix.scr.impl.manager.ConfigurableComponentHolder.enableComponents(ConfigurableComponentHolder.java:657)[31:org.apache.felix.scr:2.0.6]
	at org.apache.felix.scr.impl.BundleComponentActivator.initialEnable(BundleComponentActivator.java:341)[31:org.apache.felix.scr:2.0.6]
	at org.apache.felix.scr.impl.Activator.loadComponents(Activator.java:403)[31:org.apache.felix.scr:2.0.6]
	at org.apache.felix.scr.impl.Activator.access$200(Activator.java:54)[31:org.apache.felix.scr:2.0.6]
	at org.apache.felix.scr.impl.Activator$ScrExtension.start(Activator.java:278)[31:org.apache.felix.scr:2.0.6]
	at org.apache.felix.utils.extender.AbstractExtender.createExtension(AbstractExtender.java:259)[31:org.apache.felix.scr:2.0.6]
	at org.apache.felix.utils.extender.AbstractExtender.modifiedBundle(AbstractExtender.java:232)[31:org.apache.felix.scr:2.0.6]
	at org.osgi.util.tracker.BundleTracker$Tracked.customizerModified(BundleTracker.java:482)[org.osgi.core-6.0.0.jar:]
	at org.osgi.util.tracker.BundleTracker$Tracked.customizerModified(BundleTracker.java:415)[org.osgi.core-6.0.0.jar:]
	at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:232)[org.osgi.core-6.0.0.jar:]
	at org.osgi.util.tracker.BundleTracker$Tracked.bundleChanged(BundleTracker.java:444)[org.osgi.core-6.0.0.jar:]
	at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:902)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
	at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
	at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
	at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEventPrivileged(EquinoxEventPublisher.java:165)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
	at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:75)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
	at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:67)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
	at org.eclipse.osgi.internal.framework.EquinoxContainerAdaptor.publishModuleEvent(EquinoxContainerAdaptor.java:102)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
	at org.eclipse.osgi.container.Module.publishEvent(Module.java:466)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
	at org.eclipse.osgi.container.Module.start(Module.java:457)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
	at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:392)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
	at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:411)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
	at org.apache.karaf.features.internal.service.FeaturesServiceImpl.startBundle(FeaturesServiceImpl.java:1287)[8:org.apache.karaf.features.core:4.0.8]
	at org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:860)[8:org.apache.karaf.features.core:4.0.8]
	at org.apache.karaf.features.internal.service.FeaturesServiceImpl.doProvision(FeaturesServiceImpl.java:1176)[8:org.apache.karaf.features.core:4.0.8]
	at org.apache.karaf.features.internal.service.FeaturesServiceImpl$1.call(FeaturesServiceImpl.java:1074)[8:org.apache.karaf.features.core:4.0.8]
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_131]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0_131]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0_131]
	at java.lang.Thread.run(Thread.java:748)[:1.8.0_131]

Would wanted to give the 2.2.0 SNAPSHOT version a try, but putting the tchaikovski.jar File from here:

into the addons directory did nothing (i uninstalled the former Bindng version before via PaperUI).

Any hints on the error or how i can get the SNAPSHOT version to run?

My openhab Server runs on a Windows 2008R2 (Windows Home Server 2011) - mostly without problems.

Thanks for any feedback!

Best regards,
Klaas

@Klaas_Mertens Did you also install Visual C++ from here?

https://www.microsoft.com/en-US/download/details.aspx?id=48145

@dominicdesu I updated to build 1039 now.

I read the docu of allplay, but I cannot find how to setup zonemembers? I cannot find the channel. In PaperUI --> Things --> My Allplay Device.

@Klaas_Mertens: Either what @Celaeno1 suggested, or the Windows version. The binding is based on a native library which has to be compiled separately for each target system and included in the binding. My guess is that the version compiled on Windows 10 should work for all other Windows versions as well, but I am not really sure.
Also, I need to specify in the binding for which Windows versions the native library should be used. Currently I am using an alias which should include Windows 2008R2, but if the suggestion by @Celaeno1 doesn’t work, I could try to add Windows 2008R2 manually to the list of supported OSes and we check again.

By the way, the tchaikovsky file is included in the binding and is used by openHAB automatically. It should normally not be necessary to install it manually.

@Celaeno1: You need to remove the speaker thing and rediscover it. Afterwards the newly added channels are visible. This is a feature/issue of openHAB.

Hi @dominicdesu

I have installed the Visual C++ as @Celaeno1 suggested - tried the 32-bit and 64-bit Version.
No luck.

The suggestion about Win2008R2 could be true - I found a lot of stuff not
working properly on Windows Home Server 2011(mosquitto for example).

Regarding the Tchaikovsky.jar - my question was around how to install a
snapshot version of your binding onto a 2.1release version of openhab.
Just copying the .jar File to the addons/ directory doesn’t do the trick.
What do I need to put into addons/ to install a snapshot version?

Thanks for your suggestions - community support is always the best support
one can get!

Best regards,
Klaas.

@Klaas_Mertens: You need to put the complete binding (org.openhab.binding.allplay-2.2.0-SNAPSHOT.jar) into the addons folder. tchaikovsky.jar is only a library used by the binding and will not work with openHAB by itself.

You can get the latest snapshot from here. However, the binding compiled for the latest openHAB 2.2.0 snapshot will probably not work for older versions (see some posts above, you can discover the speakers but not add them). Anyway, you would at least see if the strange error from the 2.1.0 binding version is gone…

1 Like

Thanks @dominicdesu!

Will try when back home tomorrow and report back - as long as the binding starts without errors, we’re one step further.

Best regards,
Klaas.

@Klaas_Mertens could you please also check if the are more errors/warnings in your log file?

There are @dominicdesu, but seems to be the same error as posted above.
Will put the full copy to pastebin and send tomorrow!

Thanks for the help - would be really great to get my Panasonic systems work with Openhab!

Best regards,
Klaas.

@dominicdesu Indeed, after I removed the speaker thing and rediscovered it, the channel “zonemembers” was available.
But how to configure this channel? I have two speakers. When I fill in e.g. “SpeakerA,SpeakerB” I get a WARNING message in karaf console. So, two speakers = two channels “zonemembers”.
Should I better fill in the following:
“zonemembers” of SpeakerA = “SpeakerB” and “zonemembers” of SpeakerB = “SpeakerA” ??

Hi @dominicdesu

unfortunately - no luck so far. :-/

Please see the full error log here: https://pastebin.com/HmUq3wde

Also tried to de-install all C++ Redistributables on the machine and install the 2017 Version from here:
https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads

Even a test with the 2.2.0 SNAPSHOT did render the same results.

Could we try the Win2008R2 Server idea?

Thanks again for all your support! Really appreciated.

Best regards,
Klaas.

@Celaeno1: You choose one speaker which should be the master of the zone. Then you set all speakers, which should be in the same zone to channel “zonemembers” of the master speaker. That’s all you need to do. To control the zone, send commands to the master speaker.
Note that you have to send the speaker names as the speaker things are named in OpenHAB.
If you still get warnings, please post them here :sunglasses:

@Klaas_Mertens: Did you restart windows after installing the redistributables? Don’t know if this actually helps, just a guess.

Anyway, seems that the native library is missing a dependency on your system. To find out, which dependency this is, you can use DependencyWalker (this is what I used to identify a similar issue).
Just open Dependency Walker, and open the alljoyn_java.dll (path from your logs: C:\openhab20\userdata\cache\org.eclipse.osgi\243\0.cp\lib\x86-64\win\alljoyn_java.dll). Loock for any file where it says “Error opening file” which does not start with API-MS-WIN or EXT-MS-WIN. If the MSVCP120.dll is missing, this would be the C++ Redistibutable.
MissingLibraries

Hi @dominicdesu,

It’s missing ‘MSJAPI.DLL’ and ‘DCOMP.DLL’ - both i couldn’t find to download anywhere.

Any suggestions here?
If not, i stop the search here and probably will switch over to Yamaha Musiccast…

Thanks all the same for your great support!

Best regards,
Klaas.

@dominicdesu Ok thanks, I’m going to test it this evening! :slight_smile:

@Klaas_Mertens: Sorry, no idea. Unfortunately it is not easy to debug dependency issues of the alljoyn native library…

@dominicdesu I tested ‘zonemembers’, It’s running now! Thanks a lot! :slight_smile:

@dominicdesu I’ve finally solved Multicast / SSDP Discovery of AllPlay devices.

Sorry for the delay.

I’ve only one issue now, OH is behind a reverse proxy (Apache) and binding is ignoring configured Callback URL, is using http://OHIP:8080, not http://OHIP/ (Configured Callback in binding)

@Void, glad to hear it’s working!
Which version of the binding do you have? The was a bug in the binding that configuration values are ignored, which has been fixed on August 23rd.
If you have a newer snapshot of the binding and still have this issue, please let me know again.

Solved, I was using an snapshot from July, after the upgrade to the lastest snapshot, everything works fine !

Thanks for all @dominicdesu !!