Could someone better than I point me in the right direction.
I would like to publish some MQTT via an ECMA script but have got stuck. I have the broker & binding working together.
(thrilled to have my iPhone reading an NFC and Shortcuts/EasyMQTT sending a MQTT to my broker/OH item)
Have the below but it is not working.
var logger = Java.type("org.slf4j.LoggerFactory").getLogger("org.openhab.model.script.Rules.Experiments"); var ScriptExecution = Java.type("org.openhab.core.model.script.actions.ScriptExecution"); logger.info("MQTT published...") getActions("mqtt","mqtt:systemBroker:openHab").publishMQTT("test-topic", "test-data", true);