HOW to Update Openhab 2.0 to latest Version

Dear all,

i have been a openhab user for many years and one thing that has always bothered me is the way of upgrading.
I have seen in Openhab 2.0 that bindings can be installed etc but still there is no way of easy upgrading any outdated stuff.
Can someone please explain me after hundreds of releases that nobody has implemented this yet ?
I believe that adding a function like this would allready help allot of people at least getting the correct version and it would make the program more user friendly.

Happy to hear an update on this :wink:

2 Likes

So on an apt-get Linux install upgrading involves:

sudo apt-get update; sudo apt-get upgrade

For a manual install, upgrading involves unzipping the new version over the old version.

Are you asking for a way to upgrade without having to download a zip file yourself?

Because no one has taken up the task to implement it and the existing process for upgrading is so simple already it has never bubbled up the list of priorities.

If there isn’t one already, you can file an enhancement issue on github.

1 Like

@wolf_from_the_north There even already is a PR for it - so please help defining, testing & improving it and always remember that openHAB is a community effort. Waiting for stuff to magically appear is usually the worst option :wink:

2 Likes

Dear all

As my installation for example runs on a synology server a button to automaticly upgrade would be awsome.
I know this is a community driven solution and i sure do my best to to inform / improve with the skills i own.
I have been using openhab for years and it looked strange to me that a manual action is needed to be able to perform a update.
Would be awsome if that PR was granted someday.
I assume seeing that binding install is there for all type of Os i believe its possible to have some automated script that does the updating.
Other programs running on the syno os do it perfectly trough the web front.
If any testing needed you can offcours count me in.

Kindest regards

Hi,
Are we not talking about two different things? I think the first request were for upgrading “bindings”, so the add-ons in general and the response is to upgrade the openHAB platform.
I may be wrong or is the PR include both upgrade mecanisms ?
Regards

Dear all ,

In this topic i am realy talking about upgrading the system itself not the bindings.
kindest regards

Hi, it is a good question. I can’t find update instructions in documentation. I tried to update from 2.1 to 2.2 by using

apt-get upgrade

but it broke my system at all. How to update only Openhab service?

sudo apt-get update; sudo apt-get upgrade openhab

apt upgrade won’t work, you should use install again to update one package (and dependants).

sudo apt-get install openhab

upgrade has no additional parameters, so sudo apt-get upgrade openhab will ignore openHAB and try to update the whole system.

1 Like

Good to know. I thought I had done that before like that but I must be misremembering. It happens more and more frequently these days. Must be getting old. :slight_smile:

This post still comes up on top of the goggle results for “How to update openhab 2” so I will post although the original thread is quite old.

For users who have openhabian running on Raspberry Pi, there is a configuration tool which you can run from the console:

sudo openhabian-config

The tool includes an update functionality.

1 Like

Hi, installed some times ago OH2 on small PC (remotely access), running perfectly, with chocolatery, Karaf and a lot of environment that I really do not know.
Now I just try to enter the openhabian config in order to update to the latest version so I type : sudo openhabian-config. There the system ask me for a password, I’ve seen that it was habopen. There I get an error in return, see printscreen. Help!

And also the no tinyb error…

Also tried with Powershell, doesn’t work, signature is missing…

cd C:\openHAB2
. .\runtime\bin\update.ps1
Update-openHAB -OHVersion 2.3.0

openhabian-config only exists on openHABian configured machines, meaning Linux. Since you installed using Chocolatey you need to use Chocolatey to upgrade to the newer version. Or you need to follow the upgrade instructions for Windows: https://www.openhab.org/docs/installation/windows.html#updating-the-openhab-runtime

WINDOWS UPGRADE
Depending on what version you are upgrading from, be careful when following the Windows upgrade instructions make sure you keep your logging 42j file as many have had problems with logging disappearing after performing the in-place upgrade according to the linked above instructions.

Squid

Thanks, so this link is not the right one for me? https://github.com/openhab/openhab-distro/releases#openhabian

Windows

To start the update process, run PowerShell as an administrator and use the following commands. Assuming you have openHAB saved in C:\openHAB :

cd C:\openHAB
. .\runtime\bin\update.ps1
Update-openHAB -OHVersion 2.3.0

Not if you are running on Windows.

but did you read the link? It’s confusing.

Windows

To start the update process, run PowerShell as an administrator and use the following commands. Assuming you have openHAB saved in C:\openHAB :

Hi @chris669, I’m assuming you’re using 2.2.0? Looking at the error you received, the powershell script isn’t working because Windows is set to block the execution of scripts.

Try using

Set-ExecutionPolicy Bypass

before running the commands again. Be sure to make a backup of the folder first!

yes I’m using 2.2.0, will try your command, thanks for help !