Skip to main content



      Home
Home » Archived » Eclipse SmartHome » Cast Hue Bridge Exception
Cast Hue Bridge Exception [message #1429688] Tue, 23 September 2014 11:44 Go to next message
Eclipse UserFriend
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 12:24 Go to previous messageGo to next message
Eclipse UserFriend
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 14:34 Go to previous message
Eclipse UserFriend
+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: Sun Aug 31 03:57:00 EDT 2025

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

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

Back to the top