esp32 – smart connect plug

For years, the Dutch retailer Action has offered affordable smart-home devices under the brand LSC Smart Connect. These products are extremely popular because of their low price—but under the hood, they often use hardware that is surprisingly capable. In earlier generations, many LSC products were based on ESP8266 chips that could easily be reprogrammed. However, newer revisions increasingly use alternative chips with locked firmware or limited documentation, making it harder for enthusiasts to flash custom software.

In this three-part series, we explore three models:

  1. The classic “old” plug
  2. The newer hardware revision
  3. A model with power monitoring

This article focuses on converting one of these smart plugs into a fully open-source Apple HomeKit-compatible device.

What This Project Covers

In this step-by-step guide, you will learn how to:

  • Open the LSC Smart Power Plug safely
  • Identify the internal hardware
  • Remove the original module
  • Flash and prepare an ESP8685-WROOM-03
  • Install the ESP32 Life Cycle Manager (LCM)
  • Generate a HomeKit QR code
  • Flash your own HomeKit firmware
  • Pair your device with Apple Home

The end goal? A fully custom, native HomeKit smart plug — without cloud dependency.

Why Modify This Smart Plug?

There are more smart devices than ever—but not all of them truly belong to you. Most budget IoT devices depend on:

  • Cloud servers
  • Vendor accounts
  • Proprietary apps
  • Remote infrastructure
  • Unknown data collection

This creates the privacy trap: You buy the device, but the manufacturer controls it. If you want to understand the deeper implications of cloud-based IoT products, read this article: Source: https://www.studiopieters.nl/why-you-should-or-shouldnt-buy-a-smart-plug-from-action

By replacing the firmware, you regain:

  • Full privacy
  • Local device control
  • Firmware ownership
  • Offline operation
  • No telemetry
  • Long-term support independence

Difficulty Level

Rating: 2 / 5 Soldering Irons – Beginner friendly

No advanced electronics background is required, but you should be comfortable with:

  • Desoldering and soldering
  • Working with small components
  • Using a serial flasher
  • Command-line tools

⚠️ HIGH VOLTAGE WARNING

⚡ DANGER: MAINS ELECTRICITY CAN KILL

This project involves a device that connects directly to 230V AC power.

Always unplug before opening.
Never work live.
Use insulated tools.
Avoid touching exposed conductors.
Proceed only if you understand electrical risks.

The author accepts no liability for damage, injury, or accidents.

If you are unsure — consult a licensed electrician.

Hardware Used

Product Information

From the box:

  • Brand: LSC Smart Connect
  • Product: Smart Power Plug
  • Article numbers:
    • 970760 (V1)
    • 970760.1 (V2)

From the device:

970760.1 Max 16A 3680W μ T35
220–240V~ 50/60Hz
AL M21167 Made in P.R.C.

Why We Replace The Chip

The two revisions use different modules:

VersionOriginal Chip
V1 – Art: 970760TYWE2S / ESP8285
V2 – Art: 970760.1WB2S / BK7231

The BK7231 is far more difficult to flash and lacks modern ecosystem support. The solution? Replace both with a powerful ESP chip: ESP8685-WROOM-03

This gives you:

  • Native HomeKit
  • OTA updates
  • Full control
  • Active community support

Opening the Plug

Tools Required

  • Plastic spudgers
  • Thin metal pry tool

Steps

  1. Insert a plastic spudger between the shell halves.
  2. Create a small gap.
  1. Slide in a metal spudger.
  2. Slowly pry toward a corner.
  3. Release each of the four clips.
  1. The shell opens cleanly.

Pin Mapping

After tracing the PCB, this configuration was confirmed:

FunctionTYWE2SWB2SESP8685
RelayGPIO12GPIO24GPIO24
ButtonGPIO14GPIO26GPIO26
Red LEDGPIO4GPIO7GPIO7

Removing and Decoding the Original Chip

Before installing the new ESP8685-WROOM-03, we first need to safely remove the original module from the PCB. This step is critical: damaging the pads will make the entire project much harder (or impossible). Fortunately, with the right tools, this is a clean and controlled operation.

Tools Required

For this process, I strongly recommend:

  • TS100/101 digital soldering iron (or equivalent temperature-controlled iron)
  • Desoldering wick / copper braid remover
  • Liquid flux (very important!)
  • Isopropyl alcohol and cotton swabs

Why the TS100/101? It heats quickly, maintains stable temperature, and is powerful enough for multi-pin modules without overheating the board.

Step 1 – Identify the Original Chip

Depending on your plug revision, you will see:

  • TYWE2S / ESP8285 (older version)
  • WB2S / BK7231 (newer version)

Both are surface-mounted Wi-Fi modules with edge solder pads around the module. Before removal, take high-resolution photos of the PCB from multiple angles. These will be invaluable if anything goes wrong.

Step 2 – Add Flux Generously

Apply liquid flux along every solder pad edge of the module.

Flux:

  • Lowers melting temperature
  • Improves heat transfer
  • Prevents pad lifting
  • Makes solder flow correctly

Never attempt desoldering without it.

Step 3 – Remove the Module

Set the TS100 to 350–380°C.

  1. Place desoldering braid on one row of pads
  2. Press with the hot iron
  3. Let solder absorb into the wick
  4. Repeat across all sides
  5. Once all joints are clean, gently lift the module.

Do not pull if resistance remains. Missing even one joint can tear a pad.

Step 4 – Clean the Pads

After removal:

  1. Remove remaining solder with braid
  2. Clean flux using isopropyl alcohol
  3. Inspect for lifted pads under magnification

Your board should now show:

  • Flat copper pads
  • No burned areas
  • No solder bridges
  • Clean alignment

Preparing the ESP8685

Now that the old module is removed we can prepare the replacement module.

Magnetic Programmer

Instead of soldering headers, I built a magnetic programmer jig, you need a 3D printer. If you do not have a 3D printer you can also solder some wires to the programming pads. source: https://www.studiopieters.nl/esp8685-wroom-03 or 3D printer magnetic programmer jig Source: https://www.studiopieters.nl/esp8685-wroom-03-programmer

Benefits:

  • No soldering
  • Stable contact
  • Works with esptool
  • Fast flashing
  • Low risk

Wipe Flash

esptool.py erase_flash

Example output:

Chip is ESP32-D0WD-V3
Erasing flash...
Chip erase completed successfully
MAC: 68:25:dd:f0:40:94

⚠️ Save your MAC address — you need it when you generate the QR-Code.

Generate HomeKit QR Code

Do it yourself: https://www.studiopieters.nl/guide-to-esp32-homekit-qr-codes
Do it yourself: https://github.com/AchimPieters/esp32-homekit-qrcode

Example:

./gen_qrcode 7 693-41-208 M4T8 cc8da2ddafe0 new/qrcode.png

Meanings:

  • 7 = Outlet accessory
  • 693-41-208 = Setup code
  • M4T8 = Setup ID
  • cc8da2ddafe0 = MAC (no colons)

This will generate an images like this one. you can use only the QR-code if you want, or the whole image and print it as a sticker, and paste it on your plug.

Or download precompiled qr-code here

Install Life Cycle Manager (LCM)

LCM (Life Cycle Manager) allows OTA (Over The Air) installations and updates without needing to reopening the device ever again!

Do it yourself:https://github.com/AchimPieters/esp32-lifecycle-manager

Or download precompiled files here

Go to the folder where you have placed the files and Flash:

python -m esptool --chip esp32c3 -b 460800 \
--before default_reset --after hard_reset write_flash \
--flash_mode dio --flash_size 4MB --flash_freq 80m \
0x0 build/bootloader/bootloader.bin \
0x8000 build/partition_table/partition-table.bin \
0xe000 build/ota_data_initial.bin \
0x20000 build/esp32-lifecycle-manager.bin

Installing the New Chip and Soldering the ESP8685-WROOM-03

With the old module removed and the pads cleaned, it’s time to install the new brain of your smart plug: the ESP8685-WROOM-03. This is the most delicate part of the entire upgrade – but with patience and the right technique, it’s completely manageable even for beginners.

Step 1 – Align and Tack One Corner

  1. Position the ESP8685 on the footprint (one side 5 and other side 6 pads)
  2. Align all edges
  3. Melt one pre-tinned corner pad
  4. Let it cool

Now check alignment on all sides. If misaligned:

  • Reheat the tack joint
  • Adjust the module
  • Retack once perfect

Step 2 – Solder Opposite Corner

Once alignment looks correct:

  • Solder the opposite corner
  • Check alignment again

Once two corners are fixed, the module will not shift.

Step 3 – Drag Soldering the Pads

Apply generous flux along one row of pins.

Now:

  1. Load a small solder bead on your tip
  2. Drag slowly across pins
  3. Let surface tension pull solder into place
  4. Repeat on the other side

Do not worry if you create bridges — they are easily removed later.

Step 4 – Remove Solder Bridges

If pins are shorted together:

  1. Add flux
  2. Place desoldering braid
  3. Lightly press with the iron
  4. Let solder wick away
  5. Re-inspect

Your goal:

  • Clean joints
  • No blobs
  • No bridges
  • No lifted pads

Step 5 – Final Cleaning & Inspection

Clean the board using:

  • Isopropyl alcohol
  • Cotton swabs

Inspect carefully:

  • All pads connected
  • No pins floating
  • No cold joints
  • No heat damage
  • No debris

Spend time here. Visual inspection prevents 90% of failures.

Step 6 – Continuity Check (Recommended)

Using a multimeter:

  • Check no short circuits between neighboring pins
  • Confirm ground connections
  • Verify relay pin connects to ESP GPIO
  • Confirm power rail continuity

This step saves debugging later.

What You’ve Achieved

At this point:

  • The old chip is gone
  • A modern ESP is installed
  • Your firmware control begins
  • OTA updates are possible
  • Privacy is restored

This is the exact moment your device transitions from: consumer product → personal hardware

Write HomeKit Firmware

This part is somewhat difficult for a beginner, but doable. So if you want to write your own code read the Do it yourself links. If not you can simply use the code I already wrote and compiled, just go to Install via LCM.

Do it yourself: https://github.com/AchimPieters/esp32-homekit
Do it yourself: https://www.studiopieters.nl/esp32-homekit-development

Config:

homekit_server_config_t config = {
  .accessories = accessories,
  .password = "693-41-208",  
.setupId = "M4T8",
};

Build:

docker run -it -v ~/ESP32-Smart_connect_Plug:/project -w /project espressif/idf:v5.4
idf.py set-target esp32C3

idf.py build

Produces: main.bin

Sign Firmware

Open a new terminal window go to the directory ESP32-Smart_connect_Plug and run:

openssl sha384 -binary -out build/main.bin.sig build/main.bin
printf "%08x" "$(wc -c < build/main.bin)" | xxd -r -p >> build/main.bin.sig

Or just use my repository and read further below.

Install via LCM

  1. Connect to WiFi: LCM-XXXXX
  2. Portal opens automatically
  3. Enter home WiFi credentials
  4. Firmware source: AchimPieters/esp32-smart-connect-plug
  5. Enable GPIO7 (LED in this case) and Led Level off
  6. Click Join

Installation begins, the LED starts blinking. When done the Device reboots.

Pair with Apple Home

Add HomeKit-power plug Devices to HomeKit

  1. Open the Home app.
  2. Scan the device’s QR-Code.
  3. Follow the device-specific instructions.
  4. Name your device and assign it to a room.

Done.

Update Firmware

When You want to update your plug with a new release of the firmware you have to download the EVE App. This because the Home App, doesn’t has a building update function. In the Eve App select your device in this case your Power plug and hold it until you see “Turn On” and “Show in (the room you selected)”, select the room, here you only see the homkitplu and turn on or off? press between the homekitplug and the on/off option, and a new screen will magically appear here select FirmwareUpdate, this whole takes a few minutes, including the reconnection to HomeKit.

Final Result

You now have:

  • A smart plug you actually own
  • OTA upgrades
  • No vendor cloud
  • Native HomeKit
  • Full firmware control
  • Open-source system
  • No app lock-in
  • No spyware
  • Lifetime usability

Links & Resources

ESP32 Life Cycle Manager
https://github.com/AchimPieters/esp32-lifecycle-manager

HomeKit QR generator
https://github.com/AchimPieters/esp32-homekit-qrcode

ESP32 HomeKit Framework
https://github.com/AchimPieters/esp32-homekit

More projects:
https://www.studiopieters.nl

error: Content is protected !!
Scroll to Top