TopGreener Scene Controller Switch (TGWFSC8-W)
Available from:
Amazon.com
GPIO # | Component |
---|---|
GPIO00 | None |
GPIO01 | Tuya Tx |
GPIO02 | None |
GPIO03 | Tuya Rx |
GPIO04 | None |
GPIO05 | None |
GPIO09 | None |
GPIO10 | None |
GPIO12 | None |
GPIO13 | None |
GPIO14 | None |
GPIO15 | None |
GPIO16 | None |
GPIO17 | None |
Configuration
{"NAME":"TGWF15RM","GPIO":[0,2272,0,2304,0,0,0,0,0,0,0,0,0,0],"FLAG":0,"BASE":54}
After configuring Wi-Fi and MQTT set Module 54
or apply the template.
Add a rule to transmit every button to its topic with a description of the action
rule1
on tuyareceived#dptype4id101=0 do publish %topic%/btn1 button_short_press endon
on tuyareceived#dptype4id102=0 do publish %topic%/btn2 button_short_press endon
on tuyareceived#dptype4id103=0 do publish %topic%/btn3 button_short_press endon
on tuyareceived#dptype4id104=0 do publish %topic%/btn4 button_short_press endon
on tuyareceived#dptype4id105=0 do publish %topic%/btn5 button_short_press endon
on tuyareceived#dptype4id106=0 do publish %topic%/btn6 button_short_press endon
on tuyareceived#dptype4id107=0 do publish %topic%/btn7 button_short_press endon
on tuyareceived#dptype4id108=0 do publish %topic%/btn1 button_double_press endon
on tuyareceived#dptype4id109=0 do publish %topic%/btn2 button_double_press endon
on tuyareceived#dptype4id110=0 do publish %topic%/btn3 button_double_press endon
on tuyareceived#dptype4id111=0 do publish %topic%/btn4 button_double_press endon
on tuyareceived#dptype4id112=0 do publish %topic%/btn5 button_double_press endon
on tuyareceived#dptype4id113=0 do publish %topic%/btn6 button_double_press endon
on tuyareceived#dptype4id114=0 do publish %topic%/btn7 button_double_press endon
Enable the rule with Rule1 1
Home Assistant
The following blueprint will create MQTT discovery messages creating automation triggers for each short and double button press for the device.
Final result: