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="" ]):

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(
at org.eclipse.smarthome.core.thing.binding.BaseThingHandlerFactory.registerHandler(
at org.eclipse.smarthome.core.thing.internal.ThingManager.registerHandler(
at org.eclipse.smarthome.core.thing.internal.ThingManager.thingAdded(
at org.eclipse.smarthome.core.thing.internal.ThingRegistryImpl.notifyTrackers(
at org.eclipse.smarthome.core.thing.internal.ThingRegistryImpl.notifyListenersAboutAddedElement(
at org.eclipse.smarthome.core.thing.internal.ThingRegistryImpl.notifyListenersAboutAddedElement(
at org.eclipse.smarthome.core.common.registry.AbstractRegistry.added(
at org.eclipse.smarthome.core.common.registry.AbstractProvider.notifyListeners(
at org.eclipse.smarthome.core.common.registry.AbstractProvider.notifyListeners(
at org.eclipse.smarthome.core.common.registry.AbstractProvider.notifyListenersAboutAddedElement(

What am i missing?

Thank you in advance.
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.

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

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

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

Current Time: Tue Jun 25 10:48:28 GMT 2024

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

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

Back to the top