First update… (I am sure I find more issues)…
Removed all rules I can do without! – This fixed the issue with logInfo as well as sending mail!
Thank you soo much Rich! I can’t say it often enough… spent 8 hours yesterday and 3h today trying to figure this out.
First result:
11:12:34.607 [DEBUG] [m.r.internal.engine.RuleEngine:305 ] - Executing rule 'ATA is offline'
11:12:34.688 [INFO ] [.openhab.model.script.gNetwork:53 ] - Rule: ATA is offline triggered
11:12:38.233 [DEBUG] [m.r.internal.engine.RuleEngine:305 ] - Executing rule 'ATA is offline'
11:12:38.245 [INFO ] [.openhab.model.script.gNetwork:53 ] - Rule: ATA is offline triggered
11:12:38.265 [DEBUG] [m.r.internal.engine.RuleEngine:305 ] - Executing rule 'ATA is offline'
11:12:38.270 [INFO ] [.openhab.model.script.gNetwork:53 ] - Rule: ATA is offline triggered
11:12:38.290 [DEBUG] [.p.m.i.MapDBPersistenceService:146 ] - store called for Network_ATA
11:12:38.300 [DEBUG] [.p.m.i.MapDBPersistenceService:167 ] - Stored 'Network_ATA' with state 'OFF' in mapdb database
11:12:38.307 [DEBUG] [m.r.internal.engine.RuleEngine:305 ] - Executing rule 'ATA is offline'
11:12:38.318 [INFO ] [.openhab.model.script.gNetwork:53 ] - Rule: ATA is offline triggered
11:12:42.444 [DEBUG] [nhab.action.mail.internal.Mail:156 ] - Sent email to 'blah@gmail.com' with subject 'Rule: Item Network_ATA'.
11:12:43.013 [INFO ] [.openhab.model.script.gNetwork:53 ] - ATA is OFF (state)
11:12:44.494 [DEBUG] [nhab.action.mail.internal.Mail:156 ] - Sent email to 'blah@gmail.com' with subject 'Rule: Item Network_ATA'.
Second result
The counter for open windows now also works!
/* ***** determine number of windows either open or ajar ***** */
rule "Number of open windows"
when
Item gHouse_Windows received update
then
logInfo("OpenWindows1.rule", "testing, gHouse_Windows received update")
val numOpenWindows = gHouse_Windows.members.filter[w | w.state.toString != "CLOSED"].size
logInfo("OpenWindows2.rule", numOpenWindows.toString)
OpenWindows.sendCommand(numOpenWindows.toString)
end
2016-07-31 11:50:08.362 [INFO ] [c.internal.ModelRepositoryImpl] - Refreshing model 'max01.rules'
2016-07-31 12:33:44.906 [INFO ] [model.script.OpenWindows1.rule] - testing, gHouse_Windows received update
2016-07-31 12:33:45.870 [INFO ] [model.script.OpenWindows2.rule] - 5
It shows 3 as open, but numOpenWindows shows 5 (now including the AJAR ones too).
All I have to do is clean up the UI… ![]()
Third result
Yes, made this mistake (which I would not do in any other language – why here? I do not know.
I have in the meantime added one rule after the other back into the .rules file, and tested them; all good. Constants all over the shop was the culprit in this case.

