Hello, Maybe this is a beginner question but I can not find a hint.
mismatched input ‘’ expecting RULE_ID
Where can I find the description for RULE_ID
here is my items list
//Gruppe für den Chart
Group Strom_Chart
//Gruppe für die Sitemap-Einbindung
Group Strom
// Schalter, der den Status der Steckdose anzeigt (an/aus)
Switch Stromzaehler “Status Steckdose” (Strom) { channel=“avmfritz:FRITZ_DECT_200:32eb7005:outlet”}
// Der Gesamtverbrauch - jeweils auf zwei Nachkommastellen gerundet
Number Strom_Gesamtverbrauch “Gesamtverbrauch in Wh [%.2f Wh]” (Strom) { channel=“avmfritz:FRITZ_DECT_200:32eb7005:energy”}
Could you show us the whole error message?
It doesn’t sound like anything to do with your items, but what is the filename of your ‘items list’? Have you any files with names like xxx.rules?
Yes I created a file with rules rrd4j.rules alternatively fritz.rules
import org.openhab.core.library.types.*
var Number Var_WH
var Number ESSL_KWH=0.25
rule “Berechne KWh”
when
Item Strom_Gesamtverbrauch changed
then
Var_WH = Strom_Gesamtverbrauch.state
var Number Var_KWH = Var_WH / 1000
Strom_Gesamtverbrauch_KWH.postUpdate(Var_KWH)
end
rule “Berechne Kosten Strom”
when
Item Strom_Gesamtverbrauch_KWH changed
then
var Number Var_KWH = Strom_Gesamtverbrauch_KWH.state
var Number Kosten = Var_KWH * ESSL_KWH
Strom_Summe.postUpdate(Kosten)
end
fritz.items
You didn’t use code fences in your first post, but when I paste your Items into VSCode not all the quote marks “” are the same. Only Strom_Temperatur has the correct plain " marks.
Thank you for helping.
After your comment I looked in VS Code. I found several no printable chars in the item definition. After deleting this chars everything was ok.