Best of open source smart home: Home Assistant vs OpenHAB

by | Feb 28, 2018 | 2 comments

OpenHAB and Home Assistant are two best open source smart home hubs available at the moment. We installed and used them for over 6 months in three households in London to give you a comprehensive overview of which one offers greater flexibility, better user interface and overall performance. 

The conclusion will not surprise you – both platforms are very capable and powerful tools that considerably improve the flexibility in controlling your smart devices while enabling many automation benefits. Some deciding factors are specific for a certain user group (for example Java vs Python users) but we were able to nominate an overall winner although only by a thin margin.

This article is a detailed overview of features and how Home Assistant and OpenHAB compare, but below are our summarised findings.

You should choose Home Assistant if you prefer

  • A modern, easy and highly customizable web interface
  • Out of the box integration with over 1,200 smart devices
  • Rapid development, but with some occasional bugs
  • Smooth one-click management of updates and backup
  • Easy add-on management (Pi-hole, MotionEye etc.)
  • Advanced configuration especially if you are familiar with Python
  • Happy to pay $5 for easy integration with Google Home / Alexa (there is a free manual way as well)

You should choose OpenHAB if you prefer

  • Stability over having all the latest features quick
  • Tested and verified architecture
  • The granularity of controls over user-friendliness
  • Really simple and easy to use automation routines manager
  • Good documentation
  • Java over Python
  • Traditional look and feel of UI
  • Easy cloud management and access with myopenHAB.org
  • Working with the command line for maintenance
Basics: do you really need a smart hub?

The question of whether you need a Smart Hub depends on how complicated your smart home setup is planned to be. While hub is not worth it for one or two smart devices, you can get much more out of your smart home in larger setups. A smart hub will bring the following benefits:

  • Integrate all your devices together, so they seamlessly talk to each other and operate in one eco-system
  • Use complex practical automation rules (for example based on the combination of presence detection, luminance and motion)
  • Access to all smart home devices (like on/off toggles, camera feeds etc.), with a single interface, not a number of different apps
  • Avoid app pollution so you do not need to have five different apps or other hubs hardware for each brand or category of devices
  • Reduce the cost of devices  as in some cases you might not require additional hubs 
Open-source or commercial smart home hubs?

The choice between a commercial hub (like our favourite SmartThings) or an open-source-like Home Assistant and OpenHAB is a choice between flexibility vs convenience. Although a steeper learning curve, open source smart home hubs can offer you the following benefits

  • More flexibility with fine-tuning of the part of your smart home setup
  • More integrations as the result of more dynamic development
  • Cutting edge innovative tools due to the contribution of community and reduced governance
  • Less cost to build and run your hardware (as the example see the overview of the best hardware for Home Assistant)

All the above comes at a price of some disadvantages with Home Assistant and OpenHAB:

  • No support or guarantees means you are responsible for any damages and there is no support available other than the community of enthusiasts (which we must note is very responsive)
  • Some releases can be buggy as the result of rapid development and less time spend on testing. This is changing for both OpenHAB and Home Assistant but it is still miles away from commercial level development
  • Lack of documentation can be frustrating and you might be spending a lot of time on forums/Discord channels /Reddit to resolve your issues. 

Openhab vs Home Assistant: History and Architecture

OpenHAB has been created in 2010 by Kai Kreuzer. OpenHAB 2 (the current version) is developed in Java and mainly based on the Eclipse SmartHome framework. It uses Apache Karaf together with Eclipse Equinox to create an Open Services Gateway initiative (OSGi) runtime environment. Jetty is used as an HTTP server. openHAB is a modular software that can be extended through “Add-ons”.

Add-ons give openHAB a wide array of capabilities, from User Interfaces to the ability to interact with a large and growing number of physical Things. Add-ons come from openHAB 1/openHAB 2 distribution, Eclipse SmartHome project. The development process is relatively quick with the latest version being updated in May 2018 with the update before on the December 2017.

OpenHAB runs on many popular platforms including Linux, Windows and Mac OSx. Many people find that the simplest way to experiment with openHAB is to get a Raspberry Pi and install openHABian. While openHABian offers a streamlined and simplified way to get up and running quickly, it is a complete openHAB home automation system capable of automating your entire home.

Home Assistant is developed using Python 3 for the backend and Polymer (Web components) for the frontend components. As the open-source product, it is licensed under Apache 2.0. From the development process perspective, the project recently adopted a two weekly release cycle with one extra week for beta testing which resulted in the improved quality, but there were still buggy releases recently.

Hass.io is one of the main flavours of Home Assistant and is an operating system that will take care of installing and updating Home Assistant. It is easy to manage from the Home Assistant UI allowing creation/restoring snapshots of your configuration and can easily be extended using Hass.io add-ons including Google Assistant and Let’s Encrypt.

From Architecture perspective, Home Assistant recognized a number of logical components that illustrated in the chart below.

  • Home Control is responsible for collecting information and controlling devices.
  • Home Automation triggers commands based on user configurations
  • Smart Home triggers commands based on the previous behaviour

Comparing those two products we cannot agree on the clear winner. We liked the robustness and rigidity of the OpenHAB architecture and development that leads to known stable work and operation. Home Assistant require frequent updates, but offers rapid development and much more modern and sophisticated architecture.

Installing and Maintenance

Installing both platforms is easy. You need to download the base image for your hardware, write it on sd-card and plugging it in Raspberry Pi. Both can also be installed using Docker.

Initial configuration of OpenHAB is mainly done using the web interface. It is a well-thought process, although there are many steps to follow that can be intimidating for some users. We really struggled with Z-wave binding (even using our favourite Aeotec Z-wave Stick Gen5 or HUSBZB-1 Z-wave/Zigbee stick ). Home Assistant tries to do many things itself with very useful discovery option. There is also a push for web-UI controlled “Integration” feature that allows doing the initial configuration. Saying that at the moment we do not see how any reasonably complicated setup can be done without going into the configuration.yaml file. It is not hugely complicated but some learning curve nonetheless.

Updates are managed through web-interface for Hass.io and can be done by the click of the button. There might be breaking change in the releases so please do look in the documentation to check.
Things are more complicated for OpenHAB and done using a command line.

Add-ons are a strong part of both projects with a very strong community-driven development process existing in Home Assistant. You can use a number of repositories with add-ons to manage everything from MQTT to Lutron Certificates and NRV (MotionEye). OpenHAB also has a lot of add-ons (currently showing having of 310 add-ons). They all can be installed using Paper UI.

As for the servers to run, the majority of the users prefer to use Raspberry Pi (which is an energy-efficient powerful mini-computer) that is more than powerful to run both the platform system and add-ons. We also recommend looking into NAS solutions for Synology or even HP Microserver for more advanced uses.

The winner in this category is Home Assistant, although we see how both products are attempting to be user-friendly in the initial setup, things are still to be improved compared to commercial smart hubs. Home Assistant being slightly ahead as it is possible not to use the command line at all when installing and setting up. Add-ons are handled equally well, but a little bit better by Home Assistant due to extensive documentation and one-click installation process. Initial configuration, however, is managed slightly better by OpenHAB as you will need to understand YAML to do any more-than-basic configuration with Home Assistant.

The article will now go into more specifics about the products, but we encourage you to try DIY Smart Home yourself. Below is the ultimate starter kit that works out of the box for both OpenHAB and Home Assistant. It also surprisingly cheap – all six items below will set you well under $300

Hardware to start using OpenHAB or Home Assistant

Raspberry Pi 3 B+

Server: Raspberry Pi 3 B+

  • Low energy and flexible mini-server
  • Native support for OpenHAB and Home Assistant
  • Many add-ons and expansion sticks

Price: $79.99

Z-wave and Zigbee stick

Comms stick: HUSBZB-1 Z-wave/Zigbee

  • Single stick for both ZigBee and Z-wave

Price: $39.95

Smart Bulb

White smart bulb: TP-Link A19

  • 60 Watt Equivalent, dim brightness
  • Fine-tune light appearance from soft white (2700K) to daylight (6500K)

Price: $20.99

Z-Wave Switch (On/Off): Inovelli

Z-Wave Switch (On/Off): Inovelli

  • Z-Wave Plus Switch with Manual or Remote On/Off with Instant Status Reporting
  • SIMPLE 3 & 4-WAY WIRING: No need for an auxiliary switch! Can be used with a regular ON/OFF (non-smart) switch

Price: $39.96

Z-Wave Plug: GE Z-wave Plus On/Off Plug-In Smart Switch

Z-Wave Plug: GE Z-wave Plus On/Off Plug-In Smart Switch

  • Wirelessly schedule and control any lamp or small appliance from anywhere, at any time with any mobile device
  • Easy to configure in Home Assistant or OpenHAB

Price: $34.50

Best Multisensor

Best multisensor: Aeotec 6-in1 Z-Wave

  • 6-in-1 Z-Wave Plus MultiSensor: motion, humidity, temperature, light lux, UV, vibration sensor.
  • 2 year battery life

Price: $58.75

Supported Devices and Pairing

OpenHAB and Home Assistant both support many devices as the main benefit of having a smart hub is to be able to integrate all your devices together. Home Assistant widely publicizes the total list which stands around 1,200 components as of October 2018. It was not easy to find the same statistics for OpenHAB, but we are sure that the number is equally impressive.

Both systems can also work with main IoT protocols such as Bluetooth, Z-wave or Zigbee. For Z-wave Home Assistant has a built-in Z-wave control panel with things being a little less convenient for Zigbee. 

OpenHAB also has a built-in tool called Bindings to support Z-wave devices (and claim to currently support 792 devices from 111 manufacturers). The process is similar to similar to Home Assistant, but at the same time it is less user-friendly and feels less smooth.

The winner is Home Assistant as it provides a more user-friendly way to manage pairing and growing number of devices supported.

Creating Automation Rules

Once the hub is installed with all devices paired, the exciting part begins. Ability to easily create and deploy automation rules is key to get all the benefits from owning a smart home hub. Open source solutions traditionally struggle to keep the flexibility while maintaining simplicity and more importantly user-friendliness. It is good to see that both of the systems giving many options for users to see use create and manage automation rules

Automation rules in Home Assistant

Home Assistant has many ways to create and edit automation rules. The first and the most basic one is using YAML (more on comparing YAML and xTend below). YAML stands for YAML Ain’t Markup Language and it is a human-friendly data serialization standard for all programming languages. It uses both Python-style indentations to indicate nesting, and a more compact format that uses [] for lists and {} for maps making YAML 1.2 a superset of JSON. Note that indentation is an important part of specifying relationships using YAML and you should use YAMLLint or built-in configuration checker when changing the configurations. Overall we are finding YAML a good way to create automation and is a very powerful tool, but it is very unforgiving for beginners and there are some things that are not easy to do with it (like loops). A benefit of using YAML is also that you can easily share the configuration files. Available useful examples with configurations from advanced users can be accessed on Home Assistant website.  

For novice users, there is also an automation editor, which a built-in tool that allows you to create and edit basic automation rules. It is easy to use, but still, require a good understanding of entity names and service calls concept.

Node-RED is another way to manage automation rules. It is a flow-based development tool for visual programming developed originally by IBM for wiring together hardware devices, APIs and online services as part of the Internet of Things. It extremely visual, quick to change and deploy. At the same time Node–RED has not been build specifically for Home Assistant in mind. This means unnecessary complexity with some learning required to use but offers amazing flexibility. You can learn more about Node-RED and Home Assistant in our comprehensive guide.

Finally, App-daemon is the most powerful automation tool available in Home Assistant and we review more details in the [advanced features] below. In brief, App-daemon brings the power and flexibility of Python to manage automation rules. This yields many benefits on things you can program but will require a good knowledge of Python.

Automation rules in OpenHAB

OpenHAB is equally equipped with a number of built-in tools for automation rules management. The basic way to create and deploy automations is using Xtend. Xtend is a flexible and expressive dialect of Java, which compiles into readable Java 8 compatible source code. OpenHAB community call automation routines “Rules” and have a lot of (maybe too much) documentation around it. We will compare Xtend and YAML in the [next section].

Similarly to Home Assistant there is also an easy way to create the automation rules. Instead of building its own manager like Home Assistant OpenHAB is using Blockly. Blockly is a client-side JavaScript library for creating visual block programming languages and editors. It is an open-source tool that is maintained by Google. We really liked how Blockly worked as it gives a uniquely easy and visual way of creating automations. User-friendliness also does not come at the expense of complexity so you can create really sophisticated routines using Blockly.

If you not satisfied by Blockly, but do not want to use Xtend, Node-RED is also available for you. Implementation of Node-RED in our opinion is not as smooth as in Home Assistant, but it works nonetheless. This is done by having all your devices and states in MQTT. Also, similar to Home Assistant, you can use pure JavaScript to write automation rules. This obviously gives a lot more flexibility, but not at all user-friendly.

The winner in this section is OpenHAB although the choice was not easy. We prefer YAML over Xtend, Blockly over Home Assistant Automations manager and Node-RED integration of Home Assistant. If Home Assistant integrated Blockly it would have a good and powerful tool for any type of users and the winner would have been different. However, Blockly is only available in OpenHAB and it is the only tool that can work for both beginners and advanced users.

Comparing Xtend and YAML

Xtend and YAML have many similarities and used as primary ways to create automation rules. Home Assistant is also using YAML to configure devices and UI. It is worth spending some time comparing both to highlight differences and benefits.

Xtend is a very powerful scripting language with many complex structures and functions available. At the same time there are many unhappy users. Main complaints are on the lack of clear documentation, no support for functions, odd syntax, and no real tooling.

That is the example of Xtend routine.

rule “Exercise every morning”
when
     Time cron “0 0 8 1/1 * ? *”
then
     harmonyStartActivity(“Exercise”)
end

Complic
     import org.openhab.core.library.types.*
     importorg.openhab.model.script.actions.*
     import java.lang.String

rule “Humidity Monitor”
when Time cron “0 * * * * ?”
then
     var prevHigh = 0
     var highHum = “”

     Humidity?.members.forEach[hum|
          logDebug(“humidity.rules”, hum.name);
          if(hum.state as DecimalType > prevHigh){
               prevHigh = hum.state
               highHum = hum.name + “: ” + hum.state + “%”
          }
     ]
     logDebug(“humidity.rules”, highHum);
     postUpdate(Dehumidifier_Needed,highHum);
end

YAML, as we stated above, is not really a dialect of a programming language but human-friendly data serialization standard for all programming languages. It is very particular on indentation with many users being annoyed with that.

That is the example of the same automation rules written on YAML:

automation:
  trigger:
    platform: time
    at: ’08:00:00′
  action:
    service: notify.telegram
    data:
      message: ‘ Exercise’

automation:
  trigger:
    platform: state
    entity_id: sensor.humidity
    above: ’60’
  action:
    service: switch.turn_on
    entity_id: switch.humidifier_kitchen

The winner in this category is Home Assistant. Comparing YAML and Xtend we tend to prefer the former. It is cross-platform and does not really follow specific language conventions and standards and subsequently easier to read. All those reasons mean that it would be easier to learn YAML meaning better user acceptance. At the same time, we recognize the potential flexibility that Xtend gives, but it is compensated by AppDaemon in Home Assistant that allows the creation of similarly complicated routines.

Interface

OpenHAB has a number of interfaces that you can use depending on your needs.

Paper UI for system administration, including item access and setting up and configuring your openHAB instance. Sadly it still does not cover all parameters, so you need to resort to textual configuration files.

Basic UI as the new modern web UI for mobile devices based on Material Design Lite from Google.

HABmin is a more modern, professional and portable user interface for openHAB. It combines the functions of Paper UI and Basic UI, providing both user and administrative functions (e.g., sitemaps for users, and configuration utilities to aid setup).

HABPanel as a dashboard UI for (e.g. wall-mounted) tablets

Home Assistant also has a couple of flavours of the interface.

The default view is the automatically created a view that showing all the devices and automation you have configured. You can customize and use it for your need adding tabs and cards. You can also use a number of different themes, changing the colour palette and icons. Another interesting feature of standard UI is use of floorplans. They can be used as a general purpose user interface for just about anything you want to present in a visual way.

Recently Home Assistant also added a new UI feature called Lovelace which is a new way to define the interface. The default user interface relied solely on the state machine so you cannot define UI specific parameters. With Lovelace, all user interface configuration live in a separate file, controlled by the user. In addition to improving the way to manage the interface configuration the look and fill of the UI significantly improved.

Home Assistant Control Panel is a Home Assistant UI developed by external developers with visual simplicity for tablet and mobile use. The Control Panel has been written using AngularJS, which is a funky JavaScript framework for building apps. The app runs in a web browser, directly on your PC/Mac or even a tablet.

Comparing OH and HA we have to name Home Assistant as a winner in this category. OpenHAB has many options for UI, but at the same time, it is a lot of duplication and too many similar options available confusing the users. The look and feel and UI elements are also not the most modern in the majority on the interface option for OpenHAB.

Home Assistant, on the other hand, has a very consistent and comprehensive approach to UI. Its standard UI does not need any configuration which is convenient for beginners. More advanced users can customize the interface completely with some advanced visual features that we have not even seen in the professional systems.

Mobile Applications

Mobile applications important features as smart hubs primarily controlled using mobile devices. Home Assistant and OpenHAB have different approaches to mobile development and it is worth comparison. 

The Home Assistant for iOS app offers a companion app for iOS which is deeply integrated into both Home Assistant and iOS. Its basic features include:

  • Advanced push notifications
  • Location tracking
  • Basic control of all Home Assistant entities
  • Integration with third-party apps

It has decent review and users overall happy with the many features especially push notifications.

Things are a little bit less developed for Android users and there is no official Android application. There is an unofficial app that has quite basic functionality. At the same time, the philosophy of Home Assistant is to develop a system that does not require an app with the web interface being sufficient to all the needs of the users. As Android only household we are happy to say that it works really well for us with the only two things that we are missing sometimes. Both of those (actionable notifications and widgets) can be configured separately.

OpenHAB clients are more developed. Android application looks solid and has many powerful features. You can not only control your openHAB server but receive notifications through an openHAB Cloud connection, change items via NFC tags and send voice commands. iPhone app has very similar functionality with even better and cleaner look and feel.

The winner in this category is OpenHAB. Although we passionately agree on the philosophy of not having app for smart home hub it is still not widely shared preference. When thinking of all your family members using smart home, having an app which they can use makes things much easier.

Comparing Other Features

  • Notifications (winner Home Assistant) are important to provide ongoing information about important events happening around your house. Both products have a number of options ranging from Telegram to SMS, Pushbullet and other services. We inclined to give victory to Home Assistant in this category for three main reasons. Firstly Home Assistant has much more integrations with Notification services page has over 30 supported platforms. Secondly, the ease of implementation of those integrations is very helpful and usually only require a couple of lines in configurations.yaml file. Thirdly, based on the simple and effective implementations of the advanced notifications like actionable notifications and chatbots
  • Community: Both projects have very passionate and responsive community. OpenHAB has an established user base and contributors which we were able to tap into not only to find required information quickly but even to get answers to our specific question. Looking at stats there are nearly 200 new topics per week on average across 7 categories. This is the signs of a very active community but it is less lively comparing to Home Assistant. It enjoys the average weekly volume of new topics across 10 categories close to 500. Many users in the community were able not only to help with issues but they also structure their responses and topics in a very easy to understand way. This means it is very easy to understand the issues and quick find resolution. https://community.openhab.org/ 
  • Documentation is key in navigating the complexities of open-source solutions. We have to give a lead to OpenHAB due to well-advanced materials available which is understandable for an older project. Home Assistant is improving the documentation with a new website dedicated to Developers of Home Assistant. https://developers.home-assistant.io/
  • Advanced automation rules. (Winner Home Assistant). Both Home Assistant and OpenHAB are giving the most advanced users ability to using snippets of underlying language (Python and Java) to work on complicated automation routines. We feel that AppDaemon is a bit more developed and structured approach with many examples and documentation. The developers also added helper functions, ability to write a piece of code once and instantiate it as an app and designed AppDaemon from the start to enable the user to make changes without requiring a restart of Home Assistant. This in addition with complex logic (Python’s If/Else) durable variables and state and availability of Python’s libraries remove limitations on creating automation rules. 
  • Add-ons management – the definition of add-ons is slightly different across those two products with OpenHAB calling many smaller integrations add-ons while for Home Assistant it is complex additions to Home Assistant’s functionality. This creates a real modular feeling which extends the uses of Home Assistant. Interesting examples of add-ons are:
  1. Pi-hole – Network-wide ad blocking.o Plex Media Server – Your recorded media beautifully organized and ready to stream.
  2. IDE – Advanced web-based IDE, based on Cloud9 IDE.
  3. Grafana – Open platform for beautiful analytics and monitoring.
  4. zigbee2mqtt – Zigbee to MQTT bridge, get rid of your proprietary Zigbee bridges.
  5. TasmoAdmin – Centrally manage all your Sonoff-Tasmota devices.
  6. Aircast – AirPlay capabilities for your Chromecast players.
  • Templating is a powerful unique feature in Home Assistant that allows the user control information that is going into and out of the system. It is used for formatting outgoing messages in, for example, the notify platforms and Alexa component; process incoming data from sources that provide raw data, like MQTT, rest sensor or the command_line sensor; and Automation Templating. The main advantage is that this feature does not require Python knowledge (using Jinja2 templating engine) but give a very powerful tool that even intermediate users would find extremely useful.
  • Remote access: (winner OpenHAB). Ability to access your smart home remotely is useful when you need to see the temperature in the house, check the status of lightings or switch on some smart plugs. We consider OpenHAB a winner due to the ease of using myopenHAB.org to use an openHAB Cloud instance to which openHAB creates a tunnel connection and which forwards all requests through this tunnel. In addition, you can use VPN or reversed proxy. Home Assistant gives you similar functionality but the installation is more complicated. DuckDNS + Lets Encrypt add-on is the best and the most convenient way to expose Home Assistant, but it still more complicated then openHAB solution.
  • Integrations with HomeKit, Alexa and Google Home (winner OpenHAB). Integrations with other main home assistants are helping to further integrate all your smart tech in one system. Home Assistant has an interesting approach to integrations with all three systems. For Homekit there was an add-on https://github.com/hassio-addons/addon-homebridge but it was depreciated in favour of the component https://www.home-assistant.io/components/homekit/ it is relatively easy to install (using configuration.yaml) but require a number of steps. For Alexa, you need to just configure the skill in Amazon developer console, but make sure that Home Assistant is exposed using 443 port (might need config changes or port forwarding). For Google Home, the setup is very complicated with almost 20 different steps to follow. Saying that both Alexa and Google Home can be configured almost with the press of a button if you use Home Assistant Cloud. The only downside is that it is not a free service currently costing $5 a month. OpenHAB integration with Home Kit is relatively simple with the only requirement is to edit a couple of line in your configuration lines. The steps are really simple and you can follow them on https://www.openhab.org/addons/integrations/homekit/#additional-notes As for Home Assistant and Alexa the set up even easier. All you need to do is to configure openHAB Cloud Connector in myopenHAB.org. Comparing Home Assistant with OpenHAB the functionality of more detailed configuration of what devices should be exposed to assistants and naming is very similar. The winner in this category is clearly OpenHAB. Having myopenHAB.org  really simplifies the integration process and removes the pain that you have to follow with Home Assistant. Home Assistant Cloud is an option and we agree that paying $5 is worth it even just to support the project, but OpenHAB still manages to provide this service for free. 

Conclusion

We hope you now have more information about those two systems and can make more informed decisions on what should you go for. 

Please write your thoughts in the comments below so we can include other aspects of habs for comparison.