For newcomers: What is the difference between Openhab and home assistant?

I am new in the intelligent device world. What are the pros and the cons of each systems : Openhab (OH) and Home assistant (HA)?

  • simplicity of use
  • forum support
  • etc.

Thanks.

1 Like

For some context before I offer my opinion, I’ve been using OH since version 1.8 (around 2015) and HA to some degree only in the last few months.

I believe HA would, in many cases, have a shorter learning curve for most, but at the cost of flexibility. The concepts / setup between OH and HA are quite different. OH is very flexible, and the longer you delve into automation, I’ve found that you want to do more complex tasks. HA appears to be easier to start with and has a larger community, but when you really want to start doing more complex things, OH shines - but it has a longer learning curve.

HA has a larger community. OH has a lot of support for “standards” that arise to support the HA community as they evolve. You can use both together in different cases to meet different needs.

In short, if I were starting from scratch, I’d get started with a HA instance, but take the time early on to understand the architectural and flexibility differences in HA and OH, then start using an OH instance to either replace or “control” the HA instance - using HA only when it was the only or best option for some particular device with OH being the “master.”

YMMV, but that’s a brief summary of how I see and use the two systems.

1 Like

While HA does seem to make it easier to start with, and while I do voice some concerns and dislikes about parts of openHAB every now and then :wink: I totally agree with @RipNCode above.

I’m also a user of openHAB for the last decade, and what is invaluable to me is its stable, strong and very versatile rule engine (DSL here) which allowed me to extend me rules/automation to a vast number of very intricate rules over the years, running rock solid, no matter how complex things got over the years.

While I don’t know HA that well, I’ve never come across anything as versatile or supporting such complexity there, either being referred to Node-RED or some other 3rd party solution so far.

So for me as well, the openHAB rule engine rules!

I see a couple of different categories of differences. These do overlap with what has been described above, but also expand a little on your long term expectations.

Structure:
HA, although it does offer a free software, has a commercial arm. There are paid services and even retail hardware that contribute to an income for HA’s business arm. This means that they can 1) afford to pay some full time staff, and 2) have a vested financial interest in attracting as many users as possible and locking them into their system.

OH, on the other hand, is 100% free, volunteer driven, and prohibited from any commercial activity at all by the foundation’s German non-profit status. OH survives because it is a labor of love for a group of extremely dedicated home automation enthusiasts. Many users do financially support OH through donations to the foundation but this support cannot go to the developers at all and is very restricted in its use. OH has an interest in attracting new users and building a dedicated user base because more users leads to a more vibrant environment and more potential volunteer contributors, but it’s not nearly the same existential problem that it is for HA.

Philosophy:
HA wants to bring home automation to as many users as possible (see above) so it’s philosophy is to make on-boarding as effortless as possible. It will make every decision it can for the user to begin with (beyond, in my opinion, the threshold of reasonable) to create a functional home automation system with as few clicks as possible. You can get HA up and running to control lights with a timer or a phone or a sensor and not have to actually learn any steps or concepts. This has many benefits especially for people who have no experience with this sort of thing, have only the simplest of goals in mind, or have common enough requirements that they fit nicely within the basic box. It does not work for people who have specific goals, or requirements, who want to understand what they are doing, or really want the low-level control of their system.

OH expects users to want to develop at least a basic understanding of its structure even at the beginning (beyond, in the opinion of many first-time users, the threshold of reasonable) and expand that understanding in order to have an order of magnitude greater control of their setup. Much effort has been put in in the last few years to take away some of the additional configuration and clicking for the newest of users, but there’s still an expectation of a user engaging with the differences between physical devices, conceptual representations, data types, and so on. For the least experienced of users, this can feel like being dropped in a foreign country with no way to speak the language and no map. How quickly and easily a new user can gain this basic understanding does depend a little bit on their base-line digital literacy.

Community:
I have never engaged the HA community, so I cannot address this from personal experience. However, you can find numerous examples on the threads on this forum where former HA users are blown away by the helpfulness, and welcoming nature of the OH forums after having negative experiences with the HA forums. At least the OH side of this goes back to the philosophy of the previous section. The active users with OH and the OH forums know that there is a higher knowledge entry requirement for OH and are almost always willing to act as a translator and local guide in this foreign world.

The users who tend to not have a positive experience in the OH forums are the ones who demonstrate no desire to put in the effort to learn. They want someone to just manufacture a solution for them (usually without sufficient information to begin with) and don’t even want to understand the solution because they are expecting a more commercial level of customer service rather than a community of like-minded enthusiasts.

Development:
HA’s commercial structure drives its development in a very different way than OH’s. HA, with even a handful of full-time employees, can (and must) move quickly. When new ecosystems become available, or new devices are added to ecosystems, HA will be able to integrate those things more quickly. As a commercial entity, it also has better access to many of those closed ecosystems and so can offer direct manufacturer approved access to devices. This comes at a couple of costs: the rapid pace of HA development leaves it vulnerable to breaking (the “move fast and break things” mentality we hear some much about in modern tech). Many HA users come to OH and complain about the frequency of their system breaking from a simple update. The reliance on closed specifications although it increase functionality, often, does mean the users continues to surrender some control.

OH’s fully volunteer development means that there’s no roadmap. If someone wants to work on a feature it gets developed. If it doesn’t sound interesting to anyone with the skills to produce it, it will not get developed. This can sometimes leave users wanting a feature that never arrives or comes along well after HA has already had it. The OH developer community also understands how integral a well maintained home automation system becomes and prioritize stability over the rapid adoption of every feature and idea out there. No one is perfect, of course, and the occasional OH upgrade will break something for some users, but you will also hear on the forums from users who have had an OH system up and running without flaw for 5 or more continuous years. Lastly, one of the major draws for a sub-set of OH users is the ability to be completely divorced from commercial systems or the cloud in general. While you may not have as many device options with OH as with HA, in many cases if you stick with what works with OH you can have a complete system that never just one day stops working because that company decided to change it’s API again, add a paywall, or just completely shutter its operation. This is always a concern in the commercial tech space even with (especially with…) some of the big players.

In the end, like @RipNCode I actually use both these days. OH is my primary system that I have customized extensively over the course of nearly a decade of use, but I do have and small HA instance running to connect to some devices ecosystems where the connection is just more reliable than OH’s reverse engineered solutions. When (if) OH reaches feature parity on those devices, I move them away from HA and into OH. When I went to start using HA for this, I actually did not enjoy the experience at all, and I engage with it as little as possible. But, that is because I am the kind of person who wants to know exactly what my system is doing and want it to do only those things I ask it to. HA fundamentally does not follow either of those points (because it philosophically can’t), where OH does.

16 Likes

Not having ever used HA the only thing I have to add over what’s been mentioned here is that the openHAB Cloud Server which allows remote access to your OH instance without any dangerous (e.g. exposing your LAN to the Internet) or complicated (e.g. setting up a VPN for remote access) steps to access your openHAB instance from anywhere in the world.

Donations to the openHAB Foundation pay for the server time to run the cloud service which makes it free for anyone who wants to use it.

It’s also FOSS which means if you wanted to set up your own cloud server you could. I believe the HA cloud connection service is proprietary (could be wrong about that) and requires a monthly fee to enable remote access to your HA instance.

6 Likes

The scripting environment, and underlying engines are very different between the two. OH feels more like a developed engine and environment in that it can dynamically change items/things/scripts/rules and execute them immediately without having to restart the system. On the other hand HA is like a giant script, where you often need to restart/reload the system to make any configuration changes take effect. I’ve often been frustrated in trying to get things working, not knowing whether I need to do a configuration reload or full system restart. OH doesn’t have that problem.

The biggest difference is in the automation abilities. Pretty much all home automation systems whether OH, HA or commercial offerings have a GUI based simple method for implementing IF This Then That (IFTTT) logic, e.g. if time of day equals 07:00, then turn on light. OH and HA then offer more advanced text based scripting to give flexibility closer to a raw programming environment

My impression is that the whole automation/scripting approach in HA took a radically different approach to OH at some point in it’s past, or even inception. The standard approach to text-based scripting is to use YAML based declarative programming, which becomes very clunky if not impossible when it comes to more complex logic that would otherwise be trivial in python, JS or whatever your favourite language is. This seems to be a philosophical difference in how HA operates, seemingly YAML is more “beginner friendly”, and now that HA has become a juggernaut project, they seem to focus on front end stuff and haven’t changed the automation side much.

There is an official “python scripts” integration that allows some ability to use python syntax in scripts, but the available functions are very limited (you can’t import modules or anything either). In order to achieve any decent python functionality, you need to install the community store and a community integration, or run a separate process like node red or appdaemon which are “piggyback” programs to HA. I think these add a whole host of breakage points for a system. There’s also a ton of workaround hacks for things that HA doesn’t do, for example you can’t have persistent memory in scripts.

On the other hand, OH comes with basically all the scripting functionality you need right out of the box. It primarily uses a JavaScript engine to implement text-based scripts. I don’t know what your coding experience is, however I used C/C++ and python before JS, and found it pretty easy to pick up for the purpose of scripting. OH also can utilise 3rd party piggyback processes, e.g. Node Red can also be used as an automation engine, or if you can code in python, there’s a library called habapp which can interact with OH.

If HA implemented python scripting in the way that OH implements JS, it may have wooed me away a while ago, however the HA development team don’t seem to interested in fundamentally changing their automation approach.

In terms of community, I don’t think there’s really much that would make me swing one way or the other in choosing which software to use. Both communities have enthusiast engineer types that are willing to help you and brainstorm ideas. In the HA world, some topics/questions go unresolved for years because of the aforementioned shortcomings in automation. The only thing that really irks me is that there is a small subset of the HA community that is a bit fanatical, in that they view the HA way of doing things to be superior, even the YAML based scripting.

To help you choose between the two, perhaps describe your experience and your goals with the system?

For example I am pretty competent with coding, but are by no means a professional software engineer. I also strongly emphasise local control, security and system isolation, so OH works best for me.

Much of HA popularity comes from being a device aggregator, meaning people want to collate their google, amazon, microsoft, netflix etc services, along with their apple, sonos, philips etc products, and so the software that has the most products and services wins out. However for me, that holds less appeal.

4 Likes

Someone once said succinctly:

If you love coding/programming, you might love openhab
Otherwise, you might prefer HA

I don’t know how true this is, but I kinda agree with it, mainly:

  • I don’t know how openhab is perceived by actual openhab users who are not into coding/programming out there
  • I’m sure there are a lot of HA users who also love coding, and are hard core coders too. However, they’d pretty much be limited to using Python.

openHAB natively supports:

  • DSL (based on XTend)
  • Javascript
  • Blockly
  • Ruby
  • Python (via jython and the new python binding)
  • Groovy

And non official support for:

  • Python via Habapp
  • Java - yes despite openhab being written in Java, you can’t actually easily automate your stuff using Java but it’s most certainly do-able!

If I understand, HA is to OH, what is Ubuntu to Arch linux or Porteus. The learning curve is more steep for OH. But there are some advantages to it: speed (no reboot needed for the implementation of most changes), flexibility, better understanding of the beast under the hood.

Yet the main advantage of OH seems to be the friendliness and enthusiasm of the members of the community.

To be operational on OH, you need programming skills, which I do not have already. Although I have at some time made some python courses with a android application. How much will I have to become proficient with a progrmming langage to be at ease on OH? Or is there any way to be a user without programming skills? These are the questions for me as a new user?

My objective is to understand more about the intelligent house functioning and the competencies to control it. I just want to make my devices work together.

Yet with the android phones apps that accompanies the devices sold on the market, compatibility does not seem to be there,eve sometimes for the same brand.

There is also a question of security: could you trust the private enterprises (chineeses or americans or others) handling some of your personal data?

My practical objectives for now is to interconnect some Zigbee aqara devices together, with a wifi tuya horn (110 decibels) to get them work as an alarm system. I have also some intelligent plugs and breakers, and eventually if I can find some compatible intelligent thermostat for my old floor heating system, I would be happy to integrate these.

Thanks to all.

@francoislavoie I believe you can use OH even without knowing a thing about programming. The UI provides simple “rules” that you can construct by selecting what you want to happen given a certain trigger, all by simply clicking through the UI without writing a single line of code.

This page shows you exactly how you’ll be managing your rules on this level:

You can stop right there and use openhab happily.

Where openhab shines is that you have the ability to go much much deeper and create your own rule logic in the listed programming languages above, instead of using the “basic” UI-provided rules linked above.

If you are the type of person who want to do something in a very particular way, you would love this ability because you will not be limited only to what the UI or the basic rule allows you to do.

Here are some example code that you can write in openhab (mainly JavaScript)

and here are some more examples of rules written in Ruby:

And blockly:

If however you only want something simple and mostly using ready made stuff that other people have made, you might be happier with HA.

Practically speaking, you would be using zigbee2mqtt and present the zigbee devices to openhab (or HA) via mqtt.

For tuya in openhab, you have 2 options:

  • Use the Tuya binding for openhab, this was only recently adopted as an official part of openHAB, so it will be available in the coming openhab 5. You can use the openhab milestone or snapshot version in the meanwhile.
  • Use tuyamqtt (this is no longer maintained, but I’ve been using it for at least 4 years now)
2 Likes

Thanks for the precious information. My first step trying to install openHAB on linux, if not on a pi 3b.

The cool thing about Blockly is that it is essentially a visual way of constructing JavaScript code, which can then display the raw JS code. So you can use it as a guided tutorial until you’re comfortable in the syntax. Unless you’re doing very advanced automation, you can achieve an enormous amount of functionality with a handful of basic programming concepts arithmetic, conditional logic, iterations (including iterations of arrays and such), bitwise logic etc. Then you can just copy+paste your typical functions into code directly.

I program using the JavaScript and I am not an expert so I do the same thing.
I use blockly to get the correct syntax and then copy that to my code. I don’t use blockly for the programming of rules.
I tried home assistant a few times and I didn’t find it intuitive, not that openHab is, but I will stick to openHab as I think I can do more lower level stuff.

Humm, not really, both communities are quite good, with HA being much larger and in terms of development that usually wins because there’s many more heads pushing similar topics. Everyone is very enthusiastic around these topics I feel. What i definitely enjoy/prefer about OpenHAB is that our mods and / or maintainers are much more involved in the community.

I am a long time openHAB user (v1.6? Or 1.8? Can’t remember…) with zero coding skills. I can barely edit a UI widget. So your entire question can be answered with “huh?? What coding skills you talking about?” :slight_smile:
I use this: Rules - Basic | openHAB

And most of my current automations are just that. For more dynamic or complex rules I use node-red.

Old floor heating? Electrical or other? There’s zigbee thermostats in AliExpress specifically for floor heating (water valve, electrical and some other) which you can use to integrate it. Cheap too and they work with zigbee2mqtt (I assume that with native OH zigbee too).
I have integrated my Bosch air conditioning units with openHAB and have extended it with further sensors to help improve the home environment (air purifiers, humidity control etc).

I have over 60 devices on my network, have manually flashed 15+ sonoff light switches with tasmota and a levoit air purifier with esphome (just to get it out of the cloud) and right now I have over 30 containers running on an i3 7100 which help support my smart home.

All of this because I have asthma - high humidity levels make my breathing very difficult - openHAB, a xiaomi temperature + humidity sensor, a sonoff basic flashed with tasmota and a 25 year old dehumidifier helped me tremendously when I was at one of my lowest points in life.
I can’t even begin to think how to put all of this into other (less) words. As it was a big factor in my later personal growth, this is a rather personal topic for me - my health and growth.
OpenHAB isn’t the limitation. Imagination (or lack of it) is.

The atmosphere and the enthusiasm of the forum members is already tastable in this thread. And already, I am convinced to go with openHAB. I have already setup openHAB on my laptop with ubuntu, after trying with slackware (Porteus). I did this far from home as I am at my girlfriend’s house for the weekend.

Familiar with the linux forums, and moderator for a small linux distribution, I know that the encouragement, presence and quality of interactions of the forum makes all the difference.

I have begun a thread for my water heated floor and the appropriate thermostat.

Good to know that programming skills are not prerequisites. But I might get into some python courses for the fun of it.

Thanks.

2 Likes

One other thing, I think because they have a commercial version HA makes everything else hard. run it on hardware you buy from them and you are fine (until they decide to not support it??? Always a risk, but probably nut big). run on a dedicated pi and you are okay. however if like me you have a powerful server running lots of things for your home you shouldn’t waste your time on HA - the options are all poorly supported and many lose all the cool integrations that give HA an edge over OH. want to run BSD and it is even worse.

the above may not matter to you, but I got OH installed in a fraction of the time of any of my 3 (count them) broken HA installs.

how so?

I’m curious, do you use OH on BSD? Which flavour of BSD?

Home assistant wants / works best when it’s installed bare metal and with full control of the OS basically. If you use docker you lose the addon store and a bunch of other stuff and you either install manually or you have to go through other hoops to be able to get addons. Still kind of works but now you’re making life harder.

I haven’t used home assistant in years but when I did it wasn’t pleasant because I use docker.

As alreade said, HA without the store lacks nearly everything in every arguement that HA is better. As such we should write off docker. I suppose you can manually install things, but that is now very advanced. The install on your os can work but I found all the packages were out of date and they didn’t work well. I could probably make it work but with a lot of effort. (I’m trying arch which overall I like better than redhat, ubuntu, or debian - but I’m still very new to it)

I never tried OH on BSD, but it looks like the freebsd packages are useful. there are other things (jellyfin) that don’t run well on bsd so I had to get a second server anyway. Once I get everything off my truenas server I’m going to try xigmanas because I’m an old school bsd guy at heart. likely I’ll switch some things back to BSD aftre that. (Or more likely I’ll stay busy for a few more years and never get anywhere - same reason I haven’t automated anything with OH yet)

1 Like

You can also download and run HA as a complete VirtualBox image and just run it as a VM if you already have a home server. It also allows for complete VM backups. This is probably the better way if you don’t want a dedicated piece of hardware for it.

I run OH mostly but maintain an identical config for HA using its docker container. In case its not clear, the HA integrations are persistent across runs of the container. The addons are not, but I don’t know if everyone is going to need addons. In order to implement an addon in HA it needs to be available as a container anyway. Where it differs is having code to integrate with the supervisor component. For example, see GitHub - bropat/hassio-eufy-security-ws: Official eufy-security-ws Home Assistant add-on repository vs GitHub - bropat/eufy-security-ws: Small server wrapper around eufy-security-client library to access it via a WebSocket..
In my configuration I need zwave, so I run the zwave-js container. You just need to make sure the addon container is running first (via docker compose, k8s, etc…). You could also run the addon native, for example my mqtt broker is just the standard debian mqtt package, and then both HA and OH can use it.

The HA yaml config bothers me personally because I have grown a lot of rules in the native OH DSL, and yaml is difficult to work with for if-then-else logic – yeah you can use red alert and other stuff I guess…

With OH pay attention to the o/s and make sure you are running 64bit, as I think OH 5 will require a 64bit o/s (due to java).