logo elektroda
logo elektroda
X
logo elektroda

Flashing OpenBeken on LoraTap SP800WJ-EU Smart Plug for Local Control

divadiow 1041 0
ADVERTISEMENT
  • Hi. This is a look at a LoraTap branded Tuya-based EU WiFi smart plug/socket with power/energy metering. The model number is SP800WJ-EU. The official product page is here https://www.loratap.com/products/sp800wj-eu where it can also be purchased, but mine came from Ali Express at a lower price. Much cheaper if you're eligible for a Welcome Deal.
    QCSMART WiFi smart socket with power monitoring

    First we'll look at the product, then open it up, take it apart and solder the relevant parts up for flashing to OpenBeken, an open source Tuya replacement firmware. This conversion will cut the device off from any cloud servers for total control locally with or without HomeAssistant (and other IoT control platforms) integration.

    Packaging, box content, external product pictures:

    Packaging of LoraTap SP800WJ-EU smart plug Box with technical specifications of a WiFi smart plug.A cardboard box with a label containing details of Apex CE Specialists GmbH.Packaging of LoraTap plug model SP800WJ-EUCardboard box with the label of the LoraTap SP800WJ-EU product.White LoraTap EU smart WiFi plug side view.Close-up of the LoraTap SP800WJ-EU smart plug with a power button.Back of LoraTap smart plug with voltage and certification informationTop view of the European smart plug LoraTap SP800WJ-EU.LoraTap SP800WJ-EU smart WiFi plug with leaflets.

    To get inside the device, the two cross-head screws on the underside need to be removed and the snap-fit casing pried open with a thin spudger

    LoraTap Tuya smart plug with open case and tools on a white background.

    With the case apart there'll be some connections between the main parts stopping complete separation.

    Disassembled LoraTap SP800WJ-EU smart plug.

    Pushing the little white lugs at the left and right of this connector allows the connector to be pushed upwards using something with a thin wedge, like a flat screwdriver or the edge of the spudger if narrow enough

    Interior of LoraTap SP800WJ-EU smart plug.Plug with wires and Lugs labels

    With that separated:
    Interior of disassembled LoraTap SP800WJ-EU smart plug Interior of LoraTap SP800WJ-EU smart WiFi plug with exposed circuit board. Interior of LoraTap SP800WJ-EU smart plug housing with circuit board and ribbon cable WB2S module on a circuit board with electronic components. Close-up of the SP800WJ-EU-KP3210 circuit board with visible components. PCB of LoraTap SP800WJ-EU smart plug with electronic components. Disassembled LoraTap SP800WJ-EU smart plug showing the interior with PCB and components.

    The ribbon cable went to a separate PCB where the LED and button are soldered, which itself can be freed by removing the two screws

    PCB board with electronic components and a button. Opened smart plug casing from LoraTap with a disassembled circuit board.

    Sticking up from the main PCB is the module we're interested in - the WB2S. Tuya WB2S has a Beken BK7231T chip under the metal RF shield.

    To free the main PCB completely, so we can access the WB2S properly, the mains live and neutral wires need to be de-soldered. I achieved this with a dab of flux on each solder blob and then heating each with a soldering iron until the solder melted, allowing the wires to be removed

    Electronic module of LoraTap smart plug with NEUTRAL and LIVE labels.

    Close-up of the circuit board from the LoraTap SP800WJ-EU smart plug showing the BL0942 module. View of the internal circuit board of the LoraTap SP800WJ-EU plug. View of circuit board with electronic components

    The WB2S RX/TX/3.3V and Ground points are easily accessible with the module kept in place, so no need to remove the whole module from the mainboard.

    WB2S module with exposed connection points for soldering on the reverse side.

    Solder those 4 up with some short thin wires

    Circuit board with wires soldered to soldering points.

    And connect as follows to your USB-TTL adaptor and external 3.3v power supply (USB-TTL's own 3.3v line will most likely not be enough for successful firmware backup and flash).
    USB-TTL adapter with chip and pin connectors

    WB2S RX -> USB-TTL TX
    WB2S TX -> USB-TTL RX
    WB2S 3.3V -> Ext 3.3v PSU
    WB2S GND -> USB-TTL GND and Ext 3.3v PSU GND

    View of a PCB with wires connected to a WB2S module.

    My PSU is a basic hobbyist XL4015 with LCD from Ali Express
    Blue voltage step-down module with LCD display.

    With Easy Flasherrunning, BK7231T selected and the latest OpenBeken BK7231T firmware downloaded (EF does this for you), the backup of factory firmware and flash to OpenBeken can be started. Power on the PSU to begin the process. If the reading/writing fails, try lowering the baud rate and checking your wiring is sound and short. Ensure there is continuity between common grounds and all other points with the USB-TTL and PSU powered off.
    BK7231 Easy UART Flasher interface reading firmware data.

    More flashing example steps: https://github.com/openshwprojects/BK7231GUIFlashTool

    Your factory firmware will be backed-up to BK7231GUIFlashTool-v5\backups subdirectory. eg:
    Screenshot of backup folder with binary file readResult_BK7231T.

    If possible, avoid pairing with the Tuya app at all so your wifi credentials are not present in the backup. These can remain even if the device is reset/removed from the app.

    When flashing is complete and after an off/on of power, the OpenBeken AP broadcasts:

    Screenshot of a Wi-Fi network list with the OpenBK7231T network selected.

    Join the AP to find OpenBeken gives you a client IP of 192.168.4.100. You can then browse to 192.168.4.1 to begin setup of OpenBeken.
    OpenBK7231T configuration screen with device information and configuration options.

    From this point you can configure OpenBeken to join your wifi, setup the template to control the device (button, relay, LED), configure MQTT and Home Assistant discovery, configure power monitoring etc, just like Tasmota.

    To put the device back together it is simply the reverse of the dismantle procedure, which should have been noted and remembered with care. One tip though, the live and neutral wires are a pain to line up and solder back, so I suggest soaking away with the solder from the holes on the main PCB first, poking the ends of the wires through, then soldering back up from the top with flux/solder as normal. eg:


    PCB of a smart WiFi plug with highlighted contacts

    Further configuration and general information, including how to discover the configuration specific to this device (LED GPIO, relay GPIO etc) are better served by guides that already exist:

    How to automatically configure GPIO of OpenBeken device? Tuya Config template extraction, BK7231
    Easy Home Assistant Discovery Pairing for BK7231T, BK7231N, BL602, XR3, W800, W600, etc. - OpenBeken
    BK7231T/BK7231N WiFi, MQTT, template and IP configuration at flash time via UART - OpenBeken flasher
    BK7231 datasheet, pinout, programming, specification, wiki (BK7231T, BK7231N)
    How to script automatic switching off of the relay after a certain time in OBK without Home Assistant

    Many more guides and information pages:
    https://www.elektroda.com/rtvforum/forum517.html
    https://www.youtube.com/@elektrodacom
    https://github.com/openshwprojects/OpenBK7231T_App?tab=readme-ov-file#introduction

    For this device, the LoraTap SP800WJ-EU, the following template will configure the basic LED, button, relay and power monitoring functions

    Code: JSON
    Log in, to see the code





    Notes

    UART TX2 P0 boot log
    Code: Text
    Log in, to see the code


    Firmware version 1.3.5 - CloudCutter exploitable: https://github.com/tuya-cloudcutter/tuya-clou...r/devices/loratap-sp800wj-eu-plug-v1.3.5.json

    Code: Text
    Log in, to see the code


    Unpaired storage area:

    Code: JSON
    Log in, to see the code


    Code: Text
    Log in, to see the code


    Tuya app screenshots

    Screenshot of an app with a smart power metering socket. App screen for controlling a metering socket with the power button off. App screen showing energy consumption at 0.00 kWh. Device update screen with No updates available message.

    Factory backup Tuya_LoraTap_SP800WJ-EU_Plug_(schemaID-000002zjt3)_keym9qkuywghyrvs_1.3.5.bin https://github.com/openshwprojects/FlashDumps/tree/main/IoT/BK7231T

    Additionally, this is only the second BK7231T with BL0942 chip in the device list, the first has the same template: https://www.elektroda.com/rtvforum/topic4041210.html

    I am wondering if I could maybe turn this device into a test thing for BL0942 testing on any platform. I could route out RX/TX/GND/VCC as a minimum for use with any module- safe as long as the module is powered solely from the plug (?), no shared ground. Of course the wires on the WB2S PCB pads would need to be secure. Thoughts?

    Cool? Ranking DIY
    About Author
    divadiow
    Level 34  
    Offline 
    divadiow wrote 2742 posts with rating 470, helped 245 times. Live in city Bristol. Been with us since 2023 year.
  • ADVERTISEMENT
ADVERTISEMENT