Migrating .items / .things files to UI - My Plan - Feedback Wanted

To migrate your Things, I would perhaps plug the little script that I wrote and shared: Ohadm - A simple script to manipulate openHAB objects and sync them to YAML files

If you get it working and do a ohadm fetch things you will end up with all your things as separate YAML files in a subfolder.
Then you can update them with ohadm update thing <thingUID> but you will have to remove the non-managed (i.e. defined in a .things file) first, or rename the file and change the UID part to duplicate it.

For Items, I would suggest to first comment out your Locations tree in your .items file, then use the Add from Textual Definition feature in the UI using the contents of that very file to re-add the items as managed items. The Locations tree is probably the easiest to migrate because it doesn’t involve any links.

For the rest of the Items it’s perhaps best to redefine them from things with the UI.

3 Likes