Hey guys,
yesterday i tried to migrate my openHab main installation, from 2.4 to 2.5.
Everything looked good (no error in logs, every *items, *things, *sitemap model was loaded successfully), up to the point where the first rule was executed.
It seems to me that the rule engine has a problem with items that have an underscore in their name.
I have a few examples…
[ERROR] [ntime.internal.engine.ExecuteRuleJob] - Error during the execution of rule 'Set daily max and min temperature': The name 'Aussen_Temperatur' cannot be resolved to an item or type; line 7, column 12, length 17
rule "Set daily max and min temperature"
when
Item Aussen_Temperatur changed or
Time cron "55 * * * * ?" or
System started
then
val max = Aussen_Temperatur.maximumSince(now.withTimeAtStartOfDay,"influxdb") // line 7!
val min = Aussen_Temperatur.minimumSince(now.withTimeAtStartOfDay,"influxdb")
if( max !== null && min !== null) {
postUpdate(Weather_Temp_Max, max.state)
postUpdate(Weather_Temp_Min, min.state)
}
end
Number KNX_Aussen_Temperatur "Aussen Temperatur [%.1f °C]" <temperature> { channel="knx:device:bridge:general:Aussen_Temperatur" }
another one
java.lang.reflect.UndeclaredThrowableException: null
at com.sun.proxy.$Proxy127.apply(Unknown Source) ~[?:?]
at org.eclipse.smarthome.model.script.internal.actions.TimerExecutionJob.execute(TimerExecutionJob.java:48) ~[?:?]
at org.quartz.core.JobRunShell.run(JobRunShell.java:202) [bundleFile:?]
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573) [bundleFile:?]
Caused by: org.eclipse.smarthome.model.script.engine.ScriptExecutionException: The name 'Enable_Signal' cannot be resolved to an item or type; line 35, column 9, length 13
rule "Doorbird init"
when
System started
then
createTimer(now.plusSeconds(30), [|
Enable_Signal.postUpdate(ON) // line 35!
])
end
Switch Enable_Signal "Türklingel Signalton [%s]" <soundvolume>
and one more
[ERROR] [ntime.internal.engine.RuleEngineImpl] - Rule 'Cinema status': The name 'Wohnzimmer_Beamer_Power' cannot be resolved to an item or type; line 32, column 9, length 23
rule "Cinema status"
when
Item WohnzimmerBeamerPower changed or
Item Leinwand changed or
Item HarmonyActivity changed or
Member of gRolladenEG changed
then
if (WohnzimmerBeamerPower.state == ON && // line 32!
HarmonyActivity.state == "CINEMA" &&
Leinwand.state == 100 &&
Rolladen_Esszimmer.state == 100 &&
Wohnzimmer_Rolladen.state == 100 &&
Kuechen_Rolladen.state == 100 &&
Rolladen_Esszimmer.state == 100 &&
Rolladen_TV_Zimmer.state == 100)
{
Cinema_Switch_state.postUpdate(ON)
}
else
{
Cinema_Switch_state.postUpdate(OFF)
}
end
Switch Wohnzimmer_Beamer_Power "Beamer" { channel="knx:device:bridge:wohnzimmer:Kino_Szene_Wohnzimmer_Status" }
This is a small selection, the errors I get. As a test, I removed the underscore in the name of one item, which solved the problem the single item
Unfortunately, several hundred items with many, many rules of their own are still affected. Therefore renaming is currently not an option.
Also the sitemaps, show a large part of the affected items no longer correctly.
Does anyone have any ideas about that?