Hallo,
I’m running openhabian with openhab 2.3.0 and just realized that my rules which are controlling my heating stopped working in some of the last updates. Unfortuately I don’t know when exactly I installed the version which broke things but it used to be working until at least two weeks ago.
Currently I’m running Build #1240 and with some guidance from the logs I could find that findFirst makes some problems.
I’m using the same method in several rules but the simplest one showing errors when loading the rules files is the following:
rule "Badheizung aus"
when
Item Bad_Heiz_Soll changed or
Item Wohn_Heiz_Soll changed
then
var raum = triggeringItem.name.split("_").get(0)
var modus = Alle_Heiz_Modus.members.findFirst[name.equals(raum+"_Heiz_Modus")].state
if (modus == "MANU-MODE")
{
if (triggeringItem.state == 4.5)
postUpdate(raum+"_Heiz_HeizModus", "OFF")
else if (triggeringItem.state == 30.0)
postUpdate(raum+"_Heiz_HeizModus", "HEAT")
else
postUpdate(raum+"_Heiz_HeizModus", "MAN")
}
end
It gives the following error:
2018-03-31 16:12:20.429 [WARN ] [el.core.internal.ModelRepositoryImpl] - Configuration model 'homematic.rules' has errors, therefore ignoring it: [84,47]: mismatched character '.' expecting ']'
[84,79]: mismatched input ']' expecting 'end'
With some try and error and could solve the issue with changing square brackets with normal ones. It’s a bit wired but at least rule file is not ignored anymore.
Is there any known issue or did behavior just change?
Unfortunately afterwards I ran into another issue with the same line when the rule is executed:
2018-03-31 16:19:17.388 [ERROR] [ntime.internal.engine.RuleEngineImpl] - Rule 'Badheizung aus': The name 'name' cannot be resolved to an item or type; line 84, column 48, length 4
Until now I couldn’t find any solution or why it stopped working.
Is there anybody who is more familiar to all the rule stuff then me having any idea?