HomeHome AutomationFlashing Tasmota on Sonoff SwitchMan

Flashing Tasmota on Sonoff SwitchMan

Making Sonoff SwitchMan - mine!

Every ITEAD device without Sonoff DIY on my shelf ends up being flashed with Tasmota sooner or later. As I tested everything there is in the normal operation of the Sonoff SwitchMan (review) with the eWeLink app, it’s time to do the obvious – flash it with Tasmota, probe it until I find the right config (unless one is available online already) and share my findings with you lot.

Flashing Sonoff SwitchMan

Sonoff SwitchMan M5  2C rocking tasmota
Sonoff SwitchMan M5 2C rocking tasmota

I opened it before, so I know the PCB is easy to access. A dedicated header will also make things simpler. While I will use my trusted MiniWare TS80P soldering iron to add the wires to respective pads on the header, I read recently about using a fishing thread and the breadboard wires to secure a nice tight fit without breaking conductivity.

Thread a piece of fishing line to pad the header’s hole and slot in the breadboard wire for a nice tight fit. This way, you should be able to flash tasmota without using a soldering iron. If you don’t own a fishing line, then you may as well take this opportunity and treat yourself to a soldering iron. Something tells me this is not the last device you will ever flash.

Suggested flashing tools:

Mandatory warning: Whatever you do next, it’s on you. I hold no responsibility for your actions! Do not do this with Sonoff SwitchMan powered to mains. FTD has enough juice to keep ESP32 operational.

Follow the table below to connect your FTD1232 (or similar) to Sonoff SwitchMan:

Nicely exposed header - perfect for flashing Sonoff SwitchMan
Nicely exposed header – perfect for flashing Sonoff SwitchMan
Sonoff SwitchManFTD programmer

The GPIO00 needs to be shorted to GND on power to enter the flash mode. You can do that with a spare cable. It only needs to be pulled to the ground for a second as you power it on. Anyone with SwitchMan 1 & 3 gang configurations should have the GPIO00 linked to the button (or middle button for a 3 gang version) and can press and hold these to enter the flash mode.

As we are dealing with ESP32, Tasmotizer isn’t going to be helpful (it’s for ESP8266), so the next best thing is the ESP-Flasher. Download tasmota32.bin release from the repo and you can start flashing Sonoff SwitchMan. (it’s a good idea to make a backup if you ever want to revert, but for this you need ESPtools).

Once flashed, assemble the device, power it on and look for tasmota-xxxx SSID created. Connect to its IP address: and configure the WiFi with your network credentials.

After probing the board, I mapped the switches to K1-K3 and relays to RY1-R3. It looks like LED’s controls are fixed with the state of the relay, with separate LED_WIFI and LED_PWM responsible for LED brightness and LED network indicator.

I mapped these with ESP datasheet for my 2 gang Sonoff SwitchMan module:

Relay 1GPIO23
Relay 2GPIO19
Switch 1GPIO04
Switch 2GPIO15

Which you probably want to make your life easier and use a tasmota configuration template below.

Tasmota screen on Sonoff SwitchMan
Tasmota screen on Sonoff SwitchMan
SwitchMan 1 gang
{"NAME":"Sonoff SwitchMan 1C","GPIO":[32,0,0,0,0,576,0,0,0,0,0,0,0,0,416,0,0,0,224,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"FLAG":0,"BASE":1}
SwitchMan 2 gang
{"NAME":"Sonoff SwitchMan 2G","GPIO":[0,0,0,0,32,576,0,0,0,0,0,33,0,0,416,225,0,0,0,224,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"FLAG":0,"BASE":1}
SwitchMan 3 gang
{"NAME":"Sonoff SwitchMan 3G","GPIO":[33,0,0,0,32,576,0,0,0,0,0,34,0,0,416,225,0,0,226,224,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"FLAG":0,"BASE":1}

I had issues mapping the behaviour of the LED since these also come with dimming and WiFi links. Setting GPIO18 to a PWM signal enables dimming. It’s nice to have the ability to turn the LEDs off completely, but I was not able to configure the WiFi indicator correctly.

From there onwards it’s plain sailing with using Tasmota on the Sonoff SwitchMan M5 series switch. If you are new to tasmota, I have a post showing you the ropes and introducing you to MQTT and REST connectivity.

Final thoughts

Flashing Sonoff SwitchMan is easy and you can enjoy a tasmotised device within minutes. I hope this guide will give you a headstart on your home automation! Let me know how it goes and if you bought one with more gangs, you can always map these with the n+1 principle in mind. Just check out this post for a complete project. Let me know if you had any issues in this Reddit thread.


Nothing says "Thank you" better than keeping my coffee jar topped up!


Support me on Patreon and get an early access to tutorial files and videos.


Bitcoin (BTC)

Use this QR to keep me caffeinated with BTC: 1FwFqqh71mUTENcRe9q4s9AWFgoc8BA9ZU

Smart Ideas with

Automate your space in with these ecosystems and integrate it with other automation services


Learn NodeRED

NodeRED for beginners: 1. Why do you need a NodeRED server?

To server or not to server? That's a very silly question!

Best Automation Projects

Tuya SDK for beginners: Intro to Tuya Cloud API

Working with Tuya Cloud API. A guide to Cloud automation for beginners, get started with REST!

NEST your old thermostat under $5

Nest-ing up your older thermostat under $5

Sonoff Zigbee Bridge – review

Sonoff line up will soon include Sonoff Zigbee Bridge and more Zigbee sensors - here is the first look

DIY Smart Washing Machine – for about 15 bucks!

Learn how to add washing machine notifications to your Google Home on the cheap

Nora – Google Assistant in NodeRED

Integrate Google Assistant with NodeRED thanks to Nora - NodeRED home automation

Smart Home

I should’ve read the manual: Imilab C22

Testing Imilab C22 - an indoor IP camera with AI features

Is Sonoff TRV worth the $26.90?

ITEAD has released a new device! This time it's the Sonoff TRV. Should you get one for your smart heating system?

SwitchBot Curtain 3 is silent, but there is a catch

SwitchBot Curtain 3 brings new design, more power and silent operation to your home automation - how quiet is it?

Are new Sonoff ZigBee sensors better?

ITEAD released new Sonoff ZigBee 3.0 sensors. The new design brings changes. Will this affect the accuracy and reporting rate? Let's find out

Sonoff MINIR4M works with everything.

ITEAD has released their first Matter compatible device. It won't change everything, but it will certainly change one thing. Everything you need to know about Sonoff MINIR4M