MQTT publish failed

??

Instead of

val mqttActions=getActions("mqtt","mqtt:broker:MQTTBroker")
      mqttActions.publishMQTT("siren","0")

which gives you grief, you -
set up the MQTT binding to subscribe to your broker
make a thing for your siren topic
add a switch channel with commandTopic
specify on/off to 0/1

Then add an Item to use that channel

Switch mySirenItem "siren switch" { channel="mqtt:topic:mysirenthing:controlchannel"}

Then you just send it a command from your rule

mySirenItem.sendCommand(ON)`

Also useful

2 Likes