Whats your way to update OH2 with another nightly build?

I am not sure how far along you are at this point, but wanted to let you know a few things that may help.

First, you should not copy the Habmin jar into addons any more. In the last evening or so, Habmin has become available to install either from addons.cfg or through PaperUI. I recommend through addons.cfg as it just becomes automatic at that point. If you put it in addons.cfg, then should see it in PaperUI as well, as “installed”. Note that depending on your internet speed, it may take some time for it to install, so give it some time.

Second, the script is made to be configurable. If you liked where you had stuff installed, you could have left it there. I default to /opt as the base, which seems sane for most systems, but it should work where ever you want it to go. Just change the HAB variable at the top.

Finally, using the script does work well, but one thing to know about it is when you start the online distribution, it has to download a lot of stuff. This means that all the dependencies are not there right away and need to get loaded over time. This does lead to some exceptions and timeouts in the logs. After everything is downloaded, I do recommend restarting OpenHAB again, and the log should be much cleaner.

Hope this helps

1 Like

I find it that it is good to keep:

./runtime/karaf/bin/oh2_dir_layout

If you are not following the standard (Like I have the logs in /var/log/openhab2 etc.

Regards, S

1 Like

@Seaside, thank you so much for this hint. Just switched from the apt-get version to the snapshot zip-file as suggested by @Kai because some of my files seemed to be old (e.g. PaperUI) although I was using the apt-get procedure as described on the docs-portal. By uploading the directory structure via FTP from my PC obviously the dir_layout file got overwritten - and I wasn’t able to start my service anymore and the error message showing up was not “end-user-like” ;-). Because of your hint, I found out where to change the entries - and now it’s running again. THANK YOU!

@Boby
Glad it helped.
I’m using a different approach now when updating to latest snapshot.
I should probably update my apt-repo so I can use snapshots from there.

What I do is the following:

wget "https://openhab.ci.cloudbees.com/job/openHAB-Distribution/lastSuccessfulBuild/artifact/distributions/openhab-offline/target/openhab2-offline-2.0.0-SNAPSHOT.deb"
 dpkg -i openhab2-offline-2.0.0-SNAPSHOT.deb
rm -rf /var/lib/openhab2/cache/*
rm -rf /var/lib/openhab2/tmp/*

Doing this the oh2_dir_layout will be untouched.

Regards, S

@Seaside, thank you once more.
Are these four commands sufficient? Or do I need to consider some other commands/changes as well? If so, I’d use this way instead since it’s easier (less steps).

One thing is still unsolved : After I had the snapshot running again, all bindings, persistences and transformations were “uninstalled” - and I had to install them via PaperUI again. Is this common?

Thank you!

A lot changed since this thread was started.
On a debian/ubuntu based Linux system the repository based snapshot installation is a stable and tested process and should be the recommended method. No need to do manual installations and upgrades and follow certain steps which may change over time. Everything is taken care of by the deb installation steps.

@Seaside: Deletion of the cache and tmp folder is part of the latest deb improvement: https://github.com/openhab/openhab-distro/pull/286

@Boby to still address your question: these four commands should be enough. Maybe you would do good to manually stop openhab2 beforehand and only start it after the deletions. The problem with uninstalled addons should not normally be the case. You can work around that by installing your addons through services/addons.cfg.

I’m going to close this thread. Please contact me if you do not agree! I’m not infallible :wink:


The installation and upgrade process is documented at docs.openhab.org. The article will be updated as soon as changes are needed, e.g. when openHAB 2 reaches it’s final release.

http://docs.openhab.org/installation/linux.html#package-repository-installation