[solved] MQTT 2.4 SONOFF with time cron rules

  • Platform information:
    • Hardware: Raspberry pi, rasbian
    • openHAB version: 2.4
  • Issue of the topic:
    I have successfully installed the MQTT 2 Binding connected to a mosquitto Broker. The Bridge Thing is correct (generic MQTT thing), the Sonoff thing is proper configered, an item for the Switch linked. I can Switch my Sonoff with the control item in PaperUI. All fine so far.

But I Need to Switch it time controlled. Usually I define rules in a .rules file. How can I apply this for the MQTT2 things, or has the new 2.4 binding a PaperUI config for such purposes?

I have read a number of posts out here but I could not found some matching.
Any suggestions?

I have tried something like

rule “sonoff test”
Time cron “0 12 13 ? * MON-SUN”
mqttActions.publishMQTT(“esp/cmnd/sonoff_1/POWER”,“ON”, true)

Why would you not use that Item in your rules? An Item is an Item, the channels and binding behind it are not important in rules.

Yes, it’s really that easy, THX!!