- Platform information:
- Hardware: Raspberry PI 3B
- OS: Linux openHABianPi 4.19.42-v7+
- openHAB version: openHAB 2.4.0-1 (Release Build)
- Issue of the topic: Error during Rule file saved.
i have faced problem during xxx.rule file saving. althow Created rule works as expected.
Log file is as below.
2019-08-18 17:17:02.532 [INFO ] [el.core.internal.ModelRepositoryImpl] - Validation issues found in configuration model 'RGB.rules', using it anyway:
The use of wildcard imports is deprecated.
2019-08-18 17:17:02.583 [INFO ] [el.core.internal.ModelRepositoryImpl] - Refreshing model 'RGB.rules'
.rules file is as below.
import org.openhab.core.library.types.*
//Theam light1 variables
var String redpwmString
var String greenpwmString
var String bluepwmString
var String bripwmString
var HSBType hsbValue
//Theam light2 variables
var String redpwmString2
var String greenpwmString2
var String bluepwmString2
var String bripwmString2
var HSBType hsbValue2
rule "BEDROOM_RGB_IN_SQUARE"
when
Item Berroom_RGB_IN received update
then
hsbValue = Berroom_RGB_IN.state as HSBType // sets hsbValue to some kind of variable (int/float?)
redpwmString = (hsbValue.red.intValue).toString// grabs just the red value out of hsbValue and multiplies it time 10 so that it has a scale of 0-1000 for the PWM
greenpwmString = (hsbValue.green.intValue).toString//same as in red
bluepwmString = (hsbValue.blue.intValue).toString //same as in red
bripwmString = (hsbValue.brightness.intValue).toString//Converting brighness in to sstring
frontPorchPWMr.postUpdate(redpwmString)// posts the value above in the MQTT message
frontPorchPWMg.postUpdate(greenpwmString)
frontPorchPWMb.postUpdate(bluepwmString)
frontPorchPWMbri.postUpdate(bripwmString)
RED_MBR_IN.postUpdate(greenpwmString2)
GREEN_MBR_IN.postUpdate(bluepwmString2)
BLUE_MBR_IN.postUpdate(bripwmString2)
end
rule "Livingroom_RGB_Left_Side"
when
Item Livingroom_RGB_L received update
then
hsbValue2 = Livingroom_RGB_L.state as HSBType // sets hsbValue to some kind of variable (int/float?)
redpwmString2 = (hsbValue2.red.intValue).toString// grabs just the red value out of hsbValue and multiplies it time 10 so that it has a scale of 0-1000 for the PWM
greenpwmString2 = (hsbValue2.green.intValue).toString//same as in red
bluepwmString2 = (hsbValue2.blue.intValue).toString //same as in red
bripwmString2 = (hsbValue2.brightness.intValue).toString//Converting brighness in to sstring
frontPorchPWMr2.postUpdate(redpwmString2)// posts the value above in the MQTT message
frontPorchPWMg2.postUpdate(greenpwmString2)
frontPorchPWMb2.postUpdate(bluepwmString2)
frontPorchPWMbri2.postUpdate(bripwmString2)
RED_LR1.postUpdate(greenpwmString2)
GREEN_LR1.postUpdate(bluepwmString2)
BLUE_LR1.postUpdate(bripwmString2)
end
i just want to understand meangin of this.