openHABian hassle-free openHAB Setup

And Hello again! It’s time for the latest updates announcement.

Authentication and Encryption: I want to highlight the addition of nginx as an optional component. @Benjy contributed a fully automated installation and setup procedure for the nginx as a proxy for your openHAB system. The setup includes authentication with username and password as well as SSL / HTTPS connection encryption. If you own a domain name, you can even generate and use a Let’s Encrypt certificate during the procedure! The procedure is a big step forward in terms of security and we invite every user to test it. We invested a few hours into this function to make sure it’s working in all scenarios and clear to use and understand. The main work was done by @Benjy, Thanks!
For further details regarding this feature, please have a look at the source code and the docs.openhab.org article: http://docs.openhab.org/configuration/nginx.html

Karaf Console security and clarity: The optional step to open up the karaf console was a nice idea but posed a security risk with it’s default password hidden away in a configuration file The step now includes a dialog to enter your own password and gives some more hints.

Improved Updater: The in openhabian-config integrated update routine will now show what actually changed since your last update. This might help you figure out what to expect. I want to also take this chance to remind everyone to update regularly. The “Update” routine will only pull latest changes to the openhabian-config files and will by itself not change anything in your system. Execute one of the other menu entries to install changes, e.g. the new and improved vim config.

Improved vimrc: Vim is my favorite linux text editor. If it’s yours as well you will be happy to hear, that I’ve added some nice new default settings to the vim configuration file. To install the new configuration file you will first have to “Update” openhabian-config and then execute the “Basic Setup” step.
If you are a nano user yourself, follow this invite to contribute your favorite default settings :wink:

Minor changes: check the commit history: https://github.com/ThomDietrich/openhabian/commits/master


openHABian will continue to grow bigger. A few changes are already in he pipe and other ideas are currently discussed in the corresponding GitHub Issue Tracker. As mentioned above, feel free to participate.

One main TODO of mine is the writing of a detailed docs.openhab.org article on openHABian with all setup and usage descriptions. With this article openHABian will also (finally) reach version 1.0.

4 Likes

looks good… but I have 2 questions :slight_smile:

  1. sudo shutdown -h now doesnt work … how can I actually shut it down :wink:

  2. is is possible to also add / install the raspbian desktop (gui) and xrdp ?

cheers

sudo shutdown - h 0 should do the job. What’s the error you are seeing?

Regarding gui: openHABian hassle-free openHAB Setup

Hi

This looks really good but i have a suggestion/request for this hazel free installation and that is to make a image that works with berryboot.
Berryboot is a powerful boot for RPi that makes it possible to boot from USB devices and ISCSI devices. My current openhab1 installation is running from a iSCSI device to not wear out the SDcard.

I am not en expert in Linux and how to make images so i hope someone thinks this is a good idea can help to make this happen. My suggestion is that you build a image for berryboot in parallel to the normal image for a SD card.
If this is easy or hard, i don’t know… I tried to follow the instructions that is on the berryboot page but i was not successful due to my limited knowledge.

Here is the homepage of berryboot
http://www.berryterminal.com/doku.php/berryboot

/Fredrik

On first sight this should be possible. I’ll have to look at that at a later point. I’ve created a ticket.

Is having your system on an external USB device the only benefit you are after? Be aware that we already have a method to Move the system files to a USB device in the openhabian-config menu. You will need to install openHABian on you sd card before moving it to the usb device but besides that, it’s what you are looking for.

Secondly please be aware, that openHABian is a collection of scripts you can also execute on other debian based linux systems. I see that BerryBoot supports Raspbian. You should (in theory) be able to do the following after installing Raspbian on your USB device:

# install git
sudo apt-get update
sudo apt-get install git

# get openHABian
cd /opt
sudo git clone https://github.com/ThomDietrich/openhabian.git
cd openhabian

# Execute as root
sudo /opt/openhabian/openhabian-setup.sh

In the presented menu you can now execute the first few options (Basic Setup, Install openHAB2, install Samba,…) and you are done.

Thanks… I understand that his is maybe not highest priority but it would be very nice to see it working.

Since i have a NAS i want to have the file system on that one using iSCSI even it its not that fast due to the limitations of the Ethernet port but since i have been running openhab1 like that and it works fine i guess openhab2 should also work fine like this. I prefer to not use a USB disk since that is one more thing i need to buy. :slight_smile:
I have seen that there is a way to run on USB disk but if i remember correct his is limited to the RPi 3 but correct me if i am wrong, berryboot works on all RPi i think (i use a RPI2).

And also thanks for the tips how I could possibly get it running from a normal Raspbian, i will try it out…

For anyone bold enough to install on a rpi 1 and wanting Grafana, this should be possible in a near future : a PR is waiting to be merged.

1 Like

Just installed this on my Pi, it is asking for OpenhabPi tty1 login, what is this??? Can’t go anywhere until this is put in, and everything I try says incorrect :frowning:

maybe an option in a config for openhabian

a) raspbian lite as base
b) raspbian / pixel desktop edition as base

? :slight_smile:

Sounds like you are trying to use your Raspberry Pi like a normal PC with keyboard and display. You will be happier running it as a headless unit connected to your local network and connecting via SSH. https://www.google.com/search?output=search&q=raspberry%20pi%20ssh%20tutorial

Be it tty or ssh, the default login and password are pi and raspberry, as can be found in the first posting.

:wink:

1 Like

@skeal could you please look at the following ticket and help with the problem discussed (if you can ;)): https://github.com/openhab/openhabian/issues/33#issuecomment-264695601

well openhabian is imho targeted to help beginner-ish users to have a good start

I think these people feel more comfortable by connection via remote desktop and do stuff that way :-/

hello. hope i can help… but it works with the added line in /etc/default/openhab2

Works with the newest openHAB 2 snapshot and with quotes just as discussed in the Issue?

Yes:

EXTRA_JAVA_OPTS="-Dgnu.io.rxtx.SerialPorts=/dev/ttyAMA0"

openHAB 2.0 Build #631

2 Likes

Is this currently down, slow or some other issue? I’m trying to install to a pi 2 and say retrieving packages.gz, but I see very little activity on my wan, and the green light is pretty dim when it blinks.

Hi ThomDietrich,

first to say: i love this installer script.
I had some restarts for configuration with openhab and it is nice to have the same base for testing within only a few minutes of work and just waiting for openhab to come up.

Due to the fact I am in the change from openhab 1 to OH2, I do change between them.
Therefore I realized two issues in /etc/rc.local.

first:
it will run the installation routine always. So openhab is killed and restarted every reboot. This of course is not good when I am actualy on OH1 :wink:

second:
the redirection to the logfile is without preceding $, so the logging goes to /LOG

I fixed it for me, would be nice in the distribution too.

Hey @Steffen-Engel,
thank you for the bug report! Really appreciate it. Especially with such a nasty one. At some point I realized the logging was not going where it was supposed to go but didn’t look into it further. The lock file bug is indeed not something that should be executed every boot. The problem was, that /var/lock is a tmpfs partition and as such recreated at every boot…
The bug also held the green LED in heartbeat mode even after the second reboot, which was not intended.

I’ve fixed both bugs in 6a4b581. Everyone reading this: Please execute “Update” and then “Basic Setup” from sudo openhabian-config. Watching out for further contributions from you :wink:

Hello @Michael_Grossman, I’m not aware of any problems. In rare cases you might run into a time of interrupted network connectivity or some other unexpected problem. Please just retry once more.