Controlling brightness (dim level) based on gauge value

Functionality and usage of the OpenNethome Server
Post Reply
mikkot
Posts: 33
Joined: Fri Aug 21, 2015 6:30 am

Controlling brightness (dim level) based on gauge value

Post 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
stefangsbb
Site Admin
Posts: 313
Joined: Sun Nov 30, 2014 2:16 pm

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

Post 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.
Post Reply