Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Clone this wiki locally
You need to make the serial programming interface of the Sonoff module / the ESP8266 microchip available. In most cases the pins are available on the PCB but connectors need to be soldered or otherwise applied to allow interfacing. You'll furthermore need a USB UART TTL 3.3V Converter/Programmer (e.g. CP2102, CH340G, FT232, PL2303) (or if available use your RaspberryPi).
Be careful - some so called 3V3 FTDI cables actually supply 5v on the VCC line. I suggest you measure before connecting to your Sonoff.
Do not connect AC power and the serial connection at the same time
Shorting your serial interface with AC will fry your module or programmer and may also harm or destroy your PC. If you are not careful, your own health might be in danger. Always make sure to have all high power cables disconnected from the Sonoff module while being connected via serial/USB or even while the case of the module is opened.
The following table shows the connection between the connectors of the programmer and the modules. Pay attention to crossed RX and TX lines.
|3V3||3V3 / VCC|
Some Sonoff modules expose a five pin header. The fifth pin is irrelevant for the serial connection. Please check the specific module pages to find out more.
Bringing the Module in Flash Mode
The "brain" of the Sonoff module (normally the ESP8266) needs to be put into Flash Mode before the Sonoff-Tasmota firmware can be transferred. This is done by pulling the GPIO0 pin to GND while the chip is booting. On most modules the installed control button is connected to GPIO0 and GND, making entering Flash Mode very easy. On other modules you will need to connect pins on the PCB. See device specific articles for details.
To bring a Sonoff module into Flash Mode:
- Disconnect serial programmer and power
- Connect GPIO0 and GND (e.g., by pressing the on-board button or connection via cable)
- Connect the serial programmer (VCC, RX, TX, GND), e.g. by connecting the belonging USB cable
- Disconnect GPIO0 from GND (after one-two seconds)
If everything went well, you are now in Flash Mode and ready to continue with the Sonoff-Tasmota firmware Upload. If the upload is not able to start, disconnect the module and start the hardware preparations from the beginning.
Module Specific Articles
Check the module specific instructions and restrictions documented in the device specific articles linked in the menu on the right 🡺