When I am trying to create any script using UI, I am getting this error:
**ERROR:HANDLER** Getting handler 'scriptScriptAction' for module 'script' failed: Config parameter 'script' is missing in the configuration of module 'script'.
Thanks Rich for your reply.
I just found that when script text actually added this error sign changed to “IDLE” and all is working.
So, I just suggest that
**ERROR:HANDLER** Getting handler 'scriptScriptAction' for module 'script' failed: Config parameter 'script' is missing in the configuration of module 'script'.
changed to message like “waiting for script”.
Thanks!
I am using the “Release Build” of openHAB 3.1.0 with Zulu Java 11.0.12. (I found out the hard was that Java 16 doesn’t work. I have a fresh install of Ubuntu 20. So, it is clean as a whistle.
I am getting this exact same error. And, only the most rudimentary scripts work. However, they won’t work at all unless I resolve the issue below:
(There is more to that error, but I don’t believe it is relevant)
I create the folder /etc/openhab/automation/lib/javascript/personal then I can run some scripts.
2021-07-29 13:33:00.428 [ERROR] [internal.handler.ScriptActionHandler] - Script execution of rule with UID '69f7181e4c' failed: org.graalvm.polyglot.PolyglotException: ReferenceError: "itemRegistry" is not defined
It doesn’t matter the item, it doesn’t matter if it is with Blockly or JS. I haven’t been able to get past this. That is why I have a fresh Ubuntu install with nothing but Java and OpenHAB installed. No matter what I do, I cannot script with items. I have seen various posts with errors like mine, but theirs go away, and mine simply do not.
I ran into an error while trying to configure my rules from openhab2 to openhab3.
The old was:
rule "Turn off lights"
when
Time cron "0 0/2 * 1/1 * ? *" //0 0/5 * 1/1 * ? * for 5 minutes
then
if (AL_onoff.state == ON){
if (!zone5.updatedSince(now.minusMinutes((AL_Kitchen_3.state as Number).intValue),"jdbc") && Sw_Kitchen_3.state == ON && !Sw_Kitchen_3.updatedSince(now.minusMinutes((AL_Kitchen_3.state as Number).intValue),"jdbc") ) Sw_Kitchen_3.sendCommand(OFF)
...
Click on the code tab of the rule and paste the contents of that here, using code fences.
```
code goes here
```
Without seeing the code it’s hard to say, but I suspect there is something malformed with the script condition. Keep in mind that the last line of a Script Condition must evaluate to a boolean. No return statements and in all likelihood the if block itself needs to be removed also. See Rules - Blockly | openHAB for more details.
Thanks for the link, with it I managed to get it to work. Below how it should look.
One last thing I need to do is to put that variable in, any hints on that one?