How to create a custom thing?

I am using OH2b5 and have created several items using an items-file. How do I create a custom thing which contains these items? I want to model my weatherstation in OH2 as a thing containing these items. Finally the weatherstation should show up in paper UI control tab.

1 Like

You can’t. A thing does not contain items; it expose channels that can be linked to items (or the other way around, actually).

Have a look here for some basic concepts:

If you want your weather station to be available as a thing in openHAB, then you need a binding that supports your station. What kind of interface will you use towards the weather station? Please provide more information and I am sure you will get some pointers to get you going.

It’s a WH3080 weatherstation. It has a basis that is connected via USB to my diskstation which runs weewx. Weewx then publishes the values to mosquitto. In OH2 I have defined some items which get the values through mqtt subscriptions. Now I would like to have these items bundled into something that I can display in the Paper UI as I do with my other things such as thermostats or roller shutters.

OK, then I understand your setup.

There is really no way to “bundle your items into something else” other than using groups or a naming convention that indicates that certain items belong together in some sense.

Either way you will have to structure your sitemaps “manually” to display the items that belongs to the thing. I am not sure I understand what you mean when you say:

Perhaps you could post your items and sitemap files?

I have homematic thermostates and switches for roller shutters. Those are automatically displayed in the control section of Paper UI when I create the corresponding items. This is what I want to achieve with my weather station, too.

The control section of the Paper UI is, as far as I know, some sort of automatically generated sitemap that will only work for 2.0 bindings (and MQTT is currently not one of them). The only way I know of to make your weather station pop up in this list is to use a binding that will create a thing to represent it.

You should, however, be aware that the Paper UI is really meant for setting up and configuring your system, and not as a UI into your working system. In this context, the control section is really only meant as a quick way to look get an overview of your system, and not really as a way to operate it.

Most people, I believe, will manually create sitemaps to use with the Basic UI (or one of the other UI’s). With this approach you are free to create more or less any grouping of items that you like. In this setup you can easily create for example a frame that contains all items from your weather station.

1 Like

Ah, I see. Thank you for the explanation, which makes the different UIs more clear. I will have a look into defining a sitemap and create one that suits my needs.