I have a Dockerized OpenHAB setup that needs to work in multiple environments (I have a PROD environment driving my house on an Odroid SBC, and a DEVEL on my laptop). The environments need to be completely independent from each other so that I can develop my Items, Things, Rules…etc on my laptop without having any effect on the in-production OpenHAB.
Both environments have a separate account on OpenHAB Cloud.
I would like to provide each environment a different admin email address to which the rules can send notification messages when a problem arises.
The typical solution with a Java application that a setting is simply provided as an environment variable and query it with java.lang.System.getEnv(). This doesn’t work in the .rules file, I get a "no viable alternative at input ‘System’ " error message. It looks like java.lang.Sytem cannot be accessed at all from a rule file.
How do I solve this elegantly, without maintaining separate rule/item files for the environments?
Any help is appreciated !