Switching to OpenHAB

Hello community,

3 month ago I started my home automation project as I am moving into my new house in March. However, I am still new to home automation and has only Python beginners knowledge. Know I am considering a move from Indigo 6 to OpenHAB as device support is somehow unsatisfying. I am a fan of z-wave products from Fibaro and Aeon Labs. Now, here are my noob questions to the OpenHAB community:

  1. Z-wave is not mentioned on the homepage - is it supported?
  2. How are new (z-wave) devices supported by OpenHAB?
  3. Is OpenHAB doable for coding beginners? The homepage and infos look like more pro :smile:
  4. What are the languages I have to deal with? What other skills are required?

Thanks for helping me out!

Best regards,
Marcus

Most definitely - yes.

You will need some sort of Z-Wave dongle, most of us have the Aeon Labs Z-Stick (get the latest Gen5 if possible).

Yes, but there will be a bit of a learning curve. There is a good demo config you can play with to start with and plenty of examples and guides in the WIKI - plus the community is extremely helpful and friendly!

All the openHAB code is written in Java, but as an end user you won’t be exposed to this unless you want to write your own bindings. The rule syntax is based on Xbase and is very similar to Xtend. Check out the WIKI for more details (Rules · openhab/openhab1-addons Wiki · GitHub).

Welcome aboard and good luck!

Z-wave is supported and configuration is carried out via an addon UI called Habmin. New devices are added to Habmin’s database by its developer and you can check the database of supported devices on github. Take a look at sample rules if you can understand them you are good to go (you will need to understand first all the concepts of the system which takes some time, but programing-wise if you can read the rules you should be fine).

Z-Wave is nicely supported with the Z-Wave binding addon that is part of the openHAB distribution. It currently lacks support for door locks (generally), but the database of supported devices is growing all the time.

It depends on what you want to do. I think most users don’t need much coding experience to get started, just the ability to edit text files per the instructions and examples in the wiki. There is a demo component which is a good teaching tool for items, sitemaps, and rules.

If you wanted to write your own custom bindings, actions or other addon modules, they are written in Java, but generally users don’t end up in situations where they need to do that.

openHAB rules and scripts use a domain-specific language (DSL) that is similar to Java (much closer to Xtend), but there is also a component that lets you write rules in Jython (Java implementation of Python) and JavaScript. Other languages can also be supported. Sometimes you might need to process incoming data through “transforms” that can be expressed a number of ways, like maps (this=that), JsonPath ($.element.subelement.field), XSLT, JavaScript snippets, etc. There are many examples and people to help here on the forum.

I suggest browsing the wiki to find areas you think you might be interested in, search the forum if questions still remain, and install openHAB with the demo.

Have fun!

Thank you so much for the warm and quick welcome :smiley:

Sounds pretty good. I gues switching my mind from Indigo to this one is somehow challenging.

Just to be a bit more precise: who is going to implement new devices into the eco-system of OpenHAB? This is a huge lag for Indigo 6 as many new devices from Fibaro and Aeon Labs can be included but no settings are available. It takes quite some time until the developers inplement them into their software. Rather disapointing for me as many european devices are not supported.

I am really looking forward to test the software. I have no doubts that I will get it done with your help. First of all I will order a new Z-Stick.

By the way, while using a z-stick I am just able to include z-wave devices. How do you include enocean or homematic devices? Do I need a dongle for each?

How many standards are you using in your smart home?

As you can see, still many questions :wink:

Marcus

I am not familiar with homematic, but yes, you need a dongle or a gateway for each technology.

I am using lots of cheap 433MHz devices with rfxcom dongle, z-wave, X10, IP cameras and some data over http.

The community adds new z-wave devices to the z-wave binding as well as support for new technologies into openHAB. It is an open source community based project.

As of right now there are over 120 technologies officially supported at least in part by openHAB bindings. These range from standard home automation protocols like KNX, Zwave, and Nest, to more generic technologies like weather, sunrise/sunset times at your location, location tracking, Google Calendar integration, media integration like Samsung TVs, XBMC, Plex, and Sonos to low level stuff like executing scripts, TCP/IP sockets, and serial device connections. More are added all the time.

Most of the developers of openHAB are European. There are lots and lots of European technologies supported. I’d venture to guess that most of the users are European as well.

See the wiki page for that binding for full details on how to install and configure to add support for that technology. The Homematic binding is here and the Enocean binding is here.

In general, if the devices communicate over WiFi or wired into your network you do not need a hub or a dongle to control them from openHAB. However, if they use their own wireless protocol (e.g. zwave) you will need a hub (e.g. Vera, Wink, ZiBase, etc) or a dongle.

I currently use:

  • Astro - calculates sunrise and sunset times based on my location
  • Mail - send an email for important alerts
  • Pushbullet - a not yet officially supported addon to send Pushbullet notifications for important alerts
  • Exec - execute command line scripts, I use it to restart a service on a remote machine that goes haywire occasionally
  • HTTP - make HTTP calls to the REST API of other services. I use it to trigger GPIO pins on a Raspberry Pi that I have connected to my garage and exposes the pins via a web interface using WebIOPi
  • MQTT - publish and subscribe broker for sending and receiving messages. I use it to receive sensor inputs from some sensors wired to a couple of Raspberry Pis scatterd throughout the house
  • Mqttitude - Tell openHAB your location using the OwnTracks app on your smart phone
  • Nest - control and get data from the Nest Learning Thermostat
  • Network Health - lets me know when certain networked devices are or are not online on the LAN. Helps me track the health and status of my Raspberry Pis and determine when someone is home (phone’s address is online)
  • Network Time Protocol - keeps the time accurate
  • Weather - gets current weather conditions and forecast so I can use weather to help drive the automation (e.g. turn on the lights when it is cloudy)
  • Zwave - I have three lights controlled via zwave and two plug-in zwave outlets I use to remotely reset my Raspberry Pis when they go offline (one of my Pis is pretty flakey)
  • Habmin - a web based administration portal for managing and configuring zwave devices (among other things)
  • my.openhab - Allows access to your OpenHAB instance securely from outside your LAN without configuring port forwarding on your router. Also allows IFTTT integration.
  • RRD4J - a database that saves the states of my items and allows me to create charts and restore Item’s state on a restart of openHAB.

See the wiki for currently officially supported technologies. The only major protocol not yet directly supported I’m aware of is zigbee and that is coming in OH 2.

@chris, the main developer and maintainer of the zwave binding has a documented process for adding new devices to the z-wave database. The short answer is someone who has the device fills out a form based on information from its user guide which generates an XML file that lets the zwave binding interact with that device.

Yes but I caution that OH and home automation in general is very complex and requires a lot of learning and experimentation. Many non-coders have been very successful with OH but it requires perseverance. Also, I’ve found that those who are unsuccessful are those who copy and paste from examples they find here and there without trying to understand how the examples work. They quickly run into problems they can’t solve and usually the forum community can’t solve it either. So take your time, start small, download and refer to the Demo, use Designer, and expect to fail often. When you do, come to this forum and ask for help. When asking for help provide as much info as possible (what OS are you running on, if on Linux how you installed it (apt-get method is preferred), which version you are running, which binding you are trying to use, any errors in the log, the desired behavior verses observed behavior, and any relevant Items and Rules.

Rules and Scripts are by default written in a Domain Specific Language based on Xbase and bares a strong resemblance to Xtend. However, there is a binding that lets you write your Rules and Scripts using Python or JavaScript is that is more your speed.

In addition to programming you will want to get some systems administration skills. If on Linux you will need to know things like how to start and stop a service, where logs are put and how to view them, how to change permissions on files, how to add a user to a group, etc.

Good luck!

Wow, thank you for the detailed answer :smiley:

I was tinkering today with OpenHAB and I was partly successful. The oportunities are pretty awesome with OpenHAB. However, it is not that easy to get into it.

I was able to play around with the server and demo.sitemap. But…as I have no z-wave dongle available I tried to include a weather binding. And there it went all wrong :frowning:

Just to get this straight:

  1. Editing openhab.cfg
  2. Editing demo.item
  3. Editing demo.sitemap

Is this the right order?

Just a last question for today (ups, it is already tomorrow):

Where can I find a list of supported z-wave devices?

Thanks and good night
Marcus

Actually, if it isn’t already there, step 0) Install the binding jar file to the addons folder.

I think the demo includes a bunch of the addons but you want to make sure they were installed. On Linux with an apt-get install the addons folder is in /usr/share/openhab/addons. You will be best off installing addons using apt-get as described in the wiki page.

For weather you should see org.openhab.binding.weather-1.7.1.jar in that folder.

After editing openhab.cfg you need to restart openHAB. That and logback.xml are the only two config files that require an openHAB restart though.

The order really isn’t all that important. Just watch the log and it will tell you when it has reloaded the sitemap and when it has reloaded the items file. Just wait until both have been reloaded (around 10 seconds I think for the default settings) and everything should be good.

The supported zwave controllers are listed on the zwave binding wiki page.

@chris is building a tool that will make it easier for him and the community to keep the zwave database up to date. There appears to be about 240 devices in the DB rightnow. You should be able to use it to look up the manufacturer and model number. If it is listed I believe it is at least partially supported. When you click on the device it will show which command classes are supported for those devices.

One thing to note is devices that require the security command class such as door locks are not supported and unlikely to receive full support in the near future.

Also, I believe that list is for what is currently supported in the OH 2 version of the binding, or at least the OH 1.8 version so if you have any question about a device post a question. You could also search the github pull requests to see when the device was added.

Marcus,

As a recent convert (about a month ago) from Indigo 6, I am loving the experience with OpenHAB, this is a great community and the program works very well. I was able to replace 90% of what I did in Indigo (having some issues with my z-wave sensors). The easy way to adapt for me was to interchange things from Indigo with OH, like what indigo calls Devices, OH calls Items. In OpenHAB, the items are in a file (demo.items). Groups are groups in both programs. Triggers and Schedules are handled in Rules (demo.rules) in OH. What Indigo calls control pages, OH calls sitemaps (demo.sitemap). There are some excellent samples in the wiki for all of these files that go beyond the demo files.

Best of Luck!

~John