Skip to main content

3 Way Smart Switch with Motion Activation

Installing the true 3 Way Smart Switch from Etekcity.  As always we flash the switch with open source firmware, Tasmota for 100% local control.  No soldering required to flash!  After the setup we do a slight modification to add a motion sensor to solve an issue I had in our laundry room.

Etekcity 3 Way (2 pack)
Etekcity Single Pole
Flashing
FTDI USB Flasher
Jumper Wires
Straight Header Pins https://amzn.to/30EZsUK

To Add Motion Activation
AM312
Angled Header Pins

Installation Tools
Wago 221 Wire Connectors
Circuit Tester

Soldering gear I use
Station
Solder
Flux
Helping Hands

Additional Links
Tasmota
NodeMCU Pyflasher
3 Way Switch Diagrams
Cliff Quicktest

Tasmota Template

{"NAME":"Etekcity 3Way","GPIO":[255,255,0,255,23,29,0,0,82,22,10,0,0],"FLAG":0,"BASE":18}  

Setup Commands for the Console

backlog switchtopic 0;switchmode1 1;switchmode2 5;switchmode3 1;powerretain 1;rule1 on event#ON do power2 TOGGLE endon;rule1 1;rule2 on event#OFF do power2 TOGGLE endon;rule2 1;

rule3 on power1#state=1 do backlog rule1 0; rule2 1 endon on power1#state=0 do backlog rule1 1; rule2 0 endon
rule3 1

Sample Home Assistant Config

- platform: mqtt
name: "SW-HallWay"
state_topic: "stat/SW-HallWay/POWER1"
command_topic: "cmnd/SW-HallWay/EVENT"
availability_topic: "tele/SW-HallWay/LWT"
qos: 1
payload_on: "ON"
payload_off: "OFF"
payload_available: "Online"
payload_not_available: "Offline"
retain: false

Take note of the slightly different command topic.

Rule Addition for Motion
rule3 on power1#state=1 do backlog rule1 0; rule2 1 endon on power1#state=0 do backlog rule1 1; rule2 0 endon on switch3#state=1 do backlog event ON ; RuleTimer1 300 endon on Rules#Timer=1 do event OFF endon

Come chat with us!
Discord
Patreon