logo elektroda
logo elektroda
X
logo elektroda

[CB3S/BK7231N] Suraielec 40A Outdoor Plug UBTW01B: expected TYWE3S (ESP8266) but got Beken

ericbarber 1959 3
ADVERTISEMENT
  • I purchased this device with the impression it included a TYWE3S module (ESP8266), but it instead came with a CB3S module (BK7231N). The specifications on the inside of the door even list this device's module as a TYWE3S, so I was surprised to find something else. I had never worked with a Beken chip, but thankfully found this community and OpenBeken 👍

    Device link: https://www.amazon.com/dp/B08VRJSH5Z
    Screenshots: [CB3S/BK7231N] Suraielec 40A Outdoor Plug UBTW01B: expected TYWE3S (ESP8266) but got Beken
    [CB3S/BK7231N] Suraielec 40A Outdoor Plug UBTW01B: expected TYWE3S (ESP8266) but got Beken

    Disassembly is straightforward to reach the module. There are eight phillips head screws, and four 3mm tri wing screws to contend with. Here are pictures of the disassembly:

    [CB3S/BK7231N] Suraielec 40A Outdoor Plug UBTW01B: expected TYWE3S (ESP8266) but got Beken [CB3S/BK7231N] Suraielec 40A Outdoor Plug UBTW01B: expected TYWE3S (ESP8266) but got Beken [CB3S/BK7231N] Suraielec 40A Outdoor Plug UBTW01B: expected TYWE3S (ESP8266) but got Beken [CB3S/BK7231N] Suraielec 40A Outdoor Plug UBTW01B: expected TYWE3S (ESP8266) but got Beken [CB3S/BK7231N] Suraielec 40A Outdoor Plug UBTW01B: expected TYWE3S (ESP8266) but got Beken [CB3S/BK7231N] Suraielec 40A Outdoor Plug UBTW01B: expected TYWE3S (ESP8266) but got Beken [CB3S/BK7231N] Suraielec 40A Outdoor Plug UBTW01B: expected TYWE3S (ESP8266) but got Beken [CB3S/BK7231N] Suraielec 40A Outdoor Plug UBTW01B: expected TYWE3S (ESP8266) but got Beken [CB3S/BK7231N] Suraielec 40A Outdoor Plug UBTW01B: expected TYWE3S (ESP8266) but got Beken

    TX and RX on this device are not connected to anything, so there is no need to remove the module from the board to flash it.

    [CB3S/BK7231N] Suraielec 40A Outdoor Plug UBTW01B: expected TYWE3S (ESP8266) but got Beken [CB3S/BK7231N] Suraielec 40A Outdoor Plug UBTW01B: expected TYWE3S (ESP8266) but got Beken

    I probed the board with a multimeter in continuity mode to discover the GPIO mapping and found this:
    GPIO6 - Button
    GPIO8 - LED
    GPIO24 - Relay

    I was not able to backup the firmware on the module using the GUI tool (https://github.com/openshwprojects/BK7231GUIFlashTool), but the module accepted the write just fine. To place the module into the correct mode to flash it, all I had to do was start the firmware write in the GUI tool, then press and hold the button on the module for about four seconds. That caused the module to reboot and accept the flash.

    Here is my JSON template:
    Code: JSON
    Log in, to see the code


    After flashing and configuring, I followed this guide to make the device populate in Home Assistant: https://youtu.be/pkcspey25V4

    Please let me know if you have any questions, I'll be happy to answer them!

    Cool? Ranking DIY
    About Author
    ericbarber
    Level 2  
    Offline 
    ericbarber wrote 2 posts with rating 2. Been with us since 2023 year.
  • ADVERTISEMENT
  • #2 20611464
    p.kaczmarek2
    Moderator Smart Home
    So they changed the chip inside and left the FCC-ID (2AFNL-TYWE3S) the same? Well, that's not the first time! Good job on flashing your device. Now you can also read about SSDP and PowerSave, as they may also come useful for you.

    I also see that you used multimeter to get GPIO. Have you also tried the "modern", OpenBeken-style approach to get that mapping? It can work even after flashing OBK:
    https://www.youtube.com/watch?v=WunlqIMAdgw
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #3 20612154
    ericbarber
    Level 2  
    I didn't know about OpenBeken's GPIO interrogator until I had the device flashed and already probed everything out. I will definitely use this next time I come across one of these modules though; it's a great feature and looks like a timesaver.

    I will also check out SSDP and PowerSave, thanks for the suggestions!
  • #4 20612274
    p.kaczmarek2
    Moderator Smart Home
    I was referring to automatic GPIO extraction, and not to the GPIO Doctor, but still, GPIO Doctor is also a very useful tool.
    Helpful post? Buy me a coffee.
ADVERTISEMENT