Raspberry Pi OS, Pi 4, all latest distros - openhab installed from distro. I have a rule with an ECMAscript action (first time trying the OH3 interface). Rules work fine with timers and actions on things. With ECMAscript I get the above error. Full text is Script execution of rule with UID ‘2dabdc1660’ failed: ReferenceError: “console” is not defined in at line number 1
console.info(‘Luminance change detected’);
As nobody seems to have run into this before, I’ve got to assume that I’ve made some very basic mistake, but can’t figure out what it is.
Which ECMAscript are you using? For the OH3.X there is a built-in ECMAscript using an older JS which if you are just starting you should probably avoid because it is on its way out. And a newer version for which you have to install the JSScripting Add-on.
console.info(‘Luminance change detected’); you need that newer version.
Now all I need to do is fix the rest of my script errors
Thanks for your help. You got me on the right track and now I can proceed to the next problem.