[HELP]Use SwitchMode 15 instead of SetOption114 and still trigger rule

575 views
Skip to first unread message

psyko_chewbacca

unread,
Jul 18, 2021, 10:55:28 AM7/18/21
to TasmotaUsers
Hi,

I have a Sonoff TH10 flashed with Tasmota 9.4.0 that controls a light bulb. 

I have connected to this Sonoff TH10 both a toggle switch (switch2) and a door reed switch(switch1_n).
I would like to detach only the reed switch (switch1) from directly controlling the relay but keep the toggle switch (switch2) to normally toggle the relay (stock behavior). I want to report door reed switch state back to Home Assistant and still use it to turn on/off the light. I plan on adding complexity to switch1 through extra rules but for now, all I want is to control the relay with switch1 while reporting its state back to Home Assistant.

My current solution involves using "SetOption114" and a rule but it's not great because the toggle switch (switch2) is also impacted by having "SetOption114" active. I would like to avoid creating a second rule for that toggle switch.

My current setup is:

15:51:36 CMD: setoption114
15:51:36 MQT: stat/lum_cagibi/RESULT = {"SetOption114":"ON"}
15:51:40 CMD: switchmode1
15:51:40 MQT: stat/lum_cagibi/RESULT = {"SwitchMode1":1}
15:51:44 CMD: switchtopic1
15:51:44 MQT: stat/lum_cagibi/RESULT = {"SwitchTopic":""}
15:51:49 CMD: rule1
15:51:49 MQT: stat/lum_cagibi/RESULT = {"Rule1":"ON","Once":"OFF","StopOnError":"OFF","Length":39,"Free":472,"Rules":"ON Switch1#State DO Power %value% ENDON"}


I would like to disable "SetOption114" and set "SwitchMode1 15" to selectively detach switch1 from directly controlling relay. But as it stands right now, "Rule1" will not fire. My guess is "SwitchMode1 15" will disable rule triggering for switch1.

Is there a way to still have "Rule1" trigger when "SetOption144 0" and "SwitchMode1 15"?
Reply all
Reply to author
Forward
0 new messages