I don’t often edit inside the ESH editor as it often indicates potential errors, that seem to work fine in the actual processing of rules. Many times it seems it is minor indications of missing all the relevant items as they’ve been auto-discovers and thus not made available via local defined rules files.
None the less, the issue I’m finding is that upon startup in processing a particular file, there are errors of the following listed out. Unfortunately they don’t indicate like some others had, what lines and marks they’re at. But based on some of the info, I believe it is relevant to a particular timer section I’ve setup.
2017-06-30 23:02:01.427 [INFO ] [el.core.internal.ModelRepositoryImpl] - Validation issues found in configuration model 'automation.rules', using it anyway:
This expression is not allowed in this context, since it doesn't cause any side effects.
This expression is not allowed in this context, since it doesn't cause any side effects.
The field Tmp_automationRules.stateOutsideDogWalk refers to the missing type Object
The field Tmp_automationRules.stateOutsideDogWalk refers to the missing type Object
The field Tmp_automationRules.stateOutsideDogWalk refers to the missing type Object
This expression is not allowed in this context, since it doesn't cause any side effects.
This expression is not allowed in this context, since it doesn't cause any side effects.
This expression is not allowed in this context, since it doesn't cause any side effects.
Specifically, I have a rule setup that uses the stateOutsideDogWalk as a map for a bunch of stored item states. Basically, when we walk the dog, I have a scene trigger that will starts the following rule:
rule "Mudroom Switch Automation"
when
Item mudroom_scene changed
then
{
switch(mudroom_scene.state){
case 2.1 : [break;]
case 1.4 : { // 3 taps up
logInfo("rules.automation", "Dog Walk - Dog Walk scene executed (3 Taps UP)")
stateOutsideDogWalk = storeStates(g_outside_lights) // Storing outside light states
logInfo("rules.automation", "Dog Walk - Storing outside light states")
sendCommand(g_outside_lights, ON) // Turning all outside on
sendCommand(mudroom_switch, ON)
logInfo("rules.automation", "Dog Walk - Creating timer")
timerDogWalk = createTimer(now.plusSeconds(600)) [| // Setting timer
restoreStates(stateOutsideDogWalk) // Resetting lighting state
logInfo("rules.automation", "Dog Walk - Timer ended, restoring lighting states")
postUpdate(mudroom_scene, 2.1)
]
}
case 2.4 : { // 3 taps down
logInfo("rules.automation", "Dog Walk - Dog Walk scene canceled (3 Taps DOWN)")
timerDogWalk.cancel // Turning off the timer
restoreStates(stateOutsideDogWalk) // Reverting light states to prior
logInfo("rules.automation", "Dog Walk - Restoring lighting states")
postUpdate(mudroom_scene, 2.1)
}
}
}
end
The relevant item definitions at the top of the rules file:
var Map stateOutsideDogWalk = null
var Timer timerDogWalk = null
I’m not sure I understand specifically the issue here. But it seems this would be the rule that is causing the issue. Checking in the ESH editor, this section does have some larger Red X marks next to it. And hovering on them displays the same message about “missing type Object”.
Any ideas on what could be the issue here? And/or how to validate WHERE the issues really lie, as the other errors in the initial launch concern me that I have something else I don’t even know about that could be incorrectly processing.