Upgrading from 2.3 to 2.5 - how to prepare?

I have a working installation of Openhab 2.3 on RPi3 installed using openhabian. The system consists of several Tasmota-based devices as well as Shellies using MQTT, also Max! cube with 4 valves. 600 lines of code of rules. I want to use Shelly binding which requires Openhab 2.4+ so I decided to upgrade to latest 2.5.*. But I need to have a way back. I have done openhab-cli backup, it produced a zip containing all the scripts (rules, items etc.) together with a cache directory. Total of 95MB.
My questions are:

  1. How to perform the update exatly (what is the safe way)?
  2. If anything goes wrong how can I go back to the current state?
  3. Can I leave the MQTT binding from 2.3 and will it work? I would update it to 2.4+ style later.
  4. Anything else I should be aware of?

I know the similar questions were asked before but I haven’t found exactly the ones I needed, I also found a mention about openhabian bug concerning the update process so I rather ask to be really sure I won’t end up with not working home (especially heating in the winter is quite needed :slight_smile:). Thanks.

You can use the five commands in this link to upgrade and downgrade.

You can also see how to upgrade via openhabian-config tool here:

Before updating you will want to uninstall REST DOC first and it was moved from misc to ui. Doing this will save you a bit of time and you can reinstall this after the update is complete.

In the second link posted you may want to read the addon changes and uninstall any of those listed before upgrading as well. Like above you can reinstall any binding that you need after the update is complete.

The following openHAB 1.x add-ons have been replaced by openHAB 2.x add-ons and are now part of the legacy add-ons:

  • Denon Binding
  • IHC Binding
  • KM200 Binding
  • Mail Action
  • Neohub Binding
  • Network UPS Tools Binding
  • Pushbullet Action
  • SNMP Binding
  • XMPP Action

To continue using legacy add-ons, enable “Include Legacy 1.x Bindings” in the UI system configuration.
When using file based configuration add legacy = true to addons.cfg .

Discontinued Add-ons

Azure IoT

Due to changes in the Azure API, this add-on is no longer working and has been removed.

Sen.se Persistence Service

The Sen.se service has been discontinued, therefore there is no longer any use of this openHAB persistence service. It has thus be removed from the distribution.

Breaking Changes in Add-ons

DarkSky Binding

The item type of ‘rain’ and ‘snow’ channels have been changed to ‘Number:Speed’.

EnOcean Binding

Channel ‘receivingState’ has been removed, because this was a string containing many information. For this, there are three new channels: ‘rssi’, ‘repeatCount’ and ‘lastReceived’.

Homekit

Some tags have been renamed. Old names will not be supported in future versions. Please check documentation.

LGWebOS Binding

The binding parameter ‘localIP’ has been removed. The binding now uses system defaults for network communication. The thing type parameter ‘deviceId’ is no longer a parameter, but a property. Parameters ‘host’ and ‘key’ have been added.

MQTT Binding

Homie channel names may have changed if special characters are used for MQTT topic names.

OneWire Binding

The thing types ms-th and ms-tv have been marked deprecated and will be updated to ms-tx automatically.
The thing types counter2 , digitalio , digitalio2 , digitalio8 , ibutton , temperature have been marked deprecated and will be updated to basic automatically.

Please note that auto-upgraded things keep their thing UID including the deprecated thing type .

Manually (via textual configuration) defined things need to be changed to ms-tx or basic respectively.

Deprecated thing types will be removed with the next official release.

OpenSprinkler Binding

The stationXX channels have been removed and replaced by a bridge/thing combination. See documentation for further information.

OpenSprinkler Binding

The Pi interface was removed, as it does not provide all of the features of the binding anymore. Please use the HTTP interface instead.

senseBox Binding

The senseBox binding is now using Units of Measurements, and the channel name for Illuminance has changed. The Items must be reconfigured.

Somfytahoma Binding

The following channels have been renamed: ‘cyclic_button_state’ to ‘cyclic_button’, ‘battery_status_state’ to ‘battery_status’ and ‘lighting_led_pod_mod_state’ to ‘lighting_led_pod_mode’.

Systeminfo Binding

The ‘cpu#load’ channel has been removed because the OSHI library no longer provides this information.

TP-Link Smart Home Binding

The energy and rssi channels are now using Units of Measurements. Items must be adapted and the things must be recreated.

Tesla Binding

The binding has been heavily refactored. It is required to delete old Tesla Things and set them up from scratch.

Vitotronic Binding

The following channels have been renamed: ‘outsite_temp’ to ‘outside_temp’, ‘pelletburner:power’ to ‘pelletburner:powerlevel’, ‘party_temp’ to ‘party_temp_setpoint’ and ‘save_temp’ to ‘save_temp_setpoint’

2 Likes

For ease of going backward I would either make an image of current sd card or use a new one.

Well, I tried to upgrade it to latest stable, it started but it failed to install old mqtt (Failed installing ‘openhab-action-mqtt, openhab-binding-mqtt1’) so I suppose it’s not working in 2.5 anymore, right? Fortunately, the restore process to 2.3 went smoothly.
I will probably try to install fresh 2.5 in Hyper-V virtual machine, import the backup, update the MQTT-related things to the new syntax and then use it on the RPi. But that’s for another day :slight_smile: Thanks.

You probably only needed to restart OH a few times after the upgrade. I forgot to mention that, :grimacing: part in first post.

Give it another go and after OH has fully started up then restart it and allow it to fully load back up before the next restart.

For me personally it took 3 restarts and a reboot and all was working fine.

1 Like

I tried one full restart. Like one first start, then service restart. I may try to restart it more times but it seems strange and unreasonable …

1 Like

Agree, a restart 3 times to get it working ? Why is that so?

Don’t have a clue but it worked for me and I’ve read where others have needed to do the same.

Hopefully, it’s fixed in an update if they do another 2.5 update.

There is a bug. There is an issue open for the bug. There is not a fix yet for the bug. We don’t know why, just that a restart of OH seems to clear the problem. Most users only require one restart of OH after a clear the cache. A very few seem to require two or three.

1 Like