Add an include option to the jsondb files for file-based configurations

There are multiple ways one could achieve the same result.

Personally, I’d like to see the extension of the YAML file work started to add support for custom semantic tags. I like the idea that what you see in the code tabs matches what you can put in config files. There was also talk about making it so you can mix Things, Items, metadata, widgets, et al into the same file.

With that you can create complete modules of config.

Given how the JSONDB is written and read from, I’m not sure adding a feature like this to it would give a satisfactory experience. For example, these are only read at OH start up so if you modified one of these subdirectory files, you’ll have to restart OH to pick them up.

I see no reason why includes couldn’t be added as a feature in this YAML approach. I worry that mucking with the JSONDB is going to be lots of work, potentially disruptive, and still end up with a less than satisfying result.

See RFC: YAML configuration · Issue #3666 · openhab/openhab-core · GitHub for details and further discussion.

1 Like