Basics OpenHAB2

4,366 views
Skip to first unread message

Peter

unread,
Jul 17, 2015, 2:25:32 PM7/17/15
to open...@googlegroups.com
Hello guys,


Maybe it's an awkard question, but I started developing OH2 this week and so I need some help.

My Question: In what way the OpenHAB binding "things" and the items of the config folder relates to each other. I read something about items and add them some channels and so I want to ask if it's possible to interact between the items in the *.times and the self created binding in eclipse.

I already wrote a binding, which creates some controls in the paperui (switches, number,..) but I don't get the realation between the things in the binding and the items, sitemaps and rules.

I'm sorry for that embrassing question, but maybe you can help me.

Peter

lolodomo

unread,
Jul 17, 2015, 2:37:01 PM7/17/15
to open...@googlegroups.com
Is the concepts of things and channels described somewhere ?

Kai Kreuzer

unread,
Jul 17, 2015, 4:30:37 PM7/17/15
to open...@googlegroups.com
Hi Peter,

Well, in general, the basics from openHAB 1 are kept, which means that Items are your functional abstraction, which is used within sitemaps, persistence, rules, etc, see https://github.com/openhab/openhab/wiki/Explanation-of-items

In openHAB 2, the concept of a „Thing“ was introduced mainly as a means to more formally describe the configurable units that are provided through bindings (and thus make the binding config strings more uniform, which is now the case through the „channel“ binding config).

You can find some information about the concept of Things at https://www.eclipse.org/smarthome/documentation/concepts/things.html.

And yes, you can use the „new“ Eclipse bindings in exactly the same way as „old“ openHAB 1 bindings - you just need to link channels of your things to some item - see e.g. how this is done here: https://www.eclipse.org/smarthome/documentation/features/bindings/hue/readme.html#full-example

Best regards,
Kai
> --
> You received this message because you are subscribed to the Google Groups "openhab2" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to openhab2+u...@googlegroups.com.
> To post to this group, send email to open...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/openhab2/c06ce911-58ee-4f0a-9de2-7a5222ef4a15%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Peter

unread,
Jul 17, 2015, 6:34:28 PM7/17/15
to open...@googlegroups.com
Hey Kai,

Thank you very much, you helped me a lot!

So when I am allowed to repeat the last topic: The things, which I define in Eclipse and which have a certain channel, are get refered to the items when I give them the same channel. So after linking the channel all properties and behaviours of the item equeal the the thing in eclipse.


Thank you Kai, you are the hero ;-)

Peter

Steve

unread,
Jul 19, 2015, 4:53:08 PM7/19/15
to open...@googlegroups.com
Hey!

"So when I am allowed to repeat the last topic: The things, which I define in Eclipse and which have a certain channel, are get refered to the items when I give them the same channel. So after linking the channel all properties and behaviours of the item equeal the the thing in eclipse"

I have the same problem? Is there a tutorial?
If I give an item the channel of an eclipse thing, what happens?

Regards

Kai Kreuzer

unread,
Jul 20, 2015, 8:06:48 AM7/20/15
to open...@googlegroups.com
Hi Steve,

> If I give an item the channel of an eclipse thing, what happens?

In general, the basics of openHAB 2 is the architecture of openHAB 1 - so I assume that it is clear to anyone how openHAB 1 works here.
With this in mind, the new „channel“ binding configuration behaves just as any other openHAB 1 binding configuration, i.e. it delegates command and state events to and from the binding.

Regards,
Kai
> --
> You received this message because you are subscribed to the Google Groups "openhab2" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to openhab2+u...@googlegroups.com.
> To post to this group, send email to open...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/openhab2/dc8ec69e-b10c-430d-b646-47677dcb53cc%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages