Ich habe ein Buttonplus Room Controller. Dafür möchte ich einige Werte von Openhab über das MQTT Binding richtung den Controller schicken. z.B. Das Datum bzw. die Uhrzeit. Bei KNX funktioniert das ja wunderbar über ein Channel Link mit dem NTP Binding. Jetzt habe ich eine Channel Link mit dem MQTT Binding und dem NTP Binding eingerichtet. Siehe Code
mqtt.thing
Code: Alles auswählen
Thing mqtt:topic:buttonplus (mqtt:broker:mosquitto){
Channels:
Type datetime : buttonplus_openhab_time [commandTopic="buttonplus/openhab/time", formatBeforePublish="%1$tH:%1$tM"]
Type number : buttonplus_openhab_outsidetemp [commandTopic="buttonplus/openhab/outsidetemp"]}
Code: Alles auswählen
DateTime mqtt_buttonplus_time_time {channel="mqtt:topic:buttonplus:buttonplus_openhab_time", channel="ntp:ntp:timeserver:dateTime"}
Number mqtt_buttonplus_outsidetemp {channel="mqtt:topic:buttonplus:buttonplus_openhab_outsidetemp", channel="mqtt:topic:ebus:heating_ebus_broadcast_outsidetemp"}

Sobald ich aber eine Rule anlege funktioniert es.
Code: Alles auswählen
rule "buttonplus - time"
when
Item mqtt_buttonplus_time_time changed
then
mqtt_buttonplus_time_time.sendCommand(mqtt_buttonplus_time_time.state.toString)
end
Grüße vom Kasper
