Controlling brightness (dim level) based on gauge value
Posted: Sat Aug 26, 2017 1:45 pm
Hi,
I finished a small project and I'm now getting brightness/lightness values from a MQTT topic that ONH listens to and the values are stored in a MQTTHydrometer item (0-1024).
I'd like to control some dimmable lights based on this value. I'm after an adjustable "curve" so that I could decide what happens if the lightness value is between certain levels. E.g. if the value is 0-300 it's almost dark and lights should be turned on to some level, if that value is between 300-600 something else should happen. Between 600-800 yet something else and above 800, no lights needed.
How could this be achieved easiest? I could you the Valuetrigger item, but in order to achieve what I'm after, I'd need to create multiple Valuetriggers.
Ideas?
BR,
Mikko
I finished a small project and I'm now getting brightness/lightness values from a MQTT topic that ONH listens to and the values are stored in a MQTTHydrometer item (0-1024).
I'd like to control some dimmable lights based on this value. I'm after an adjustable "curve" so that I could decide what happens if the lightness value is between certain levels. E.g. if the value is 0-300 it's almost dark and lights should be turned on to some level, if that value is between 300-600 something else should happen. Between 600-800 yet something else and above 800, no lights needed.
How could this be achieved easiest? I could you the Valuetrigger item, but in order to achieve what I'm after, I'd need to create multiple Valuetriggers.
Ideas?
BR,
Mikko