Of course it is!
If you instruct logInfo, it is supposed to show in the normal log level, without having to change the lockback.xml and restarting the service.
What we are seeing here is behaviour where you cannot test a rule, because the logInfo level does not seem to work.
I have changed the rule on both (Linux|Windows) to:
rule "ATA is offline"
when
Item Network_ATA received command or
Item Network_ATA changed or
Item Network_ATA received update
then
logInfo("gNetwork", "Rule: ATA is offline triggered")
if (receivedCommand==OFF) {
logInfo("gNetwork", "ATA is OFF (command)")
}
else if (Network_ATA.state==OFF) {
logInfo("gNetwork", "ATA is OFF (state)")
}
else if (Network_ATA.state == "OFF") {
logInfo("gNetwork", "ATA is 'OFF' (state)")
}
end
telling me exactly which action it seem to accept (here on Windows):
2016-07-31 09:26:17.934 [INFO ] [.openhab.model.script.gNetwork] - Rule: ATA is offline triggered
2016-07-31 09:26:17.934 [INFO ] [.openhab.model.script.gNetwork] - Rule: ATA is offline triggered
2016-07-31 09:26:17.934 [INFO ] [runtime.busevents ] - Network_ATA received command OFF
2016-07-31 09:26:17.939 [INFO ] [.openhab.model.script.gNetwork] - Rule: ATA is offline triggered
2016-07-31 09:26:17.959 [INFO ] [.openhab.model.script.gNetwork] - ATA is OFF (state)
2016-07-31 09:26:17.969 [INFO ] [.openhab.model.script.gNetwork] - ATA is OFF (command)
2016-07-31 09:26:17.984 [INFO ] [.openhab.model.script.gNetwork] - ATA is OFF (state)
2016-07-31 09:26:21.787 [INFO ] [runtime.busevents ] - Network_ATA state updated to ON
2016-07-31 09:26:21.787 [INFO ] [.openhab.model.script.gNetwork] - Rule: ATA is offline triggered
2016-07-31 09:26:21.787 [INFO ] [.openhab.model.script.gNetwork] - Rule: ATA is offline triggered
2016-07-31 09:27:01.423 [INFO ] [runtime.busevents ] - Weather_Temperature state updated to 10
2016-07-31 09:27:05.435 [INFO ] [runtime.busevents ] - Weather_Humidity state updated to 82
2016-07-31 09:27:21.789 [INFO ] [runtime.busevents ] - Network_ATA state updated to ON
2016-07-31 09:27:21.789 [INFO ] [.openhab.model.script.gNetwork] - Rule: ATA is offline triggered
while on Linux:
rule "ATA is offline"
when
Item Network_ATA received command or
Item Network_ATA changed or
Item Network_ATA received update
then
logInfo("gNetwork", "Rule: ATA is offline triggered")
sendMail("blah@gmail.com", "Rule: Item Network_ATA", "Rule: ATA is offline triggered")
if (receivedCommand==OFF) {
logInfo("gNetwork", "ATA is OFF (command)")
sendMail("blah@gmail.com", "Rule: Item Network_ATA", "OFF (command)")
}
else if (Network_ATA.state=="OFF") {
logInfo("gNetwork", "ATA is OFF (state)")
sendMail("blah@gmail.com", "Rule: Item Network_ATA", "'OFF' (state)")
}
else if (Network_ATA.state==OFF) {
logInfo("gNetwork", "ATA is OFF (state)")
sendMail("blah@gmail.com", "Rule: Item Network_ATA", "OFF (state)")
}
end
no entry in log shows other than Refreshing model max01.rules
the mial is also not sent, despite mail working.
Meaning OH does not trigger this rule!
What else could be wrong? Please…