Load things from yaml file

Thanks for the hint, I’ll have a look at this! Most probably this solves my version controlling needs!

I agree with you that if all configs are already in JSON in the file system (even if they are located in three different places like you wrote), that means that they are already now version controllable (if that is a proper word in English) and thus, this kind of export/import feature that I was thinking out loud is not needed.

You’re correct that it was reworked at some point to conform to a certain design. And that exact point was between Drupal 7 and Drupal 8 when the whole Drupal core was pretty much completely re-written. My point was not to say that the Drupal way is the only right way, it was more intended as an inspiration to our openHAB community. I feel that it’s worth sharing good concepts we’ve seen in other contexts.

Cheers,
Markus

For completeness, here is my .gitignore. I run in Docker so $OH_CONF and $OH_USERDATA are in the same root folder. I keep my whole config in git including my internal databases. If you don’t want those you can ignore the userdata/persistence I forgot, I excluded my persistence files a long time ago.

userdata/*
!userdata/secrets
!userdata/etc
!userdata/jsondb
!userdata/config
!userdata/habot
!userdata/openhabcloud
!userdata/uuid
!userdata/zigbee
!userdata/zwave
userdata/jsondb/backup
userdata/backup
.Trash-1000
conf/html/hum.jpg
conf/html/light.jpg
conf/html/power.jpg
conf/html/temp.jpg
conf/automation/lib/javascript/personal/node_modules
conf/automation/js/node_modules/*
!conf/automation/js/node_modules/rlk_personal
*py.class
*.swp
*~
*.old
conf/automation/js/rlk_personal.tar

Note that I use a self hosted GitLab so it’s no biggie to include secrets and the openhabcloud folder (which holds the openhab cloud connector secret file) and users are in there somewhere (I think in etc). You’ll see that a lot of bindings have their own folders where they put their own configs too.

2 Likes