HomeHome AutomationSonoff MiniR4 Extreme released and flashed with Tasmota

Sonoff MiniR4 Extreme released and flashed with Tasmota

Let's flash it with Tasmota

The wait is over. Sonoff MiniR4 Extreme has been released today and you can get one for yourself from the Itead store – it will cost you $9.90. I held off with the Tasmota flashing guide, as things on the internet are short-lived and no one but a handful of privileged influencers had one at home. Now, that you can get one for yourself – let’s talk Tasmota. If you are interested to see what you going to give up – check out my original article which covers the use of the single channel relay with eWeLink.

Sonoff MiniR4 Extreme and custom firmware

Things have changed a little in the Tasmota world, so I’ll be trying the new web tool to get the process accomplished. It worked great with my other ESP32 boards it should work just fine to flash Tasmota on Sonoff MiniR4 Extreme. If only, someone had the time to port the excellent Tasmotizer to support ESP32 boards for all-in-one flashing needs.

From my original teardown, I know that Sonoff MiniR4 Extreme uses ESP32 to connect to the internet and control the logic for the single-channel relay inside. It’s located on a small daughter board soldered at a 90-degree angle. As the daughter board comes with dev pads linked to the pins responsible for flashing firmware – my job today is much easier.

Tools

You’ll need a soldering iron and FTD Flasher to complete the process. Take my advice and don’t cheap out on the FTD flasher. I have far too many emails that report issues during the flash process, usually solved using a more robust serial adapter. While you are splashing out, it would be a miss not to plug the MiniWare TS101 as the soldering iron of choice. The recently acquired JimiHome tool set also comes in handy if you take apart a lot of electronics.

One more shill from me: a multimeter is a must if you want to learn more about devices like Sonoff MiniR4 Extreme, although not needed for this guide. It’s nice to have a professional one, but inexpensive multimeters that measure DC and have continuity are what you need. I have been using ANENG AN8008 (best £10 spent) – which is perfect. It’s what I used to confirm the pin layout.

GPIO hunt

The switch is as simple as they get. Only a couple of inputs/outputs and ESP32-DOWD-V3 are in charge. To find out what’s what, I need a datasheet for this IC. As the most important pins are already exposed as dev pads, I just need to confirm where is VCC. A quick probe of the VDDA 1 pin reveals the connection to the U2 pad on the underside of the main board.

It’s time to wire things out according to the table below:

FTD SerialSonoff MiniR4 Extreme
VCC (3.3V)U2
GNDGND
RXTX
TXRX

I soldered up a couple of wires (a good colour scheme helps) to the dev pads of the Sonoff MiniR4 Extreme – with connectors for the pins from my FTD1232 module. To enter the bootloader mode, you have to hold the button located on the daughter board (mapped to GPIO00) as you power the Sonoff MiniR4 Extreme. After that, you can start flashing.

Flashing Tasmota on Sonoff MiniR4 Extreme

You will lose the original firmware, and without a backup, you won’t be able to restore it back as it’s linked to the MAC address of the device. The web tool won’t create a backup for you – for that, you need to use a CLI tool to backup, erase and flash new firmware. I’m not going back, so the web interface for flashing Tasmota on Sonoff MiniR4 Extreme is just fine for me.

Open the Tasmota flash tool web interface (link) and connect your Sonoff MiniR4 Extreme in the bootloader mode (hold down the button as you connect the module to power). Do not power the module with mains. Your FTD module will supply enough current unless you have a dodgy module or your USB socket is not able to deliver 500mA of current.

Select tasmota.bin (the tool will show you compatible ESP ICs) and start the process. It should take about 3 min to complete. At this point, your Sonoff device will reboot and if you have enough juice in your FTD1232 adapter it might even display a WiFi access point. If that doesn’t happen, don’t worry.

Setting it up

De-solder the wires, close up the unit, and power on Sonoff MiniR4 Extreme again via mains – it should advertise SSID with tasmota in its name. I know it’s tempting to leave the FTD adapter connected just in case, but don’t do that!

Once connected to Tasmota AP – visit 192.168.4.1 in your browser, enter your WiFi credentials and your Tasmotized Sonoff MiniR4 Extreme will reboot again. You should be able to find it on the network with a tool like Fing App.

Mapping outputs

Your device has Tasmota, but it doesn’t know everything about the hardware. Visit the configuration menu to set it up. There are 2 ways of finding what’s what – the tedious way – probing each component on the board and tracing it back to ESP32 then looking it up in the datasheet, or if you have flashed enough of these, you know which pins are likely used for what.

If you want to learn how to find the pins, read more. Otherwise, just use the template below to configure everything:

{"NAME":"Sonoff MiniR4 Extreme","GPIO":[32,1,1,1,1,1,1,1,0,1,1,1,1,1,1,576,0,1,1,1,0,1,224,160,0,0,0,0,1,1,1,1,1,0,0,1],"FLAG":0,"BASE":1}

Start with pins labelled as GPIO in the datasheet, as these are likely to be used first. After blindly trying a couple in the range of 20-30 I quickly found that the relay and switch are mapped to GPIO26 and GPIO27. I already knew about the physical button linked to the GPIO00 – what gave me a couple of tries to find was the LED – which is assigned to GPIO19.

Relay 1GPIO26
Switch 1GPIO27
Button 1GPIO00
LED (inverted)GPIO19

There is no golden rule. To find all pins takes a little time and patience. It’s good to make notes as you go, in case you forget which pins have been checked and tested by you.

Shop with Sonoff

Take a look at the ZigBee and WiFi range of the devices compatible with eWeLink:

Final Thoughts

Now that you flashed Tasmota on Sonoff MiniR4 Extreme, you can enjoy REST, MQTT and more integrations. If you don’t have your relay yet – visit the ITEAD store and get one for yourself. Alternatively, if ZigBee is your thing, check out the article on MiniR4’s twin: Sonoff ZBMiniL2 – a no-neutral in-wall switch that uses ZigBee protocol instead. There is a care package from ITEAD coming my way with some interesting devices, so if you want to know what’s next – keep in touch! If you have any questions, feel free to leave them in this Reddit thread.

🆓📈 – See the transparency note for details.

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

Nora – Google Assistant in NodeRED

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

DIY Smart Washing Machine – for about 15 bucks!

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

Smart Home

I damaged the cheapest Smart Socket with power metering for you

0
Sonoff S60 has an exeptional price for a smart socket with a power meter - I decided to check it out and see how flashable it is

The end of Tasmota? Sonoff SwitchMan M5 Matter

0
These are one of the least expensive Matter devices to automate your lights. Will Sonoff SwitchMan M5 Matter put an end to Tasmota?

Meros TRV to the rescue?

0
I got my hands on another TRV - this time from Meross. I heard good things about the brand so I wanted to see if Meross TRV would be good to manage smart heating.

Aqara brings Thread sensors but…

0
Aqara brings new Thread sensors to their ecosystem. First sensors to support Matter this way are Aqara Motion and Light Sensor P2 and Aqara Contact Sensor P2

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