WOOX R4028 Power Strip
WOOX R4028

Available from:

GPIO #Component
GPIO00 None
GPIO01 Led1i
GPIO02 None
GPIO03 Button1
GPIO04 Relay3
GPIO05 Relay2
GPIO09 None
GPIO10 None
GPIO12 None
GPIO13 Relay4
GPIO14 Relay1
GPIO15 None
GPIO16 None
FLAG Analog
{"NAME":"WOOX R4028","GPIO":[0,56,0,17,23,22,0,0,0,24,21,0,0],"FLAG":1,"BASE":18}

Seems to be identical to: geekbes_4socket.html

Button controls single relay only. Rule to emulate original button behaviour (make sure to have all relays set to off before adding the rule, from then on it should work correctly across restarts):

on system#boot do var1 %mem1% endon
on power1#state do event pwch=%value% endon
on power2#state do event pwch=%value% endon
on power3#state do event pwch=%value% endon
on power4#state do event pwch=%value% endon
on event#pwch=0 do sub1 1 endon
on event#pwch=1 do add1 1 endon
on var1#state do mem1 %value% endon
on button1#state do event press=%mem1% endon
on event#press>0 do backlog power1 0;power2 0;power3 0;power4 0; endon
on event#press<0.1 do backlog power1 1;power2 1;power3 1;power4 1; endon

it is also possible to use standard Tasmota button behaviour: one short press controls usb sockets, two short presses control first mains socket, three control second socket and four short presses control third mains socket. Also add a rule for long press to switch all sockets off: rule1 ON button1#state=3 DO Backlog power1 0; power2 0; power3 0; power4 0 ENDON Not sure what the analog is connected to, if any. Values stays between 950 and 990.