Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Eclipse SmartHome » Cast Hue Bridge Exception
Cast Hue Bridge Exception [message #1429688] Tue, 23 September 2014 15:44 Go to next message
Pedro Girão is currently offline Pedro GirãoFriend
Messages: 6
Registered: September 2014
Junior Member
Hello all,

I am using the Hue Binding as an example to better understand how to develop a binding, however i get the following exception when i declare a Hue Bridge in the .things (like this: hue:bridge:home [ ipAddress="1.2.3.4" ]):

16:38:36.796 ERROR o.e.s.c.t.i.ThingManager[:297] - Exception occured while calling handler: org.eclipse.smarthome.core.thing.internal.ThingImpl cannot be cast to org.eclipse.smarthome.core.thing.Bridge
java.lang.ClassCastException: org.eclipse.smarthome.core.thing.internal.ThingImpl cannot be cast to org.eclipse.smarthome.core.thing.Bridge
at org.eclipse.smarthome.binding.hue.internal.factory.HueThingHandlerFactory.createHandler(HueThingHandlerFactory.java:86)
at org.eclipse.smarthome.core.thing.binding.BaseThingHandlerFactory.registerHandler(BaseThingHandlerFactory.java:95)
at org.eclipse.smarthome.core.thing.internal.ThingManager.registerHandler(ThingManager.java:295)
at org.eclipse.smarthome.core.thing.internal.ThingManager.thingAdded(ThingManager.java:222)
at org.eclipse.smarthome.core.thing.internal.ThingRegistryImpl.notifyTrackers(ThingRegistryImpl.java:142)
at org.eclipse.smarthome.core.thing.internal.ThingRegistryImpl.notifyListenersAboutAddedElement(ThingRegistryImpl.java:75)
at org.eclipse.smarthome.core.thing.internal.ThingRegistryImpl.notifyListenersAboutAddedElement(ThingRegistryImpl.java:1)
at org.eclipse.smarthome.core.common.registry.AbstractRegistry.added(AbstractRegistry.java:42)
at org.eclipse.smarthome.core.common.registry.AbstractProvider.notifyListeners(AbstractProvider.java:42)
at org.eclipse.smarthome.core.common.registry.AbstractProvider.notifyListeners(AbstractProvider.java:61)
at org.eclipse.smarthome.core.common.registry.AbstractProvider.notifyListenersAboutAddedElement(AbstractProvider.java:65)

What am i missing?

Thank you in advance.
Regards,
Pedro G.
Re: Cast Hue Bridge Exception [message #1429709 is a reply to message #1429688] Tue, 23 September 2014 16:24 Go to previous messageGo to next message
Kai Kreuzer is currently offline Kai KreuzerFriend
Messages: 673
Registered: December 2011
Senior Member
you need to put the "Bridge" keyword at the beginning of the line in your things file. The DSL parser is not clever enough to check whether a thingTypeUID is a bridge or a thing, that's why you have to manually mark it.

Regards,
Kai
Re: Cast Hue Bridge Exception [message #1431469 is a reply to message #1429709] Thu, 25 September 2014 18:34 Go to previous message
Karel Goderis is currently offline Karel GoderisFriend
Messages: 198
Registered: March 2014
Senior Member
+1

Just spent the last hour or so trying out to figure the same

That being said, in the DSL, how do you couple Things to a defined Bridge?

Maybe it is worthwhile to post the complete .things for the Hue binding with lamps defined in the DSL and not sourced from the Discovery process

Karel
Previous Topic:Not able to setup smartHome from sources
Next Topic:Flow for creating Things and ThingHandlers
Goto Forum:
  


Current Time: Sat Jul 27 09:08:35 GMT 2024

Powered by FUDForum. Page generated in 0.03402 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top