Downgrade from 3.1.0 to 3.0.1

I run openhabian on a RPI4 and used the config tool to upgrade to 3.1.0.
Unfortunately there is a bug in the homematic add-on so I am forced to downgrade until that is fixed.

Can I do it with the config tool ? If not, what would I have do on the console ?

You can use the linux shell and it is part of the documentation:

Once you know which version you want, you can upgrade/downgrade to it by using the apt-get install openhab=[version] command, for example:

sudo apt-get install openhab=3.0.0-1

The command

apt-cache showpkg openhab

shows available package versions.

1 Like

I did apt-get install openhab=3.0.2-1. When asked about keeping the files I went with the maintainers version. I am now at 3.0.2 but all my add-on/tranformation configuration is gone and I cannot re-install it.

nstalling new version of config file /etc/openhab/services/addons.cfg ...

Configuration file '/etc/openhab/services/runtime.cfg'
==> Modified (by you or by a script) since installation.
==> Package distributor has shipped an updated version.
  What would you like to do about it ?  Your options are:
   Y or I  : install the package maintainer's version
   N or O  : keep your currently-installed version
     D     : show the differences between the versions
     Z     : start a shell to examine the situation
The default action is to keep your current version.
*** runtime.cfg (Y/I/N/O/D/Z) [default=N] ? Y
Installing new version of config file /etc/openhab/services/runtime.cfg ...

Configuration file '/var/lib/openhab/etc/users.properties'
==> Modified (by you or by a script) since installation.
==> Package distributor has shipped an updated version.
  What would you like to do about it ?  Your options are:
   Y or I  : install the package maintainer's version
   N or O  : keep your currently-installed version
     D     : show the differences between the versions
     Z     : start a shell to examine the situation
The default action is to keep your current version.
*** users.properties (Y/I/N/O/D/Z) [default=N] ? Y
Installing new version of config file /var/lib/openhab/etc/users.properties ...
Installing new version of config file /var/lib/openhab/etc/shell.init.script ...

Configuration file '/var/lib/openhab/etc/log4j2.xml'
==> Modified (by you or by a script) since installation.
==> Package distributor has shipped an updated version.
  What would you like to do about it ?  Your options are:
   Y or I  : install the package maintainer's version
   N or O  : keep your currently-installed version
     D     : show the differences between the versions
     Z     : start a shell to examine the situation
The default action is to keep your current version.
*** log4j2.xml (Y/I/N/O/D/Z) [default=N] ? Y
Installing new version of config file /var/lib/openhab/etc/log4j2.xml ...
Installing new version of config file /var/lib/openhab/etc/keys.properties ...

The log says:

`

2021-07-05 14:15:49.478 [ERROR] [core.karaf.internal.FeatureInstaller] - Failed installing ‘openhab-binding-hue, openhab-binding-modbus, openhab-persistence-mapdb, openhab-binding-mail, openhab-transformation-javascript, openhab-transformation-regex, openhab-ui-habpanel, openhab-transformation-jsonpath, openhab-binding-shelly, openhab-binding-mqtt, openhab-persistence-rrd4j, openhab-transformation-map, openhab-ui-basic, openhab-binding-astro, openhab-binding-homematic’: Unable to resolve root: missing requirement [root] osgi.identity; osgi.identity=openhab-binding-modbus; type=karaf.feature; version=“[3.1.0,3.1.0]”; filter:=“(&(osgi.identity=openhab-binding-modbus)(type=karaf.feature)(version>=3.1.0)(version<=3.1.0))” [caused by: Unable to resolve openhab-binding-modbus/3.1.0: missing requirement [openhab-binding-modbus/3.1.0] osgi.identity; osgi.identity=org.openhab.binding.modbus.e3dc; type=osgi.bundle; version=“[3.1.0,3.1.0]”; resolution:=mandatory [caused by: Unable to resolve org.openhab.binding.modbus.e3dc/3.1.0: missing requirement [org.openhab.binding.modbus.e3dc/3.1.0] osgi.wiring.package; filter:=“(osgi.wiring.package=org.openhab.binding.modbus.handler)” [caused by: Unable to resolve org.openhab.binding.modbus/3.1.0: missing requirement [org.openhab.binding.modbus/3.1.0] osgi.wiring.package; filter:=“(&(osgi.wiring.package=javax.measure)(version>=2.1.0)(!(version>=3.0.0)))”]]]

`

Just tried to re-install 3.1.0, now my system ist’nt even starting any more.

How did you install 'em before - via openhab-addons package ? Then that one also needs to be downgraded.
Did you try to clean the cache ? The log entry shows that it is trying to access 3.1.0 versions.

Don’t know if they came with a package. I used openhabian and they have always been there. I now did uninstall openhab and re-install it and it is back to normal - except for this annoying homematic bug.

What would happen if I downgraded only the plugins ? Or- better, just that homematic plugin ? How would I do that ?

The 3.1.0 binding would have to be removed.
And the 3.0.2 binding jar file needs to be placed in /usr/share/openhab/addons.
Make sure that the owner/group is set to openhab:openhab.

In case of incompatibilites I would expect to see a set of error messages.
It could be that the cache needs to be cleared.

Officially, downgrades are not supported so you should rebuild and restore your last 3.0.x backup./