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
3V3Vcc/3.3v
GNDGND
RXTX
TXRX

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: 192.168.4.1 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
LED PWMGPIO18
LEDLink_iGPIO05

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.

PayPal

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

Patreon

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

image/svg+xml

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

client-image
client-image
client-image
client-image
client-image
client-image
client-image
client-image
client-image

Learn NodeRED

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

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

Best Automation Projects

Tuya SDK for beginners: Intro to Tuya Cloud API

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

NEST your old thermostat under $5

0
Nest-ing up your older thermostat under $5

Sonoff Zigbee Bridge – review

0
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!

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

Nora – Google Assistant in NodeRED

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

Smart Home

Multi-lights for your ceiling from Aqara

0
This is the biggest light I held in my hands so far. It's ZigBee and it comes from Aqara - meet Aqara Ceiling Light T1M

Almost the fastest PIR sensor you can buy

0
ITEAD introduced a new ZigBee sensor - Sonoff PIR (SNZB-03P) which is also the fastest PIR sensor in their line up. Is it good? Read more!

Smart Panel automation by Tuya

0
I'm checking out two smart panels by Tuya. Both run Linux systems, fit inside the wall switch cavity and offer a range of automation options

Adding Matter to Sonoff BasicR4

0
Sonoff goes back to basics with Sonoff BasciR4 - a new and improved basic smart relay - and I'm about to add Matter to it (and Tasmota)

Sonoff Presence Sensor (SNZB-06P) is not what you think

0
This mm wave radar sensor combines cool tech and ZigBee 3.0, but it's not what you think it is. Closer look at Sonoff Presence Sensor