openHABian hassle-free openHAB Setup

Hi at all,

first of all, thanks a lot for the great work on openhabian!

Since the newest release 1.4 i have a big problem with openhabian. If I do a fresh installation of openhabian and then doing the following steps, nothing works anymore:

  1. start openhabian-config
  2. start update
  3. start upgrade system
  4. install optional components:
    a) homegear
    b) mosquitto
  5. edit the interfaces file to get a static ip
  6. reboot
  7. openhabian is broken, because i can’t start an upgrade system (point 3) anymore and i get the following error:
The following packages will be upgraded:
  bind9-host cpp-4.9 curl g++-4.9 gcc-4.9 gcc-4.9-base homegear homegear-homematicbidcos homegear-homematicwired libasan1 libatomic1 libbind9-90 libcups2 libcurl3 libcurl3-gnutls libdb5.3 libdns-export100 libdns100 libgcc-4.9-dev
  libgcc1 libgomp1 libgssapi-krb5-2 libhomegear-base libhomegear-node libicu52 libirs-export91 libisc-export95 libisc95 libisccc90 libisccfg-export90 libisccfg90 libk5crypto3 libkrb5-3 libkrb5support0 liblwres90 libmysqlclient18
  libncurses5 libncursesw5 libssl1.0.0 libstdc++-4.9-dev libstdc++6 libtinfo5 libubsan0 libwbclient0 libx11-6 libx11-data libxi6 libxml2 libxtst6 mysql-common ncurses-base ncurses-bin ncurses-term openhab2 openssh-client
  openssh-server openssh-sftp-server openssl p7zip-full rsync sensible-utils ssh sudo tzdata zulu-embedded-8
65 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/234 MB of archives.
After this operation, 175 MB of additional disk space will be used.
fatal: unable to read tree ecb31bff091888105076334ab0bd08fa3099f05b
dpkg-deb (subprocess): decompressing archive member: lzma error: compressed data is corrupt
dpkg-deb: error: subprocess <decompress> returned error exit status 2
dpkg-deb (subprocess): decompressing archive member: internal gzip read error: '<fd:4>: invalid distance too far back'
tar: This does not look like a tar archive
tar: Exiting with failure status due to previous errors
dpkg-deb: error: subprocess tar returned error exit status 2
Traceback (most recent call last):
  File "/usr/bin/apt-listchanges", line 250, in <module>
  File "/usr/bin/apt-listchanges", line 108, in main
    pkg = DebianFiles.Package(deb)
  File "/usr/share/apt-listchanges/", line 134, in __init__
    self.binary  = pkgdata.Package
AttributeError: ControlStanza instance has no attribute 'Package'
E: Corrupted archive
E: Prior errors apply to /var/cache/apt/archives/libncurses5_5.9+20140913-1+deb8u2_armhf.deb
fatal: unable to read tree ecb31bff091888105076334ab0bd08fa3099f05b; assuming package has no files currently installed
Updating FireMotD available updates count ... es/libatomic1_4.9.2-10+deb8u1_armhf.deb
E: Sub-process /usr/bin/dpkg returned an error code (2)

I don’t know what to do to avoid this error. I tried the installation for several times and I always get this error.

Maybe someone can help me?

Thanks a lot!


Maybe this works.

1 Like

I installed openHABian successfully and it has been working for a few months.
Just a few questions:

  • I need to install a new Z-wave jar file and I can’t find the addons directory. openHABian seems to put things in different folders from those listed here:

  • How do I upgrade the installation to the latest stable release (I’m on 2.1.0-1) ?

  • How do I backup my installation?

Found Amanda for backup… sounds complicated (but very effective).
Found openHABian-config and upgraded to 2.2.0 I’ll have to figure out what the other options do.
Still can’t find addons directory.

After upgrade 2.1 to 2.2, Frontail doesn’t have any new events.
tail -F /var/log/openhab2/openhab.log /var/log/openhab2/events.log

Did the location of the events.log change?

It’s possible that you did not upgrade correctly (there is a configuration for logging that has changed, the upgrade will by default use the old configuration, which is wrong). See here:

I guess that’s the problem. It would have been nice to have known that I should not have accepted the defaults for those files. Perhaps some instructions somewhere.
I’ll see if I can patch it up.

In fact, there are those informations. See Announcing openHAB 2.2 and the link inside,, especially the paragraph about breaking changes

You might think “that’s well hidden!” but from the perspective of a developer, this (release information document) is the one and only place to give detailed informations. Why repeating informations over and over again, when you can simply set a link to it?

1 Like

I don’t want to be too hard on the good people here since I really appreciate everything they do but I do think the upgrade instructions could be improved to avoid the difficulty I (and others) have encountered.
The upgrade instructions are:

If you are working with an openHABian setup, the upgrade is quite easy. Regardless of if you are currently using the openHAB 2.1 stable release or one of the latest 2.2 SNAPSHOT builds, switching to openHAB 2.2.0 stable is done in just a few steps:

Connect to the SSH command line and execute: sudo openhabian-config
Select the "Update" option
Wait for the openHABian update to finish, reenter the openHABian configuration tool
Select the "openHAB 2.2.0 stable" option

It would be good to include instructions here to NOT accept the default reply to the messages which appear during the upgrade for certain files. The default option keeps the old configuration and this is not the correct response for some of the files. (It would be useful to know which files should use the old configuration and which the new.)

The “Breaking Changes” section talks about what to do if you have made changes to the configuration file but should also include the above advice about upgrading to NOT accept the default response to that file which is to keep the old file. It should instruct to use the new file.

Again, I really appreciate all of the effort everyone has put into this project and my intention is to improve it, not criticize.

That’s the Thing. Wenn can’t publish such Infos online from a developers view, if the System is going to be used by other people than developers too.

Ich would consider myself as a geek, tech interested human and since i am working with different programming languages for years i would consider myself as a kind of developer too.

Guss what: i had the logging problem too and checked that file after updating.

Things like this should be improved if we want openHAB to be used by a wider range in the future.

Oh, I had this Issue, too. :slight_smile: But I don’t complain, because I found the needed information at once by reading the release notes (which I should have done before updating!)

Simply no.

If the product is for others than developers too, the Release Notes can be optional, but should not be a must read document.

Or we have to put a “sorry only for nerds” on top of the Page…

Especially opanhabian considers itself to be hassle free, so we have to listen for Feedback like this and improve “hassle free” on Such points.

1 Like

Release notes are never optional :slight_smile: that’s no “we are very proud to present, and hey, thank god it’s Friday” document, but essential information about new functions, bug fixes, changes …

And home automation is no job for “let’s click the install button and all will work automagically”.
In fact, at least in Germany, we home automation enthusiasts are always called nerds :slight_smile:

1 Like

I need some advice for moving the configuration files to a mounted nfs folder located on a NAS.
It seems as if the configuration folder is hard-linked to at least two places:

  • /etc/openhab2/
  • /srv/openhab2-conf/

What’s the reason for that? Could there be a problem with replacing them with symlinks to an nfs-mounted folder?

I also consider moving /srv/openhab2-userdata as well, could there be a problem with that?

I think this is due to the fact, that per default samba would not allow to follow symbolic links, but this is just a guess.

1 Like

See /etc/fstab. The first column is the real location. The second is a directory loopback mount of the same dir to allow for Samba to easily share it (you can remove it from /etc/fstab if you don’t want it, also IIRC it’s a reversible config option in openHABian). So no, you do not want to move /srv/.

I have a NAS, too, and chose to mount logs (var/log/openhab2) and /var/lib/openhab2 (to contain persistence data etc). I chose to however NOT mount /etc/openhab2 so in case of trouble with the NAS or connection openhab still has access to the config.

1 Like

Thank you @mstormi for this detailed information and for sharing your experience about using a NAS.
Before my update to openhabian, the entire (manual) openhab installation was located on a mounted nfs folder. But the setup is completely different now. I think I will now also keep everything on the sd card and make regular backups instead (maybe even executed by rules via the exec binding).

I’d still strongly suggest to put logs and persistence data on the NAS mount. They account for the vast majority of writes, and once you move these, you’ll be ‘reasonably’ safe from SD card corruption.
You’ll still have to do backups, of course. Check out the Amanda backup system install option in openHABian.

Thanks @Lionello_Marrelli I had similar issues for installing redis-py, but I had to do this:

(running as root)
apt-get remove python-pip
easy_install pip

and then I had to use the full path to run pip

/usr/local/bin/pip install redis

I raised this topic/problem on the beginners forum:-

and have been advised to move it it seems to be a problem with openhab setup. The same Pi with raspbian stretch works fine, so the problem is not the hardware.

I have tried a number of times now to get the wireless working, each time the result is the same, the pi no longer boots and I have to reflash the card.

Any help/advice/solutions would be gratefully received- as I stated in the beginners forum, using wired on my home network is not an option for me except for testing.