OpenHAB registers inotifies or polls the configuration files at a regular interval. Having a lot of files and splitting many of them for a better overview and faster updates (of rules) works great for me.
I now would like to organize these many rules into subdirectories. Here is an exaggregated example:
Before:
openhab2/rules/work.lights.modes.automatic.rules
openhab2/rules/work.lights.modes.manual.rules
openhab2/rules/work.lights.modes.override.rules
openhab2/rules/work.lights.presence.rules
openhab2/rules/work.notifications.rules
openhab2/rules/work.audio.rules
(flat hierarchy. Looks OK when listed as text, but is overwhelming when looking at it in an IDE or browser)
After (what I am trying to sell here):
openhab2/rules/work/lights/modes/automatic.rules
openhab2/rules/work/lights/modes/manual.rules
openhab2/rules/work/lights/modes/override.rules
openhab2/rules/work/lights/presence.rules
openhab2/rules/work/notifications.rules
openhab2/rules/work/audio.rules
(usual file system hierarchy. Very easy to focus on specific files/rooms/groupings.)
When folding all folders, we have a great overview:
openhab2/rules/work
openhab2/rules/living
openhab2/rules/garden
openhab2/rules/kids
or even folder per-purpose or mixed up:
openhab2/rules/per-room/work
openhab2/rules/per-room/kitchen
openhab2/rules/per-purpose/automation
openhab2/rules/per-purpose/sensors
openhab2/rules/per-floor/ground
openhab2/rules/per-floor/first
You get the hang of it.
It would be awesome to be able to let openHAB poll the subdirectories as well. As we are polling already, I assume it’s a small change in the regexp or globbing pattern that matches those configuration files.
What do you think?