- Platform information:
- RaspberryPi 2
- Raspbian
- Java: java version “1.8.0_161”
Java™ SE Runtime Environment (build 1.8.0_161-b12)
Java HotSpot™ Client VM (build 25.161-b12, mixed mode) - 2.3
I’m getting issues in my rules, which were all working in 2.1. I think there was an openhab upgrade when I did some other upgrades last night after which I started getting issues, I upgraded again today through to 2.3.
I’m getting problems with items not recognised when they clearly are recognised as they were used earlier in the logs - including a debug print of the values. I also get a problem where NULL is not found, which is very bizarre, and had a problem earlier where ON was not found. It sort of looks like different threads are working or not working, but that wouldn’t make much sense.
For examples, consider this log file snippet:
2018-07-08 17:45:23.217 [INFO ] [lipse.smarthome.model.script.weather] - Not running accumulation rule - initialisation not done
2018-07-08 17:45:23.227 [ERROR] [ntime.internal.engine.RuleEngineImpl] - Rule 'Modify Time - adjust minutes': The name 'NULL' cannot be resolved to an item or type; line 40, column 38, length 4
2018-07-08 17:45:31.991 [INFO ] [clipse.smarthome.model.script.boiler] - swInitialisation swInitialisationDone (Type=SwitchItem, State=NULL, Label=Initialisation Done, Category=null, Groups=[InternalFlags])
2018-07-08 17:45:31.992 [INFO ] [lipse.smarthome.model.script.devices] - Not running zone setpoint change rule - initialisation not done
2018-07-08 17:45:31.995 [INFO ] [clipse.smarthome.model.script.boiler] - Not running heating state rule - initialisation not done
2018-07-08 17:45:31.998 [INFO ] [lipse.smarthome.model.script.devices] - Not running zone setpoint change rule - initialisation not done
2018-07-08 17:45:32.000 [INFO ] [marthome.model.script.initialisation] - Turning off switch swHeating (Type=SwitchItem, State=ON, Label=Heating, Category=null,
Groups=[InternalFlags, Switches, InitSwitchesCycle, PersistGroup])
2018-07-08 17:45:32.006 [INFO ] [marthome.model.script.initialisation] - Turning off switch swDHW (Type=SwitchItem, State=ON, Label=Hot Water Cylinder, Category=null, Groups=[InternalFlags, Switches, InitSwitchesCycle, PersistGroup])
2018-07-08 17:45:32.004 [INFO ] [g.eclipse.smarthome.model.script.fan] - Not running WallMasterTemp changed rule - initialisation not done
2018-07-08 17:45:32.009 [INFO ] [g.eclipse.smarthome.model.script.fan] - Not running WallLoungeTemp changed rule - initialisation not done
2018-07-08 17:45:32.007 [INFO ] [lipse.smarthome.model.script.weather] - Not running weather changed rule - initialisation not done
2018-07-08 17:45:32.034 [INFO ] [g.eclipse.smarthome.model.script.fan] - Not running swHeating changed rule - initialisation not done
2018-07-08 17:45:32.365 [INFO ] [marthome.model.script.initialisation] - Finished initialising relevant items
2018-07-08 17:45:32.395 [INFO ] [ipse.smarthome.model.script.watering] - Program 4 triggering
2018-07-08 17:45:32.410 [ERROR] [ntime.internal.engine.RuleEngineImpl] - Rule 'DHW mode changed': The name 'swInitialisationDone' cannot be resolved to an item or type; line 454, column 8, length 20
2018-07-08 17:45:32.418 [ERROR] [ntime.internal.engine.RuleEngineImpl] - Rule 'Heating mode changed': The name 'swInitialisationDone' cannot be resolved to an item or type; line 259, column 8, length 20
So we can see it’s saying that swInitialisationDone cannot be found, but earlier in the same log file it printed out the status of that same item. And earlier in the file it claims that NULL cannot be found.
Relevant snippets of rules files:
Line 40 of adjust minutes - the one with the NULL check
rule "Modify Time - adjust minutes"
when
Item zoneSettingsTimes changed
then
if ( swInitialisationDone.state == NULL || swInitialisationDone.state != ON ){
logInfo( 'zones', 'Not running zoneSettings changed time normaliser rule - initialisation not done')
} else {
zoneSettingsTimes.members.forEach( time | {
normaliseMinutes.apply( time )
})
}
end
Line 454 of DHW mode changed:
rule "DHW mode changed"
when
Item stringDHWMode changed
then
if ( swInitialisationDone.state == NULL || swInitialisationDone.state != ON ){
logInfo( 'boiler', 'Not running DHW state rule - initialisation not done')
} else {
switch stringDHWMode.state {
case "ON": {
logInfo( 'boiler', 'DHW mode changed to ON')
Again the NULL check is the culprit, as it is in the other examples.
I’ve cleared the cache and temp files, any other tips as to what may be going on?