I’m trying to optimize my humidity rule, hope someone can help.
My current rule is like this:
when
Item Nilan_Input_RH changed
then
if(Nilan_Input_RH.state>=48.50) {
sendCommand(Nilan_Control_VentSet,4)
sendCommand(Smarthouse_Motorventil, ON)
}
end
rule "Nilan Humidity <=48,00 Speed 2"
when
Item Nilan_Input_RH changed
then
if(Nilan_Input_RH.state<48.00) {
sendCommand(Nilan_Control_VentSet,2)
sendCommand(Smarthouse_Motorventil, OFF)
}
end
As the Nilan_Input_RH.state is depending on the outside humidity and the room temperature, a fixed value is not a good choice.
I was thinking if I did a measurement over 1/2 hour and use the mean value of all measured values, and add 1 to this value - Then I should have a dynamic setpoint that takes the outside humidity and room temperature in account.
This should be really simple, but some how I can manage to make this work.
I have this rule:
when
Item Nilan_Input_RH changed
then
if (Nilan_Input_RH.state >= Nilan_Input_RH_Avrg.state){
sendCommand(Nilan_Control_VentSet,4)
sendCommand(Smarthouse_Motorventil, ON)
}
What I need is simple add a fixed value (eg. 2) of to to the Nilan_Input_RH.state, så that the comparison always is 2 greater than Nilan_input_RH_Avrg.state
Can someone please tell me how, I can simply not make it work.
when
Item Nilan_Input_RH changed
then
if (Nilan_Input_RH.state as Decimal >= Nilan_Input_RH_Avrg.state as Decimal){
sendCommand(Nilan_Control_VentSet,4)
sendCommand(Smarthouse_Motorventil, ON)
}