Openhab 2.3 and 2.5 installations on the same Pi

Had a working 2.3 installation on a Raspberry pi and decided to upgrade to 2.5

Did the update and apparently ended up with two instances, my 2.3 which is installed in /opt/openhab2 and my 2.5 which is in /usr/share/openhab2

I can still start my old instance from systemctl start openhab.service or I can use open-cli start to run the 2.5

Even though I restored my backup from 2.3 into 2.5 it seems to have done little for me. I’m basically starting to configue the 2.5 instance from scratch

Any suggestions?

How did you install openHAB2.3? How did you do the upgrade?

To solve the Issue, backup your configurations by using openhab-cli backup, copy the backup file to a stick or to another computer, then start from scratch.

Maybe consider to use openhabian, but please be aware that openhabian was broken - wasn’t able to download zulu - I don’t know if it’s fixed yet. To circumvent the Issue, you can use a current standard Raspbian Image, then install git, download openhabian scripts and use it manually (you will have to install java zulu without using openhabian, then) According to https://github.com/openhab/openhabian/issues/734 it’s still broken…

after installing openHAB2.5 (would be OH2.5-M4 if using Milestone), start openHAB once and chose expert from web UI. shutdown openhab and restore your backup.

Please be aware that there may be several Issues to solve, as openHAB2.3 is pretty old and there were many hundreds changes of code since.

1 Like

As of late last week still broken but there are workarounds.

There have been major changes between the latest 2.4 stable version and the 2.5 Milestone 4 testing version. The Milestones are quite stable now. I would recommend the Milestone and then move to 2.5 stable at the end of the year.

Gents, thanks for the replies!
My 2.3 is the result of upgrading my my original build over the years.
I realize now it is the result of manual installation where the Repository install uses different locations.
I’ll probably build from new on a new machine but stay away from openhabian.

The question is whether there is anything to be gained by backing up my 2.3 configuration and using it for the 2.5 build? I tried restoring a 2.3 backup into 2.5 and all it seemed to do was created empty folders in the 2.5 conf directory.

The answer depends on how large your system is. I am in the modst of using my ond configuration to build from new on a different system but I am migrating to different server hardware and a different Z-Wave controller.

Don’t know about large but it contains a lot of elements.
Mostly security and lighting using z-wave and hue.
Multiple one-wire temp probes
Influx DB to store temp data
weather interface
lots of rules
mail connector

Built over the years…not looking forward to re-creating it

@brianlay I would do a backup with the openHAB backup tools then manually copy the etc openHAB directory off the as card. Store al the data in a reachable place.

Then with another as card start over. Once openHAB installed manually copy data to the needed places at an incremental pace. I suggest one binding at a time as you verify your config if possible.

Once you get everything up and running you can make a new backup and wipe the sd card.

Normally I would suggest only the openHAB backup tool but as your paths are different this appears to not function properly.

You may be able to reuse some of the json dB files of you copy them to the correct places.

With Z-Wave, when you add your controller, give it the same ID as your old one. That should make the thingids for the device match your old one since the network association is stored on the controller, not in OpenHAB. Your Item channel links would then be the same & can be copied from your old configuration.

1 Like

The easiest place to see your old ID is in the PaperUI.

image

that’s very helpful, thanks

1 Like