Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Eclipse SmartHome » Thing interface purpose(Should it be implemented by bindings?)
Thing interface purpose [message #1721804] Sun, 31 January 2016 07:08 Go to next message
Davy Vanherbergen is currently offline Davy VanherbergenFriend
Messages: 15
Registered: March 2014
Junior Member

Is it the goal that bindings implement their version of a Thing interface? And if so, what logic/functionality should reside there?
Or should the Thing remain an abstraction, which is e.g. configured through the XML files?
Re: Thing interface purpose [message #1721823 is a reply to message #1721804] Sun, 31 January 2016 15:15 Go to previous messageGo to next message
Kai Kreuzer is currently offline Kai KreuzerFriend
Messages: 673
Registered: December 2011
Senior Member
Bindings are only supposed to implement ThingHandlers, see https://www.eclipse.org/smarthome/documentation/development/bindings/thing-handler.html.
Maybe I am lacking the background of your questions, it comes a bit out of the blue...
Re: Thing interface purpose [message #1721825 is a reply to message #1721823] Sun, 31 January 2016 16:55 Go to previous messageGo to next message
Davy Vanherbergen is currently offline Davy VanherbergenFriend
Messages: 15
Registered: March 2014
Junior Member

So far I haven't gone into many details of the new classes that were created for SmartHome, but as I'm currently looking how to best transform some bindings from v1 to OH2/SmartHome, I'm digging in a little deeper.

And during this digging, I come across things that look strange or wrong to me when compared to my understanding of how it should work. I am raising the questions to check if either my understanding is wrong or if there is room to improve the implementation.

In this specific case, what made me doubt how it should work was the createThing method in the ThingHandlerFactory interface. The implementation of this method in the BaseThingHandlerFactory uses the ThingFactory to create the thing.
As my understanding was that bindings should not create custom things, I expected the responsible class to instantiate things would be ThingManager and not the interface that bindings should implement.

I also wasn't sure which would be the best channel to get clarity on this type of issue, the forum or Github issues. So, I have been alternating.


[Updated on: Sun, 31 January 2016 16:57]

Report message to a moderator

Re: Thing interface purpose [message #1723399 is a reply to message #1721825] Mon, 15 February 2016 11:54 Go to previous message
Kai Kreuzer is currently offline Kai KreuzerFriend
Messages: 673
Registered: December 2011
Senior Member
I agree that a lot of the "who calls whom" is difficult to understand.
FTR, we tried to clarify it a bit in the documentation here: https://www.eclipse.org/smarthome/documentation/development/bindings/thing-handler.html#lifecycle
Previous Topic:I cannot build my ESH
Next Topic:Event dispatch order and rules
Goto Forum:
  


Current Time: Tue Apr 30 02:37:28 GMT 2024

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

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

Back to the top