- Platform information:
- Hardware: VMWare on synology
- OS: debian 12
- openHAB version: 3.4.4
- Issue of the topic:
I want to publish periodically shellies/command (“announce”)
My rule looks like this:
var Actions = Java.type(“org.openhab.core.model.script.actions.Things”);
var mqttActions = Actions.getActions(“mqtt”,“mqtt:broker:c6a43xxxxx”);
mqttActions.publishMQTT(“/shellies/command”, “announce”);
I get following error in the log.file, when I run it manually…
2023-07-16 19:32:37.964 [ERROR] [internal.handler.ScriptActionHandler] - Script execution of rule with UID ‘b12442f47f’ failed: TypeError: null has no such function “publishMQTT” in at line number 3
I tried also below …
actions.get(“mqtt”, “mqtt:broker:c6a436xxx”).publishMQTT(“test/test”, “hurray!”);
and got this error in log…
2023-07-16 19:39:01.764 [ERROR] [internal.handler.ScriptActionHandler] - Script execution of rule with UID ‘b1244xxxxx’ failed: TypeError: null has no such function “publishMQTT” in at line number 5
Could anybody please give me a hint? Do I need to import PublishMQTT or install it somehow?