logo elektroda
logo elektroda
X
logo elektroda

Farylink LSPA9-like EU Smart Plug Conversion - BL0937 Metering Chip + WR2E RTL8710BX Module

divadiow 399 1
ADVERTISEMENT
  • #1 21486791
    divadiow
    Level 34  
    Yet another LSPA9-type EU smart plug, but this one's a little more interesting, so worthy of a post I thought. Bought from the Farylink (of FL-xx module and device fame) store on Ali Express, this variant has a BL0937 metering chip and was advertised as being capable of handling 20A at 100-240V.

    https://www.aliexpress.com/item/1005007992846991.html
    WiFi smart plug EU 20A with power monitoring features.

    Initial observations are that is comes in very familiar generic product boxing and that the glue holding this one together was not very strong or was used sparingly, requiring only mild spudger attack techniques to break open.

    Smart plug packaging on a carpet. Box of a smart plug with product label and barcode. Smart plug in open packaging White smart plug and user manual on a carpet. Smart plug with technical information on a carpet background. Smart plug with a metal tool used for opening it. Opened interior of an EU smart plug with visible electronic components. Interior of the Farylink smart plug with visible electronics and components on the PCB.

    one screw holds the main PCB to the chassis and a blob of glue stabilises one corner. Will the screw removed, the whole inside will slide out with a little downward force on the main power prongs while holding the case.

    Interior of a smart plug showing electronic components. Close-up view of EU electrical plug prongs on a blue background. Interior of an electrical socket housing with glue and a mounting screw. View of the interior of the LSPA9 smart plug with visible screws and wires.

    Yongwei Y3F-105DM relay on a blue PCB. Open smart plug with visible PCB and assembly components. PCB board of a smart EU plug type LSPA9 with components. Close-up of a smart plug PCB with visible electronic components. Close-up of the interior of the FL-S165-V1.1 smart plug showing electronic components. Yongwei Y3F-105DM relay on a smart plug PCB. Close-up of an open electronic module with visible PCBs and components. Close-up of a PCB inside a smart plug. Disassembled smart plug with WR2E module. Close-up of the measurement circuit inside a smart plug. Smart plug with visible measuring circuit on a blue workbench background. Close-up of a blue PCB with a relay and a screwdriver. Interior of a smart plug with Yongwei relay on a blue PCB.

    We see our Belling BL0937, a Yongwei Y3F-105DM 16A @28/125/250VAC relay (even though I ordered the 20A), Bright Power BP2525 step down 85Vac~265Vac to 3.3v converter chip and a WR2E Realtek RTL8710BX module. 2mb flash on the rear of the module courtesy of a GigaDevice 25Q16CSJG SOP8 flash IC.

    Module de-soldered
    WR2E module on a blue mat. Close-up of an electronic module on a blue background.

    WR2E module diagram showing pin connections.

    Boot log from TX2/PA30
    Code: Text
    Log in, to see the code

    Soldered ready for dumping/flashing. PA29 and PA30 are very small so require a little care. I also opted for some flexible copper jumper wires to allow for a little more give when under any pressure while being moved/connected up. I've torn off a few pads before with rigid dupont ends.

    Electronic module PCB with attached wires Two soldered wires on a blue background. Electronic board with connected wires testing a smart plug.

    The needle is my handy ground, required on TX2 at power-on get RTL8710B into correct boot mode.

    Using our AmebaZ family rtltool (credits to pvvx) from the Flashtools repo we can dump the whole factory firmware to file

    Screenshot of RTL AmebaZ FlashTool bootloader utility

    and then flash OpenRTL to the OTA1 address 0x00B000
    Screenshot of the RTL AmebaZ Bootloader Utility flashing tool.

    and on next boot
    Wi-Fi connection dialog box for OpenRTL8710B network.

    thankfully the boot log already lists our pin assignments

    Code: Text
    Log in, to see the code


    It even contains the BL0937 calibration but we'll need to manually calibrate OpenRTL from the web app GUI later.

    So the OpenBeken/RTL template is

    Code: JSON
    Log in, to see the code


    OpenRTL8710B management panel for a smart plug displaying power parameters.
    (power not calibrated yet)

    Module soldered back ready for complete reassembly
    Close-up of soldered pins on a blue PCB.

    firmware backup will land at https://github.com/openshwprojects/FlashDumps/tree/main/IoT/RTL8710BX as Tuya_Generic_EU_Plug_(schemaID-e1kt0gdk)_keydnqmh87c8ajv4_d182tgb7if9myzx9_WR2E_1.1.6.bin
    https://github.com/OpenBekenIOT/webapp/commit/66961cb30c9de8c5b408dc0e4727dfc6260aed35
  • ADVERTISEMENT
  • #2 21487192
    divadiow
    Level 34  
    forgot some things.

    Tuya storage data
    Code: JSON
    Log in, to see the code


    Tuya app paired experience
    App screen with successfully added smart device. Tuya app screen displaying a turned-off Smart Plug with options for Power, Timer, Countdown, and Electric. App screen showing a smart plug with a countdown timer function. Screenshot of the Tuya app displaying electric consumption data. Tuya app screen showing schedule section with no timer data set. Device update screen in the Tuya app, showing no updates available and the versions of the main and MCU modules.
ADVERTISEMENT