logo elektroda
logo elektroda
X
logo elektroda

[BK7231T] Teardown Action LCS Smart Plug (without Energy Meter) 2578685

nielspiersma 4377 18
ADVERTISEMENT
  • As I already did a teardown, a second one is no problem.
    This is the LCS Smart Power Plug Article number: 2578685.
    I got acquainted with ELEKTRODA as I bought this plug, hoping it contained an ESP82xx. Well, I got disappointed (again); this unit doesn't have an ESP82xx. As this was the 6th unit I ordered not contain an ESP82xx, I figured. Is there a replacement? And yes, there was. @p.kaczmarek2 has been a great help, and I am pretty happy with the updates and changes he committed to the code.

    Well, let us start again;


    Unpacking:
    The unit comes in a little square box
    [BK7231T] Teardown Action LCS Smart Plug (without Energy Meter) 2578685
    [BK7231T] Teardown Action LCS Smart Plug (without Energy Meter) 2578685
    [BK7231T] Teardown Action LCS Smart Plug (without Energy Meter) 2578685
    [BK7231T] Teardown Action LCS Smart Plug (without Energy Meter) 2578685
    [BK7231T] Teardown Action LCS Smart Plug (without Energy Meter) 2578685
    [BK7231T] Teardown Action LCS Smart Plug (without Energy Meter) 2578685
    [BK7231T] Teardown Action LCS Smart Plug (without Energy Meter) 2578685


    Physical appearance:
    [BK7231T] Teardown Action LCS Smart Plug (without Energy Meter) 2578685
    [BK7231T] Teardown Action LCS Smart Plug (without Energy Meter) 2578685
    [BK7231T] Teardown Action LCS Smart Plug (without Energy Meter) 2578685
    [BK7231T] Teardown Action LCS Smart Plug (without Energy Meter) 2578685


    Opening up:
    Even though not needed as cloud-cutter works OK, I did open up the LSC plug.
    Opening the plug is very easy. It is locked/snapped in the corners; if you put a knife or small screwdriver near the edge and gentry pry, it will pop open.
    [BK7231T] Teardown Action LCS Smart Plug (without Energy Meter) 2578685
    [BK7231T] Teardown Action LCS Smart Plug (without Energy Meter) 2578685


    Closing is also effortless, snap the chassis back in, and you will hear a click once.

    The inside:
    [BK7231T] Teardown Action LCS Smart Plug (without Energy Meter) 2578685
    [BK7231T] Teardown Action LCS Smart Plug (without Energy Meter) 2578685
    [BK7231T] Teardown Action LCS Smart Plug (without Energy Meter) 2578685
    [BK7231T] Teardown Action LCS Smart Plug (without Energy Meter) 2578685


    And the stuff we care about:
    These plugs do have a drawback; they are mislabeled. The Tuya board is labeled CB2S, which should be a BK7231N, but once you remove the label on the chip, it is a BK7231T. This did result in some extra frustration in the beginning, but once this was clarified, flashing went quickly.

    [BK7231T] Teardown Action LCS Smart Plug (without Energy Meter) 2578685


    And because we are using cloud-cutter, there is no need for soldering.

    Flashing is straightforward, and I've attached the whole process.

    I choose the 1.1.8 BK7231T / oem_bk7231s_rnd_switch and SS01S Single Pole Smart Light Switch (TreatLife)

    PINs
    As this is a very basic plug, there is not much configuring.
    PIN6 LED_n 1
    PIN7 Btn 1
    PIN8 Rel_1 1
    PIN26 Wifi



    And finished
    [BK7231T] Teardown Action LCS Smart Plug (without Energy Meter) 2578685 [BK7231T] Teardown Action LCS Smart Plug (without Energy Meter) 2578685 iled 0

    Cheers

    Added after 2 [hours] 46 [minutes]:

    My little collection;
    [BK7231T] Teardown Action LCS Smart Plug (without Energy Meter) 2578685

    I will head to the office to configure all these for our ceiling lamps.

    NIels

    Cool? Ranking DIY
    About Author
    nielspiersma
    Level 9  
    Offline 
    nielspiersma wrote 60 posts with rating 19, helped 3 times. Been with us since 2022 year.
  • ADVERTISEMENT
  • #2 20350582
    p.kaczmarek2
    Moderator Smart Home
    Thank you for detailed teardown. It will be added to our templates database.
    You have really a lot of those plugs. I am curious what kind of router are you using - is there a single one or a mesh network?
    Helpful post? Buy me a coffee.
  • #3 20354075
    nielspiersma
    Level 9  
    p.kaczmarek2 wrote:
    Thanks for the detailed disassembly. It will be added to our template base.
    You have a lot of these plugins. I'm curious what kind of router you're using - is there one or a mesh network?


    I am using an OPNsense router and 2 Cisco 3560CXv2 in a 10GB stack configuration, 5 Unifi AU6 Pro APs and a Windows Server 2022 domain controller. ;)
  • #4 20394337
    Robgie
    Level 27  
    I bought the same plugin in Action described as LSC.
    It also has a module described CB2S but the system is in version N. In addition, I had to change the configuration
    PIN6 LED 1
    PIN7 Btn_n 1
    Without it, it worked in reverse on/off
  • #5 20394503
    p.kaczmarek2
    Moderator Smart Home
    @Robgie what do you mean with "reverse"? Don't you mean by chance that the button reacts when released? If so, it's not the other way around, it's standard behavior, just like in Tasmot.
    The correct solution to this problem is to run "Instant Touch Reaction", aka "SetOption 13", here:
    [BK7231T] Teardown Action LCS Smart Plug (without Energy Meter) 2578685
    This is not enabled by default, because sometimes we may want to support single click, double click, etc. separately, so you have to wait for the button to be released to know what event happened..
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #6 20395942
    Robgie
    Level 27  
    I checked and I messed up.
    Configuration only requires changing LED_n to LED.
  • #7 20459471
    Tilator
    Level 10  
    I bought Nedis WIFIP121FWT.

    It has the same plastic package locked from the corners. Wifi-board is CB2S but it has the BK7231N-version chip.
  • #8 20459493
    p.kaczmarek2
    Moderator Smart Home
    Most likely only a single batch was affected by that strange "CB2S with BK7231T" module.

    Nedis WIFIP121FWT topic: https://www.elektroda.com/rtvforum/topic3926632.html
    Helpful post? Buy me a coffee.
  • #9 20539436
    jadom11
    Level 2  
    Hello, I am reading with interest information about the OpenBK7231 project. Great forum, thanks for the great work and so much valuable information. Interested in the topic, I decided to add a couple of plugins (as in the topic above) to my domoticz. After opening, it turned out that these are plugins with this strange CB2S BK7231T module, thanks to the information on the forum, flashing and configuration took place without any problems. Unfortunately, I have a problem with domoticz, the device is recognized in domoticz, but I can't switch it. I will add that I have a couple of devices in Tasmot and everything works without a problem. Domoticz detects the device, generates an idx and assigns it to the system. I've been looking for information for a few days but I can't move on.. Has anyone configured this device with domticz and can help me? Please note that I am a beginner in the subject and need a little more time :)
    [BK7231T] Teardown Action LCS Smart Plug (without Energy Meter) 2578685
    [BK7231T] Teardown Action LCS Smart Plug (without Energy Meter) 2578685
    [BK7231T] Teardown Action LCS Smart Plug (without Energy Meter) 2578685
  • #10 20540009
    p.kaczmarek2
    Moderator Smart Home
    Hello, the topic has already been discussed and it ended up that there is no publish in MQTT, I would have to know 1:1 what Domoticz "says" to Tasmota after MQTT and what Tasmota "replies" then I would do it twice ... of course I don't ask about all protocol documentation with only those necessary packages. If you know more or less what they look like, put their description here. What needs to be received and sent for the relay to work.

    If not, maybe I will finally find time to install Domoticz and pair it with Tasmota and eavesdrop on communication but it's a lot of fun
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #11 20540838
    jadom11
    Level 2  
    Thanks for the reply, I thought it was a configuration issue. So far I have found a solution to the problem and I am controlling the relay from domoticz using http commands. It works without a problem and meets my needs. Eavesdropping on the MQTT message is unfortunately a new topic for me, but I will try to make up for it, maybe one of my colleagues has domoticz and can help pair it with Tasmota..
  • #12 20541933
    GP007
    Level 8  
    I also lack support for Domoticz (as it is in Tasmot) but I manage with node red.

    smart plug BK7231 -> domoticz

    From the topic mqtt obk..../1/get I fetch the state 0 or 1 and send it to the switch in domoticz accordingly using the mqtt message to domoticz/in function, e.g. msg.payload = { "command": "switchlight", "idx": 127, "switchcmd": "Off" }

    the other way domoticz->plug BK7231

    with domoticz/out I filter the mqtt message after the appropriate idx and depending on the nvalue 0/1 I send an Off or On command to cmnd/obk.../POWE R


    It may be a bit of guerrilla but it works :) [BK7231T] Teardown Action LCS Smart Plug (without Energy Meter) 2578685nodere..jpg Download (155.35 kB)
  • ADVERTISEMENT
  • #13 20610323
    Bushrider
    Level 1  
    nielspiersma wrote:
    choose the 1.1.8 BK7231T / oem_bk7231s_rnd_switch and SS01S Single Pole Smart Light Switch (TreatLife)

    PINs
    As this is a very basic plug, there is not much configuring.
    PIN6 LED_n 1
    PIN7 Btn 1
    PIN8 Rel_1 1
    PIN26 Wifi


    Hello and first of all, thanks for all the great work you are providing !
    If that can help someone, this config is working as expected for me, red led when Wifi is lost and blue led when plug is on :
    PIN6 WifiLED_n
    PIN7 Btn 1
    PIN8 Rel 1
    PIN26 LED 1
  • #14 20665222
    Karmacoma
    Level 5  
    >>20540009
    Hi,
    It is my very first post here but I'm very interested in openbecken integration with domoticz, could you tell what do you need to achieve this?
    a tcpdump capture maybe?

    I have also observed that 1970-01-01 date appears in front of every message sent to domoticz:

    Info:MQTT:MQTT client in mqtt_incoming_publish_cb topic tele/domoticz/in/OpenB96D7F6A/SENSOR
    Info:MQTT:MQTT client in mqtt_incoming_publish_cb topic domoticz/in/OpenB96D7F6A/1/get
    Error:CMD:cmd SENSOR NOT found (args {"Time":"1970-01-01T00:00:00","ENERGY":{"Power": 58.775512,"ApparentPower": 66.568054,"ReactivePower": 31.252918,"Factor":0.882938,"Voltage":224.556243,"Current":0.296442,"ConsumptionTotal":180.129364,"ConsumptionLastHour":0.000000}})
    Info:MQTT:MQTT client in mqtt_incoming_publish_cb topic stat/domoticz/in/OpenB96D7F6A/RESULT
    Error:CMD:cmd RESULT NOT found (args {"Time":"1970-01-01T00:00:00","Uptime":"0T00:15:10","UptimeSec":910,"Heap":25,"SleepMode":"Dynamic","Sleep":10,"LoadAvg":99,"MqttCount":23,"POWER":"OFF","Wifi":{"AP":1,"SSId":"wifichita","BSSId":"30:B5:C2:5D:70:72","Channel":11,"Mode":"11n","RSSI":98,"Signal":-51,"LinkCount":21,"Downtime":"0T06:13:34"}})
    Info:MQTT:Publishing val (233 bytes) to tele/domoticz/in/OpenB96D7F6A/SENSOR retain=1
    Info:MAIN:Time 911, idle 131121/s, free 72624, MQTT 1(2), bWifi 1, secondsWithNoPing 828, socks 2/38 
    Info:MQTT:MQTT client in mqtt_incoming_publish_cb topic tele/domoticz/in/OpenB96D7F6A/SENSOR
    Error:CMD:cmd SENSOR NOT found (args {"Time":"1970-01-01T00:00:00","ENERGY":{"Power": 58.775512,"ApparentPower": 66.568054,"ReactivePower": 31.252918,"Factor":0.882938,"Voltage":224.556243,"Current":0.296442,"ConsumptionTotal":180.129364,"ConsumptionLastHour":0.000000}})
    Info:MAIN:Time 912, idle 165402/s, free 73104, MQTT 1(2), bWifi 1, secondsWithNoPing 829, socks 2/38 
    Info:MAIN:Time 913, idle 161868/s, free 73104, MQTT 1(2), bWifi 1, secondsWithNoPing 830, socks 2/38 
    Info:MQTT:Publishing val (230 bytes) to tele/domoticz/in/OpenB96D7F6A/SENSOR retain=1
    Info:MQTT:Publishing val 0.000 to domoticz/in/OpenB96D7F6A/current/get retain=1
    Info:MQTT:Publishing val 0.00 to domoticz/in/OpenB96D7F6A/power/get retain=1
    Info:MAIN:Time 914, idle 183704/s, free 73104, MQTT 1(2), bWifi 1, secondsWithNoPing 831, socks 2/38 
    Info:MQTT:MQTT client in mqtt_incoming_publish_cb topic tele/domoticz/in/OpenB96D7F6A/SENSOR
    Error:CMD:cmd SENSOR NOT found (args {"Time":"1970-01-01T00:00:00","ENERGY":{"Power": 0.000000,"ApparentPower": 0.000000,"ReactivePower": 0.000000,"Factor":1.000000,"Voltage":226.218750,"Current":0.000000,"ConsumptionTotal":180.129364,"ConsumptionLastHour":0.000000}})


    Could it be this the reason, or one of the reasons why this integration is failing?

    many thanks for your help!!!
  • #15 20665684
    Karmacoma
    Level 5  
    Obviously, mine is with power meter....
    And I am using 1,17,199
    Thanks!!!
  • #16 20665708
    p.kaczmarek2
    Moderator Smart Home
    Hello, the 1970 date may indicate that you are missing:
    
    startDriver NTP
    in short startup command or autoexec.bat.

    Regarding domoticz, I am not sure what is their standard, don't we need to support that JSON format with device index?
    Helpful post? Buy me a coffee.
  • #17 20665761
    Karmacoma
    Level 5  
    I'm not sure about if it need json format but idx for sure, although it says so in one of my coding trials for arduino:

            String url = "/json.htm?type=command¶m=udevice&idx=";
            url += String(mqttIdx) ; url += "&nvalue=0&svalue=";
            url += String(t); url += ";";
            url += String(h); url += ";";
            url += String(hum_stat);
         
            sendServer(server, url);
    


    although that is for a weather station and I don't know if it is the same...

    Note the enter symbol + the "m" stands for
    Quote:
    & + param


    altogether...

    Added after 1 [hours] 44 [minutes]:

    Here you have a trace from a tasmota device taking into account that tasmota device is x.x.x.195 and server is x.x.x.25

    let me know if you need more traces...
  • #18 20666343
    Karmacoma
    Level 5  
    It looks like you were right
    Quote:
    Domoticz MQTT communication
    Communication from and to Domoticz works via JSON. Default MQTT topics of the Domoticz for incoming and outcoming messages are:

    domoticz/in
    domoticz/out


    Every Domoticz communication is based on JSON
    Many thanks again!!
  • #19 20734052
    jprofesorek
    Level 1  
    p.kaczmarek2 wrote:
    Probably only one batch was affected by this strange module , "CB2S with BK7231T".
    I report that no.... In another plug from Action ("lsc smart connect smart power plug" art no. 2578677, only switching without energy meter) I also found a middle module with designation CB2S and with IC BK7231 T :
    Close-up of the CB2S module with a Beken BK7231T microcontroller.
    In an earlier post, someone wrote that the same dyno (i.e. same "Art. no.") has BK7231 N , so it looks like the Action shack has the same lettering and different guts.
    Some other pictures of this plug-in:
    LSC Smart Connect power plug and its packaging. Top view of an opened electrical plug with visible electronic components. Front view of an electrical plug with a Wi-Fi logo.

    I uploaded the OpenBK version for "T" to this and it works.
    I didn't unsolder the module, Tx and Rx aren't connected to anything, and Gnd and Vcc don't appear to be loaded with anything other than a capacitor for voltage stabilization, so for the upload I connected ground with a crocodile to the electrical outlet plug (it's connected to Gnd), power to the uninsulated fuse leg at the relay (it's connected to Vcc), and I touched the data lines with pogo-pins directly at the module.

    First I tried to rip the software with which it came with this all graphical BK7231GUIFlashTool, but when reading I was getting errors that it read fewer bytes than expected, while
    python ./uartprogram backup.bin -b 115200 -d /dev/ttyUSB0 -r
    it ripped what it needed and wrote:
    CRC should be cd59b0fe
    CRC is cd59b0fe
    Wrote 119000 bytes to myFirmwareBackup.bin

    Then I tried to upload the new software with this BK7231GUIFlashTool, it managed to erase the memory and blew up something like "writing failed". I don't know if it's the fault of Linux, mono or this module, because there were surprises in this more convenient console software too, ie. firing up:
    python ./uartprogram ./OpenBK7231T_UA_1.17.244.bin -b 115200 -d /dev/ttyUSB0 -w

    it spit out my
    WriteSector Failed
    and only after one more run (I found in another thread here on the forum that it helps, with the memory cleared it had to be tried) it started writing, uploaded everything, and then gave the message:
    Read CRC Failed : |##################################################|[ 2.65k/s]

    which turned out to be a blunder, as I repeated reading the code and it uploaded everything fine after all.
    (I've been using a trouble-free CP2102-based usb-serial for a much longer time, so I don't expect any problems from it.)

    Followed "textbook"; read by paths on the board and checked configuration:
    PWM2 - P8 - relay control - "Rel"
    PWM5 - P26 - led2, blue - "WifiLED"
    PWM1 - P7 - button - "Btn"
    PWM0 - P6 - led1, red - "LED"

    I can insert additional pictures / test something else if needed.

Topic summary

The discussion revolves around the teardown of the LCS Smart Plug (Article number: 2578685), which does not contain the expected ESP82xx chip. Users share their experiences with various smart plugs, including the Nedis WIFIP121FWT and LSC Smart Connect Smart Power Plug, both featuring the BK7231T chip. Configuration issues are addressed, particularly regarding the button functionality and LED indicators. Users discuss integrating these devices with Domoticz and Tasmota, highlighting challenges with MQTT communication and JSON formatting. Solutions include using HTTP commands for relay control and configuring Node-RED for integration. The conversation emphasizes the variability in chipsets across different batches of the same product.
Summary generated by the language model.
ADVERTISEMENT