But the switch doesnt change the status. I am sure my Broker is running correctly, because I am publishing my temperatures in a rule wich works fine. Also my PaperUI shows that the Broker is online an the channel is linked.
When you action the switch, in an UI for example, the command topic will be used to send the payload.
To change the state of the swith with an mqtt message from outside openHAB, use the state topic
rule "sendthermo"
when Time cron "0 0/1 * * * ?" //cron every minute
then
var Number tempTemperature = (WandthermostatWohnzimmer2ACTUALTEMPERATURE.state as QuantityType<Number>).doubleValue
val actions = getActions("mqtt","mqtt:broker:myLocalBroker")
actions.publishMQTT("temp/wt1", tempTemperature.toString)
end
Hi,
when I subscribe # in my python script and manually switch in Paper UI I recieve this messages:
So it seems that the channel works, but I am doing just something wrong with publishing?