openHABian hassle-free openHAB Setup

Thanks Thom! Indeed I just did an openhabian update and not the Basic Setup. And I missed the mentioned posting as it describes exactly what happened to me.

Will try it this evening.

Thanks again.

Hi Please advise. I tried upgrading, tonight and followed the instructions as follows:

‘# Make backup
cp -arp /etc/openhab2 /home/pi/openhab2-conf-bak
’# Remove and reinstall openHAB
sudo apt update
sudo apt purge openhab2-offline
sudo apt install openhab2-offline
’# Restore Backup
#sudo rm -rf /etc/openhab2
sudo cp -arp /home/pi/openhab2-conf-bak /etc/openhab2
sudo systemctl restart openhab2.service

Error message:
awk: cannot open /usr/share/openhab2/runtime/karaf/etc/branding.properties (No such file or directory)

I tried sudo openhabian-config, but receive error message:
sudo: openhabian-config: command not found

I then tried:
sudo sed -i -e ‘s|/usr/share/openhab2/runtime/karaf/bin/|/usr/share/openhab2/runtime/bin/|g’ /etc/init.d/openhab2 /usr/lib/systemd/system/openhab2.service
sudo sed -i -e ‘s|OPENHAB_USERDATA="${OPENHAB_HOME}/userdata"|OPENHAB_USERDATA="/var/lib/openhab2"|g’ /usr/share/openhab2/runtime/bin/oh2_dir_layout
sudo sed -i -e ‘s|OPENHAB_CONF="${OPENHAB_HOME}/conf"|OPENHAB_CONF="/etc/openhab2"|g’ /usr/share/openhab2/runtime/bin/oh2_dir_layout
sudo sed -i -e ‘s|OPENHAB_LOGDIR="${OPENHAB_USERDATA}/logs"|OPENHAB_LOGDIR="/var/log/openhab2"|g’ /usr/share/openhab2/runtime/bin/oh2_dir_layout
sudo systemctl daemon-reload
sudo service openhab2 start

But same problem. Please advise where I am going wrong?

I’m doing an update and I get this message. Not sure if it’s the first time, just the first time I’ve notice it. Not sure what it means, if it’s important, or how to fix.

(Side note: Use the “code fences” button in the editor toolbar to structure your posting with console text.)

First part: Seems okay. Please check the content of /etc/openhab2 to be yours.

Error message: You need to execute “Basic Setup”

“sudo: openhabian-config: command not found” - this can’t be. There is only one explanation I can think of. I remember your name (add profile pic to stay known ;)) from way back when I started with openHABian. Are you by any chance on a very early version of openHABian? I introduced openhabian-config only at a later point (around v0.8). Please check the output of

git -C /opt/openhabian/ log -1

Regarding the last part with the sed commands: That was not needed anymore. A more general advice: Do not execute Linux commands blindly without knowing what they are going to do.

To get up to speed you can either install openhabian anew or you can try to update the important parts manually (git pull, execute openhab-setup.sh, select most menu entries). I would recommend to do a backup and trigger a new openhabian setup.

This error is new to me and doesn’t make much sense. The character war in the first line also looks scary. I do not want to rattle you but please do a backup now and check your filesystem/sd card for corruption.
This could on the other side just be an error with the newest version of etckeeper. Can you check the mentioned line 35 in /usr/bin/etckeeper ?

@ThomDietrich

I do have a current backup and will check. When I open etckeeper I see this:

I’m certainly no programmer, but it doesn’t look right to me. Could this be contributed to me not having the current snapshot version as determined in this thread:

https://community.openhab.org/t/no-audio-voice-configuration-in-paperui/17466/4

Thanks,
Yes - I am using a very early version of openHABian… I will perform a complete re-install.

That’s not the bash script that’s supposed to be there. Do a backup and reinstall openHABian.
This happens to users from time to time. I only once had real issues with 2-3 RPi over multiple years. Pay attention to this article on the topic:

That’s probably the easiest solution for you. Especially after the latest big change Replacement of mapdb by jsondb

Did a new install, once again enjoying the wonders of OpenHabian!!! Back on the newest snapshot without errors.

Thanks.

1 Like

Hey guys, because of current events I just wanted to point out once again, that every contribution in the form of comments on issues or by submitting PullRequests are highly welcome!

Help improve openHABian for yourself and others! :wink: You will make this guy feel proud:

3 Likes

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: