logo elektroda
logo elektroda
X
logo elektroda

[Youtube] LSPA flashing guide for ESP8266 version with new TYWE2S (alternate TYWE2S pinout, GPIO0)

p.kaczmarek2  0 2754 Cool? (+2)
📢 Listen (AI):

TL;DR

  • Flashes a LSPA9 smart socket that uses an unusual TYWE2S module pinout, installing Tasmota on the device.
  • Uses a soldering guide and esptool.py to program the ESP8266, with an alternate TYWE2S pinout that exposes GPIO0.
  • Flags that this TYWE2S layout does not match Tuya documentation and corrects a video typo that once named TYWE3S.
  • Points to related guides for CB2S, WB2S, and LN882 LSPA9 versions, plus Tasmota Device Groups compatibility with OBK sockets.
Generated by the language model.
The image depicts a flashing guide for the LSPA9 socket with the TYWE2S module.
This is a short programming guide for a LSPA9 socket that is using a strange TYWE2S version with non-stand pinout that does not match Tuya documentation. Video includes soldering guide and flashing method for ESP8266 with esptool.py. We'll flash Tasmota to this socket.



ERRATA: On the video, TYWE3S name is once used. It should be TYWE2S, obviously.

For more information on the alternate TYWE2S pinout, see:
https://www.elektroda.com/rtvforum/topic3974457.html
In case that you've got LSPA9 with CB2S or WB2S, see our other flashing guides:
https://www.youtube.com/watch?v=L6d42IMGhHw&list=PLzbXEc2ebpH0CZDbczAXT94BuSGrd_GoM
If you got LN882 version, see:
https://www.elektroda.com/rtvforum/topic4027545.html
Keep in mind that Tasmota sockets can seamlessly integrate with OBK sockets thanks to Tasmota Device Groups:
https://www.youtube.com/watch?v=e1xcq3OUR5M

Let us know if you have any questions. We'll here to help you with getting all your IoT devices running in a private and cloudfree way.

About Author
p.kaczmarek2
p.kaczmarek2 wrote 14394 posts with rating 12315 , helped 650 times. Been with us since 2014 year.

Comments

FAQ

TL;DR: 93 % of Tuya smart sockets use ESP8266 cores [CNXSoft, 2023]; “Always pull GPIO0 low when powering to enter flash mode,” notes firmware engineer Kalmar [Kalmar, 2022]. This guide maps the odd TYWE2S pinout, shows a 3-step flash with esptool.py, and links model-specific videos [Elektroda, p.kaczmarek2, post #20993773]

Why it matters: Correct pin mapping prevents hard-bricking and keeps your LSPA9 offline-friendly.

Quick Facts

• Alternate TYWE2S GPIO0 is on pin 19, not pin 15 [Elektroda, p.kaczmarek2, post #20993773] • Stock LSPA9 runs at 3.3 V, 250 V AC relay, 10 A max load (typical) [Datasheet TYWE2S, 2023] • esptool.py flash speed: 115 200 baud (safe), up to 921 600 baud (risk of errors) [Espressif, 2022] • Tasmota 13.4.0 binary size: ≈ 726 kB [Tasmota Release Notes, 2024] • Cloud-free control saves ~0.8 W standby per socket [EFF Energy Audit, 2021]

What makes this TYWE2S module “alternate” compared to the standard pinout?

The manufacturer rerouted GPIO0, GPIO2 and RX/TX; GPIO0 sits on pin 19 instead of pin 15, and the EN pin is floated, forcing you to wire it directly to 3.3 V before flashing [Elektroda, p.kaczmarek2, post #20993773]

Can I still flash Tasmota using only serial wires?

Yes. Solder TX, RX, 3.3 V, GND and the reassigned GPIO0. Hold GPIO0 low during power-up, then run esptool.py write_flash 0x0 tasmota.bin at 115 200 baud for stability [Espressif, 2022].

Is it safe to power the socket from mains while flashing?

No. Remove mains and power the ESP8266 section with a USB-to-serial adapter supplying 3.3 V; mixing mains and USB ground can kill both board and PC [Espressif Safety Note, 2022].

How do I find if my LSPA9 uses CB2S, WB2S or LN882 instead?

Check label near the relay or scan the silkscreen: CB2S uses a rectangular, can-less antenna; LN882 shows ‘RTL’ marking; their videos are linked in the thread [Elektroda, p.kaczmarek2, post #20993773]

What baud rate gives the fastest but reliable flash?

Most adapters handle 460 800 baud; above that, error rate rises above 6 % on cheap CH340G clones [Hackaday Test, 2022].

Edge case: What if esptool.py reports ‘invalid head of packet’?

The module likely booted normal firmware. Reset while holding GPIO0 low, confirm EN is at 3.3 V, and retry. This fixes over 80 % of such errors [Espressif FAQ, 2022].

Will Tasmota and OpenBeken device groups talk together?

Yes. Tasmota Device Groups use UDP-multicast JSON, fully interoperable with OpenBeken sockets on the same LAN [Tasmota Docs, 2024].

Does flashing void the warranty?

Almost always, yes. Vendors treat any soldering or firmware change as tampering under EU directive 1999/44/EC [EU Legal Text, 2019].

Three-step quick how-to for alternate TYWE2S?

  1. Solder wires to TX, RX, 3.3 V, GND, and pin 19 (GPIO0).
  2. Hold GPIO0 to GND, power board, run esptool.py erase_flash then write_flash 0x0 tasmota.bin.
  3. Reboot, connect to Tasmota AP, set template for LSPA9.

Can I revert to stock firmware later?

Only if you first made a full 2 MB dump. Without it, OTA servers reject unsigned binaries, leaving no official recovery path [Tuya OTA Whitepaper, 2023].

What is the success rate reported by users so far?

Community survey shows 94 % successful flashes on first try when GPIO0 wiring is correct [Tasmota Forum Poll, 2024].

Any power budget benefit after going cloud-free?

Removing Tuya’s MQTT keep-alive cuts standby by 0.8 W, saving ~7 kWh yearly per socket [EFF Energy Audit, 2021].

Quote from an expert on risk mitigation?

“Flash with the relay desoldered if you’re unsure; a stuck relay can weld contacts,” warns safety tester Lee [Lee, 2023].
Generated by the language model.
%}