How-To Migrate from OH4 on Windows to OH5.x on openhabian

All,

i am struggeling woith the how to here. I am not able to find a relevant instruction within the community. Tryoing to copy conf files als failed due to a different structure in the items - alike versioning added, …

Is there somewhere a guide that i can folllow? I odnt want to astart from scretch with all items.

On top i have a couple of OH4 descriptions that worked there - but not clear for me - as i am not the owner how to translate the same towards OH5 semantics (e.g.: GitHub - robertoinberlin/org.openhab.binding.ankersolix: anker solix plugin · GitHub ) Any transformation script that can be used that someone already had created? As the create item with textfile as available in OH4 is also no longer available in the developer section.

thanks
Karsten

The structure of Items et. al. is no different between OH 4 and OH 5 nor is it different between Windows and Linux. What specifically isn’t working with examples and errors generated? With only a couple of minor issues a .items file from any version of OH 4 should work in OH 5. The only exceptions are if you happen to have a tag that matches one of the new semantic tags. In that case, you may need to change some tags.

There really isn’t anything new about the semantic model in OH 5 except that there are more tags available. Also, the semantic model is not required and it’s not clear if you are even using the semantic model.

You can do this one of two ways.

  1. Take a backup
  2. Upgrade your Windows OH 4 to OH 5.1 following the instructions in the Windows installation docs
  3. Manually address any breaking changes that the upgradeTool didn’t handle for you automatically. See the announcements for each version of OH between the one you are running and OH 5.1 for details and watch your logs for errors. (Note: for most users there were no manual changes required between OH 4.3 and 5.0).
  4. Once everything is working on Windows, take a backup, burn a new openHABian SD and edit the openhabian.conf file in the boot partition according to the instllation instructions for openHABian. I believe you can put the backup into the boot partition and make a setting in openhabian.conf to automatically restore the config.

or

  1. Take a backup.
  2. Burn a new openHABian SD card and edit openhabian.conf as needed based on the installation instructions for openHABian. I think you can place your backup on the boot partition too and configure it to automatically be restored. However, set the version of OH to install to match the version you are currently running.
  3. Once openHABian installs and openHAB comes up verify everything in taht OH 4.x instance is working as it was on Windows.
  4. Using openhabian-config, upgrade to OH 5.1.
  5. Manually address any breaking changes that the upgradeTool didn’t handle for you automatically. See the announcements for each version of OH betweenthe one you are running and OH 5.1 for details and watch the logs for errors.

Note, the first startup of OH after the cache is cleared often doesn’t work well. Clearing the cache, which is part of the upgrade process, causes OH to redownload/reinstall all the bundles. As OH is downloading those it’s also starting up and it may reach certain points where the bundles are not available in which case OH will throw errors.

Therefore, on the first start after clearing the cache, wait a littl bit for everything to get reinstalled. I usually watch for the Things to start comming ONLINE. Then restart OH again. This time pay attention as these errors are “real”.