Setting up openHAB on a Pi was really easy thanks to the online guide.
I have just setup Debian on a desktop and want to install openHAB, however it looks a lot trickier…
It’s there a simple workaround for a simple install of openHAB on Debian? Eg using virtualbox or something similar.
Have a look in the Installation Guide.
Linux install via apt could not be easier.
Another popular choice is docker.
Otherwise please share more in detail what challenges you face.
what is the exact point you are struggling with ?
I had a VMuwith Debian 10 and had no problem to install openHAB.
The most simple and recommended install method for Debian is openHABian. On x86, too.
Thank you all for your feedback.
I only just started playing with Debian a few weeks ago, having setup a Pi a long while back.
It has been a steep learning curve and now that I briefly looked at the installation guide posted by @chrismast, it makes more sense.
It’s a lot to take in coming from Windows. What you all take for granted is gobbledygook to start with.
Reading responses from top to bottom… If I installed openHabin through the link you shared, I assume it will just install openHAB as an app in Debian 11?
I don’t want it to install as it did on my Pi where its running like an os.
If it does install like an app, then I’ll just do that, as it looks easy and I don’t know what I’m missing out on vs installing the way @chrismast suggested.
… Now would be a great time to hear the pros and cons of each method
PS slow reply as have been busy migrating to a new Debian install on new hardware…lots to install and configuration to do…
Lots of NR contrib
Now I’m ready to dabble with ooenHAB. I have 4x zwave sticks, 2x Pis and a Debian PC to setup multiple zwave networks on… Aiming for 8x networks across 4x physical devices in the end (3x Pi and 1x Debian PC)… Its going to be a long journey!
For me the major difference is in automation.
ooenhabian (which I also used at the beginning) offers a nice menu and automation of a lot of steps while apt is a simple package manager and does not do so.
Example 1: frontail log viewer can be installed via openhabian with a simple click and is automatically configured for openhab while with apt you will have to do so manually (i.e. edit a config file, not Rocket science but an extra job).
Example 2: backups can be done via the menu while with the apt way you will need to execute the CLI command (openhab-cli backup) manually/via cron.
A lot of people here use openhabian therefore.
I preferred apt as I am used to debian CLI (I do run a HA (high availability) cluster of 5 enterprise servers and a PI with about 15 - 20 LXCs, all debian) but I think there is no right or wrong, both options are valid.
Sounds like you have been dabbling with HA for a while with your setup!
Thanks for the explanation. It’s a no-brainer for me, I’ll go openhabian on the basis that I’m not sure how much I will use openhab at the moment, more than as a zwave interface, as I do almost everything in Node-RED these days, so the easier option is probable the better.
There is a docker for frontail and openhab and it worked a treat!
Can you tell me why you use a docker over just installing directly?
I get the idea of docker, trying to understand why you use it for openhab…
When I install my home automation system, the last thing I think of it reinstalling it again…
I can image you might use it so you can easily have a second install for testing, but not sure if I’d even do that tbh.
I, only yesterday, setup openHAB on a fresh Debian 11 system. Here are the commands that I used, from start to finish. Each line is a new command.
Install Zulu Java
From the Azul docs.
sudo apt install gnupg curl
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 0xB1998361219BD9C9
curl -O https://cdn.azul.com/zulu/bin/zulu-repo_1.0.0-3_all.deb
sudo apt install ./zulu-repo_1.0.0-3_all.deb
sudo apt update
sudo apt install zulu11-jdk
Install openHAB stable
From the openHAB docs (previously linked by @chrismast )
wget -qO - 'https://openhab.jfrog.io/artifactory/api/gpg/key/public' | sudo apt-key add -
echo 'deb https://openhab.jfrog.io/artifactory/openhab-linuxpkg stable main' | sudo tee /etc/apt/sources.list.d/openhab.list
sudo apt update
sudo apt install openhab
sudo systemctl daemon-reload
sudo systemctl enable openhab.service
sudo systemctl start openhab.service
Give it a few minutes to startup for the first time.
I use the following commands frequently:
//To see the status of openHAB
sudo systemctl status openhab.service
//To enter the openHAB console
//password is habopen
//Once in the openHAB console, to monitor the logs
Quite a few of us tinker with the thing beyond repair. Having the program containerised (and good backups, of course) makes ‘re-installing’ less painful - it turns all the commands shown above into (sometimes) one single command.
Docker allows you to isolate environments and re-create them whenever you want.
This is especially helpful with tools that change a lot (i.e. if you want to test new versions).
In addition it can simplify, as @hafniumzinc mentioned, deployments of very complex systems (for instance with multiple services) into one combined command/docker-compose file.
I use docker extensively across my services as, as mentioned, simplifies deployments.
Docker though also got some complexities, for instance in how it manages networks and you need to make sure to mount the right directories as otherwise you have to exec into the container all the time.
If you want to go the docker route and you are not yet familiar with it, you can watch a few videos to get started, there is a lot of content on YouTube.
That is also the main reason why I, take into account here many people run OH in docker (!), went with bare metal debian for openhab via apt as this takes out this potential (!) networking complexity (esp. with a service that relies on connection a vast list of devices across different protocols) with docker.
I also installed frontail bare metal as I do not have a docker instance running on the same LXC for now.
At the end its completely up to you, apt, docker, openhabian are all good ways of getting OH up and running.
For reliable home automation you should minimise complexity and interdependencies as much as possible.
We recommend running a dedicated box for OH i.e. no container or other virtualization.
Docker has its strengths in Cloud and Enterprise environments but a typical Home Automation installation is not where it can put these to use.
You don’t have mass or frequent (re) deployments or upgrades.
Choice is yours. I’d go with openHABian. Note it is not only an image for Raspis but can be deployed on top of x86 Debian as well.
If you run openhabian-config with the “unattended” parameter it’ll automatically install and configure a ready to use OpenHAB system (read the docs before). Just like the image for Raspberry or Docker do.