Page 1 of 1

Controlling brightness (dim level) based on gauge value

Posted: Sat Aug 26, 2017 1:45 pm
by mikkot
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

Re: Controlling brightness (dim level) based on gauge value

Posted: Sun Aug 27, 2017 12:03 pm
by stefangsbb
Aha cool!
Yes, you are right, the ValueTrigger-Item is the right one, and you may have to use multiple if you want more levels. I have been thinking about adding "ActionOnBetween" and "ActionWhileBetween" on the Item, so you can at lease cover three cases with one Item.