This rule was working with OH1 1.8. After install OH2 this rule is not working anymore:
// Kühlschrank Überwachung ####################################################
rule “Kühlschrank Temperatur HOCH”
when
Item temp_kuehl changed
then
if (temp_kuehl.state > 3)
{
sendMail(“mxxxxx@onxxxx.de”, “openHAB Nachricht”, “Kühl/Gefrierschranktemperatur zu hoch! " + temp_kuehl.state + " Grad”)
}
end
The logfile shows the following message:
16:00:01.618 [ERROR] [untime.internal.engine.RuleEngineImpl] - Rule ‘Kühlschrank Temperatur HOCH’: Script interpreter couldn’t be obtain
The OH2 is installed from scratch no upgrade. All bindings from OH2, only the rules from are separated from one rulefile to separated rules.
My OH is running on Windows 10 64bit with Java™ SE Runtime Environment (build 1.8.0_221-b11).
All other functions are working as well. Btw: When the System is starting I send a Mail without any issue like this:
// Systemstart ################################################################
rule “Initialize”
when
System started
then
sendMail(“mxxxlf@xxxx.de”, “Nachricht von openHAB”, “openHAB gestartet.”)
sendBroadcastNotification(“openHAB gestartet…”)
end
Try putting this part in your first rule, comment out the other message, and see if it works. If it works the problem is in the message your trying to send…something changed with the syntax???
rule “Kühlschrank Temperatur HOCH”
when
Item temp_kuehl changed
then
if (temp_kuehl.state > 3)
{
sendMail(“mxxxxxx@xxxxxx.de”, “openHAB Nachricht”, “Kühl/Gefrierschranktemperatur zu hoch!”)
}
end
Looking at a few other topics that are similar I recommend to use openhabian tool and select install needed packages, fix permissions, ect… then clean the cache and restart OH. Hopefully this will help b/c I’m out of ideas.
Please use a logInfo just before the sendMail line in order to see if you really get inside the if statement.
Maybe the temperature isn’t just a number anymore? Topic to look at UnitsOfMeasurement.
I thought about this also but as OP mentioned the rule worked before so I was assuming the item has been defined as a Number. But you make a good point and thanks for helping.
I’m not sure you understood what Bruce was recommending. The sendMail Action you are trying to use is a legacy Action. And indeed, people were having issues getting it to work properly. That Action has been replaced with a 2.x version binding, but that binding was released after 2.4 release.
I recommend that you wait a day, install OH 2.5, and then use the 2.5 Mail binding instead of the now deprecated Mail Action.
As for your error, my only recommendation is to double check that the Mail Action is in fact installed.
Ok. I think I have time to wait until OH 2.5 is released. It was only an incident because of my defective Frozer. With OH1 I was able to repair the Froster until Temperature was too high then I’ve got an EMail. Last time it was too late.