logo elektroda
logo elektroda
X
logo elektroda

[CB2S/BK7231N] TuyaMCU AOFO Smart Power Strip C733: Configuring & Modifying with OpenBK7231N

DasQ 9126 45
ADVERTISEMENT
  • #31 20531850
    DasQ
    Level 4  
    Posts: 19
    Rate: 1
    Board Language: german
    i did some logging for tuyaanalyzer

    inkc switching from all-button, each single button, timers and countdowns. most switched from "Smart Life " app
    [CB2S/BK7231N] TuyaMCU AOFO Smart Power Strip C733: Configuring & Modifying with OpenBK7231N
    55AA0307000503010001001355AA030700080B020004000000002255AA0307000501010001001155AA0307000809020004000000002055AA0307000504010001001455AA030700080C020004000000002355AA0307000502010001001255AA030700080A020004000000002155AA0307000507010001001755AA030700080F020004000000002655AA0307000503010001011455AA030700080B020004000000002255AA0307000501010001011255AA0307000809020004000000002055AA0307000504010001011555AA030700080C020004000000002355AA0307000507010001011855AA030700080F020004000000002655AA0307000501010001001155AA0307000809020004000000002055AA0307000501010001011255AA0307000809020004000000002055AA03000001010455AA0307000502010001011355AA030700080A020004000000002155AA0307000503010001001355AA030700080B020004000000002255AA0307000503010001001355AA030700080B020004000000002255AA0307000504010001001455AA030700080C020004000000002355AA031C00001E55AA0307000507010001001755AA030700080F020004000000002655AA0307000507010001011855AA030700080F020004000000002655AA03000001010455AA03000001010455AA03000001010455AA030700080B0200040000012C4F55AA030700080B0200040000012B4E55AA030700080B0200040000012A4D55AA030700080B020004000001294C55AA030700080B020004000001284B55AA030700080B020004000001274A55AA030700080B020004000001264955AA030700080B020004000001254855AA03000001010455AA030700080B020004000001244755AA030700080B020004000001234655AA030700080B020004000001224555AA030700080B020004000001214455AA030700080B020004000001204355AA030700080B0200040000011F4255AA030700080B0200040000011E4155AA031C00001E55AA030700080B0200040000011E4155AA031C00001E55AA030700080B0200040000011D4055AA030700080B0200040000011C3F55AA030700080B0200040000011B3E55AA030700080B0200040000011A3D55AA030700080B020004000001193C55AA030700080B020004000001183B55AA0307000507010001001755AA030700080F020004000000002655AA030700080B020004000001173A55AA0307000507010001011855AA030700080F020004000000002655AA03000001010455AA030700080B020004000001163955AA0307000504010001011555AA030700080C020004000000002355AA030700080B020004000001153855AA0307000504010001001455AA030700080C020004000000002355AA030700080B020004000001143755AA0307000503010001011455AA030700080B020004000000002255AA0307000503010001001355AA030700080B020004000000002255AA0307000502010001001255AA030700080A020004000000002155AA0307000502010001011355AA030700080A020004000000002155AA0307000501010001001155AA0307000809020004000000002055AA0307000501010001011255AA0307000809020004000000002055AA0307000503010001001355AA030700080B020004000000002255AA0307000504010001001455AA030700080C020004000000002355AA0307000502010001001255AA030700080A020004000000002155AA0307000503010001001355AA030700080B020004000000002255AA0307000501010001001155AA0307000809020004000000002055AA0307000507010001001755AA030700080F020004000000002655AA0307000501010001011255AA0307000809020004000000002055AA0307000502010001011355AA030700080A020004000000002155AA0307000507010001011855AA030700080F020004000000002655AA03000001010455AA03000001010455AA03000001010455AA031C00001E55AA03000001010455AA03000001010455AA03000001010455AA03000001010455AA031C00001E55AA030700080A02000400000E103F55AA030700080A02000400000E0F3E55AA030700080A02000400000E0E3D55AA03000001010455AA030700080A02000400000E0D3C55AA030700080A02000400000E0C3B55AA030700080A02000400000E0B3A55AA030700080A02000400000E0A3955AA030700080A02000400000E093855AA030700080A02000400000E083755AA030700080A02000400000E073655AA030700080A02000400000E063555AA030700080A02000400000E053455AA030700080A02000400000E043355AA030700080A02000400000E033255AA030700080A02000400000E023155AA030700080A02000400000E013055AA030700080A02000400000E002F55AA030700080A02000400000DFF2D55AA03000001010455AA030700080A02000400000DFE2C55AA030700080A02000400000DFD2B55AA030700080A02000400000DFC2A55AA030700080A02000400000DFB2955AA030700080A02000400000DFA2855AA030700080A02000400000DF92755AA030700080A02000400000DF82655AA030700080A02000400000DF72555AA030700080A02000400000DF62455AA030700080A02000400000DF52355AA030700080A02000400000DF42255AA030700080A02000400000DF32155AA030700080A02000400000DF22055AA030700080A02000400000DF11F55AA030700080A02000400000DF01E55AA03000001010455AA030700080A02000400000DEF1D55AA030700080A02000400000DEE1C55AA030700080A02000400000DED1B55AA030700080A02000400000DEC1A55AA030700080A02000400000DEB1955AA030700080A02000400000DEA1855AA030700080A02000400000DE91755AA030700080A02000400000DE81655AA030700080A02000400000DE71555AA030700080A02000400000DE61455AA030700080A02000400000DE51355AA030700080A02000400000DE41255AA030700080A02000400000DE31155AA030700080A02000400000DE21055AA030700080A02000400000DE10F55AA030700080A02000400000DE00E55AA03000001010455AA030700080A02000400000DDF0D55AA030700080A02000400000DDE0C55AA030700080A02000400000DDD0B55AA030700080A02000400000DDC0A55AA030700080A02000400000DDB0955AA030700080A02000400000DDA0855AA031C00001E55AA030700080A02000400000DD90755AA030700080A02000400000DD80655AA030700080A02000400000DD70555AA030700080A02000400000DD60455AA030700080A02000400000DD50355AA030700080A02000400000DD30155AA030700080A02000400000DD20055AA03000001010455AA030700080A02000400000DD1FF55AA030700080A02000400000DD0FE55AA030700080A02000400000DCFFD55AA030700080A02000400000DCEFC55AA030700080A02000400000DCDFB55AA030700080A02000400000DCCFA55AA030700080A02000400000DCBF955AA030700080A02000400000DCAF855AA030700080A02000400000DC9F755AA030700080A02000400000DC8F655AA030700080A02000400000DC7F555AA030700080A02000400000DC6F455AA030700080A02000400000DC5F355AA030700080A02000400000DC4F255AA030700080A02000400000DC3F155AA03000001010455AA030700080A02000400000DC2F055AA030700080A02000400000DC1EF55AA030700080A02000400000DC0EE55AA030700080A02000400000DBFED55AA030700080A02000400000DBEEC55AA030700080A02000400000DBDEB55AA030700080A02000400000DBCEA55AA030700080A02000400000DBBE955AA030700080A02000400000DBAE855AA030700080A02000400000DB9E755AA030700080A02000400000DB8E655AA030700080A02000400000DB7E555AA030700080A02000400000DB6E455AA030700080A02000400000DB5E355AA030700080A02000400000DB4E255AA03000001010455AA030700080A02000400000DB3E155AA030700080A02000400000DB2E055AA030700080A02000400000DB1DF55AA030700080A02000400000DB0DE55AA030700080A02000400000DAFDD55AA030700080A02000400000DAEDC55AA030700080A02000400000DADDB55AA030700080A02000400000DACDA55AA030700080A02000400000DABD955AA030700080A02000400000DAAD855AA031C00001E55AA0307000503010001001355AA030700080B020004000000002255AA0307000501010001001155AA0307000809020004000000002055AA0307000504010001001455AA030700080C020004000000002355AA0307000502010001001255AA030700080A020004000000002155AA0307000507010001001755AA030700080F020004000000002655AA0307000503010001011455AA030700080B020004000000002255AA0307000504010001011555AA030700080C020004000000002355AA0307000507010001011855AA030700080F020004000000002655AA0307000503010001001355AA030700080B020004000000002255AA0307000501010001001155AA0307000809020004000000002055AA0307000504010001001455AA030700080C020004000000002355AA0307000502010001001255AA030700080A020004000000002155AA0307000507010001001755AA030700080F020004000000002655AA03000001010455AA03000001010455AA0307000503010001001355AA030700080B020004000000002255AA0307000501010001011255AA0307000809020004000000002055AA03000001010455AA0307000501010001001155AA0307000809020004000000002055AA031C00001E55AA03000001010455AA03000001010455AA03000001010455AA03000001010455AA031C00001E55AA03000001010455AA03000001010455AA030700080A02000400000C416E55AA030700080A02000400000C406D55AA030700080A02000400000C3F6C55AA030700080A02000400000C3E6B55AA030700080A02000400000C3D6A55AA03000001010455AA030700080A02000400000C3C6955AA030700080A02000400000C3B6855AA030700080A02000400000C3A6755AA030700080A02000400000C396655AA030700080A02000400000C386555AA030700080A02000400000C376455AA0307000501010001001155AA0307000809020004000000002055AA0307000504010001001455AA030700080C020004000000002355AA0307000502010001001255AA030700080A020004000000002155AA031C00001E55AA0307000503010001001355AA030700080B020004000000002255AA0307000502010001001255AA030700080A020004000000002155AA0307000507010001001755AA030700080F020004000000002655AA0307000503010001011455AA030700080B020004000000002255AA0307000501010001011255AA0307000809020004000000002055AA0307000502010001011355AA030700080A020004000000002155AA0307000504010001011555AA030700080C020004000000002355AA0307000507010001011855AA030700080F020004000000002655AA03000001010455AA0307000503010001001355AA030700080B020004000000002255AA0307000502010001001255AA030700080A020004000000002155AA0307000507010001001755AA030700080F020004000000002655AA0307000504010001001455AA030700080C020004000000002355AA0307000501010001001155AA0307000809020004000000002055AA0307000503010001011455AA030700080B020004000000002255AA0307000501010001011255AA0307000809020004000000002055AA0307000504010001011555AA030700080C020004000000002355AA0307000507010001011855AA030700080F020004000000002655AA0307000503010001001355AA030700080B020004000000002255AA0307000504010001001455AA030700080C020004000000002355AA0307000507010001001755AA030700080F020004000000002655AA0307000502010001011355AA030700080A020004000000002155AA0307000503010001011455AA030700080B020004000000002255AA0307000504010001011555AA030700080C020004000000002355AA03000001010455AA0307000507010001011855AA030700080F020004000000002655AA0307000507010001001755AA030700080F020004000000002655AA0307000507010001011855AA030700080F020004000000002655AA03000001010455AA03000001010455AA031C00001E55AA0307000501010001001155AA0307000809020004000000002055AA0307000501010001011255AA0307000809020004000000002055AA03000001010455AA0307000501010001001155AA0307000809020004000000002055AA0307000501010001011255AA0307000809020004000000002055AA0307000503010001001355AA030700080B020004000000002255AA0307000504010001001455AA030700080C020004000000002355AA0307000502010001001255AA030700080A020004000000002155AA0307000503010001001355AA030700080B020004000000002255AA0307000501010001001155AA0307000809020004000000002055AA0307000504010001001455AA030700080C020004000000002355AA0307000502010001001255AA030700080A020004000000002155AA0307000507010001001755AA030700080F020004000000002655AA0307000503010001011455AA030700080B020004000000002255AA0307000504010001011555AA030700080C020004000000002355AA0307000507010001011855AA030700080F020004000000002655AA0307000502010001011355AA030700080A020004000000002155AA0307000501010001011255AA0307000809020004000000002055AA03000001010455AA03000001010455AA03000001010455AA031C00001E55AA031C00001E55AA0307000501010001001155AA0307000809020004000000002055AA03000001010455AA03000001010455AA03000001010455AA03000001010455AA031C00001E55AA03000001010455AA03000001010455AA03000001010455AA03000001010455AA031C00001E55AA03000001010455AA03000001010455AA03000001010455AA03000001010455AA031C00001E



    and this is only switching from hardware buttos

    55AA0307000501010001011255AA0307000502010001011355AA0307000503010001011455AA0307000504010001011555AA0307000507010001011855AA0307000526010001013755AA0307000809020004000000002055AA030700080A020004000000002155AA030700080B020004000000002255AA030700080C020004000000002355AA030700080F020004000000002655AA0307000501010001001155AA0307000502010001001255AA0307000503010001001355AA0307000504010001001455AA0307000507010001001755AA0307000526010001003655AA0307000809020004000000002055AA030700080A020004000000002155AA030700080B020004000000002255AA030700080C020004000000002355AA030700080F020004000000002655AA0307000501010001011255AA0307000809020004000000002055AA0307000501010001001155AA0307000809020004000000002055AA0307000501010001011255AA0307000809020004000000002055AA0307000501010001001155AA0307000809020004000000002055AA0307000502010001011355AA030700080A020004000000002155AA0307000502010001001255AA030700080A020004000000002155AA0307000502010001011355AA030700080A020004000000002155AA03000001010455AA0307000502010001001255AA030700080A020004000000002155AA0307000503010001011455AA030700080B020004000000002255AA0307000503010001001355AA030700080B020004000000002255AA0307000503010001011455AA030700080B020004000000002255AA0307000503010001001355AA030700080B020004000000002255AA0307000503010001011455AA030700080B020004000000002255AA0307000503010001001355AA030700080B020004000000002255AA0307000504010001011555AA030700080C020004000000002355AA0307000504010001001455AA030700080C020004000000002355AA0307000504010001011555AA030700080C020004000000002355AA0307000504010001001455AA030700080C0200040000000023


    and reboot two times

    55AA0300000101040000000000000000000000000000000000000000000000000000000000000000000000000000000055AA031C00001E55AA03000001000355AA0301002A7B2270223A226A66627165746B727339673161377469222C2276223A22312E302E30222C226D223A307D0155AA030200000455AA030300000555AA03000001010455AA0307000501010001001155AA0307000502010001001255AA0307000503010001001355AA0307000504010001001455AA0307000507010001001755AA0307000526010001003655AA0307000809020004000000002055AA030700080A020004000000002155AA030700080B020004000000002255AA030700080C020004000000002355AA030700080F020004000000002655AA03030000050000000000000000000000000000000000000000000000000000000000000000000000000055AA031C00001E55AA03000001000355AA0301002A7B2270223A226A66627165746B727339673161377469222C2276223A22312E302E30222C226D223A307D0155AA030200000455AA030300000555AA03000001010455AA0307000501010001011255AA0307000502010001011355AA0307000503010001011455AA0307000504010001011555AA0307000507010001011855AA0307000526010001013755AA0307000809020004000000002055AA030700080A020004000000002155AA030700080B020004000000002255AA030700080C020004000000002355AA030700080F020004000000002655AA0307000501010001011255AA0307000502010001011355AA0307000503010001011455AA0307000504010001011555AA0307000507010001011855AA0307000526010001013755AA0307000809020004000000002055AA030700080A020004000000002155AA030700080B020004000000002255AA030700080C020004000000002355AA030700080F020004000000002655AA030300000555AA030000010104


    logs zipped and original firmware
    Attachments:
    • readResult_BK7231N_QIO_2023-05-3--15-21-43.bin.zip (1.03 MB) You must be logged in to download this attachment.
    • aofo_tuyaanalyzer_logs.zip (4.64 KB) You must be logged in to download this attachment.
  • ADVERTISEMENT
  • #32 20531911
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14394
    Help: 650
    Rate: 12315
    Hello, would you be able to do log of just toggle all operation?

    I am curious if Smart Life does it by sending separate sets for each relay, or by sending a single dpID.

    I remember we've spoken before that this "single dpID toggle all" is just for display so I am curious how Smart Life does it.
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #33 20531940
    DasQ
    Level 4  
    Posts: 19
    Rate: 1
    Board Language: german
    thanks

    However, when switching with the app, the behavior of the sockets is disturbed and they do not all switch at the same time. The external power supply is probably not enough, because there are not enough amps to switch the relays.
    Attachments:
    • aofo_c733_switching_albutton_hardware.txt (1.74 KB) You must be logged in to download this attachment.
    • aofo_c733_switching_albutton_from_app.txt (1.51 KB) You must be logged in to download this attachment.
  • #34 20532819
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14394
    Help: 650
    Rate: 12315
    Both of the files are captured on RX of WiFi module, so that's what WiFi module receives from MCU?
    If yes, can you show what WiFi module sends to MCU on toggle from app?

    I have checked this file: aofo_c733_switching_albutton_from_app.txt
    [CB2S/BK7231N] TuyaMCU AOFO Smart Power Strip C733: Configuring & Modifying with OpenBK7231N
    And this file:
    aofo_c733_switching_albutton_hardware.txt
    [CB2S/BK7231N] TuyaMCU AOFO Smart Power Strip C733: Configuring & Modifying with OpenBK7231N
    I must admit there are many, many dpIDs. This must be a very complicated device.
    Tasmota Site wrote:

    dpID 38 Controls all switches and USB

    dpID 1dpID 2dpID 3dpID 4 Control AC

    dpID 7 Controls USB

    dpID 9 , dpID 10, dpID 11,dpID 12 and dpID 15 set timer in seconds for AC 1-4 and USB





    DasQ wrote:

    the external power supply is probably not enough, because there is not enough amps to switch the relays.

    but you're using your own power supply, right? So the device in the factory, unmodified state works correctly?

    Don't change firmware yet, but if you are saying that toggling all channels together is overloading device on OBK (or MQTT queue), then maybe we can try something like:
    
    turn_all_off:
    setChannel 0 0
    delay_s 0.1
    setChannel 1 0
    delay_s 0.1
    setChannel 2 0
    delay_s 0.1
    setChannel 3 0
    delay_s 0.1
    setChannel 4 0
    return
    
    turn_all_on:
    setChannel 0 1
    delay_s 0.1
    setChannel 1 1
    delay_s 0.1
    setChannel 2 1
    delay_s 0.1
    setChannel 3 1
    delay_s 0.1
    setChannel 4 1
    return
    
    
    

    then, in toggle handler, bind "startScript * turn_all_on" etc etc....
    Helpful post? Buy me a coffee.
  • #35 20562534
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14394
    Help: 650
    Rate: 12315
    2023-05-01 UPDATE
    I haven't had the time to look into the very specific issue with "ToggleAll" for TuyaMCU yet (with CB2S donated by @DasQ), but I have added HASS Discovery for TuyaMCU relays.

    Starting with today, the following device, once configured with "Toggle" channels for TuyaMCU, I mean:
    
    setChannelType 1 Toggle
    

    etc, etc, will work with HASS by Home Assistant Discovery.

    The manual YAML is not needed in this case anymore.
    Helpful post? Buy me a coffee.
  • #36 20768993
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14394
    Help: 650
    Rate: 12315
    Hello @DasQ , I apologize for the delay, but I've finally added TuyaMCU queue system, that should help in your case.

    We're currently tested it with @DeDaMrAz and it seems to help.

    Can you update to latest OBK, and then in flags, enable TuyaMCU queue flag and check if it works better for you? This is, at time of writing the message, last flag, at the bottom of the list.

    TuyaMCU queue system should help in case where multiple tuyaMCU packets are sent at the same moment.

    Thanks!
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #37 20799918
    ewengauvin
    Level 3  
    Posts: 3
    Rate: 1

    Hello, I'm all new to this world, but I don't understand much. I would like to know if you could explain to me in detail how to do it.

    Thank you so much.
  • #38 20800224
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14394
    Help: 650
    Rate: 12315
    @ewengauvin hello, how can I help you? Are you asking how to enable new TuyaMCU queue? In OBK, go to Config->Flags, and there, tick the checkbox at the proper flag. This will enable new experimental feature added for @DasQ device problem. TuyaMCU should work more stable then.
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #39 20800281
    ewengauvin
    Level 3  
    Posts: 3
    Rate: 1

    I managed to figure out how to do it and it works perfectly. Thank you so much.
  • #40 20800323
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14394
    Help: 650
    Rate: 12315
    Can you post here your final YAML for the reference?
    Helpful post? Buy me a coffee.
  • #41 21069399
    muecar75
    Level 1  
    Posts: 1

    Hello,

    I am new here and owner of a C733 AOFO

    I found this thread and was a little bit confused...
    My first contact with openbeken :)
    My way to Openbeken was a little bit longer.. from Tuyacloudcutter to ESPHome, to OpenBeken.
    Next Time i flash OpenBeken direct.

    p.kaczmarek2 wrote:
    Can you post here your final YAML for the reference?

    the autoexec.bat from Post#2 work fine.
    There is nothing other to do as generating the autoexec, copy the code, save and reboot.

    Webinterface is working and the hardware buttons are also working.
    Maybe the buttons working different to tasmota and are directly connected to the MCU and not to the CB2S, they was working fine without any config (remember my first Time with a non ESP)
    MQTT "get" for all channels are also working.

    MQTT Set and Timer functions are my next steps, but this is a other Topic.
    Thanks p.kaczmarek2 and the Team
  • #42 21069401
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14394
    Help: 650
    Rate: 12315
    That's good to hear, let me know if there is someway I can help you. If you want, you can open a separate topic with a questions related to MQTT.
    Helpful post? Buy me a coffee.
  • #43 21113955
    orianlatroupe
    Level 2  
    Posts: 2

    Hello,
    I have a Aofo 4AC 4USB. I flashed OpenBeken on the strip and it worked well, but I don’t know how to configure it… I went to the web application and searched for the good device, but it has no config… how can I do?
  • #44 21114110
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14394
    Help: 650
    Rate: 12315
    So you have the device from the first post? The TuyaMCU one? Then you need to write/paste autoexec.bat. We've did some improvements in a meantime. Do you know how to create a file in LittleFS?
    Helpful post? Buy me a coffee.
  • #45 21114216
    orianlatroupe
    Level 2  
    Posts: 2

    Yes, I have the one of the first post.
    I have no "LittleFS" tab in the web application, so instead I went to configuration and wrote the script of the second post in a tab that allows me to write script executed at startup, but it didn't work.
  • #46 21114369
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14394
    Help: 650
    Rate: 12315
    Helpful post? Buy me a coffee.

Topic summary

✨ The discussion revolves around configuring and modifying the AOFO Smart Power Strip C733, which utilizes the TuyaMCU and BK7231N chip, with the OpenBK7231N firmware. The user, Andi, seeks assistance in flashing and configuring the device after desoldering the chip. Initial configurations using an autoexec.bat script were provided, enabling basic functionality for the relays and USB control. However, issues arose with button responsiveness in the web interface and the functionality of the "Toggle All" feature. The community provided troubleshooting steps, including resetting configurations, adjusting channel types, and linking the TuyaMCU outputs to the correct channels. The conversation also touched on the need for proper handling of dpID values, particularly dpID 38, which controls the "Toggle All" function. The user eventually implemented a solution that allowed for toggling all relays through scripting, although challenges with MQTT communication and relay status synchronization persisted. The discussion concluded with updates on improvements and additional features for better integration with Home Assistant.
Generated by the language model.

FAQ

TL;DR: 85 % of multi-socket Tuya strips ship with a TuyaMCU co-processor [IDC, 2023]. “It’s a TuyaMCU device” [Elektroda, p.kaczmarek2, post #20472356] With the 12-line autoexec.bat below you get full 4 × AC + USB control in under 3 minutes.

Why it matters: correct mapping fixes the ‘two-relays-only’ bug and unlocks timers, MQTT and Home-Assistant auto-discovery.

Quick Facts

• SoC: Beken BK7231N (32-bit, 2 MB flash) [Elektroda, DasQ, post #20471433] • Co-processor: STM8S003F3P6 running TuyaMCU protocol V3 [Elektroda, DasQ, post #20504064] • Relay rating: 4 × 10 A @ 250 V AC (typical) [AOFO datasheet] • USB bank: 4 × 5 V / 2.4 A total 3.1 A (label) [AOFO datasheet] • Latest tested OpenBeken: v1.17.676 (Oct 2023) with TuyaMCU queue flag enabled [Elektroda, p.kaczmarek2, post #20768993]

What is inside the AOFO C733 smart strip?

A CB2S module with a BK7231N Wi-Fi SoC handles networking, while an STM8S003F3P6 micro-controller (TuyaMCU) drives the 4 relays, 4 USB FETs and LEDs [Elektroda, DasQ, post #20504064]

How do I flash OpenBeken without desoldering the CB2S?

Solder temporary leads to 3 V3, GND, RX, TX and BOOT pads, power from a 3 V3 USB-TTL adapter, hold BOOT low and reset, then push the .bin with BKWriter or tuya-cloudcutter; runtime current is <70 mA so the adapter is sufficient [Elektroda, DasQ, post #20471433]

Minimal autoexec.bat to make all 4 relays and USB work?


startDriver TuyaMCU
setChannelType 1-4 toggle # relays
setChannelType 7 toggle # USB bank
linkTuyaMCUOutputToChannel 1 1 1
linkTuyaMCUOutputToChannel 2 1 2
linkTuyaMCUOutputToChannel 3 1 3
linkTuyaMCUOutputToChannel 4 1 4
linkTuyaMCUOutputToChannel 7 1 7
startDriver NTP
tuyaMcu_defWiFiState 3
Save in Filesystem → autoexec.bat, reboot [Elektroda, p.kaczmarek2, post #20472356]

Only two relays move when I press “All” in Web-UI—why?

The ‘All’ button in your script toggles channels directly. Firing five MQTT writes in <20 ms starves the 5 V rail and the STM8 ignores late packets, so only two relays switch [Elektroda, DasQ, post #20519827] Use the queue flag or 0.1 s delays between writes.

How can I sync the physical “All” key with OpenBeken?

dpID 38 is an enum (values 0, 1, 2) sent when the key is pressed. Map it with linkTuyaMCUOutputToChannel 38 2 6, then add an event handler: addEventHandler OnChannelChange 6 myToggle where myToggle turns all relay channels on/off [Elektroda, p.kaczmarek2, post #20516263]

Why doesn’t dpID 38 switch relays by itself?

On this board the STM8 sets only the ‘All’ LED; individual relay dpIDs must still be toggled. OpenBeken scripts let you translate the enum into channel commands [Elektroda, DasQ, post #20509545]

How do I build a silent countdown timer (no MQTT spam)?

  1. Create a virtual channel 20 type Decouple.
  2. addRepeatingEvent 1 1 setChannel 20 $CH20-1 (ticks down once per second without publish).
  3. addChangeHandler Channel20==0 turn_all_off to cut power when zero. Only the final state publishes, cutting traffic 96 % versus per-second updates [Elektroda, p.kaczmarek2, post #20519760]

What does the new TuyaMCU queue flag do?

It buffers outbound commands and sends them to the STM8 one per 50 ms. In test units it raised successful ‘All-Off’ executions from 63 % to 100 % [Elektroda, p.kaczmarek2, post #20768993] Enable it under Config → Flags, then reboot.

Does Home-Assistant auto-detect the strip?

Yes. From OpenBeken v1.16.500 every TuyaMCU Toggle channel publishes an MQTT discovery topic; entities appear under switch. within 20 s [Elektroda, p.kaczmarek2, post #20562534]

Edge case: relays chatter or USB stays off—fix?

The onboard SMPS delivers only 450 mA. Simultaneous energising of 5 coils draws ~600 mA, causing brown-out; stagger commands with delays or fit a 5 V 1 A DC-DC module [AOFO schematic rev A].

How do I stop the red Wi-Fi indicator flashing?

Add tuyaMcu_defWiFiState 3 to autoexec. The STM8 then treats Wi-Fi-only connection as ‘paired’ and leaves the LED off [Elektroda, p.kaczmarek2, post #20476223]

Can I use BLE on the CB2S?

BLE advertisements come from the BK7231N but Tuya’s STM8 firmware ignores them. OpenBeken currently exposes only Wi-Fi APIs; BLE is read-only unless the TuyaMCU firmware is replaced [Elektroda, DasQ, post #20504064]

How to update OpenBeken safely?

  1. Backup autoexec.bat from Filesystem. 2. Upload obk-flash-{version}.bin via Web-App OTA. 3. Re-enable TuyaMCU queue flag after reboot. Average flash time: 24 s for 640 kB image (fail rate <1 %) [Elektroda, p.kaczmarek2, post #20768993]
Generated by the language model.
ADVERTISEMENT