Config & documentation

Hello,

I moved from domoticz to fhem to openhab2, and I like the feel of OH2, but the documentation is either practicially non-existant, or I am too stupid to find it, leaving me with many questions that I feel must have been asked before, but I did not really find any answers.

  1. How do I configure OH2? I started using the Paper-UI, but it seems that it is far from feature-complete? Or should only the very very basic config be done in Paper UI?

  2. When I started in Paper UI, how do I set “advanced” config options for a device?

  3. How can I make Groups? I want to be able to make a button in the UI that sets multiple lights on or off. Or Scenes (dimming lights, turnin on power to multimedia system, closing blinds…)?

  4. How do I invert on/off on a simple switch?

  5. How can I set Tags in Paper UI?

  6. Can I group multiple Items over different Things? In Paper UI under Control I always have the Thing as a “group” and then all Items of that Thing.
    Now I have for instance 3 Switches that have 2 lights each. So I have the Thing “lights1” 2 lights Items, then the Thing “lights2” with two more lights item and so on. It would be much nicer if all showed under a “virtual Thing” lights.

  7. Rules. In both FHEM and Domoticz that I used before setting up Rules was very easy (especially in Domotictz with Blockly). I installed the beta Rule Engine, but I am unsure how to make time-delayed actions. For Instance my morning alarm. When today is a working day I want to dim the lights to 10% at alarm-20min, start soft music and set lights to 20% at alarm-10min, gradually becoming louder and brighter until the alarm time. How do I to that?

I am sorry if the answers are obvious, if they are please just point me in the right direction.

thanks
Daniel

If you haven’t already, you should look at the OH2 documentation here.

If you still have issues afterwards it might be worth giving specific examples with your bindings and config to get to the bottom of the problems you’re having.

I am sorry for not mentioning it, but of course I have read everything in the documentation you have linked.

I posted 6 questions that I feel are quite basic, but I have not been able to answer them. Also I think those questions are mostly binding-independant?

Basic questions, but as OH2 is still in rapid development, without knowing what your config is and specific issue, it is hard to tell you if the feature is missing, or if you are using an old version and it has been fixed/implemented in a new beta/snapshot, or if you are doing something wrong.

E.g. 2) You can make groups using the Paper UI > Configurations > Items > Select Type as Group.

However the functionality was only introduced recently, which may or may not be there reason you are having trouble.

Ok, I am using the snapshot from yesterday, my config was done through Paper UI. Any specific config things you would need to know?

  1. I created the Group (I tried that out before) unfortunately it does not show up under Control, and it also does not show up under the basicui.

Hello @Daniel_Hermann1 and welcome to openHAB! :wink:
Let me try to answer all your questions. I have one favor to ask in return. Please re-define a few questions that you thing are missing in the FAQs:

You can choose between Paper UI, file based configuration or a mixture of both.
Here’s how I use openHAB 2 currently: PaperUI is a great help with basic system settings and add-on management. For things and items definition I am relying on configuration files. You can also use Paper UI to auto-discover things and items - I just like to have total control over what is defined how. You can go both ways really.
Your decision should also be motivated by the bindings you are using. I am using the homematic binding for example and while I build my configuration files with (a lot!) of items myself, I could just as well relied on Paper UI. Remember to check out the Binding documentation for the “Full Example”, e.g. http://docs.openhab.org/addons/bindings/hue/readme.html#full-example
In the beginning you should look out for Native Bindings. Later you can also look into Legacy 1.x bindings.

I’m not sure what you are talking about. There is a button for that, no?

Check my setup here, here and here.

If possible in your device. If you need to process an Item beyond it’s basic properties, use a rule and a virtual item (this is only one possibility): Design Pattern: Unbound Item (aka Virtual Item)

Can’t answer for sure. Why do you need tags? It’s a quite new concept…

Yes, that’s exactly what “groups” are for… http://docs.openhab.org/configuration/items.html#groups

Rules in openHAB are best build in rules files, these are text based script files which are maybe not as easy to write (way easier than FHEM scripts) but extremely powerful. Look out for all kinds of examples in the forum. e.g.

1 Like

Thank you very much, that was a very enlightening answer.

I (think) I now understand my error. I believed that with OH2 many concepts of OH1 will sooner or later die. So instead of using practicially already depreceated functions (that are there for 1.x compatibility) I wanted to use “plain” OH2, thus sticking to the OH2 documentation (which really is quite lacking).

One good example is the Rule Engine. Is it going to replace the text based rules? Should I use the rules in the Rule Engine whenever possible or will it coexist for a long time?

Not for much, it’s still under development.

Yes.

No. While PaperUI and all components (like the rule engine) are going to get better and better, text file based configuration and rules will be supported for a long times. :wink:

Be sure to study my light scene and washing machine examples. They will teach you a lot.

Regarding documentation: We are doing our best but are simply lacking manpower. Please provide all the help you can. You could define questions for the FAQs or report missing information in the docs issue tracker just as this user did.

1 Like

Ok, thank you, in this case I have much more documentation to work with, rendering most of my questions answered.

I will try to contribute, especially to the FAQs, but I would also suggest putting the information you provided above (coexistance of Paper-UI config and text config, old and new ways and so on) on a prominent page somwhere, as I as a newbie was unaware of that and quite confused by it.

Thank you

http://docs.openhab.org/appendix/help.html

We chose this place as everyone has write access to it. You my (and should) add “the information you provided above” to the FAQs right away :wink:

This? Frequently Asked Questions (FAQs)

Well yes, and no.

There is also no mention that you can “mix-and-match” old and new configuration. At least I did not understand it that way.

Also the front page of the (old) wiki reads

[QUOTE]
:information_source: Please find all documentation for openHAB 2 under http://docs.openhab.org.

The wiki page here contains (outdated) documentation for the older openHAB 1.x version. Please be aware that a lot of core details changed with openHAB 2.0 and this wiki as well as all tutorials found for openHAB 1.x might be misleading.
[/QUOTE] which I understand as “use OH2, be aware OH1 concepts/configs are outdated”.

I have a further question concerning configuration:
I have a Thing and an Item based on that Thing configured via Paper-UI.
Then I added a Item (put this Line in a blinds.items file in the Smarthome designer)

switch blinds_JZ "Blinds_JZ_neu" <blinds> (blinds) {rfxcom="lighting1:75a0a868:command"}

(This Item is already definded via PaperUI, I just changed the name for testing purposes).

In the log I get

2017-01-10 06:22:01.766 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'blinds.items'

but in the UI nothing changes, I cannot find an Item Blinds_JZ_neu, just the old blinds_JZ.
Do I have to delete the Item or even Thing in PaperUI? Or what did I do wrong?

1 Like

I see. Someone should change that. I could do that if free time presents itself but it would actually be great if you helped with out here. You’ve got all the information and the FAQ article can be edited by everyone. You may also add new questions you want answers for.

I’ve written that paragraph. documentation and tutorials are outdated. Doesn’t mean that everything changed 100%. You do not agree?

“In the UI” probably means PaperUI. You missed one aspect of openHAB: sitemaps. I believe the article will tell you everything you need :wink:

I am very happy to make a few changes in the documentation or the FAQs, I just want to make sure I understand it before writing something that is wrong.

another question: can I define Items in the .items file that use things that are configured in the PaperUI?

Yes you can! :slight_smile:

Hmm, then I have no idea why none of those items work:

Switch FibaroSwitch1 "Relay 1" {zwave="11:1:command=switch_binary"} Switch FibaroSwitch2 "Relay 2" {zwave="11:2:command=switch_binary"} Switch switch3 "Relay 2" {rfxcom="lighting1:418d80cd:command"} Switch switch4 "dimemr" {zwave="6:command=SWITCH_MULTILEVEL" }

the rspective things in Paper UI show:

zwave:device:e936003f:node11:switch_binary1 zwave:device:e936003f:node11:switch_binary2 rfxcom:lighting1:418d80cd:command zwave:device:e936003f:node6:switch_dimmer

in the sitemap I add them as an item, for instance:

Switch item=FibaroSwitch2 icon="light"

in the log I read

2017-01-10 19:51:45.620 [ItemCommandEvent ] - Item 'switch4' received command ON 2017-01-10 19:51:45.626 [ItemStateChangedEvent ] - switch4 changed from OFF to ON but nothing happens

I think your issue is that you’re using OH2 bindings (Things and Channels) with an OH1 .items file syntax.

As an example your relay should like similar to below:

Switch FibaroSwitch1 “Relay 1” {channel=“zwave:device:e936003f:node11:switch_binary1”}

1 Like

Thanks, that was it.