Elektroda.com
Elektroda.com
X
Elektroda.com

[BK7231N / CB3S] Aubess Tuya Wifi Smart Touch Switch 4 Gang W/ Neutral

Xinayder 633 8
  • I've bought a wall switch from Aubess for my home, with 4 capacitive (touch) buttons.

    I ordered it from AliExpress: https://www.aliexpress.com/item/1005005009473461.html

    [BK7231N / CB3S] Aubess Tuya Wifi Smart Touch Switch 4 Gang W/ Neutral [BK7231N / CB3S] Aubess Tuya Wifi Smart Touch Switch 4 Gang W/ Neutral [BK7231N / CB3S] Aubess Tuya Wifi Smart Touch Switch 4 Gang W/ Neutral

    [BK7231N / CB3S] Aubess Tuya Wifi Smart Touch Switch 4 Gang W/ Neutral [BK7231N / CB3S] Aubess Tuya Wifi Smart Touch Switch 4 Gang W/ Neutral [BK7231N / CB3S] Aubess Tuya Wifi Smart Touch Switch 4 Gang W/ Neutral

    [BK7231N / CB3S] Aubess Tuya Wifi Smart Touch Switch 4 Gang W/ Neutral

    With the device in hands, it was time to begin the fun part - disassembly and converting it to OpenBK!

    [BK7231N / CB3S] Aubess Tuya Wifi Smart Touch Switch 4 Gang W/ Neutral [BK7231N / CB3S] Aubess Tuya Wifi Smart Touch Switch 4 Gang W/ Neutral [BK7231N / CB3S] Aubess Tuya Wifi Smart Touch Switch 4 Gang W/ Neutral

    [BK7231N / CB3S] Aubess Tuya Wifi Smart Touch Switch 4 Gang W/ Neutral [BK7231N / CB3S] Aubess Tuya Wifi Smart Touch Switch 4 Gang W/ Neutral [BK7231N / CB3S] Aubess Tuya Wifi Smart Touch Switch 4 Gang W/ Neutral

    Regarding functionality, when a button is touched/pressed, the corresponding relay is triggered. The button has a light that shows whether the relay is open or closed - it will show up as blue when the relay is ON and red when the relay is OFF.

    As you can see, the device is powered by a CB3S chip, although not all of its pins are soldered on the PCB. Upon checking the datasheet for the MCU, we can determine the required pins to flash the device:

    Datasheet: https://developer.tuya.com/en/docs/iot/cb3s?id=Kai94mec0s076

    [BK7231N / CB3S] Aubess Tuya Wifi Smart Touch Switch 4 Gang W/ Neutral [BK7231N / CB3S] Aubess Tuya Wifi Smart Touch Switch 4 Gang W/ Neutral

    I've connected a push button to drive the CEN pin to low level to put the device into bootloader mode in order to flash a new firmware.






    Pin NamePin Number
    CEN3
    VCC8
    GND9
    RX115
    TX116


    NOTE: these devices are 3.3v, so the VCC pin is connected to the 3V3 pin on the USB UART programmer.

    Flashing:
    [BK7231N / CB3S] Aubess Tuya Wifi Smart Touch Switch 4 Gang W/ Neutral

    At first, it wasn't possible to flash and I thought it could be that the CEN is connected to the wrong ping - according to the datasheet, the RST pin corresponds to the CEN pin of the IC, so I tried changing the CEN to that pin, but it didn't work. Every time I pressed the button before flashing, the device would simply reboot and the flash would fail because it couldn't communicate with the UART bus.

    Then I found out looking at other teardowns that some devices have an extra chip (highlighted in pink) that connects to either the TX/RX lines of the wifi module, so you need to find a way to cut the communication between the wifi module and this IC. For me, the easiest way was to completely remove the IC using an air reflow station and resoldering it back with flux.

    So I reconnected the push button to the CEN pin (pin 3) and this time, without the extra IC, I was able to flash OpenBK. I used the command line tool, hid_download, as I run Linux on my PCs, but you should be able to flash it using the new BK7231GuiFlashTool.

    - BK7231GuiFlashTool: https://github.com/openshwprojects/BK7231GUIFlashTool
    - hid_download: https://github.com/OpenBekenIOT/hid_download_py

    Flashing command:
    python uartprogram OpenBK7231N_QIO_1.15.206.bin --unprotect -d /dev/ttyUSB0 -w --startaddr 0x0

    I have configured it after flashing by using the web app and selecting Tuya Smart Wifi Switch 4 Gang from the pre-configured devices list. Some pins were wrong, but luckily the relays were mapped correctly.
    [BK7231N / CB3S] Aubess Tuya Wifi Smart Touch Switch 4 Gang W/ Neutral [BK7231N / CB3S] Aubess Tuya Wifi Smart Touch Switch 4 Gang W/ Neutral












    PinTypeChannel
    P6Rel4
    P7Btn1
    P8Rel3
    P9Rel1
    P10Btn3
    P14Btn2
    P23WifiLED_n-
    P24Btn4
    P26Rel2


    I could setup the relays, but unfortunately I couldn't map the physical buttons on OpenBK. I found out that pins P7, P14, P20 and P24 might be connected to the touch buttons; the way I tested it was by trial and error and set those pins as digital inputs. By doing so, the light of the corresponding touch button would turn red but nothing happened if I touched the button. When I change the state via the web interface, the lights change accordingly and the relays get triggered, but when touching the capacitive buttons nothing happens. I even tried setting those pins as actual buttons, but nothing worked.

    EDIT: turns out when resoldering the button controller IC I messed up and the IC wasn't properly soldered. After soldering it once again the buttons started working.

    As for the extra IC that I removed to flash OpenBK, I suspect it's a driver for the relays, as I tested with a multimeter and found out some of its pins are connected to the CB3S pins that drive the relays.

    Cool? Ranking DIY
    About Author
    Xinayder
    Level 3  
    Offline 
    Xinayder wrote 9 posts with rating 1. Been with us since 2022 year.
  • #2
    p.kaczmarek2
    Moderator Smart Home
    Very good and detailed review. I must admit that here, in Poland, I didn't see much of quadruple smart switches. We usually only seem to go up to 3. Or, to be precise, up to 3 in a single form factor, because there are also double ones, etc.

    Why do you have TuyaMCU enabled? From description it sounds like a normal device, I can see Rel roles on relays.
    [BK7231N / CB3S] Aubess Tuya Wifi Smart Touch Switch 4 Gang W/ Neutral
    Can update and add mapping for buttons?

    PS: It's worth trying out new SSDP driver - "startDriver SSDP" will give you OBK presence here:
    [BK7231N / CB3S] Aubess Tuya Wifi Smart Touch Switch 4 Gang W/ Neutral
  • #3
    Xinayder
    Level 3  
    p.kaczmarek2 wrote:
    Very good and detailed review. I must admit that here, in Poland, I didn't see much of quadruple smart switches. We usually only seem to go up to 3. Or, to be precise, up to 3 in a single form factor, because there are also double ones, etc.

    Why do you have TuyaMCU enabled? From description it sounds like a normal device, I can see Rel roles on relays.
    [BK7231N / CB3S] Aubess Tuya Wifi Smart Touch Switch 4 Gang W/ Neutral
    Can update and add mapping for buttons?

    PS: It's worth trying out new SSDP driver - "startDriver SSDP" will give you OBK presence here:
    [BK7231N / CB3S] Aubess Tuya Wifi Smart Touch Switch 4 Gang W/ Neutral


    I've updated the OP. No, it doesn't need the TuyaMCU driver, I was testing and forgot to remove it. And I'll try the SSDP driver. I don't know if it's planned but ESPHome (and maybe Tasmota?) support mDNS so you could connect to the device by typing its hostname.local, so for example it could be accessible by typing http://openbk123456.local
  • #4
    p.kaczmarek2
    Moderator Smart Home
    Sorry, I don't have much knowledge about mDNS yet. I might look into it soon, as it sounds like a nice feature, but I remember that just a few days ago, one user here:
    https://www.elektroda.com/rtvforum/viewtopic.php?p=20375796#20375796
    was showing that he can already access the OBK devices by their DHCP host name on his local network. So is mDNS really needed for that or not?

    I think I saw mDNS in Beken SDK, I just haven't researched it yet.
  • #5
    Xinayder
    Level 3  
    I'm not sure, maybe because they're using OpenWRT the router automatically takes care of that, resolving local hostnames to their host address.

    Also, one thing I noticed from this wall switch module. When the relays are turned on, the light on the buttons turns red. When they are off, the light turns blue. I find it weird that they chose red to represent power on and blue as power off, in my opinion it should be the opposite.
  • #6
    p.kaczmarek2
    Moderator Smart Home
    Some of the devices have separate pins used for LEDs and that's why you have "LED_n" roles, but if they are on the same pin, then only some hardware hackery is possible.

    Are you using all relays?

    That kind of device, with four buttons, could be even utilized even more. For example, you could script it to do alternate actions on double click or something. We have a native support for a click, double click, triple click and quadruple click events. You can use them to run scripts, to send get commands and to broadcast Tasmota Device Groups packets.

    I have recently bought a 3 gang switch with RF433 even though I just have a single relay required there because I wanted to use it as a Tasmota Device Group sender. It arrived and it was TYWE3S version, but luckily we are compatible with Tasmota so I can still utilize it.
    https://www.elektroda.pl/rtvforum/topic3939685.html
    Sorry, article not yet translated, but Google Translate does magic.

    It's very nice, now my 3gang Tasmota wall switch can control OpenBeken LED strip.
  • #7
    rezydent1
    Level 14  
    I have a question if there are switches on the market, switches that do not need to be "login" to the cloud. To clarify what I mean. I buy one, set it with an IP address (because it has some default set there, for configuration purposes) and it works locally, without the need to log in to someone at least once.
    Thank you in advance for your help.
  • #8
    p.kaczmarek2
    Moderator Smart Home
    Looks like you're looking for something with Tasmota already loaded. There are stores that sell these types of products. Some sellers of ordinary Tuya products, in turn, charge themselves, for example, PLN 5 for uploading Tasmota and you can also get a product cut off from the cloud. You'll have to look online to see what it looks like now.
  • #9
    rezydent1
    Level 14  
    p.kaczmarek2 wrote:
    Looks like you're looking for something with Tasmota already loaded.

    Thanks for the hint. There isn't much of it.
    I wonder why they don't make such devices. Not everyone has to want to set up an account with a software producer and etc.
    In my opinion, it is not a very safe solution to transfer all information about your home devices, linking to a phone number, mail and etc. to someone somewhere.
    After all, potentially the manufacturer can remotely turn off the light in a "disliked" country :D those are my thoughts.