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”
when
Item gasMeter received update
then
gasMeterKWH.postUpdate(12345)
end
(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.
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?
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!)