logo elektroda
logo elektroda
X
logo elektroda

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

DasQ 7251 45
ADVERTISEMENT
  • #31 20531850
    DasQ
    Level 4  
    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
  • ADVERTISEMENT
  • #32 20531911
    p.kaczmarek2
    Moderator Smart Home
    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
  • #34 20532819
    p.kaczmarek2
    Moderator Smart Home
    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
    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.
  • ADVERTISEMENT
  • #36 20768993
    p.kaczmarek2
    Moderator Smart Home
    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.
  • #37 20799918
    ewengauvin
    Level 3  

    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
    @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.
  • #39 20800281
    ewengauvin
    Level 3  

    I managed to figure out how to do it and it works perfectly. Thank you so much.
  • #40 20800323
    p.kaczmarek2
    Moderator Smart Home
    Can you post here your final YAML for the reference?
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #41 21069399
    muecar75
    Level 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
    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  

    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
    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  

    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
    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.
Summary generated by the language model.
ADVERTISEMENT