openHABian hassle-free openHAB Setup

Hi all,

Not sure if this issue is to do with the installation script or not.

First of all a big thank you for developing the utility. I installed it a week ago and ended up with the most functional OH2 installation I’ve had yet :slight_smile: It’s very helpful.

But I recently ran apt-get update and apt-get upgrade and after a reboot nothing gets initialized.

What have I done wrong? I have a very basic installation.

No, it’s not about the script. At the moment (or maybe forever?) an apt-get update/upgrade does delete all bindings, actions, persistence etc. Only the configuration files remain.

See here:

You have to manually add all your bindings etc. to the addons.cfg file.

@jaydee73, many thanks for your prompt reply. I guess I’ll use updates more sparingly from now on!

1 Like

and since I’ve hijacked this thread, may I ask another question regarding the Mosquitto installation included in the script.

When I follow the instructions on [], (, it seems fine until I try subscribe with the following:

Did I miss setting permissions or something? I see some SSH commands require me to enter the pi’s password. Maybe I need to turn that off somewhere?

I’ve had MQTT working on a previous installation of OH2 (via apt) so i’m not sure what I missed here.

Starting mosquitto seems fine:

I just want to say thanks for this work.
I’m new to openhab AND to Linux AND to RasPi,
and your Openhabian made my decicion easy to give my dream of an smart home a try :slight_smile:
Install worked fine without any problems, thanks.

Additional remark: would be nice if you could add some more basic information to this thread for dummys like me, for example how to login into openhabian machine, default username and password

This is a shout out to RPi+Razberry+openHAB users:

Please help solve the still unclear issue with the Razberry and openHABian, especially in combination with a RPi3 with Bluetooth. There is a ticket for that topic in the issue tracker. Input from users with experience with the hardware and/or willing to gather the needed intel, please step forward :wink:

I looked into the script you are talking about and found more details regarding the problem that both Razberry and Bluetooth use the same UART pins 14 and 15. That’s the reason why Bluetooth indeed needs to be disabled! (CPU freq changes do not seem mandatory) (The following has to be done additionally to Serial Port activation through openhabian-config)

I’m not sure about the differences between these two solution but I would recommend the one used in the official installation script:

# Disable bluetooth Raspberry Pi 3
RPI_BOARD_REVISION=`grep Revision /proc/cpuinfo | cut -d: -f2 | tr -d " "`
if [[ $RPI_BOARD_REVISION ==  "a02082" || $RPI_BOARD_REVISION == "a22082" ]]
	echo "Raspberry Pi 3 Detected. Disabling Bluetooth"
	systemctl disable hciuart
	# Add "dtoverlay=pi3-miniuart-bt" to /boot/config.txt if needed
	if [[ ! `grep "dtoverlay=pi3-miniuart-bt" /boot/config.txt` ]]
		echo "Adding 'dtoverlay=pi3-miniuart-bt' to /boot/config.txt"
		echo "dtoverlay=pi3-miniuart-bt" >> /boot/config.txt

	echo "!!! Update Raspberry Pi 3 Firmware for stability work with commands:"
	echo "sudo apt-get install rpi-update"
	echo "sudo rpi-update"

Btw.: The “hciuart” service is disabled during the mentioned installation script.

Btw. 2: A “UZB” was mentioned and successfully tested without disabling Bluetooth (the above instructions). I’m too lazy too google what UZB is, I’ll leave this here just for reference.

Hey guys,
loosing the list of installed bindings is in fact a current problem in openHAB which is worked on with effort! Current plans are to remove the cause of this problem this Thursday. Please do not overrate this hickup of a beta snapshot :wink:

Apart from the problem, I can still recommend installing bindings through addons.cfg as this will act as an instant backup of your setup.

@UglyKidJoe: “I’ll use updates more sparingly” is not the conclusion you should draw from that :smiley:

The command your screenshot shows should work with the default setup. I’d guess the IP address is the problem. This has to be the IP of your broker, which is the openHABianPi itself (localhost). In this you can just ignore this option.

mosquitto_sub -t 'owntracks/#'

is it possible to install this on a USB drive… i tried changing the cmdline.txt to root=/dev/sda2 but that didn’t work anything else i should be doing?

  • Use the “Move root to USB” feature in the menu after you finished installation on SD card (this will still need the SD to be present)
  • Set inside installer-config.txt usbroot= # set to 1 to install to first USB disk. This was not tested by me.

sorry can you please clearify that for me. where do i find the MOVE ROOT TO USB. once i downloaded the “openhabian-ua-netinst-20160915-git9e034e7” i used Wind32Diskimage to put the image on my sd card…

also inside the installer-config.txt

do i replace the
"hostname=openHABianPi boot_volume_label=openHABian disable_root=1 username=pi userpw=raspberry user_is_admin=1 timezone=Europe/Berlin"

"usbroot= # set to 1 to install to first USB disk"

Okay, the openHABian menu is something you will find after installing the system on an SD card.

If you do not have any prior experience with openHABian I would recommend to go with an sd card. There is no eminent reason to prefer an USB stick and you can still switch at any point if you really want to.

Regarding the option, after booting the system and connecting via SSH you will be able to execute sudo openhabian-config to see the menu mentioned in all previous update postings here (scroll up). There you will find the menu entry “Move root to USB”.

As for the installer-config.txt: Your quote tells me that you are on Windows and use the default Notepad. Microsoft Notepad does not support Linux line endings, that’s why everything is cluttered together from your point of view. That’s not your fault, MS doesn’t care that millions of users run into that problem at some point in their life. A very general suggestion: Install the way better Notepad++ and use it from here on out!

After you got a sane view on the content of the file, just add usbroot=1 at the end.

Thanks for quick reply…
i was able to install the image on 2gb SD and run it… it did not finish installing the whole thing due to lack of space. I was able to boot my pi with the SD and moved the stuff on my USB… (i don’t have a big SD card). if i ran every single option on the openhabian-config. would that be the complete installation? or do i really need to start with 8bg micro sd?

thank jay

While the initial setup a lot of things are done. I can not vouch for a full openhabian setup on your system from where you are starting. If you really want to work with the 2GB card (imho not worth it) you can however continue as you did. The important steps can be executed through the first few menu entries. Start with Update and then continue. Good luck!

To not have to deal with this and in order to avoid possible problems, my personal approach would be to buy an SD card and be done with it.
16GB is what I would recommend to remarkably reduce wear / increase the chance that your data does not get corrupted.

Perhaps you can point me to the problem:

After about one day the ssh-connection isn’t working anymore. I was connected and then all commands like nano, ls, cp etc were replied by “command not found”. OpenHAB webinterfaces still work as expected. This was the second time now. As I don’t have a display at the raspberry I can’t tell what’s on the console :frowning:

EDIT: Now there is no ssh working anymore even after hard reboot by power cable. OpenHAB still starts expected :frowning:

Okay I’ll try to “point you to your problem” :slight_smile:
Your description is very awkward. Sounds to me like the problem is actually something different. If your system does not respond on an SSH connection, that’s normally the sign for a boot or network problem - in other words I never encountered problems with openssh itself. The fact that your openHAB is still responding disproves that…

Did you do any changes to the system recently? Change something for the pi user, change settings in sshd.conf, add firewall rules, change your surrounding infrastructure?

Is samba still working? Maybe this problem is the first sign of a corrupt sd card --> random parts of your system are not functional anymore… Because of that possibility I would recommend to do a backup of your system before anything else. Your best way for that is to use Win32DiskImager (if you are on Windows).

If i was writing something wrong with “point to” sorry … i’m german and trying to do my best in english :slight_smile:

Didn’t change anything other than installing and migrating to your system 2 days ago :slight_smile:

Samba isn’t working anymore too. I’ll try a new sd-card today. Perhaps this will fix

First time user here. Just started freshly with the openHABian image you provided. Looks like almost everything worked but Java8 seems to be broken, right?

[openHABian] Installing Oracle Java 8 from Web Upd8 repository...
$ apt -y install oracle-java8-installer
Reading package lists... Done
Building dependency tree
Reading state information... Done
oracle-java8-installer is already the newest version.
oracle-java8-installer set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up oracle-java8-installer (8u111+8u111arm-1~webupd8~0) ...
Using wget settings from /var/cache/oracle-jdk8-installer/wgetrc
Downloading Oracle Java 8...
--2016-11-10 13:41:53--
Resolving (,
Connecting to (||:80... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: [following]
--2016-11-10 13:41:53--
Resolving (, 2a02:26f0:136:290::2d3e, 2a02:26f0:136:2a0::2d3e
Connecting to (||:443... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: [following]
--2016-11-10 13:41:53--
Resolving (, 2a02:26f0:136:2a0::2d3e, 2a02:26f0:136:290::2d3e
Connecting to (||:443... connected.
HTTP request sent, awaiting response... 503 Service Unavailable
2016-11-10 13:41:53 ERROR 503: Service Unavailable.

download failed
Oracle JDK 8 is NOT installed.
dpkg: error processing package oracle-java8-installer (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of oracle-java8-set-default:
 oracle-java8-set-default depends on oracle-java8-installer; however:
  Package oracle-java8-installer is not configured yet.

dpkg: error processing package oracle-java8-set-default (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
Updating FireMotD available updates count ...
E: Sub-process /usr/bin/dpkg returned an error code (1)
[13:42:23] pi@openHABianPi:~$ sudo openhabian-config
[openHABian] Checking for root privileges... OK
[openHABian] Updating myself... Already on 'master'
Your branch is up-to-date with 'origin/master'.
OK - No remote changes detected. You are up to date!

[openHABian] Updating myself... Already on 'master'
Your branch is up-to-date with 'origin/master'.
OK - No remote changes detected. You are up to date!

Bye Bye! :


I just selected the “Java 8” menu entry and everything went just fine. This looks like a short term temporary problem with either the server or your internet connection:

   2016-11-10 13:41:53 ERROR 503: Service Unavailable.

Easiest solution: Restart the installation