logo elektroda
logo elektroda
X
logo elektroda

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

Xinayder 4902 19
ADVERTISEMENT
  • 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 8  
    Offline 
    Xinayder wrote 24 posts with rating 4. Been with us since 2022 year.
  • ADVERTISEMENT
  • #2 20378414
    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
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #3 20379005
    Xinayder
    Level 8  
    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
  • ADVERTISEMENT
  • #4 20379016
    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/topic3946427.html#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.
    Helpful post? Buy me a coffee.
  • #5 20379027
    Xinayder
    Level 8  
    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 20379031
    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.
    Helpful post? Buy me a coffee.
  • #7 20385074
    rezydent1
    Level 15  
    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 20385136
    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.
    Helpful post? Buy me a coffee.
  • #9 20386320
    rezydent1
    Level 15  
    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.
  • ADVERTISEMENT
  • #10 20423370
    SilverX
    Level 11  
    p.kaczmarek2 wrote:
    Very good and detailed review. I have to admit that here in Poland I haven't seen many quadruple smart switches. Usually it seems that we only go to 3. More precisely, to 3 in one case, because there are also doubles, etc.

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

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


    Are you planning to implement roller shutters in OB? Tasmota can be a good cheat sheet.
  • #11 20423398
    p.kaczmarek2
    Moderator Smart Home
    Roller blinds could even be done in the current version through scripts, without modifying the firmware, but I intend to do them soon in a dedicated driver anyway. I just don't have blinds myself so I'll have to test in a simulator or somehow on LEDs.

    Do you have blinds and would like to help with testing?
    Helpful post? Buy me a coffee.
  • #12 20423588
    SilverX
    Level 11  
    @p.kaczmarek2
    I will have it installed soon. Any switch with two relays will suffice. Maybe I'll buy a dual channel Aubess and help with the testing. As far as I know, LoraTap flush and panel roller shutter switches now have Bekena. Also, a few people would definitely benefit from this implementation.
  • #13 20424574
    p.kaczmarek2
    Moderator Smart Home
    What exactly functionality would we need for roller shutters? Control such that one relay is opening, the other is closing, two separate time factors (separate for closing and opening, configurable) and the ability to set the bar to how many % do we open or close?
    Helpful post? Buy me a coffee.
  • #14 20425736
    SilverX
    Level 11  
    @p.kaczmarek2
    Yes exactly. In addition, configurable stop time between up and down operation (e.g. 500 ms), support for button actions (e.g. single click - 0% position, double click - 50%, triple 24%, long click - movement of all roller shutters with the same < grouptopic> ;) .
    More info at https://tasmota.github.io/docs/Blinds-and-Shutters/

    As for the logic itself, in the conveyor belt, the action from the button during the operation of the blinds probably always stops the motor. As for the GUI, I have to check.
    https://esphome.io/components/cover/time_based.html
  • #15 20425739
    jkwim
    Level 12  
    rezydent1 wrote:
    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.


    Check Aliexpress.

    https://www.aliexpress.com/w/wholesale-tasmot...a+pre+flashed&spm=a2g0o.productlist.1000002.0

    [BK7231N / CB3S] Aubess Tuya Wifi Smart Touch Switch 4 Gang W/ Neutral
  • #16 20425940
    p.kaczmarek2
    Moderator Smart Home
    Nice, but at average, how much more expensive are preflashed devices with TAS than average cheap Tuya device (with most likely BK)?
    Helpful post? Buy me a coffee.
  • #17 20433624
    p.kaczmarek2
    Moderator Smart Home
    @silver_x here someone activated the blinds fully with a script:
    https://www.elektroda.com/rtvforum/topic3953586.html#20433363
    Helpful post? Buy me a coffee.
  • #18 20460541
    gangle
    Level 3  
    Dose anyone else have issues with these going offline randomly?
  • #19 20460657
    p.kaczmarek2
    Moderator Smart Home
    I haven't experienced anything like that for wall switches, but for a simple switch module for me the cure was to add "PowerSave 1" in short startup command, because it has turned out that original device power supply was so bad that it actually needed a capacitor replacement...
    https://www.elektroda.pl/rtvforum/topic3898805.html
    In general, PowerSave 1 will soon be enabled by default, once we finish testing. It helps a lot in most cases.
    Helpful post? Buy me a coffee.

Topic summary

The discussion revolves around the Aubess Tuya Wifi Smart Touch Switch with 4 capacitive buttons, focusing on its disassembly and conversion to OpenBK firmware. Users share insights on the switch's functionality, including the use of SSDP drivers for device discovery and the peculiar LED color coding (red for on, blue for off). There are inquiries about local operation without cloud dependency, with suggestions for purchasing pre-flashed devices with Tasmota firmware. Additionally, users discuss potential features for roller shutter control and troubleshooting issues related to devices going offline, with recommendations for power-saving settings.
Summary generated by the language model.
ADVERTISEMENT