My goal is to set up one D1 Mini with tasmota 8.1.3 to have the following:
-1 real relay to turn on/off porch light
-3 physical touch sensors working as switches. One switch would control the real relay, and the other two switches would control two remote relays via rules
-1 hall sensor set up as a switch to monitor door open/close
-1 buzzer.
-Once all set up, I would like to be able to longpress the two remote switches, to create a hold and use that to disarm the alarm.
So far I’ve got everything working except for the two ghost switches (the ones that control remote relays). At one point I had it all working except the longpress part. I tried using buttons instead of switches and all hell broke lose. When ever I try to play with buttons instead of switches my tasmotas end up being reset. Supposedly it is feature of tasmota but only if I hold for more than 40 seconds which I haven’t done.
That is my current setup
Relay1i is the real relay
Switch4 is touch sensor ghost switch to control remote living room lights (switchmode 3)
Switch3 is the hall sensor monitoring the door (switchmode 2)
Relay2 is not a physical relay. When turned “on” it provides the 3.3v to the buzzer
Switch1 is a touch sensor used to toggle Relay1i
Switch5 is a touch sensor ghost switch to control remote livingroom fan (switchmode 3)
Switch2 is a dummy switch, nothing connected to the pin. I had to create the dummy switch because door switch (switch 3) was turning buzzer on and off. Buzzer will be controlled 100% via HA.
This is my console info, after I set up the rule;
01:35:23 MQT: stat/tasmota_553DDB/RESULT = {"Rule1":"ON","Once":"OFF","StopOnError":"OFF","Length":62,"Free":449,"Rules":"on SWITCH4#state DO publish SalaMiriam/cmnd/POWER TOGGLE endon"}
01:35:45 MQT: cmnd/tasmota_553DDB/POWER4 = ON
01:35:45 MQT: stat/tasmota_553DDB/SWITCH4 = {"STATE":"ON"}
01:35:45 MQT: stat/tasmota_553DDB/RESULT = {"Command":"Error"}
01:35:46 MQT: cmnd/tasmota_553DDB/POWER4 = ON
01:35:46 MQT: stat/tasmota_553DDB/SWITCH4 = {"STATE":"ON"}
01:35:46 MQT: stat/tasmota_553DDB/RESULT = {"Command":"Error"}
01:35:52 MQT: cmnd/tasmota_553DDB/POWER4 = ON
01:35:52 MQT: stat/tasmota_553DDB/SWITCH4 = {"STATE":"ON"}
01:35:52 MQT: stat/tasmota_553DDB/RESULT = {"Command":"Error"}
If you notice I am using SalaMiriam/cmnd/POWER TOGGLE, but instructions have cmnd/SalaMiriam/… but when I did have it working a couple of days ago, I am 95% sure it was with SalaMiriam frist. But just to verify here is with the info swapped.
01:36:49 CMD: rule1 on SWITCH4#state do publish cmnd/SalaMiriam/POWER TOGGLE endon
01:36:49 RUL: Stored uncompressed, would compress from 62 to 48 (-23%)
01:36:49 MQT: stat/tasmota_553DDB/RESULT = {"Rule1":"ON","Once":"OFF","StopOnError":"OFF","Length":62,"Free":449,"Rules":"on SWITCH4#state do publish cmnd/SalaMiriam/POWER TOGGLE endon"}
01:36:58 MQT: cmnd/tasmota_553DDB/POWER4 = ON
01:36:58 MQT: stat/tasmota_553DDB/SWITCH4 = {"STATE":"ON"}
01:36:58 MQT: stat/tasmota_553DDB/RESULT = {"Command":"Error"}
01:37:00 MQT: cmnd/tasmota_553DDB/POWER4 = ON
01:37:00 MQT: stat/tasmota_553DDB/SWITCH4 = {"STATE":"ON"}
01:37:00 MQT: stat/tasmota_553DDB/RESULT = {"Command":"Error"}
Like I said, this morning I had everything working as I wanted. The only thing I was playing with was being able to hold down two sensors/switches for 4 seconds to put both on hold to trigger an automation to disarm the alarm. I switched the two ghosts switches to buttons, rebooted and after a couple of presses my tasmota got reset. Yesterday it did the same thing with another tasmota setup I was playing with.
For what it is worth. When I had it working this morning the setup was a bit different. I had 5 relays and 4 switches set up. Out of the 5 relays, relay1 was a real relay, relay2, 3 and 4 were dummy relays, and relay5 was the one used for the buzzer. SW1 was for Relay1, SW2 and SW3 were working with rules to toggle living room lights and fan, and SW4 was the door sensor. I didn’t have to list a SW5 to get relay5 to work.
Since I had to start from scratch I figured I would switch the switch numbers around as to not have to create so many dummy relays.
All that said, could someone be kind enough to help me first get the rules working for switches 4 and 5 so they can control the remote relays. Then help me with the hold feature, which I know I would have to switch them to switchmode 5 since switchmode3 doesn’t allow long press.
One last thing, I do have switchtopic set to 1
1 post - 1 participant
Read full topic