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
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:
- FTD1232 Programmer
- Soldering Iron: MiniWare TS80P (review)
- Screwdriver: MiniWare ES15 (review)
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:
Sonoff SwitchMan | FTD programmer |
3V3 | Vcc/3.3v |
GND | GND |
RX | TX |
TX | RX |
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 1 | GPIO23 |
Relay 2 | GPIO19 |
Switch 1 | GPIO04 |
Switch 2 | GPIO15 |
LED PWM | GPIO18 |
LEDLink_i | GPIO05 |
Which you probably want to make your life easier and use a tasmota configuration template below.
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.