Hi everyone!
I am running Openhab2.4 stable release on raspi 3b.
At the moment i try to setup a rule to control the humidity (water dispenser) in my livingroom. Due to the fact that i want to change the level trough out the day (to save water and electricity) i wanted to setup a rule with a moving activating and deactivating state.
Rule is done in Habmin
// This rule file is autogenerated by HABmin.
// Any changes made manually to this file will be overwritten next time HABmin rules are saved.
// Imports
import org.openhab.core.library.types.*
import org.openhab.core.persistence.*
import org.openhab.model.script.actions.*
import org.java.math.*
// Global Variables
// Constants used to generate this rule
// MinHumidWZ == 45 _*(it works with the constant as the low level)*_
rule "Luftfeuchte Wohnzimmer"
when
Item SonoffWohnzimmerHumid changed
or
Item EG_Soll_humid changed
or
Item SonoffWZLuftbefeuchter changed
or
Item Rolladen changed
then
if (((SonoffWohnzimmerHumid.state >= EG_Soll_humid.state) && (SonoffWZLuftbefeuchter.state == ON))) {
sendCommand(SonoffWZLuftbefeuchter, OFF)
}
else if (((Rolladen.state = OFF) && ((SonoffWohnzimmerHumid.state <= (EG_Soll_humid.state as DecimalType - 5)) && (SonoffWZLuftbefeuchter.state == OFF)))) {
sendCommand(SonoffWZLuftbefeuchter, ON)
}
end
The Item Rolladen indicates that everyone is a sleep so no humidifiing in the livingroom needed at all.
For some reasons the rule is not triggering if i lower the “Soll_humid” value below the actual level.
Number items are: SonoffWohnzimmerHumid and EG_Soll_humid
Switch items are: SonoffWZLuftbefeuchter and Rolladen( state ON = shutters down)
Can you please help me here?