openHABian hassle-free openHAB Setup

You didn’t get my point. Look at the second link again. It is possible to tell openHABian your wifi configuration (ssid, password) before putting the sd card back into your Raspberry Pi! This should be tested and documented and will henceforth be a great addition!

yes, this would be very nice !!
I’ll test this tomorrow

From a beginner’s point of view, I can tell you there are definite positives of a total install vs a modular install. A person without Linux/computer/home automation experience may very well be happy to have EVERYTHING installed even though they would never use it even if it takes more memory. This way they future proof their device.

Someone who is more tech savvy may be happier with a more modular install where they only install the pieces they need at that time.

I kind of equate this to the online vs. offline version of OH or even an iPhone vs. Android comparison.

For OH to move beyond “hobby” status it really needs to be dumb simple. Plug it in, insert memory card, and start adding devices after a quick set up (like adding user information).

Personally, if I were more adapt at this, I’d just package everything directly and produce a RPi3 based system with Z-Wave already configured (ala what is already in the process with the Pine 64). I would pay $20-$50 more easily not to spend the hours upon hours I’ve spent setting up my system.

1 Like

what you are asking for is a bit tricky.

I am currently doing an unintended installation and setup of openHAB 2, samba and a few other packages so users have a base to work with. This already covers a lot.

There are however components not directly linked to openHAB and not needed by most users. These I want to provide as additional components. Additional means you need to connect via ssh and select them from a menu. Examples are Habmin, Homegear, MQTT, knxd, owserver, logstash, InfluxDB+Grafana, … and many more possibly. After a user got one of them installed, further steps are needed on the users side (like scanning and connecting devices).
Are you suggesting to install all of them, no matter if needed or not? I am not sure if this is wise or would yield any real benefit.

No, not necessarily. But to have them easily available. Paper UI goes a long way in this by having the bindings able to be installed via a button.

A lot of what I was talking about was in reference to OH1 and it looks to be on track to being made a lot better with OH2.

Hey guys,
yesterday I finally got to the point where I merged my testing branch back to master - meaning there are a few additions ready to be used.

Let me say this to steer clear of misunderstandings: The unattended installation when booting your Raspberry Pi for the first time did not change!

I have added a menu (based on whiptail, just as raspi-config you already know) which you can access by directly calling the setup script yourself from the ssh-console. This menu allows to (again) setup your system, openHAB2 and Samba. These options were important for me as they allow for an openHABian update over time!
Additionally there are now a few optional components ready to be installed through the menu. This includes owserver and knxd for now but more will follow very soon.

  • all steps are now separated into bash functions
  • a new whiptail based menu in interactive mode
  • optional component knxd (thanks to @staehler67)
  • optional component owserver (thanks to @staehler67)
  • menu option to open up the karaf console interfaces so it can be accessed from everywhere (your local subnet)
  • Improved vimrc, Improved bashrc (global and user-specific - root now has his own color red :blush: )
  • many many internal technical details…

How to:

The menu is functional but not documented fully yet. What you should do:

# Update to newest version
cd /opt/openhabian
sudo chown -R pi .
git fetch origin
git reset --hard origin/master

# Execute the menu
sudo ./

If your installation is more than two days old, it might be interesting to you to select the first option from the menu to apply all improvements.
I am aware, that this is not yet in a good usability state. I’ll work on documentation and instructions. I decided to use whiptail for the menu as most Raspberry Pi users already know raspi-config. If you have any suggestions, let me know as always.

The script is now also in a state, where it should be usable on most debian/ubuntu systems besides the unintended installation on a RaspberryPi. Being applicable on other systems besides the initially promoted integration in the unintended raspbian net installation was one of the goals of this project. I am looking for somebody with Linux background willing to give this a test run on his system or in a virtual machine. Please contact me for more details.

Have Fun! Happy Hacking!

1 Like

And I’m back with yet another update. I had some spare time the last two days and worked on a lot of still missing details.

openHABian has reached version v0.9 and it’s at my personal “Definition of Done”. Sure, a few optional components will still be added and some small bugs might be found, but the core system and the openhabian-config menu are at a state of conceptional completeness.
I am welcoming everyone to use openHABian and actively take part in improving it by proposing new ideas or finding bugs.

New in this version:

  • Fix: the bash shell prompt wrap was broken by custom PS1
  • Fix: the provided bashrc was messing with SFTP
  • Fix: A major bug with the locale settings has been patched (waiting on Issue response)
  • rpi-config is now preinstalled as well, you should use it once
  • The early menu version was overhault and now includes a lot more options
  • Execute the menu in the console with sudo openhabian-config (similar to sudo raspi-config)
  • Now included:
    • Java 8 by WebUpd8Team
    • Homegear
    • Mosquitto
    • Bind Karaf Console to all interfaces
  • The menu can now update itself! :sunglasses:
  • Many small fixes
  • All changes…

Once again, I want to point out that the project was initially used to build and then configure a Raspberry Pi but has since then evolved and can now also be used on other Debian/Ubuntu based systems. Testers, arise! :wink:

openHABian v0.9 represents a solid base and with the integrated updater, you will be able to benefit from additions over time without the need to redo your whole system. I’ll leave this version here for testing and will turn it into the final v1.0 if no big problems present themselves.

Flash, Fiddle, Enjoy!!


Is there a list of all the included apps somewhere?

Great work!

I have two questions:

  1. What’s the status on InfluxDB+Grafana. Did you manage to get it into the system?
  2. I installed openHABian a while back (before the fancy configuration menu, :-)). Is there any recommended way to upgrade to v0.9 apart from doing a complete reinstall?

Yeah, that was also the first question which came to my mind.

Furthermore, regarding the major bug with the locale settings: How can I repair this bug manually?


Looking good, however i am a bit confused now. Do i just write the image and off i go as per pre-menu editions, or do i need to write it to the sd card, wait 45 mins then do option 2,3,4,5?

Then again, when i want to update, do i need to do option 1, then 2,3,4,5 or just option 1 and 4

Sorry for such a basic question. I think the instructions need a bit of an update to help new users get it going.

Hey guys! While I spent the last days coding, now I need to start upgrading the documentation, you are totally right. Okay let me try to answer you all, hopefully this information will soon be available in the first post.

Everything that’s added to the minimal Raspbian can be found in but let’s summarize:

  • screen vim nano mc vfu bash-completion htop curl wget multitail git bzip2 zip unzip xz-utils software-properties-common
  • rpi-update
  • raspi-config oracle-java8-jdk apt-transport-https samba bc sysstat
  • Oracle Java 8 by WebUpd8Team (what most know as revision 101 needed for my.openhab)
  • openhab2-offline
  • FireMotD
  • etckeeper
  • OPTIONAL: homegear homegear-homematicbidcos homegear-homematicwired
  • OPTIONAL: mosquitto
  • OPTIONAL: KNX installation script from here
  • OPTIONAL: owserver ow-shell usbutils

Thank you :wink: Not yet but with the core and menu (inkl. update) finished, this can now be added without any further implications. I’m still eager to add the combo, let’s hope it works out :wink: If you by any chance got around trying it, let me know.

I’m optimistic that upgrading will be easier from here on out. The reinstall would be the cleanest I guess but there’s no need really. What you need to do is, you need to manually pull the latest changes from the openhabian GitHub repository and then select a few options from the menu to reapply certain changes.

Out of my mind, that should do:

# Update to newest version
cd /opt/openhabian
sudo chown -R pi .
git fetch origin
git reset --hard origin/master
git clean -f

# Make openhab-config globally available
sudo ln -s /opt/openhabian/ /usr/local/bin/openhabian-config

# Execute the menu
sudo openhabian-config

Select the second option (“Basic Setup”) to reapply the basic steps. I suspect your version to mostly differ in this area. Namely, this step will call these functions: locale_timezone_settings first_boot_script memory_split basic_packages needed_packages bashrc_copy vimrc_copy

After that you may call the other options (3, 4, 5) just to be sure, I can’t recall big changes in them the last few days.

The only step left out after you did the above is the installation of FireMotD. Execute these commands manually (if you care).

Good luck!

The same way than above, just update through the menu or pull manually as described above (depends on your current version) and then execute the second option, which includes locale_timezone_settings.

Yes on the first. The original idea of a self-configuring RPi image didn’t change. If you just want a openHAB+Samba system, you do not need to touch the menu or even the ssh console once.
Menu options 2,3,4,5 are there to (a) apply the latest changes on an older installation as seen above or (b) for other systems that are not based on the provided RPi image.

If you flash the openHABian image to your Raspberry Pi today and you want to do an update of openHAB in two weeks, you do not need the menu at all. Just do a normal sudo apt update && sudo apt upgrade as always. You only need to execute openhabian-config if you want to install one of the optional components or if I tell you so here (for example like with the locales problem discussed above). In this case it would of course bbe a good idea to first select option 1 and then proceed with the newest menu version.

I don’t think that openhabian-config updates are a must (from here on out). If you got a working Linux setup on your Raspberry Pi and you do regular upgrades through sudo apt update && sudo apt upgrade, you should be fine :wink:

If anything stayed unclear please let me know!

Has anyone tried the latest release? I’ve just tried to make a clean install and couldn’t get it to go. I can connect via SSH but no OH related directories are created. Also no Samba. But mc, nano etc. are installed. LED of my RPi3 is red (sometimes with a yellow blink).

Any suggestions @ThomDietrich? I have a log file on my pi, but without samba I am not sure how to get it on my MAC.

FTR: The older version of the script worked flawlessly on my rpi3.

I will try a second run now.

Forget about my last post. Second run went without problems. Maybe I was too impatient or did something wrong the first time.

kudos to you, mate! This is just friggin’ amazing! ^^ #dancing


Hey @jaydee73 great that it went well the second time but that shouldn’t happen. I’m aware of the downside, that the setup can fail at any step where something is downloaded from the internet (server timeouts,…) I don’t know what to do there. I hope to not have to build retries into all steps. While testing I never hat random failures…

At least the fact, that your setup was not successful should be made clear . You should see the LED blinking quickly, the openhabian-install-failed file in your home and all the details in /var/log/raspiban...log. Did you have the feeling you knew what’s going on?

@KjetilA I have been looking at Go compiling for a bunch of minutes now. Go is a prerequisite of InfluxDB. The steps to come do not seem to be easier…

OK. I haven’t gotten around to try myself yet, but I wonder; do you have to compile InfluxDB?

According to the web site they already have a set of pre-compiled binaries for ARM available for download:

Grafana, on the other hand, does not have pre-compiled binaries for ARM (at least none that I could find).

I haven’t searched for an openhabian-install-failed file (as I wasn’t aware such a file could exist), but I took a look at the log. The log was about 57kb in size, so something did happened. :wink: As I said, the OS seemed to be installed correctly. Also some tools (mc etc.). But all OH related directories were missing. I could not dive deeper into the log (my little child had other plans… :wink: ), so I simply made a second try. So: Sorry, I don’t know what was going on.

Ah yes, I saw that. The tutorial was just one of the resources I used.
Sadly my experiments yesterday ended with Go.

apt install make ruby-dev gcc rpm bison
bash < <(curl -s -S -L
source /home/pi/.gvm/scripts/gvm
gvm listall
gvm install go1.4 -B
gvm use go1.4
gvm install go1.7 #or go1.6 or go1.5 or go1.5.4

The last command always fails. I’ll get my hands on a RPi 3 in the next few days. With my RPi1B+ the compile steps take ages and who knows, maybe there are problems with ARMv6 I’m not aware of. Would you be willing to try?
Let’s have further discussions in the related GitHub Issue