logo elektroda
logo elektroda
X
logo elektroda
Dostępna jest polska wersja

Czy wolisz polską wersję strony elektroda?

Nie, dziękuję Przekieruj mnie tam

TYWE2S without GPIO0? Alternative pinout and flashing Tasmota, ESP8285

p.kaczmarek2 10116 0

TL;DR

  • A new TYWE2S ESP8285 Tuya Wi‑Fi module variation from an LSPA9-like smart socket lacks the old GPIO0 pad and any silkscreen markings.
  • GPIO0 is routed to the old AD pad, while the remaining pads still match the classic TYWE2S pinout.
  • Flashing uses 3.3V, GND, RX, TX, and GPIO0, then runs `esptool.py write_flash 0 tasmota.bin`.
  • Pulling GPIO0 low at power-up enters bootloader mode, and disconnecting it lets Tasmota boot normally.
  • The main uncertainty is why Tuya changed the TYWE2S form factor, though this version still stays easy to flash.
Summary generated by AI based on the discussion content.
ADVERTISEMENT
📢 Listen (AI):
  • TYWE2S without GPIO0? Alternative pinout and flashing Tasmota, ESP8285
    Here I will show you how to flash a new version of TYWE2S (ESP8285) Tuya WiFi module. Old TYWE2S had GPIO0 pad on the back, but this TYWE2S comes without any extra pads and has no markings. I've received one in a LSPA9-like smart socket with BL0937 power metering. Here I will attach the full pinout and mapping of this module. This module is still very easy to flash, you just need to know the GPIO mapping, which I will show below.

    Let's start by looking at 'classic' TYWE2S, as per Tuya docs:
    TYWE2S without GPIO0? Alternative pinout and flashing Tasmota, ESP8285
    Pinout:
    Pin numberSymbolI/O typeFunction
    13V3PPower supply pin (3.3 V)
    2IO5I/OSame with module Silkscreen 05, GPIO_05, which corresponds to GPIO 5 (Pin 24 ) of IC
    3GNDPPower supply reference ground
    4IO4I/OSame with module Silkscreen 04, GPIO_04, which corresponds to GPIO 4 (Pin 16) of IC
    5RXI/OUART0_RXD (used to display the internal information of the module)
    6IO13I/OSame with module Silkscreen 13, GPIO_13, which corresponds to MTCK (Pin 12) of IC
    7TXI/OUART0_TXD (used to display the internal information of the module)
    8ADCAISame with module Silkscreen AD, ADC interface, a 10-bit-precision SAR ADC
    9IO12I/OSame with module Silkscreen 12, GPIO_12, which corresponds to MTDI (Pin 10 ) of IC
    10RSTI/OHardware reset pin (active low, a resistor has been pulled up internally)
    11IO14I/OSame with module Silkscreen 14, GPIO_14, which corresponds to MTMS (Pin 9 ) of IC

    Extra pads:
    Pin numberSymbolI/O typeFunction
    12IO4I/OGPIO_04, which corresponds to GPIO 4 (Pin 16) of IC
    13IO13I/OGPIO_13, which corresponds to MTCK (Pin 12) of IC
    14IO2I/OUART1_TXD, (an interface for displaying information about the module)
    15RSTI/OReset pin
    16IO5I/OGPIO_05, which corresponds to GPIO 5 (Pin 24) of IC
    17IO0I/OGPIO_0 (in the module power-on initialization process, use with caution)


    My flashing procedure here is very simple - solder 3.3V, GND, RX, TX and GPIO0, attach GPIO0 to ground and then connect power. Module will boot into bootloader mode, so esptool.py can be used to flash it:
    
    esptool.py write_flash 0 tasmota.bin
    

    Then you will have to disconnect it from power, disconnect IO0 from GND, and power it again, so Tasmota can run.

    But recently I have received a strange variation of TYWE2S:
    TYWE2S without GPIO0? Alternative pinout and flashing Tasmota, ESP8285
    It was in a no-name power metering socket in a LSPA9 shape.
    After desoldering, I realized that it has no markings:
    TYWE2S without GPIO0? Alternative pinout and flashing Tasmota, ESP8285
    TYWE2S without GPIO0? Alternative pinout and flashing Tasmota, ESP8285
    So I have opened ESP8285 datasheet and wrote down the pinout, in hope to find GPIO0 easily accessible:
    TYWE2S without GPIO0? Alternative pinout and flashing Tasmota, ESP8285
    The GPIO0 is in place of AD pin of old TYWE2S. This is new to me. It's good that it's still routed out.
    Remaining pads seem to match old TYWE2S. I don't know why Tuya made that change.

    Conclusion
    I haven't been aware about this TYWE2S variation up until now. At first I was worried that I will have to solder directly to QFN pad, but luckily the GPIO0 was routed out in the place of ADC pad. I don't know why Tuya changes TYWE2S form and is it indeed a new version of the module, but at least I know how to flash it with Tasmota easily.
    Have you also encountered a TYWE2S variation like that? Let me know in the comments!

    Cool? Ranking DIY
    Helpful post? Buy me a coffee.
    About Author
    p.kaczmarek2
    Moderator Smart Home
    Offline 
    p.kaczmarek2 wrote 14692 posts with rating 12720, helped 656 times. Been with us since 2014 year.
  • ADVERTISEMENT
📢 Listen (AI):

FAQ

TL;DR: For TYWE2S ESP8285 flashing, connect 5 lines and remember: "GPIO0 is in place of AD pin" on the unmarked newer module. This FAQ helps Tasmota users flash LSPA9-like sockets when the classic GPIO0 pad is missing. [#20557104] Why it matters: A missing GPIO0 label can look like a blocked firmware flash, but this variant still exposes GPIO0 on a usable pad.

Flashing detail Classic TYWE2S Newer unmarked TYWE2S
Main module pins 11 pins Same main pads appear to match
Extra pads documented 6 extra pads, including IO0 No extra pads visible
GPIO0 access Extra pad 17 marked IO0 Old ADC pad position
ADC pad role ADC input Used as GPIO0 for flashing
Example device found Tuya-style module reference LSPA9-like power metering socket

Key insight: The newer TYWE2S variant is still flashable with Tasmota. Use the pad where classic documentation shows ADC as GPIO0, then release it from GND after flashing.

Quick Facts

  • The classic TYWE2S pinout lists 11 edge pins: 3V3, IO5, GND, IO4, RX, IO13, TX, ADC, IO12, RST, and IO14. [#20557104]
  • The documented classic TYWE2S extra-pad area lists 6 pads, including IO0 as pad number 17. [#20557104]
  • Flashing uses 3.3 V power, GND, RX, TX, and GPIO0 pulled to GND before power is applied. [#20557104]
  • The module came from a no-name LSPA9-shaped smart socket with BL0937 power metering. [#20557104]
  • The working write command shown is esptool.py write_flash 0 tasmota.bin, writing the binary at flash offset 0. [#20557104]

How do you flash Tasmota onto a TYWE2S ESP8285 module that has no visible GPIO0 pad?

Flash it by using the old ADC pad position as GPIO0 on this unmarked TYWE2S variant.
  1. Solder 3.3 V, GND, RX, TX, and the GPIO0 pad.
  2. Tie GPIO0 to GND, then connect 3.3 V power.
  3. Run esptool.py write_flash 0 tasmota.bin, then remove power and release GPIO0 from GND. This puts the ESP8285 bootloader into flashing mode before Tasmota starts. [#20557104]

Where is GPIO0 located on the newer unmarked TYWE2S module compared with the classic TYWE2S pinout?

GPIO0 is located where the classic TYWE2S documentation shows the ADC pad. The thread states: "The GPIO0 is in place of AD pin of old TYWE2S." Classic TYWE2S documentation instead shows IO0 on extra pad number 17, separate from the ADC pin. This difference matters because the newer board has no visible extra GPIO0 pad. [#20557104]

What is the TYWE2S module and how is it related to the ESP8285 chip?

TYWE2S is a Tuya WiFi module built around the ESP8285 chip. "TYWE2S is a Tuya WiFi module that exposes ESP8285 power, UART, reset, ADC, and GPIO signals through module pads, letting smart sockets connect relays, metering chips, and serial flashing tools." The discussed module appeared in an LSPA9-like socket with BL0937 power metering. [#20557104]

What is GPIO0 used for when putting an ESP8285 or TYWE2S module into bootloader flashing mode?

GPIO0 selects bootloader flashing mode when it is held to GND during power-up. The thread describes attaching GPIO0 to ground, then connecting 3.3 V power. After that, esptool.py can write firmware. If GPIO0 stays grounded after flashing, the module remains in bootloader mode instead of starting Tasmota. [#20557104]

What is esptool.py and how is it used to write a Tasmota binary to an ESP8285 module?

esptool.py is the flashing tool used here to write tasmota.bin to the ESP8285 flash at offset 0. The exact command shown is esptool.py write_flash 0 tasmota.bin. The module must already be in bootloader mode, which requires GPIO0 tied to GND at power-on. [#20557104]

How should 3.3V, GND, RX, TX, and GPIO0 be connected when flashing a TYWE2S with Tasmota?

Connect 3.3 V to 3V3, GND to GND, serial RX and TX to the UART pads, and GPIO0 to GND before power-up. The classic pinout lists RX as pin 5 and TX as pin 7. The author solders all 5 required lines, then powers the module only after grounding GPIO0. [#20557104]

Why does the newer TYWE2S variant have GPIO0 where the old TYWE2S documentation shows the ADC pin?

The thread does not identify Tuya’s reason for moving GPIO0 to the old ADC pad location. The author explicitly says they do not know why Tuya made that change. The practical fact is clear: on this newer unmarked module, GPIO0 is still routed out and remains usable for Tasmota flashing. [#20557104]

Classic TYWE2S vs newer unmarked TYWE2S: what pinout differences matter when flashing firmware?

The flashing-critical difference is GPIO0 access. Classic TYWE2S documentation shows IO0 on extra pad 17, while the newer unmarked TYWE2S places GPIO0 at the old ADC pad position. The main pads, including 3V3, GND, RX, TX, and reset, appear to match the old TYWE2S layout. [#20557104]

How can I identify RX, TX, GND, 3.3V, reset, and GPIO pins on an unmarked TYWE2S module?

Identify them by matching the unmarked module pads to the classic TYWE2S pinout and ESP8285 datasheet mapping. The classic 11-pin order includes 3V3 at pin 1, GND at pin 3, RX at pin 5, TX at pin 7, and RST at pin 10. On the newer variant, treat the classic ADC pad position as GPIO0. [#20557104]

What should I do after flashing Tasmota if the TYWE2S stays in bootloader mode or does not start normally?

Disconnect power, remove the GPIO0-to-GND connection, and power the TYWE2S again. The flashing procedure requires GPIO0 grounded only during bootloader entry. If GPIO0 remains grounded, the ESP8285 keeps entering bootloader mode and Tasmota will not run normally after the write operation. [#20557104]

How can I safely desolder and flash a TYWE2S module from an LSPA9-style smart socket with BL0937 power metering?

Desolder the TYWE2S, identify the pads, then flash it on a 3.3 V serial setup. The thread’s module came from a no-name LSPA9-shaped socket with BL0937 power metering. After desoldering, the author found no markings, mapped the ESP8285 pins, and used GPIO0 at the old ADC pad position. [#20557104]

What is the BL0937 power metering chip and how does it relate to Tasmota configuration in smart sockets?

BL0937 is the power metering chip named in the socket that contained the TYWE2S module. "BL0937 is a power metering chip used in smart sockets to provide electrical measurement signals, while Tasmota needs matching GPIO assignments after flashing to use those metering functions." The thread does not provide the final Tasmota template. [#20557104]

What are the risks of soldering directly to ESP8285 QFN pads if GPIO0 is not routed to a TYWE2S module pad?

Direct QFN-pad soldering is a risky fallback when GPIO0 is not routed to an accessible module pad. The author initially worried they would need to solder directly to the ESP8285 QFN pad. They avoided that because GPIO0 was routed to the old ADC pad position on this variant. [#20557104]

Which Tasmota build or firmware file should be used for an ESP8285-based TYWE2S module?

Use the Tasmota binary file shown in the flashing command: tasmota.bin. The thread writes it with esptool.py write_flash 0 tasmota.bin to an ESP8285-based TYWE2S module. It does not compare multiple Tasmota builds or name a special ESP8285-only file. [#20557104]

How can I configure Tasmota after flashing a no-name LSPA9-like power metering socket using a TYWE2S and BL0937?

Configure Tasmota by mapping the socket’s GPIO functions after the firmware boots. The thread confirms the hardware context: TYWE2S, ESP8285, LSPA9-like socket shape, and BL0937 power metering. It does not provide a complete Tasmota template, relay GPIO, LED GPIO, button GPIO, or BL0937 pin assignment. [#20557104]
Summary generated by AI based on the discussion content.
ADVERTISEMENT