Send MQTT message to embedded Broker with Binding 2.0

running OH 2.4 with MQTT Binding 2.4.
I need to send an MQTT message to Embedded Broker every 5 minutes. I am supposing to use a rule, but I have not undestood yet how to perform this.

Many Thanks in Advance.


cron rule trigger

MQTT publish Action

1 Like

Thanks for update and another question, in case I would like to use tele/# messages just sent out by tasmota, can I have 2 State Topic on one single Channel?


I think what you would need is two channels. An Item can be linked to multiple channels and get its state updated by either.

How can link an item to different channels?

Docs, near the end

If your using files it would look something like this:

Switch LivingRoom_Light "Living Room Light" <light>  ["Lighting"] { channel="mqtt:topic:pibroker:sonoff11:power" }
Number LivingRoom_Light_Temp "Temperature [%.1f °F]"      <temp>             { channel="mqtt:topic:pibroker:sonoff11:temperature" }
Number LivingRoom_Light_Humidity    "Humidity [%.1f %%]"    <humidity>       { channel="mqtt:topic:pibroker:sonoff11:humidity" }

One item that turns on/off a switch, gives temp and humidity. Hope the example helps.

String MyStringItem { channel="xxxxxxxxx", channel="yyyyyyy", channel="zzzzzzz" }

Thanks to all


Solved?, please tick the box, thanks