"Method or field undefined" in rule


I just started working with Openhab again after a long time. I tried to setup a simple rule to convert a mqtt measurement (m³ of Gas to kWH)

rule “m3 to KWH”
Item gasMeter received update
(both items are declared as Number, 12345 is just for testing)

So this seems like a rather simple task but Openhab Designer is telling me that “Method or field gasMeterKWH undefined” (although it is created in the items file and I can use it in my sitemap)

item file:
Number gasMeterKWH “Gas Meter [%d kWh]”

Other rules (from my old projects) that seem pretty similar are working fine. So why is it that I cant access the new gasMeterKWH variable? Do I have to add something in the new PaperUI? If I ignore the openhab designer message and just save the file, the error log of openhab shows the same error message as the designer does.

So does anyone has an idea what I have to change?

Thx in advance.

Do you see the item gasMeterKWH in Paper UI?

Yes, I do

Oh, I missed a part from the beginning… You are using openHAB Designer? Really? That software is not recommended anymore and not maintained for years.
Which version of openHAB do you use?

Ehm yes. Like I said… I havent worked With Openhab for a while. So yes I really am using Openhab Designer. Is there any up2date successor for it?

And I am using Openhab

Yes, definitely, please delete openHAB Designer and install Visual Studio Code instead.
code.visualstudio.com/ (it’s Open Source and free)
Install at least the openHAB plugin (from VSCode builtin marketplace)

Take care of the correct configuration (i.e. set the correct host for openHAB in the VSCode plugin settings)

Use a Windows share (no UNC path but a drive letter!) to access the configuration.

VSCode with the openHAB pludin is the feature-complete successor of openHAB Designer (it’s even much better!)

1 Like