ich möchte über MQTT einige Relais ansteuern, was mit MQTT.fx auch einwandfrei funktioniert. Über OH funktioniert es aber leider nur sporadisch und es kommt in MQTT.fx (und an den Relais) manchmal nichts an.
OH3 und MQTT-Broker Mosquitto laufen auf RP4. Zum Schalten über UI habe ich für jeden Schalter ein Item angelegt, für jeden "MQTT-Ausgang" ebenfalls ein eigenes Item. Die Steuerung erfolgt über jeweils eine Rule "AN":
Code: Alles auswählen
triggers:
- id: "1"
configuration:
itemName: SchalterV2
state: ON
previousState: OFF
type: core.ItemStateChangeTrigger
- id: "3"
configuration:
time: 18:26
type: timer.TimeOfDayTrigger
conditions: []
actions:
- inputs: {}
id: "2"
configuration:
itemName: MQTT_Bew_Ventil_2
command: ON
type: core.ItemCommandAction
Code: Alles auswählen
triggers:
- id: "1"
configuration:
itemName: SchalterV2
state: OFF
previousState: ON
type: core.ItemStateChangeTrigger
- id: "3"
configuration:
time: 18:31
type: timer.TimeOfDayTrigger
conditions: []
actions:
- inputs: {}
id: "2"
configuration:
itemName: MQTT_Bew_Ventil_2
command: OFF
type: core.ItemCommandAction
Ich bin über jeden Tipp dankbar!