I’m new to OH2 and might Need a push into the right direction.
My Scenario I want to achieve for the Moment: Create a Little Alarm System based on Z-Wave to get started at all.
What I have:
A running OH2 on a RPI
Managed to configure the Z-Wave Module (Razberry via GPIO)
Connected a Figaro FGMS1 (this was really hard work).
But this is, where I’m actually stuck. I found a bunch of tutorials for OH1, but less on OH2 (okay - release was just a month ago). I’m happy to contribute to the docs, once I have it running, but as for now I’m missing the links, somehow.
What I understood so far is, that I likely need items to be defined. I can do this via UI (use SimpleLink in the configuration) or create it on My own.I feel like I should do the latter, even for the OH2. But what is the correct way to do it for OH2? I’m missing the link somehow.
Next Point is, I want to create a rule. I have seen the experimental engine in OH2, but I’m not sure if this is the right way. Are rules from OH1 are still supported? From the docs I guess so (It states “you can even Combine it”) but this really leaves me confused. Do I need to create a rule script? Is this still the right way to do it?
For testing purposes I’d like to use a Mail Binding, especially to see, if the rule fires a mail. I just want to Keep it simple. Is it right, that Bindings with Version 1.9. are still needed to be configured directly? If yes that might solve some question marks I have.
A short guide with corresponding links would be very helpful to get me going. Thanks anyone in advance!
And sorry if this sounds like ranting. I see the great potential in OH, even over those other Open Source Projects, but as of now it seems pretty functional in this very Moment.
Indeed, it was a steep learning curve personally to “get” how OpenHab works when I started…can only imagine it’s more confusing now between major releases.
Anywho, I think the easiest start would be to use the PaperUI for adding things and items, test some basic UI rules and see how it all connects. Might be easier to understand if and when you want to edit the rules manually in the designer. (NB: use HABmin UI for editing/adding/removing Z-wave related “things”) .
Are rules from OH1 are still supported?
Yes, just like in OH1 the rules can be written as (ex: “something.rules”) in the openhab/rules/ folder. The syntax is more or less equal to OH1, the only small changes can be found here.
I would recommend you edit your own rules in the editor to get a feel for how everything works.
Regarding the Mail binding you can add it through Paper UI , Add-ons->Actions and find “Mail Action”.
I’m using the latest snapshot release and see a 1.10 version currently but could be the official OH2 release used a 1.9 version. When the mail binding is added you should find a openhab2/services/mail.cfg file, edit this with your SMTP info.
I’ll define a simple example here that sends a mail everytime someone triggers a motion detector:
rule "notify me when motion detected"
when
Item myMotionSensor received command
then
if (receivedCommand == ON) {
sendMail("me@somewhere.com", "Motion detected!")
} else if (receivedCommand == OFF) {
sendMail("me@somewhere.com", "Motion detection cleared")
}
end
I’m no expert on OpenHAB but hope this helps somewhat…
Thank you very much for the quick Response.
This is exactly, what I have been looking for.
So, as expected, I have to configure the Mail Binding in a corresponding cfg - great. Will check, if this will be able to be done with Outlook.com - otherwise a specific Google account for this shall do the Job as well.
P.S.: What does this binary mean in this Switch. Stumbled over it as well, but didn’t get the idea behind it.
P.S.P.S.: If you could also just state, where each file mentioned above has to be place locationwise, you’ll make My day.
Sitemaps,rules,items should all be in your openhab directory, but it depends how and where you installed it.
I’ve installed openhab through apt-get and I find my openhab directory here(with items etc.):
/etc/openhab2/items
/etc/openhab2/rules
/etc/openhab2/scripts
/etc/openhab2/services
/etc/openhab2/sitemaps
Oh and regarding the binary is a definition of what this “channel” is and how it should respond, this information can be found if you click on the z-wave device “thing”. It will list all the channels that z-wave device or “thing” features.
Okay. Thanks for the quick guidance. All take my time tomorrow to Play a bit more on that and let you know on monday, how it worked. Thanks so far! :slight_smile
Okay. None of this worked. I tried the easiest sample available and it didn’t work out. So I went for a Devolo Home System and My Troubles have all vanished. Setup was done in not even 30 minutes, and another 15 to set up all rules in the mobile App.
You pose a challenge (due to lack of understanding on OH2), people start to help you out, and the next message is you telling you have switched to another solution…
Great help for this community…
Openhab 2 is a stable and very flexible system with, i agree, a somewhat steep learning curve.
perseverance is what would have helped you here…
We (as OH2 users/developers) have to realize that indeed OH2 is simply not for everybody. Personally I love it for the enormous flexibility, and I do not mind the challenge to get things working. Apperently he has different priorities, but he gave it a serious try, was nice enough to thank people for the help they offered on the various questions he asked.
I had a quick look at the Devolo solution he went for, looks rather nice, and indeed a lot easier to set up. But, also limited. If you can live with the limitations, and do not want to spend a lot of time tinkering, probably a good solution and there likely is a market for that (as there is for Fibaro, Vera, CoCo/KaKu, etc). But I will stick to OH2, trying to get things done I would not even try with any of the commercial systems
Having good People helping was a great! And I put no offense here - the System is very flexible - I’d love to set up a new one including Z-Wave and Zigbee for Lighning. But havin a wife and a kid is timewise challenging.
This System has a lot of potential, but is not there where it could be.