Sonos binding

650 views
Skip to first unread message

tre...@gmail.com

unread,
Oct 15, 2012, 5:39:24 AM10/15/12
to ope...@googlegroups.com
Hello,

I looked at the respository and I noticed that there was a sonos binding in one of the branches.

Is this binding working? Any place I can download the package without building it?

Thanks

Thomas Eichstädt-Engelen

unread,
Oct 15, 2012, 7:22:06 AM10/15/12
to ope...@googlegroups.com
Hi,


> I looked at the respository and I noticed that there was a sonos binding in one of the branches.

yes, you can find it on the 1.1-sonos feature-branch.

> Is this binding working?

AFAIK, yes!

> Any place I can download the package without building it?

No, once it is merged into the default branch it will be available through our CI-Build (https://openhab.ci.cloudbees.com/job/openHAB/). There will be an announcement on the newsgroup as soon it is available.

Regards,

Thomas E.-E.

tre...@gmail.com

unread,
Oct 15, 2012, 12:38:59 PM10/15/12
to ope...@googlegroups.com
OK, thanks.

I tried building it in Eclipse but got an error:
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation

Do you know what the problem could be?

C

tre...@gmail.com

unread,
Oct 15, 2012, 1:50:29 PM10/15/12
to ope...@googlegroups.com, tre...@gmail.com
Reinstalled the total package and everything was solved - Thanks!

C

Karel Goderis

unread,
Oct 15, 2012, 2:06:49 PM10/15/12
to ope...@googlegroups.com
Hi

Bear in mind that the sonos binding in the main repository is not the same as the one you can find in my clone. The one in the clone is fully functional in the sense that I had to make some changes after the integration into the main repository to make things compile as it should. The error you get here below is not the one I fixed, but I thing you can ignore it

Karel

--
You received this message because you are subscribed to the Google Groups "openhab" group.
To view this discussion on the web visit https://groups.google.com/d/msg/openhab/-/xDLm09W3DPwJ.
To post to this group, send email to ope...@googlegroups.com.
To unsubscribe from this group, send email to openhab+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/openhab?hl=en.

tre...@gmail.com

unread,
Oct 15, 2012, 3:39:15 PM10/15/12
to ope...@googlegroups.com, tre...@gmail.com
OK, I tried building this from the 1.1 sonos branch and got 4 errors on missing xml files.

Also I noticed this in the pom.xml file
  <properties>
  <bundle.symbolicName>org.openhab.binding.snmp</bundle.symbolicName>
  <bundle.namespace>org.openhab.binding.snmp</bundle.namespace>
  </properties>

Should this be .sonos?

How can I build from your clone?

C

tre...@gmail.com

unread,
Nov 12, 2012, 10:10:58 AM11/12/12
to ope...@googlegroups.com, tre...@gmail.com
Hello,

I tried buliding this binding from your clone but receives multiple errors when i try to do a mvn clean install in the directory.
Any chance you could lead me into the right track or send me the binding?

Error:
[ERROR] Cannot resolve project dependencies:
[ERROR]   Software being installed: org.openhab.binding.sonos 1.1.0.qualifier
[ERROR]   Missing requirement: org.openhab.binding.sonos 1.1.0.qualifier require
s 'bundle org.apache.httpcomponents.httpcore 0.0.0' but it could not be found
[ERROR]

Karel Goderis

unread,
Nov 12, 2012, 10:17:22 AM11/12/12
to ope...@googlegroups.com
Hi 

I am not a Maven expert, do I not really know how to solve that. Apache Http Core is effectively needed, I think that in Eclipse I used/modified the Yoxos configurator to include it (don't really remember honestly, has been a long time)

K

--
You received this message because you are subscribed to the Google Groups "openhab" group.
To view this discussion on the web visit https://groups.google.com/d/msg/openhab/-/PH_jJx9-K1AJ.

Thomas Eichstädt-Engelen

unread,
Nov 12, 2012, 10:17:39 AM11/12/12
to ope...@googlegroups.com
could you try to start the build in the topmost directory?


tre...@gmail.com

unread,
Nov 12, 2012, 10:42:08 AM11/12/12
to ope...@googlegroups.com
Get error on the topmost directory too...

[INFO] Scanning for projects...
[INFO] Computing target platform for MavenProject: org.openhab.binding:org.openh
ab.binding.bluetooth:1.1.0-SNAPSHOT @ C:\Users\chtr\OpenHab\karelgoderis-contrib
2\bundles\binding\org.openhab.binding.bluetooth\pom.xml
[ERROR] Internal error: java.lang.RuntimeException: Failed to resolve target def
inition C:\Users\chtr\OpenHab\karelgoderis-contrib2\targetplatform\openhab.targe
t: includeAllPlatforms='true' and includeMode='planner' are incompatible. -> [He
lp 1]
org.apache.maven.InternalErrorException: Internal error: java.lang.RuntimeExcept
ion: Failed to resolve target definition C:\Users\chtr\OpenHab\karelgoderis-cont
rib2\targetplatform\openhab.target
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:168)
        at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Laun
cher.java:290)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.jav
a:230)
        at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(La
uncher.java:409)
        at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:
352)
Caused by: java.lang.RuntimeException: Failed to resolve target definition C:\Us
ers\chtr\OpenHab\karelgoderis-contrib2\targetplatform\openhab.target
        at org.eclipse.tycho.p2.resolver.P2TargetPlatformResolver.addTargetFileC
ontentToTargetPlatform(P2TargetPlatformResolver.java:409)
        at org.eclipse.tycho.p2.resolver.P2TargetPlatformResolver.computeTargetP
latform(P2TargetPlatformResolver.java:222)
        at org.eclipse.tycho.core.resolver.DefaultTychoDependencyResolver.resolv
eProject(DefaultTychoDependencyResolver.java:89)
        at org.eclipse.tycho.core.maven.TychoMavenLifecycleParticipant.afterProj
ectsRead(TychoMavenLifecycleParticipant.java:64)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:274)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
        ... 11 more
Caused by: org.eclipse.tycho.p2.target.facade.TargetDefinitionResolutionExceptio
n: includeAllPlatforms='true' and includeMode='planner' are incompatible.
        at org.eclipse.tycho.p2.target.TargetDefinitionResolver.getPlannerResolu
tionStrategy(TargetDefinitionResolver.java:181)
        at org.eclipse.tycho.p2.target.TargetDefinitionResolver.getResolutionStr
ategy(TargetDefinitionResolver.java:150)
        at org.eclipse.tycho.p2.target.TargetDefinitionResolver.resolveContent(T
argetDefinitionResolver.java:129)
        at org.eclipse.tycho.p2.target.TargetDefinitionResolverService.resolveFr
omArguments(TargetDefinitionResolverService.java:63)
        at org.eclipse.tycho.p2.target.TargetDefinitionResolverService.getTarget
DefinitionContent(TargetDefinitionResolverService.java:53)
        at org.eclipse.tycho.p2.target.TargetPlatformBuilderImpl.addTargetDefini
tion(TargetPlatformBuilderImpl.java:281)
        at org.eclipse.tycho.p2.resolver.P2TargetPlatformResolver.addTargetFileC
ontentToTargetPlatform(P2TargetPlatformResolver.java:404)
        ... 16 more
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
ch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please rea
d the following articles:
xception

Thomas Eichstädt-Engelen

unread,
Nov 12, 2012, 10:46:27 AM11/12/12
to ope...@googlegroups.com
* does the maven installation which is used have internet access?
* do you use at least maven 3.0.4


To view this discussion on the web visit https://groups.google.com/d/msg/openhab/-/ebaKA8AkXlkJ.

tre...@gmail.com

unread,
Nov 12, 2012, 10:54:43 AM11/12/12
to ope...@googlegroups.com
Tried changing the includemode in the targetplatform from planner to slicer and it has started building now.
Will this work?

on your question yes to both...

C:\Users\chtr>mvn -v
Apache Maven 3.0.4 (r1232337; 2012-01-17 09:44:56+0100)
Maven home: C:\Program Files (x86)\Maven\bin\..
Java version: 1.7.0_07, vendor: Oracle Corporation
Java home: C:\Program Files\Java\jre7
Default locale: en_US, platform encoding: Cp1252
OS name: "windows 7", version: "6.1", arch: "amd64", family: "windows"
C:\Users\chtr>ping google.com

Pinging google.com [173.194.32.33] with 32 bytes of data:
Reply from 173.194.32.33: bytes=32 time=46ms TTL=55
Reply from 173.194.32.33: bytes=32 time=43ms TTL=55

Ping statistics for 173.194.32.33:
    Packets: Sent = 2, Received = 2, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 43ms, Maximum = 46ms, Average = 44ms

Thomas Eichstädt-Engelen

unread,
Nov 12, 2012, 10:56:14 AM11/12/12
to ope...@googlegroups.com
to be honest: no idea :-)

let's see what happens ...


To view this discussion on the web visit https://groups.google.com/d/msg/openhab/-/VdE4GkPy6GcJ.

Kai Kreuzer

unread,
Nov 12, 2012, 11:00:46 AM11/12/12
to ope...@googlegroups.com
You said that you try building it from Karels clone. Are you aware that there is also already a feature branch in the official repo?
I cannot guarantee that this is building any better, though. But if you have a few days more time, you can should wait. When Devoxx is over, I plan to review the code and merge it to the default branch so that the Sonos binding will be available in the CI build.

Regards,
Kai

tre...@gmail.com

unread,
Nov 12, 2012, 11:06:07 AM11/12/12
to ope...@googlegroups.com
OK...


It builded with success now but the binding was not included in the zip file but I found it in the filestructure...

Will try later the binding later today!

Thanks for your help!

C

tre...@gmail.com

unread,
Nov 12, 2012, 4:08:53 PM11/12/12
to ope...@googlegroups.com, tre...@gmail.com
OK,

The entire program build with success now but when I try to add the sonos binding to the addons directory nothing happens.
This is the case both with the clone from karels clone and the "official" branch.

Any ideas?

C

Karel Goderis

unread,
Nov 13, 2012, 2:29:17 PM11/13/12
to ope...@googlegroups.com
Hi

What did you change to make it work? I tried to replicate your initial problem and I have the same issue in a "clean" copy of the official repository. That's strange, because even when switching to the Sonos branch yields me the same problem. I do not really get it, as  last time I provided a patch to the target platform definition files so that the Apache bundles would be included. Reloading the target platform definition does not solve the problem... Strange.

K

To view this discussion on the web visit https://groups.google.com/d/msg/openhab/-/VCOg0c1GPl0J.

Karel Goderis

unread,
Nov 13, 2012, 2:30:16 PM11/13/12
to ope...@googlegroups.com
Can you post some log info? your .cfg or items definition?

You should see at least the Cling lib load during OH initialisation.

Karel

To view this discussion on the web visit https://groups.google.com/d/msg/openhab/-/9ZWWxR_rtacJ.

tre...@gmail.com

unread,
Nov 14, 2012, 4:09:01 AM11/14/12
to ope...@googlegroups.com
Hello,

As told in an earlier post I had to change the target platform to slicer to get it to compile correctly - no idea what it does but it works!

No entries in openhab.cfg but I tried with sonos:"Kitchen",udn=[RINCON_000E########01400] (got udn from http://sonosip:1400/status/topology)

In the items I tried all three entries that was listed in the wiki:
Switch ledstatus              "LedStatus"       (Sonos) {sonos="<[ON:RINCON_000E########01400:led], <[OFF:RINCON_000E########01400:led]" autoupdate="false"}
String currenttrack           "CurrentTrack"    (Sonos) {sonos="<[RINCON_000E########01400:currenttrack]" autoupdate="false"}
String radiostation           "RadioStation"    (Sonos) {sonos=">[RINCON_000E########01400:radio]" autoupdate="false"}

and

Switch ledstatus              "LedStatus"       (Sonos) {sonos="<[ON:Kitchen:led], <[OFF:Kitchen:led]" autoupdate="false"}
String currenttrack           "CurrentTrack"    (Sonos) {sonos="<[Kitchen:currenttrack]" autoupdate="false"}
String radiostation           "RadioStation"    (Sonos) {sonos=">[Kitchen:radio]" autoupdate="false"}


No traces AT ALL of the sonos initialization when I run start_debug.sh

C

tre...@gmail.com

unread,
Nov 19, 2012, 11:19:19 AM11/19/12
to ope...@googlegroups.com, tre...@gmail.com
Hello,

Did you manage to build the binding correctly?

C

Karel Goderis

unread,
Nov 19, 2012, 11:24:13 AM11/19/12
to ope...@googlegroups.com
It does compile and work in my development clone. I need to further investigate the matter using a new clone of the main repository

K

Sent from my iPhone
To view this discussion on the web visit https://groups.google.com/d/msg/openhab/-/O6mRFUY9Gz4J.

Kai Kreuzer

unread,
Nov 19, 2012, 5:01:53 PM11/19/12
to ope...@googlegroups.com
Not yet, will do so once Karel has finished incorporating my review comments.

Regards,
Kai

To view this discussion on the web visit https://groups.google.com/d/msg/openhab/-/O6mRFUY9Gz4J.

tre...@gmail.com

unread,
Nov 20, 2012, 11:19:23 AM11/20/12
to ope...@googlegroups.com, k...@openhab.org
Hello,

Looks like the new Joda time implementation kind of destroyed the build.

Just a heads up if you was not aware of it.

[ERROR] Failed to execute goal org.eclipse.tycho:tycho-compiler-plugin:0.15.0:compile (default-compile) on project org.openhab.binding.sonos: Compilation failure: Compilation failure:
[ERROR] C:\Users\chtr\OpenHab_sonos_new\openhab\bundles\binding\org.openhab.binding.sonos\src\main\java\org\openhab\binding\sonos\internal\SonosZonePlayer.java:[1040,0]
[ERROR] if(this.isUpdatedValue("StationID", newValue) || lastOPMLQuery ==null || lastOPMLQuery.plusMinutes(1).isBeforeNow()) {
[ERROR] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[ERROR] Access restriction: The method isBeforeNow() from the type AbstractInstant is not accessible due to restriction on classpath entry C:\Users\chtr\OpenHab_sonos_new\openhab\bundles\core\org.open
hab.core.persistence\lib\joda-time-2.1.jar
[ERROR] C:\Users\chtr\OpenHab_sonos_new\openhab\bundles\binding\org.openhab.binding.sonos\src\main\java\org\openhab\binding\sonos\internal\SonosZonePlayer.java:[1429,0]
[ERROR] if(anAlarm.getStartTime().isBefore(currentDateTime.plus(shortestDuration)) && anAlarm.getRoomUUID().equals(udn.getIdentifierString())) {
[ERROR] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[ERROR] Access restriction: The method isBefore(ReadableInstant) from the type AbstractInstant is not accessible due to restriction on classpath entry C:\Users\chtr\OpenHab_sonos_new\openhab\bundles\c
ore\org.openhab.core.persistence\lib\joda-time-2.1.jar
[ERROR] 2 problems (2 errors)
[ERROR] -> [Help 1]

Karel Goderis

unread,
Nov 20, 2012, 12:50:54 PM11/20/12
to ope...@googlegroups.com, k...@openhab.org
Mmhh... it looks more like a libpath problem to me. But I will check when I find some time 

To view this discussion on the web visit https://groups.google.com/d/msg/openhab/-/89yUFOCoko0J.

Kai Kreuzer

unread,
Nov 20, 2012, 4:43:58 PM11/20/12
to ope...@googlegroups.com
Hi,

I have just merged the Sonos branch to the default branch, so that it is now available in our nightly build.

Let's touch wood that this build is green: https://openhab.ci.cloudbees.com/job/openHAB/312/
Please check if the result works as expected - I cannot test it myself as I am lacking the hardware :-)

Regards,
Kai

Karel Goderis

unread,
Nov 21, 2012, 5:07:23 AM11/21/12
to ope...@googlegroups.com
It's green ;-)

Will check functionality asap

Karel

tre...@gmail.com

unread,
Nov 21, 2012, 5:38:12 AM11/21/12
to ope...@googlegroups.com
Yip, its green!

Tried adding the binding to my installation but no signs of startup...

11:37:16.786 INFO  o.q.impl.StdSchedulerFactory[:1310] - Quartz scheduler version: 2.1.5
11:37:16.788 INFO  o.quartz.core.QuartzScheduler[:534] - Scheduler openHAB-job-scheduler_$_NON_CLUSTERED started.
11:37:16.893 DEBUG o.o.p.r.i.RRD4jActivator[:51] - RRD4j persistence bundle has been started.
11:37:16.905 DEBUG o.o.b.c.i.ConfigAdminActivator[:51] - ConfigAdmin binding has been started.
11:37:17.018 DEBUG o.o.b.k.internal.KNXActivator[:51] - KNX binding has been started.
11:37:17.038 DEBUG o.o.b.e.internal.ExecActivator[:51] - Exec binding has been started.
11:37:17.206 DEBUG o.o.p.d.internal.Db4oActivator[:45] - db4o persistence bundle has been started.
11:37:17.232 DEBUG o.o.b.h.internal.HttpActivator[:54] - HTTP binding has been started.
11:37:17.255 DEBUG o.o.b.n.internal.NtpActivator[:51] - NTP binding has been started.
11:37:17.307 DEBUG o.o.p.s.i.SenseActivator[:51] - Open.Sen.se persistence bundle has been started.
osgi> 11:37:17.404 DEBUG o.o.p.l.i.LoggingPersistenceActivator[:51] - Logging persistence bundle has been started.

Thomas Eichstädt-Engelen

unread,
Nov 21, 2012, 5:46:30 AM11/21/12
to ope...@googlegroups.com
is the binding installed correctly?

please type "ss sonos" at OSGi-console

The status of the bundle should be "Active". If not, try to start it
with "start <bundleid>"

Regards,

Thomas E.-E.



2012/11/21 <tre...@gmail.com>:
> https://groups.google.com/d/msg/openhab/-/WHya4zP_MbYJ.

Karel Goderis

unread,
Nov 21, 2012, 6:16:39 AM11/21/12
to ope...@googlegroups.com
Just made a new clone from the latest repo, did all the necessary steps to set up according to Wiki, did not change config files : Sonos binding starts up without problem.

Do you see items related to Cling in the logs?

K

To view this discussion on the web visit https://groups.google.com/d/msg/openhab/-/WHya4zP_MbYJ.

tre...@gmail.com

unread,
Nov 21, 2012, 6:19:41 AM11/21/12
to ope...@googlegroups.com
Hmm,

Did you use the build from jenkins or did you build it yourself?

C

Karel Goderis

unread,
Nov 21, 2012, 8:14:47 AM11/21/12
to ope...@googlegroups.com
Build myself in Eclipse

To view this discussion on the web visit https://groups.google.com/d/msg/openhab/-/D-5z6pCMCIYJ.

tre...@gmail.com

unread,
Nov 21, 2012, 8:30:01 AM11/21/12
to ope...@googlegroups.com
OK, tried to do the same but it wont startup.
All other bindings starts just perfect!

Any clue where to go from here?

C

Karel Goderis

unread,
Nov 21, 2012, 8:32:45 AM11/21/12
to ope...@googlegroups.com
Nope - not really. 
You copied the main repo or my clone? (I made some changes in my clone so that the binding would NOT startup if no config item)
Is is checked in the Run Configurations?

K

To view this discussion on the web visit https://groups.google.com/d/msg/openhab/-/Yz5DkfP76GYJ.

tre...@gmail.com

unread,
Nov 21, 2012, 5:04:58 PM11/21/12
to ope...@googlegroups.com
yip - finally got it to work - Thanks!

It works within the IDE enviroment but not when Im trying to run it from the raspberry pi.

C

Kai Kreuzer

unread,
Nov 24, 2012, 4:56:32 PM11/24/12
to ope...@googlegroups.com
Hi,

I have just tested this - the distribution zip indeed did not work as the Apache http libraries were missing in it (and hence the Sonos binding failed to start up).

So the next build should hopefully work with Sonos.

Regards,
Kai


To view this discussion on the web visit https://groups.google.com/d/msg/openhab/-/mWEboEVXlAkJ.

tre...@gmail.com

unread,
Nov 25, 2012, 3:33:34 PM11/25/12
to ope...@googlegroups.com, k...@openhab.org
Built it from source now and it starts up in my raspberry pi!

Still working within IDE environment!

However on the PI it fails on a java error

21:28:58.464 ERROR OSGi[:98] - An unexpected runtime error has occurred.
org.osgi.service.component.ComponentException: Exception occurred while creating new instance of component Component[
        name = org.openhab.binding.sonos
        activate = activate
        deactivate = deactivate
        modified =
        configuration-policy = optional
        factory = null
        autoenable = true
        immediate = false
        implementation = org.openhab.binding.sonos.internal.SonosBinding
        state = Unsatisfied
        properties = {event.topics=openhab/*, service.pid=org.openhab.sonos}
        serviceFactory = false
        serviceInterface = [org.osgi.service.cm.ManagedService, org.osgi.service.event.EventHandler]
        references = {
                Reference[name = EventPublisher, interface = org.openhab.core.events.EventPublisher, policy = dynamic, cardinality = 1..1, target = null, bind = setEventPublisher, unbind = unsetEventPublisher]
                Reference[name = ItemRegistry, interface = org.openhab.core.items.ItemRegistry, policy = dynamic, cardinality = 1..1, target = null, bind = setItemRegistry, unbind = unsetItemRegistry]
                Reference[name = SonosBindingProvider, interface = org.openhab.binding.sonos.SonosBindingProvider, policy = dynamic, cardinality = 1..n, target = null, bind = addBindingProvider, unbind = removeBindingProvider]
        }
        located in bundle = org.openhab.binding.sonos_1.1.0.201211242316 [231]
]
        at org.eclipse.equinox.internal.ds.model.ServiceComponent.createInstance(ServiceComponent.java:495)
        at org.eclipse.equinox.internal.ds.model.ServiceComponentProp.createInstance(ServiceComponentProp.java:272)
        at org.eclipse.equinox.internal.ds.model.ServiceComponentProp.build(ServiceComponentProp.java:333)
        at org.eclipse.equinox.internal.ds.InstanceProcess.buildComponent(InstanceProcess.java:620)
        at org.eclipse.equinox.internal.ds.ServiceReg.getService(ServiceReg.java:53)
        at org.eclipse.osgi.internal.serviceregistry.ServiceUse$1.run(ServiceUse.java:141)
        at java.security.AccessController.doPrivileged(Native Method)
        at org.eclipse.osgi.internal.serviceregistry.ServiceUse.getService(ServiceUse.java:139)
        at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.getService(ServiceRegistrationImpl.java:468)
        at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.getService(ServiceRegistry.java:467)
        at org.eclipse.osgi.framework.internal.core.BundleContextImpl.getService(BundleContextImpl.java:594)
Caused by: java.lang.NoClassDefFoundError: org/teleal/cling/registry/RegistryListener
        at java.lang.Class.getDeclaredConstructors0(Native Method)
        at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389)
        at java.lang.Class.getConstructor0(Class.java:2699)
        at java.lang.Class.newInstance0(Class.java:326)
        at java.lang.Class.newInstance(Class.java:308)
        at org.eclipse.equinox.internal.ds.model.ServiceComponent.createInstance(ServiceComponent.java:493)
        at org.eclipse.equinox.internal.ds.model.ServiceComponentProp.createInstance(ServiceComponentProp.java:272)
        at org.eclipse.equinox.internal.ds.model.ServiceComponentProp.build(ServiceComponentProp.java:333)
        at org.eclipse.equinox.internal.ds.InstanceProcess.buildComponent(InstanceProcess.java:620)
        at org.eclipse.equinox.internal.ds.ServiceReg.getService(ServiceReg.java:53)
        at org.eclipse.osgi.internal.serviceregistry.ServiceUse$1.run(ServiceUse.java:141)
Caused by: java.lang.ClassNotFoundException: org.teleal.cling.registry.RegistryListener
        at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:501)
        at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:421)
        at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:412)
        at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
        at java.lang.Class.getDeclaredConstructors0(Native Method)
        at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389)
        at java.lang.Class.getConstructor0(Class.java:2699)
        at java.lang.Class.newInstance0(Class.java:326)
        at java.lang.Class.newInstance(Class.java:308)
21:28:58.643 ERROR OSGi[:98] - FrameworkEvent ERROR
org.osgi.framework.ServiceException: Exception in org.eclipse.equinox.internal.ds.ServiceReg.getService()
        at org.eclipse.osgi.internal.serviceregistry.ServiceUse.getService(ServiceUse.java:151)
        at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.getService(ServiceRegistrationImpl.java:468)
        at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.getService(ServiceRegistry.java:467)
        at org.eclipse.osgi.framework.internal.core.BundleContextImpl.getService(BundleContextImpl.java:594)
        at org.eclipse.equinox.internal.cm.ManagedServiceTracker.addingService(ManagedServiceTracker.java:65)
        at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:932)
        at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:1)
        at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256)
        at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:229)
        at org.osgi.util.tracker.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:894)
        at org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:107)
Caused by: org.osgi.service.component.ComponentException: Exception occurred while creating new instance of component Component[
        name = org.openhab.binding.sonos
        activate = activate
        deactivate = deactivate
        modified =
        configuration-policy = optional
        factory = null
        autoenable = true
        immediate = false
        implementation = org.openhab.binding.sonos.internal.SonosBinding
        state = Unsatisfied
        properties = {event.topics=openhab/*, service.pid=org.openhab.sonos}
        serviceFactory = false
        serviceInterface = [org.osgi.service.cm.ManagedService, org.osgi.service.event.EventHandler]
        references = {
                Reference[name = EventPublisher, interface = org.openhab.core.events.EventPublisher, policy = dynamic, cardinality = 1..1, target = null, bind = setEventPublisher, unbind = unsetEventPublisher]
                Reference[name = ItemRegistry, interface = org.openhab.core.items.ItemRegistry, policy = dynamic, cardinality = 1..1, target = null, bind = setItemRegistry, unbind = unsetItemRegistry]
                Reference[name = SonosBindingProvider, interface = org.openhab.binding.sonos.SonosBindingProvider, policy = dynamic, cardinality = 1..n, target = null, bind = addBindingProvider, unbind = removeBindingProvider]
        }
        located in bundle = org.openhab.binding.sonos_1.1.0.201211242316 [231]
]
        at org.eclipse.equinox.internal.ds.model.ServiceComponent.createInstance(ServiceComponent.java:495)
        at org.eclipse.equinox.internal.ds.model.ServiceComponentProp.createInstance(ServiceComponentProp.java:272)
        at org.eclipse.equinox.internal.ds.model.ServiceComponentProp.build(ServiceComponentProp.java:333)
        at org.eclipse.equinox.internal.ds.InstanceProcess.buildComponent(InstanceProcess.java:620)
        at org.eclipse.equinox.internal.ds.ServiceReg.getService(ServiceReg.java:53)
        at org.eclipse.osgi.internal.serviceregistry.ServiceUse$1.run(ServiceUse.java:141)
        at java.security.AccessController.doPrivileged(Native Method)
        at org.eclipse.osgi.internal.serviceregistry.ServiceUse.getService(ServiceUse.java:139)
        at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.getService(ServiceRegistrationImpl.java:468)
        at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.getService(ServiceRegistry.java:467)
        at org.eclipse.osgi.framework.internal.core.BundleContextImpl.getService(BundleContextImpl.java:594)
Caused by: java.lang.NoClassDefFoundError: org/teleal/cling/registry/RegistryListener
        at java.lang.Class.getDeclaredConstructors0(Native Method)
        at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389)
        at java.lang.Class.getConstructor0(Class.java:2699)
        at java.lang.Class.newInstance0(Class.java:326)
        at java.lang.Class.newInstance(Class.java:308)
        at org.eclipse.equinox.internal.ds.model.ServiceComponent.createInstance(ServiceComponent.java:493)
        at org.eclipse.equinox.internal.ds.model.ServiceComponentProp.createInstance(ServiceComponentProp.java:272)
        at org.eclipse.equinox.internal.ds.model.ServiceComponentProp.build(ServiceComponentProp.java:333)
        at org.eclipse.equinox.internal.ds.InstanceProcess.buildComponent(InstanceProcess.java:620)
        at org.eclipse.equinox.internal.ds.ServiceReg.getService(ServiceReg.java:53)
        at org.eclipse.osgi.internal.serviceregistry.ServiceUse$1.run(ServiceUse.java:141)
Caused by: java.lang.ClassNotFoundException: org.teleal.cling.registry.RegistryListener
        at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:501)
        at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:421)
        at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:412)
        at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
        at java.lang.Class.getDeclaredConstructors0(Native Method)
        at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389)
        at java.lang.Class.getConstructor0(Class.java:2699)
        at java.lang.Class.newInstance0(Class.java:326)
        at java.lang.Class.newInstance(Class.java:308)
21:29:11.946 DEBUG o.o.b.s.i.SonosActivator[:68] - Sonos binding bundle has been stopped.

Pali

unread,
Nov 28, 2012, 3:49:21 PM11/28/12
to ope...@googlegroups.com, tre...@gmail.com
Hi,

I tried to run Sonos binding on IDE environment, but I got error "Bundle 'org.apache.httpcomponents.httpclient' cannot be resolved". Similar errors are also on dropbox binding (No available bundle exports package 'org.apache.X'). 

I also tried Sonos binding from latest nightly build (#318). 

22:25:44.340 ERROR o.o.m.c.i.f.FolderObserver[:125] - An unexpected exception has occured
java.lang.IllegalArgumentException: cannot find sonosCommandType for 'play'
at org.openhab.binding.sonos.SonosCommandType.getCommandType(SonosCommandType.java:626)

My item config:
Switch sonostest  "Sonos test"    (Sonos) {sonos=">[ON:RINCON_000E5855BBB201400:play], >[OFF:RINCON_000E5855BBB201400:stop]"}

Any ideas?

Br,
Pauli

tre...@gmail.com

unread,
Nov 28, 2012, 4:02:00 PM11/28/12
to ope...@googlegroups.com, tre...@gmail.com
Hello,

Try replacing the > with * on both the play and stop command.

C

Thomas Eichstädt-Engelen

unread,
Nov 28, 2012, 5:37:56 PM11/28/12
to ope...@googlegroups.com
will look into it tomorrow ...

- sent from a mobile device -
--
You received this message because you are subscribed to the Google Groups "openhab" group.
To view this discussion on the web visit https://groups.google.com/d/msg/openhab/-/GrIdOywI71cJ.

Kai Kreuzer

unread,
Nov 29, 2012, 2:49:53 PM11/29/12
to ope...@googlegroups.com
The libs folder was missing from the binary build, that's the reason for the problem below.
I have added this and the next build should hopefully work just the same way as from the IDE.

Regards,
Kai

To view this discussion on the web visit https://groups.google.com/d/msg/openhab/-/BMUB1W88Dn4J.
Reply all
Reply to author
Forward
0 new messages