i plan to do a green field migration for openhab3.
Actually openhab 2.5 is running on a raspberry 3 and i want to move to a raspberry4 with openhab3.
Therefore i check all my settings and plan my manual step by step migration.
But about the Items i am very confused and hope you can help me.
I am using both kind of items. The items manually created in .item files and items created via paperui.
In configuration/system the value for ItemLinking is set to yes. simple mode is on.
When i take a look to my Habmin Dashbords i can see some items which a have assigned.
These items are not created via the .items files.
My actually understanding was that all items automatically created via paper ui are stored to a jsondb located on: varlib/openhab2/jsondb/org.eclipse.smarthome.core.items.Item.json
When i take a look to this file there is only one item in it !
So im very confused, because all the item’s i am using in habmin are not in any .item files created by myself.
Have anyone an idea or explanation for that ?
Where can i find the items created via paperui ?
I trie to find out what is the best way for me to do a migration with some reorganisations
That is really not recommended. It adds complexity and there is enough different in how the two behave during loading and startup and Item Linking behavior that it can cause you problems.
Another thing that is not recommended. You should disable this and manually define your Items. You will want to do so eventually anyway. OH 3 doesn’t have simple mode.
Not without more information.
Since you are doing green field anyway I recommend forgetting about your Items for now.
Add you bindings and then discover or create the Things.
Go to the model and create all the Locations you need.
Click on a Location in the model and choose “Create Equipment from Thing”. Select the Channels you want and set the names and other settings for the the Items as desired. Note that you cannot change the names afterward so you have to balance between keeping the same names as you used on your OH 2.5 instance and coming up with new names that make more sense in your new OH 3 system.
Ultimately you will want to build up your model anyway and it’s way less work to create your Items as part of the model in the first place than it is to add your existing Items to the model later.
If you change the name of any Items, you’ll need to update your sitemaps and rules accordingly so be deliberate. Don’t try to do it all at once. I took one binding at a time and moved over everything related to that binding: things, items, rules, etc.
Note that you cannot change the names afterward so you have to balance between keeping the same names as you used on your OH 2.5 instance and coming up with new names that make more sense in your new OH 3 system.
When changing the item names bare in mind, that this will affect historic data in the persistent services. If you want to access these data you have to use the same name or change the names in the database (at least for the SQL databases this could be done with a small script.)
First of all, thank you very much for the great and valuable answers.
That’s helps me a lot.
I absolut agree with that That’s the reason why i want to setup up on a fresh installation and bring more structure to my openhab system.
It has all grown over time, partly combined with ignorance Nevertheless, everything currently works in this implementation. But it’s time to change that in the course of openhab 3.
In the meantime I’ve found out. In simple mode, no items are created directly in the item file (org.eclipse.smarthome.core.items.Item.json). These are only available in the file (org.eclipse.smarthome.core.thing.link.ItemChannelLink.json). My assumption is that the Habpanel can use the items above. (https://github.com/openhab/openhab-core/issues/1638)
As far as I know, Habpanel no longer exists in OH3, so I will completely rebuild the gui with the current tools. Accordingly, it doesn’t matter if I don’t take over the items created by the simple mode.
I will consider your tips with my migration. As you wrote it, I will first set up my Homematic Binding which is connected to homegear. This should contain all things from Homematic, Zigbee and Hue. I can then build on that. I had also installed the Hue binding beforehand. But that has also led to double entries because they have already come from Homegear I would also like to structure that differently.
My items which come for Grafana / InfluxDB and Homekit from the text files (not via PaperUi) I will then transfer gradually.
What is currently not so clear to me how I can best transfer the things that I have created manually in the Paper UI. I created some generic MQTT things manually. Maybe I can do this through the file. (org.eclipse.smarthome.core.thing.Thing.json)
Yes, it’s still there and supported. But migrating an existing HABPanel to OH 3 takes some extra work. Search the forum for some posts about that. I don’t use HABPanel so I can’t help with that.
For these I recommend recreating them on OH 3. There are a bunch of little things that have changed which will make copying and editing the raw JSON from OH 2.5 to OH 3 just about the same amount of work and way more error prone than just recreating them again from scratch.
But there are features that you can make the process faster and easier.
Create the one MQTT Thing normally. Verify that it works. Then click on the “Code” tab, copy the YAML. Create a new MQTT Thing that is similar to the first one. Open the “Code” tab and paste the YAML. Edit the fields that need to be different (subscribeTopic, publishTopic, etc). Repeat.
Do the same as above only use the REST API Docs to query for the “code” instead of the code tab. Then use the REST API Docs to submit the edited JSON for the new MQTT Thing.