-
-
Notifications
You must be signed in to change notification settings - Fork 421
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve ECMA integration #2056
Comments
Found the solution! The reason is a lack of information in the documentation. Don't know where and how to change the docu, but for others running into this problem, this would be helpful. here it goes: You need to include the following line into your ECMA script: And the call of the function is like: I leave this issue open until someone can update the documentation. Thanks! |
@kaikreuzer maybe we should go on here with our discussion based on openhab/openhab-docs#1414 to get seom progress for ECMA Script implementation and also improve the docs with some proper explanations/tutorials. |
Hm, I guess we only need someone who can fix this issue - since it seemed to work in the past, I assume it should be possible to make it work again... |
This issue has been mentioned on openHAB Community. There might be relevant details there: https://community.openhab.org/t/syntax-for-sendhttpgetrequest-in-oh3-ecma-script/111863/8 |
@kaikreuzer After re-reading this issue several times: I think it works for DSL rules (and did that in the past), but I don't think it ever worked for JS rules. And IMO the correct way is indeed to import the Java type of the core actions, we should not magically inject something. I would vote for closing this issue. |
Ok, in that case let's indeed close the issue - but we might want to revive the documentation update openhab/openhab-docs#1414 then. |
The built-in executeCommandLine command doen't work in rules:
Result in the logfile:
2021-01-02 23:00:43.873 [ERROR] [internal.handler.ScriptActionHandler] - Script execution of rule with UID 'test' failed: ReferenceError: "executeCommandLine" is not defined in <eval> at line number 1
DSL rules don't show this problem - calling executeCommandLine there works fine.
The text was updated successfully, but these errors were encountered: