Hi, I have to configure a switch for a roller shutter which should do with a command:
- Turn off the engine
-Wait about 50mS
-Switch relay to opening
-Wait about 50mS - Start the engine for a set time.
All in MQTT.
Individually the commands work, but I don’t understand how to integrate them into a single switch.
- platform: mqtt
unique_id: serranda_1_Power_switch
name: "Serranda 1 Power"
state_topic: "ESP_Easy_12_Serrande/State"
command_topic: "ESP_Easy_12_Serrande/cmd"
payload_on: "mcplongpulse,2,0,3"
payload_off: "mcplongpulse,2,0,3"
state_on: "1"
state_off: "0"
optimistic: false
qos: 0
retain: false
Commands to enter in the switch:
payload: "MCPGPIO,2,1" #Motor Off
payload: "MCPGPIO,2,1" #Motor On
payload: "mcplongpulse,2,0,3" #Motor On for 3 seconds