JSR223 Javascript MQTT publish action?

jsr223
mqtt
mqttaction
Tags: #<Tag:0x00007fd313e59668> #<Tag:0x00007fd313e59500> #<Tag:0x00007fd313e59280>

(illnesse) #1

Im trying to utilize the MQTT binding’s publish function in a JSR223 Javascript, but not really sure how to access it. There used to be an action for the Xtext DSL

kinda like this?

var MQTT = Java.type(“org.openhab.io.transport.mqtt.MqttService”);
and then MQTT.publish(…) ?

Any clues? Thanks!


(illnesse) #2

found it!

getAction(“Mqtt”).static.publish()