Elektroda.com
Elektroda.com
X
Elektroda.com

Generic Tuya WIFI Smart Socket for different countries (LSPA8)

merni99 537 6
  • WIFI Smart Socket
    Model: LSPA8
    Max.load 16A

    Contains a WB2S module and a BL0937 to measure power consumption.

    Available on AliExpress (e.g. https://www.aliexpress.com/wholesale?catId=0&...+FR+I&spm=a2g0o.productlist.1000002.0&dida=y)

    Generic Tuya WIFI Smart Socket for different countries (LSPA8)

    Programming the WB2S with bk_writer1.60.exe is easily possible with UART.
    Just connect 3.3V to VBAT, GND, 1RX and 1TX to a USB to UART programmer.



    RX and TX have to be crossed between programmer and WB2S (RX on programmer has to be connected to TX on WB2S).

    To program the device, the switch on pin 1RX has to be disconnected because the switch has a pullup resistor which prevents from programming via UART.

    Connect CEN (Reset of WB2S) to GND at the beginning of programming.

    After successful programming, the following configuration has to be defined:

    Generic Tuya WIFI Smart Socket for different countries (LSPA8)

    Generic Tuya WIFI Smart Socket for different countries (LSPA8)

    Photos of the opened device will follow.

    Cool? Ranking DIY
    About Author
    merni99
    Level 2  
    Offline 
    merni99 wrote 2 posts with rating 1, helped 0 times. Been with us since 2022 year.
  • #2
    p.kaczmarek2
    Level 28  
    Thank you for providing configuration template. From what I see, the device seems to be using BL0937 power metering chip.

    Are you also able to provide some photos from the inside?
  • #3
    merni99
    Level 2  
    Photos of the inside of the Smart WIFI Switch

    Generic Tuya WIFI Smart Socket for different countries (LSPA8) Generic Tuya WIFI Smart Socket for different countries (LSPA8) Generic Tuya WIFI Smart Socket for different countries (LSPA8) Generic Tuya WIFI Smart Socket for different countries (LSPA8)


    The next photo shows how to program the WB2S.
    3.3V, GND, RX and 1RX have to be connected to the UART programmer.
    Program a new firmware with the BkWrite tool.
    At beginning of programming, connect CEN to GND for 1 sec to reset the BK7231T.

    Important: To program the WB2S, the switch on the PCB connected to the 1RX pin of the WB2S module needs to be disconnected (because it has a pull up resistor which disturbs the programming). This can be done easily: Just "remove" the solder from the 1RX pin which connects the two PCBs so that the two PCBs are no longer connected on the 1RX pin.

    Generic Tuya WIFI Smart Socket for different countries (LSPA8)
  • #4
    p.kaczmarek2
    Level 28  
    Thanks, this will certainly be useful for beginners and new OBK users.

    As per CEN - I usually don't do CEN, just reboot with power off/on cycle. I also usually desolder whole WB2S for that and power it from 3.3V LDO.

    Regarding pull up resistor - it happens from time to time, for example, in case of that Relay, we had to remove both pull up resistor and a capacitor (used to debounce button by Tuya):
    [youtube]https://wwwa.youtube.com/watch?v=0V0kaRVnk18[/youtube]
  • #5
    beniamino38
    Level 2  
    Thanks for this post! I am new to this, and used this info to get OpenBK on a similar but smaller plug. Mine is a generic 16A UK LSPA7, but the internals are similar -- WB2S and BL0937. It opened easily with a craft knife, and I had to desolder the AC power pins to remove the main board. The WB2S would not accept programming when attached to the main board, so I desoldered it altogether. I also found that 'uartprogram' failed, first with an error 'cannot set baud rate', and then (at a lower baud rate) a write error. I tried bk7231tools with an offset of 0x11000, which worked fine. The OpenBK configuration settings seem to work correctly for this device -- the LEDs, relay and power measurement all seem to be working. Thanks again!

    Generic Tuya WIFI Smart Socket for different countries (LSPA8) Generic Tuya WIFI Smart Socket for different countries (LSPA8) Generic Tuya WIFI Smart Socket for different countries (LSPA8) Generic Tuya WIFI Smart Socket for different countries (LSPA8) Generic Tuya WIFI Smart Socket for different countries (LSPA8)

    Edit: The chip was reported as a "BK7231S_1.0.6" but I used the BK7231T firmware.
  • #6
    p.kaczmarek2
    Level 28  
    It's good that it worked out. Tell me if you need any special features, I can add them for you.

    LSPA7 is not yet on our devices list, so thank you for photos, I will add them here:
    https://openbekeniot.github.io/webapp/devicesList.html
    If you have any other IoT devices not listed, feel free to post a separate teardown in this forum section.
  • #7
    beniamino38
    Level 2  
    OK, I will -- thanks for producing this awesome software