Hi,
I am running now on OpenHab and I would like to move to HA within this year. I have some issue and one of this is to control 8 of my light connected to a step relay.
I added a Shelly1 with tasmota onboard, and with some rule i configured tasmota to have 3 switch:
POWER1 = is the Shelly1’s relè control. Relè is connected in parallel with the phisical momentary button that control my StepRelay Light. POWER1 is temporized to 1 second, and act as a human that press the physical button
POWER2 = is conneted to nothing, but it have the role to receive command via MQTT from OpenHab. Then with rules on Tasmota, it control POWER1
POWER3 = is the feedback, connected to SW input of Tasmota, and it gave me back the status of the light.
Rule on Tasmota is:
PulseTime1 10
rule1 1
rule1
ON system#boot DO ruletimer1 120 ENDON
ON rules#timer=1 DO backlog power3;ruletimer1 120 ENDON
on power3#boot do var3 %value% endon
on power3#state do var3 %value% endon
ON power2#state DO power1 1 ENDON
ON power3#state=0 DO power2 0 ENDON
ON power3#state=1 DO power2 1 ENDON
In Openhab is very simple to handle this, because i can select 2 different MQTT topic for state and control:
Type switch : SwitchCorridoio2 [stateTopic="stat/Shelly1-Tasmota-Corridoio2/POWER3", commandTopic="cmnd/Shelly1-Tasmota-Corridoio2/POWER2", on="ON", off="OFF"]
I would like to achieve this also in HA, but I cannot facing how to attach 2 different MQTT topic to a switch in order to control and state the switch.
Any Help or suggestion would be apprecitated