Bulk import .things file to UI

while I was using openhab2, I’ve configured every item and things using textual definition. Now, with openhab3 I’ve migrated my .items file to the UI. How can I do the same but with things?


You can’t. In general, most Things get automatically discovered so you can run a scan from the inbox and just accept the Things as they are discovered. If you are using bindings like Modbus, MQTT Generic MQTT Thing, or KNX you might consider keeping those in text files. Those would need to be recreated individually. There are things that can make the process easier but just a bulk import of the .things files isn’t going to be an option.

One approach you can use is to query the REST API for your Things. Save that JSON off to the side. Remove all the Things and then recreate all the Things using the REST API and the saved JSON.

But ideally you should let OH automatically discover those Things that can be automatically discovered.