Way to save system settings

Have you considered just using a HashMap in your rule file?

val HashMap<String,HashMap<String,Integer>> HABSettings = newHashMap(
    "RGBW"  -> (newHashMap(
        "MaxDim"            -> 90,
        "DimPeriod"         -> 20,
        "DayColor"          -> 205,
        "AfternoonColor"    -> 58,
        "NightColor"        -> 160)
    ),
    "AC"    -> (newHashMap(
        "DayTemmp"          -> 90,
        "NightTemp"         -> 20)
    ),
    "Light" -> (newHashMap(
        "EveningDim"        -> 90,
        "NightDim"          -> 20)
    )
)

Then access it with…

HABSettings.get("RGBW").get("MaxDim")

You can programmatically change values, but the hardcoded values will reset after a restart or rule file save.

HABSettings.put("RGBW").put("MaxDim")

If you want to use files, there was a recent tutorial on using configuration files with JSR223 w/ the lucid modules.

I also had a recent discussion about this with @rlkoshak and was playing around with some examples.