Use of multiple configuration files in OH2

I wonder, is it possible (and desirable) to have multiple items configuration files?

F ex a

groups.items
zwave.items
anel.items

this thread

gives the idea that OH2 only works with mapDB, yet I have been working with a file for items, sitemap etc…
Am I wrong, should I stop working with the files and somehow do the configuration in a different way?

so far I like the files as I can have them in a source control system to see (and revert) my changes.
yet I do worry about speed.

What is the preferred way to go:

  • mapDB
  • one feel per type
  • as many files as I want, that makes no different in speed and configuration use.

You can do text config in OH2 the same way as done in OH1, config through paperUI is only one way.

1 Like

great to know.

As I don’t know OH1, that still leaves the question, can I use multiple config files for
group.items
nongroups.items

?

and is that a good or a bad thing?

Yes - you can use multiple files, and while everyone will likely have different ways of managing their items, I would suggest it’s a good idea to split them up…

1 Like

thanks
especially for different items of the same type, that will make creating a new one rather easy.

next question.
I started by having a file per technology, now I realize it might be better to have a file per room.
What do you think?

(part of my reason is I will teach my kids to control their own room (as everything goes over source control, we will alway know what the previous state was)

It’s personal preference I guess.

I used a file per technology in my OH1 setup, but if you want to let people control their room, then maybe split per room. Or, split per technology for the stuff you don’t want the kids messing with, and then per room for the stuff they can control…

It’s a case of whatever works best for you and your system :wink:

I have one item file for the whole house, grouped per technology and room. I have about 200 items in it. I would not split mine, but we are all different. :slight_smile: It’s just a matter of taste in the end.

yes it’s personal
so I’ll rephrase
what do you prefer to do and why.

wel for me part of teaching is allowing people to play and experiment…
yet I will have a separate Raspberry PI, for experimenting .

I have split the items in technology, too, but to be honest, I have a few items that don’t fit in these files, because they are bound to more than one binding. For items, it couldn’t care less, because any changing of any items file will cause a complete jump to uninitialized items (yes, all items!).
In question of rules, this is different, each rule file will only get a “system started” trigger, if the file itself is touched, this is important to know for splitting rule files. As a second point, you have to keep in mind, that vars and vals outside of rules are per file, but please avoid the same vars in different files, this will confuse openHAB.

1 Like