Hi,
the following rule file…makes trouble.
- It actually works !
- But when I start OH1.8.1 with that rule file in the rules folder --> all rules do not work; also from all other rules files!
- when I copy that rule file AFTER OH1 has launched the rules within that rules file do work !
what could be the problem that this rules breaks OH181 when its in the folder on startup?
import org.openhab.core.library.types.*
var HSBType hsbValue
var String redValue
var String blueValue
var String greenValue
var String currentAllStateValue
rule "Set wzRGBW Value"
when
Item wzRGBW changed
then
hsbValue = wzRGBW.state as HSBType
redValue = hsbValue.red.intValue.toString
greenValue = hsbValue.green.intValue.toString
blueValue = hsbValue.blue.intValue.toString
sendCommand(wzRGBW_R,redValue)
sendCommand(wzRGBW_G,greenValue)
sendCommand(wzRGBW_B,blueValue)
end
rule "LED Farbe Selection"
when
Item selColors received command
then
currentAllStateValue = wzRGBW_All.state.toString
if (receivedCommand == 1) {
sendCommand(wzRGBW_R,currentAllStateValue)
sendCommand(wzRGBW_G,"0")
sendCommand(wzRGBW_B,"0")
}
if (receivedCommand == 2) {
sendCommand(wzRGBW_R,"0")
sendCommand(wzRGBW_G,currentAllStateValue)
sendCommand(wzRGBW_B,"0")
}
if (receivedCommand == 3) {
sendCommand(wzRGBW_R,"0")
sendCommand(wzRGBW_G,"0")
sendCommand(wzRGBW_B,currentAllStateValue)
}
if (receivedCommand == 4) {
sendCommand(wzRGBW_All,"0")
}
if (receivedCommand == 5) {
sendCommand(wzRGBW_All,"100")
}
if (receivedCommand == 6) {
sendCommand(wzRGBW_R,currentAllStateValue)
sendCommand(wzRGBW_G,currentAllStateValue)
sendCommand(wzRGBW_B,currentAllStateValue)
}
end