openhab-cli backup and restore works regardless how OH is configured. Furthermore, all the Items and everything else configured through the UI or rest API are stored in text JSON formatted files in $OH_USERDATA/jsondb.
As long as you are on the same version of OH, you can migrate these jsondb configs as easily as text file configs, since it’s all text files.
The key thing is to realize the following:
- it’s mostly the same
- the triggers are defined separately
- if you have any “global” variables (commonly used for timers) you’ll need to switch to using Blockly or JSScripting for the language or keep them in .rules files
- give a close look at Blockly which may be more powerful and easier to use than even Rules DSL, given it’s graphical nature.
You’ll basically define the triggers separately from the stuff between the “then” and “end” which will go in a Script Action (i.e. “run a script” option).
I’m not here to convince anyone to change from using file based configs. I’m just not motivated to spend a lot of time helping debug syntax errors or using the wrong semantic tag or not knowing all the options or any similar problems that simply do not occur when using the UI. I’ve measured the time, and mostly the time lost to dealing with those problems dwarfs the time lost to using the UI or REST API.
If you get some other benefits from using text files, that’s great. But in my experience, it’s going to cost you in time and effort.
This can be done with the JSONDB files too. They are just text files after all. Order is preserved so they are quite suitable for source control.
This is a misnomer and actually a source of problems when using. items files. It is impossible to rename an Item. The names are the unique id for the item. What happens with .items files is every time it’s reloaded, all the items defined in that file are deleted and then recreated based on the new contents of the file.
But if you are not careful, you can end up with orphaned links which causes all sorts of problems. It also causes a lot of churn.
The worst you can do is mix .items files and managed items as there are known issues, particularly with the semantic model.
And I’m not arguing against people choosing to use text config files. I never have and never will. I just won’t help people solve problems that simply do not occur when using the UI or REST API. It’s a time sink and I don’t have that much time too spare. If you want to use text files, you should know what you’re are getting into and not expect the same sort of self documenting and self describing interface. You’ll be spending a lot of time with reference docs up on one screen and your editor up on the other and fighting syntax errors. If you are ok with that, great! OH has you covered. I’d prefer to spend my time elsewhere, helping people with their home automation problems rather than solving syntax problems.
GraalVM. I can’t address any of the issues you experienced and recommend opening a new thread.
The way it currently works, at least with UI rules, it’s not even hotspot optimization. The script actions are reused from one run to the next. This causes it’s own problems, such as an inability to use let or const, but it’s super effecient.
Personally I’ve found no performance problems this far but I don’t use many npm libraries.
But the way it currently works well probably change because not being able to use let and const in UI rules really isn’t acceptable.