OpenHAB 2.5.3 and Raspbian 9
Can anyone help me identify why I am getting the following error in the OpenHAB logs? The rule is working as expected, but I would like to clean up the error, if possible.
==> /var/log/openhab2/openhab.log <==
2020-04-06 17:16:26.947 [INFO ] [el.core.internal.ModelRepositoryImpl] - Validation issues found in configuration model ‘hall-downstairs-motion.rules’, using it anyway:
Assignment to final field
Assignment to final field
Assignment to final field
2020-04-06 17:16:27.021 [INFO ] [el.core.internal.ModelRepositoryImpl] - Refreshing model ‘hall-downstairs-motion.rules’
Here is the rule that I have been working on.
var Timer HallDownstairsMotionTimer1 = null
val int timeoutMinutesHD1 = 5 // choose an appropriate value
val int epochHD1 = 0 //
rule "Hall Downstairs Motion On"
when
Item HallDownstairsMotionSensor1Motion changed from OFF to ON or
Item HallDownstairsMotionSensor2Motion changed from OFF to ON or
Channel "hue:0820:001788774895:21:dimmer_switch_event" triggered 3002.0
then
logInfo("epochHD1", epochHD1.toString)
val int epochHD1Temp = (now.millis / 1000).intValue()
logInfo("epochHD1Temp", epochHD1Temp.toString)
val int epochHD1Calc = epochHD1Temp - epochHD1
logInfo("epochHD1Calc", epochHD1Calc.toString)
if(epochHD1Calc > 30) {
HallDownstairsOverhead.sendCommand(ON)
var ROGoogleVol1=RichardOfficeGoogleVolume.state as Number
RichardOfficeGoogleVolume.sendCommand(15)
Thread::sleep(5000)
RichardOfficeGoogleVolume.sendCommand(ROGoogleVol1)
if(HallDownstairsMotionTimer1 === null) {
epochHD1 = epochHD1Temp
logInfo("HDTimer", "Timer created")
HallDownstairsMotionTimer1 = createTimer(now.plusMinutes(timeoutMinutesHD1), [|
HallDownstairsOverhead.sendCommand(OFF)
HallDownstairsMotionTimer1 = null
epochHD1 = 0])
}
else {
HallDownstairsMotionTimer1.reschedule(now.plusMinutes(timeoutMinutesHD1))
logInfo("HDTimer", "Timer rescheduled")
epochHD1 = epochHD1Temp
}
}
else {
HallDownstairsMotionTimer1.reschedule(now.plusMinutes(timeoutMinutesHD1))
logInfo("HDTimer", "Timer rescheduled")
}
end