Beginner to OpenHab...initial thoughts

First, I want to state that all comments I make is strictly for conversation or suggestion, I applaud the work that the community and the developers have put into the program.

I come from the commercial automation world, having installed and programmed with Andover, Siemens, and Tridium. I enjoy working on complex automation and love to assist with development.

I have finally begun to work on my HA with a base design of Zwave and an open mind to other technologies so that I do not find myself in a limited market. I still prefer hardwired control, especially for proof of state; but am finding that HW is not feasible or really practiced in residential control. I am on a mission to find Zwave or other current technology that has 8-16 pin addressable I/O…

So, coming into the world of OpenHab for the last 4 days, starting from scratch, I have a few comments to make. First, one has to understand that this programs flexibility and endless potential are what differentiates it from box store cookie cutter applications. You have to be willing to spend quite a bit of investment time learning the back end, which is worth it to someone that wants to know “why” something does what it does. I do believe that the information to do a basic A-Z start-up is somewhat disorganized and could use a “sticky” in the forum. I think that more “tinkerers” that want to get started would not be as put off in the beginning if there was a process map for installation to your first switch widget with a basic rule.
The next area that I am finding to be a challenge is the UI layout customization. I looked for a forum area primarily focused on how to customize the layouts, maybe a user gallery to show potential and give ideas. I am finding scattered posts and pictures.
Finally, I want to ask about the newest rev coming out. Should I invest the time in developing my system with OH1 or pause for OH2? Main question is, will the rule and config files from OH1 be able to be migrated to OH2 or is everything a start from scratch?

At the end of the very long sidebar are various examples, but I would agree that better organization of examples and FAQs would go a long way towards improving quick comprehension.

The Nest binding example presents a number of areas in UI customization, but there are many more throughout that section.

I couldn’t agree more and it is the main reason why I am such an openHAB supporter and user. However, that also causes me to caution some people from considering it as an option. Some people are unwilling or unable to spend the time to do that learning investment and for those people I usually direct towards a more commercial and less capable option. I’ve also seen problems where beginners try to build something far beyond their understanding and it usually ends in disaster. But I’ve also been impressed with how quickly a lot of the newcomers on this forum have managed to come up to speed and do some really advanced things in a very short period of time.

This is a well known problem and one I hope to try helping to tackle when I have some time (Ha ha ha ha ha, I’ve a two-year-old at home, that was funny). The quick start guide on the main openHAB website needs a rewrite for sure and there could stand to be a better beginner’s guide on the wiki. It is a wiki so if you have any ideas or are willing to contribute, go for it. I’m a willing colaborator for anyone who wants to try and tackle this problem.

This sort of documentation isn’t really intended for the forum but perhaps it should be. @kai, @teichsta, do you think having a sticky beginner’s guide posting here in the forum as well as the main page and wiki would be in line with your thoughts? I don’t even know if the forum can do that. But even a sticky posting that points to the wiki installation page might help some people find it. I get the feeling that a lot of people come to the forum without being aware that the wiki even exists.

I agree. For me the demo configs that are available are both comprehensive and intimidating. I personally ended up flailing around with a couple of simple switches, using the demo as a reference rather than starting from the demo. I think a comprehensive beginner’s guide would be greatly enhanced with a step by step instruction to get a switch working (and a contact, date time, etc). I’ve been toying with the idea of breaking such a guide up into trails kind of like the Java Tutorial does.

The UI area is a challenge. The reference for sitemaps is in the wiki but sometimes there is a bit of custom stuff that is specific to a binding such as the Weather Binding. So the information is necessarily distributed across the forum, the examples @watou directed you to, and the individual binding’s wiki pages. A lot of people don’t even use the openHAB UIs at all and instead use the REST API to drive their HA from a third party or custom developed UI or, like me, only use the UI for debug and try to have as little UI as possible.

OH2 is Alpha quality software right now so I wouldn’t recommend it for production. A lot of the bindings have yet to be ported over yet, though more and more are being added every day. That being said, despite a complete rewrite of the rules engine I believe the intent is that all of your rules written for OH1 will work for OH2.

Great feedback, I appreciate the fast responses. I am surprised to find the minimal support for a scheduling function based on event or time command. Once again, this is not a knock as I am unsure as to what the limitations of the programming is. I did see that this is being developed with OH2?

This is an important feature for me as is is a simple energy savings measure that can be implemented when combined with photocells.

Curious about your comment on “minimal support for a scheduling function based on event or time command”.

You can use full cron-style time controls as triggers in rules as well as item changed, item changed from x to y, item changed from x, item changed to y, and OR-based complex triggers. What is it that you think is missing ?

I am at the point where OpenHAB2 has been stable enough for me that I would recommend somebody that already knows the home automation ropes, such as yourself, to give OpenHab2 a go. It is true that it is in more flux than OpenHAB 1, and not all of the OH1 plugins will work in OH2, but there are enough now that are stable to really do some neat stuff. I have been running a couple different installations of OH2 now for about 9 months. My house is one of those installations where I use Insteon, zwave, weather, Samsung, Denon/Marantz, and other bindings, and I have been very happy. A caveat is I have been a sysadmin and electronics type for 20+ years and don’t mind learning.

The rules in OH2 are currently compatible with OH1, and while that may not always be the case, what you learn with OH2 around rules would apply directly to OH1 should you want to switch. The same applies for the manual entries in items files and device configuration.

I would put it this way: Unless there is a function or binding or element that is known to only work in OH1 that you want or need, or you are looking to install and support professionally, don’t be afraid of OpenHAB 2. The more people we get to use it and provide feedback, the better it gets. No need in pausing for OH2.

As @bob_dickenson said, I’m not sure I understand what specifically you are missing. There is a lot space in that sentence, some of which is well covered by openHAB and some less so.

If you want a time based trigger, the full range of cron definitions are available to you from once per second to every third Thursday of November.

If you want an event for celestial events (e.g sunset, sunrise, full moon, etc) the Astro binding has you covered. I personally have switches that trigger at sunrise, 90 minutes before sunset, and actual sunset al based on my lat/long.

If you want to use AND in your rule trigger (e.g. when this Item updates between 08:00 and 17:00) you are out of luck. The Rules engine is completely event based and not state based so it doesn’t make sense to use AND as two events will never occur exactly simultaneously. But you can easily add state checking in your rule. For example, by using your Item event to trigger the rule and an if clause to check whether it is the right time. Another approach is trigger a rule at the beginning and end of your time period of interest and use those rules to set or unset a boolean or another Switch Item. Then in your rule you just need to check the state of the boolean or Switch item to see whether the rule should execute.

I use this second approach to turn off a rule that turns on or off some lights based on whether the weather report says it is cloudy, but only between sunrise and 90 minutes before sunset.

For event triggers, as bob outlined, you can trigger on an Item being update, changed, updated or changed to a or specific state. You can also trigger on a Group update or change where your rule will trigger if one item in the Group changes or if an aggregate of all the items in the Group changes or updates to a certain state. You can even control how the items aggregate (AVG, MIN, MAX, AND, OR, NAND, NOR).

Is there a use case no covered that you need?

I think this would be definitely useful. Nonetheless, I think the page that most people get to first is the “Getting started” on, so this should be the main focus for a beginner guide (and yes, it very much needs to be improved and it leaves a lot of room to do so…)

FYI: For the 2.0 release, I plan to keep the current rule engine in place as the default, so that the risk is minimized that there are problems when migrating from 1.x.
And yes, in general it is already pretty stable and anybody who is familiar with 1.x should be fine with using the 2.0 snapshot as well. The biggest problem on 2.0 is that the documentation situation is much worse than for 1.x (is that possible…?), that’s why I do not recommend it to any newcomers.
The biggest change in the nearer future that might cause some 2.0 snapshot hickups is the move to Apache Karaf. Once this is done and working well, we are good for the beta release without any bigger surprises on the way.

So talking about 2.0 and documentation, I personally wonder how much effort should still be spent on a beginners guide for 1.x or if we should not concentrate on bringing this all in place for openHAB 2 directly. I am still a bit undecided on how to structure the main webpage as soon as 2.0 becomes available as the mainstream version. How to port docs from 1.x, update them or keep them as legacy (as they are then outdated). This will all be quite some effort and it would be great to have the support from the community for this. I am currently contemplating about some other measures to better organize the community and make it easy for people to actively involve themselve in the management (and not only code contributions). I’ll come back with details on this in Nov/Dec, so please stay tuned :smile:

Thanks to all of you for your support - openHAB only is what it is because of its great community!


I have been using openhab for more than 1,5 years now and I am not a Java programmer.
The only remainig point which continues to bother me repeatingly are the Openhab Classes/Types and related conversions.

F.e. calculating time differences between f.e. DateType itemes, converting Number into floating points and also the formatting still gives me fits. Also some examples, how to do calculations with floating points variables would be great (cos, sin, …)
Additionally some warnings would be good.e.g. that sendCommand(Number,0) is not the same as sendCommand(Number, 0.0)

For me still after 1,5 years it would be super helpful to have one page which shows some examples and the general concept behind. From forum request I can see that I am not the only one who is struggling with these topics.

Even though I am still very much a beginner, I’ve gotten on like most do after chipping away at this beast :sunglasses: .

Being very recently aware of the frustrations that can come when first starting out, I decided to start “The beginners guide to openHAB”. While still early on, i’d like to get a little feedback if i’m on the right track. Let me know what you guys think.

The plan is to hit the basics, ensure folks can get it up and running in a night so you can smile and feel encouraged. Then hit the examples and fun stuff which is the proverbial “crack”, we all keep coming back for. When the doc get’s enough substance, maybe we can post it on the wiki or site if enough folks find it helpful. Let me know your thoughts…
openHAB Beginners Guide.pdf (153.5 KB)


I do see some more documentation on the Cron function. I may have spoken too soon. However, correct me if I am wrong, I don’t see a front side scheduling interface. It seems that the scheduling would be done in code or at minimum on the front end with a virtual “item”. Am I correct in thinking this?


Great start, this is something that will be very useful to “tinkerers” that want to learn and start out with a step by step. I think that I am going to get started with 2.0 as I would like to learn the hurdles to understand the program from the ground up. Since some of the main structure or theory is not changing at this time, the documentation that I do find should get me in the ball park. I truly am impressed by the community and the knowledge being shared.


Yes, you’re right.
There is no widget to regulate time and/or date
so far, so the only way to set schedules for the user is google calendar
or (hopefully in near future) the caldav binding, so you can set
appointments in your favorite calendar.

Sort of.

You are correct, there isn’t a front side scheduling interface. Typically you schedule things by using a cron based trigger to kick off a rule so it is done in the code. For some celestial events there is the Astro binding that will let you create triggers based on celestial events at your configured location (most common being sunrise and sunset).

I’m not sure what you mean by “on the from end with a virtual “item”” so I’m going to say no, that is not correct. :slight_smile:

I recently created a post showing my approach to scheduling and setting up “periods of processing” states in my system (i.e. certain rules do something different or different rules are enables/disabled depending on where we are in the day.

But I think the big take away here is that there really isn’t a way to create a schedule or timer through the UI clients. It is done in rules code.

Personally, I’ve only really seen one use case where a user would want to be able to frequently change a time through the UI (alarm clock). That doesn’t mean there are not more, but that is the only one I’ve seen thus far.

I have a bunch of Insteon in my home (something like 30 devices or a $3k) and have been happy with the hardware (switches, dimmers, etc.) but tired of the lack of advanced controllers.

Then I discovered you guys and raspberry pi.

I am new to openhab, linux, Raspberry Pi, etc. - but otherwise old. Several here have helped me over the past week explore openhab - thank you.

So I have a demo system running, which took me longer than I want to admit.

I am now starting understanding and expanding the demo to include my stuff and it got me wondering.

If Openhab 2 had any support for Insteon shouldn’t I just start with 2 instead of 1.

And I found this post.

Does Insteon work with OpenHab2? I didn’t see it mentioned in OpenHab2 bindings and wrote it off.
I get it will have issues - I have plenty of issues already.

Can I and should I just get another MicroSD and try openhab 2 on my RPi2.

As I’m typing I’m thinking yes … I’m going to find another MicroSD…

Thanks for what you do.

The insteon binding works very well in OpenHAB2. I have been using it for nearly a year now.

Also, the RPi2 is a great platform for OH2. I even had it running on a Pi 1 for a while.

I’ll give it a try. Thx.

But don’t forget that openHAB2 is still alpha…