openHABian hassle-free openHAB Setup

One more question: In the official documentation I can read something about a demo sitemap. But I couldn’t get that demo sitemap started. Isn’t it included in your installation or am I not capable of choosing it?! :wink:

Thanks for image !! I´m a Vera/MIOS user evaluating alernatives, including Openhab2.
I´ve just burnt the image, everything seems ok, except the Mios Binding (I´ve configured it with my Vera’s IP) not working and the COMETVISU UI that is not starting … Could it be a problem with the Install feature ?
Thx

Hello @yokokito, problems with openHAB internally (like with bindings) are most probably not openHABian related. Can you please open a new thread in the openHAB 2 category? Good luck!

@jaydee73 how to switch to the demo sitemap is documented here :wink: I however would stay with standard and only look at the demo when needed. I have written something about that before:

@ThomDietrich, great idea and execution! Just wondering if you’ve heard about the new https://www.raspberrypi.org/blog/pibakery/ automatic Raspian image development tool? Any thoughts on using that to pre-build the image, including your auto configuration tools? Might make it quicker/easier to maintain, and keep the Raspian releases up to date, as well.

Hey @bartus, I read about it yesterday yes :slight_smile: Basically they are doing the same thing as I am doing, just in a graphical way instead of a script file. While this is probably nicer for the end user and for easy steps like preconfiguring Wifi, I see no benefits for the openHABian project in general. Setting everything up is a manageable but long process and doing this in a shell script seems to me the better (because more flexible) approach.

Another aspect: I’m currently in the process of making the scripts more modular. By that it should be possible to use the same logic in your Raspberry Pi setup as well as on a normal Linux (e.g. Ubuntu) installation or in a Virtual Machine. There will even be an interactive menu with optional components ready to install and set up. As you can see, openHABian goes way beyond what PiBakery aims to offer :wink:

As it is Stark Trek anniversary day today:

…to boldly go where no man has gone before… :slight_smile:

1 Like

Ah yes, keeping it platform-independent is clearly a better idea. Looking forward to using this when I finally make the full switch over to OH2. Thanks again!

1 Like

Hi @ThomDietrich , I’ve been working on something similar for the past few weeks (for OH1), but with a slight different approach (and more specific orientated towards z-wave).

The idea I followed was to propose an image of a completely configured installation. So for an hassle free installation interested people could just download the image and have a working configuration for their PI.
The image is much bigger than yours (3GB) but the time spent for the installation is only for downloading the image and burning it on the SD card. After that, the only thing to be done is plug in the PI and it is running.

So my question, what advantages do you see with your approach compared to the one described above?

Hey @Vincent,

sure thing:

Transparency, openHABian is a Raspbian installation PLUS a clear set of changes every user can work through and understand. I personally would hesitate to install a modified system without being sure about the details. No offense!

Ease of development, The git repository with a few Kilobytes of size is all you need to build the image AND configure the setup process. Changes to the setup are immediately available to users installing a fresh system or as upgrades. No need to build, test and upload a 3GB file…

Ease of usage, Downloading and flashing a 64MB file (directly from GitHub) is quicker and easier. After that, the installation will in return take a few minutes more but in the end it adds up to more or less the same time.

Modularity/Scalability, the openHABian setup script can soon be executed in an interactive menu-driven mode that allows to set up systems beside a Raspberry Pi (PC, VM, …) or providing optional components (like zwave, homegear, knx, mqtt,…)

That said, I like your motivation to work on such a project. Would you be interested in contributing? As I am personally not a zwave user (which has quite a significance nowadays) I would like to know which packages and or settings you would include in an automated setup process!?

1 Like

Hey,

I would absolutely be interested to contribute, but let me first put forward a few arguments of my own:

Transparency : you’re right that one should know what is included in the system. The image I would propose would not so have a modified system, but rather have some modules included (oh, habmin, samba, …) and other modules not included compared to the default installation of Jessie (like the educational packages, or the games). This could be clearly described.

Ease of usage : I think both methods are quite easy

Ease of development : This is clearly in favour of your proposed method.

Modularity : If you can propose this of course, it would be a great advantage.

The only thing I have been struggeling with during the past weeks, is the (classic) installation process itself, were when you had to ‘apt-get’, some installations didn’t succeed, and I had to start all over again (meaning a lot of time wasted). So I thought : give a user the image and he has working PI even without any Linux knowledge.

Maybe it is possible even to propose both ways (for very specific implementations). So a potential user could choose between a working PI without even having to look at it, or a modular installation where he can play with.

What, in my opinion is really important, is an easy wifi set-up, since in the PI 3 the hardware is included. (I don’t know if you have this included already).

So, till now I have been looking at OH1 (since I wanted to propose something combined with the charting solution), and for the moment I have a working configuration which includes (just from memory):

  • hamin : needed for z-wave in openhab
  • razberry : needed for the controller of the razberry hardware (card plugged onto the PI)

I could give you a much more detailed description (tomorrow) of the installation process (for example : the razberry server has to be stopped in order for habmin to work).

How do you propose to proceed ?

These are a few good points, let me clarify a bit more.

openHABian does that. You download an image, flash it to your sd card and after a few minutes there is a fully working openHAB 2 installation with all the latest versions and preconfigurations ready to use. You could connect to your samba share and the openHAB web pages and start configuring and using your openHAB instance without connecting via ssh once. So to make that clear: the result is exactly the same as with your proposed solution.

If you were to make an image of your sd card after your Raspberry Pi finished booting openHABian for the first time, you would have exactly what you are asking for. An image of a preconfigured Raspbian. :slight_smile: But why would you even want that? Package versions are going to get old and a 3GB image is harder to transfer and store than a 64MB one.

I already have it working in beta testing, probably gonna release it this evening after some more tweaking :wink:

Good point. Are we talking wifi setup before or after first boot? Both are possible I guess but that’s currently not on my todo list as I would recommend an Ethernet connection for 24/7 utilization.

OH1 is not included in openHABian and as it is going to be outdated soon, I’ll probably not bother adding it anymore. Is your charting solution also compatible with openHAB 2? Would be great to integrate your described steps as one optional component.

Yes this sounds good to me. You could provide a Pull Request but it’s probably easier to just send me the steps needed to get your ideas integrated in a new issue, just like this one. Thanks for your effort!

Ok. I will give you a description on github tomorrow. I can even test it if you like.
For the moment the charting was only ready for OH1, with the intention to propose it in OH2 if there is interest.

And concerning the wifi. Personally I have only one ethernet cable available for the moment so wifi would be a plus. And since the hardware is standard included in PI3 it would be a pity not to include this.

The problem with wifi is that the user has to enter his personal configuration to make this work (name, password), which for obvious reasons one can not provide in a standard installation. I was still struggling to find the optimal way to provide this :

  • A user can connect with screen and keyboard to the PI to enter this (standard on PI).
  • A user can connect with ethernet and login the PI to enter the details (basic use of linux)
  • Probably the best way I thought was to provide (develop) some kind of webaccess to allow the user to configure this (without to much hassle)

Great, that would be awesome.

That should be possible as after flashing you can still modify the content of your sd card. Would you be able to test this?


As I understand it, you would need to flash openhabian and then add the file /boot/config/wpa_supplicant.conf

Just quick answer (the rest for tomorrow).

The wifi configuration is possible and working perfectly. My problem was to find the most easy configuration.

So, with the ethernet connected and logged in to the PI, you have to :

  • edit
    /etc/wpa_supplicant/wpa_supplicant.conf

  • add at the last line of the file (default only 3 lines already written)

      		network={
      			ssid="YOUR_SSID"
      			psk="YOUR_PASSWORD"
      		}
    
  • and then ideally reboot

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

Hey @RHINESEL,
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. https://github.com/ThomDietrich/openhabian/commits/master

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 ./openhabian-setup.sh

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