
It is difficult to open the whole switch because the pins going to the board are not plugged in, but soldered. I wasn't able to desolder them. I lifted the board and soldered only RX and TX (according to the CB3S module documentation), and connected the power supply to the extreme pins on the board (see photo), where GND is on the left - the same as the OPEN button.
VCC and GND:

RX and TX:

I started the flashing mode by shorting GND to CEN.
The flashing application is not able to read the settings automatically. I had to find all the exits myself. Here they are:
P6 (PWM0) "WifiLED_n;0"
P7 (PWM1) "Btn;2"
P8 (PWM2) "LED_n;2"
P9 (PWM3) "Btn;1"
P14 (N/A) "Rel;3"
P23 (ADC3) "Btn;3"
P24 (PWM4) "LED;3"
P26 (PWM5) "Rel;1"
Here is the json that will make it easier to save the settings:
{
"vendor": "LoraTap",
"bDetailed": "0",
"name": "Full Device Name Here",
"model": "SC400W-EU",
"chip": "BK7231N",
"board": "TODO",
"flags": "0",
"keywords": [
"LoraTap",
"SC400W-EU",
"Curtains",
"Blinds",
"Switch",
"Roller",
"Shutters",
],
"pins": {
"6": "WifiLED_n;0",
"7": "Btn;2",
"8": "LED_n;2",
"9": "Btn;1",
"14": "Rel;3",
"23": "Btn;3",
"24": "LED;3",
"26": "Rel;1"
},
"command": "",
"image": "https://obrazki.elektroda.pl/8913814600_1698850663.webp",
"wiki": "https://www.elektroda.com/rtvforum/viewtopic.php?p=20795168"
}
It is also necessary to add a button management script to replicate the previous logic. I slightly improved it, i.e. the button deactivates itself after 60 and not 120 seconds, and the reset button lights up for one second instead of two, and the OPEN and CLOSE buttons can be turned off not only by pressing the RESET button, but by pressing it again.
Add new file `/autoexec.bat`:
// P26 - Relay 1 Close
// P7 - Btn 2 Stop
// P14 - Relay 3 Open
// P6 - Led backlight
// description
SetChannelLabel 1 Close
SetChannelLabel 2 Stop
SetChannelLabel 3 Open
// logic
alias Reset_Stop_Close backlog SetChannel 2 0; SetChannel 1 0
alias Reset_Stop_Open backlog SetChannel 2 0; SetChannel 3 0
alias Reset_Close_Open backlog SetChannel 1 0; SetChannel 3 0
addChangeHandler Channel1 == 1 Reset_Stop_Open
addChangeHandler Channel1 == 1 backlog startScript autoexec.bat resetCloseAfterMinute
addChangeHandler Channel2 == 1 Reset_Close_Open
addChangeHandler Channel2 == 1 backlog startScript autoexec.bat resetStopAfterSecond
addChangeHandler Channel3 == 1 Reset_Stop_Close
addChangeHandler Channel3 == 1 backlog startScript autoexec.bat resetOpenAfterMinute
// do not proceed
return
// Scripts
resetCloseAfterMinute:
// wait 60 seconds
delay_s 60
// stop opening
SetChannel 1 0
// done
return
resetStopAfterSecond:
// wait 1 second
delay_s 1
// disable button
SetChannel 2 0
// reset all scripts
stopAllScripts
// done
return
resetOpenAfterMinute:
// wait 60 seconds
delay_s 60
// stop opening
SetChannel 3 0
// done
return
Enjoy!
Cool? Ranking DIY