Basics project 109e How to flash SONOFF mini with Tasmota firmware using Tasmotizer


Basics: Project 109e

Project name:  How to flash SONOFF mini with Tasmota firmware using Tasmotizer

Tags: SONOFF Mini, SONOFF, Tasmota Firmware, Tasmotizer, USB TTL converter

Attachments: NONE

In this project, you needed these parts (Dear visitors. You can support our project buy clicking on the links of parts and buying them or donate us to keep this website alive. Thank you):

1. SONOFF mini 1 pc

sonoff mini

2. AC lamp power cord with switch 1 pc

sonoff mini

3. Jumper cables F-M 4 pcs

jumper cables

4. USB to TTL /Serial adaptor/converter 1 pc

usb to ttl
usb to ttl

General

We will learn how to flash SONOFF mini with Tasmota firmware using USB to TTL converter. The SONOFF mini is using the ITEAD manufacturer cloud solution and requires an online account. The purpose of this project is to release the SONOFF mini from this integration by replacing the original firmware with the Tasmota open source firmware. When you do that, you can easily integrate and control the switch in any open source home automation setup (home assistant or openhub, for example. (Please note when you do this your eWeLink app will not work with your SONOFF mini)

Understanding the Tasmota

Tasmota is an alternative firmware for ESP8266 based devices with easy configuration using webUI, OTA updates, automation using timers or rules, expandability and entirely local control over MQTT, HTTP, Serial or KNX. Written for Arduino IDE and PlatformIO.

It was initially written for Sonoff devices, but it supports devices from many other brands like Electrodragon, MagicHome, AriLux, Blitzwolf, and Allterco. You can also install it on development boards like the Wemos D1 mini and the ESP8266 NodeMCU.

You can read more about it here.

Understanding the Tasmotizer

The full-featured flashing tool for Tasmota. With the great ESPtool from Espressif under the hood, and all required settings by default.

Features:

  • Automatic backup of current ESP image before flashing: in case you want to return to manufacturer firmware
  • Flash local .bin images, or simply select from release or development images: it will download them automatically
  • Send configuration to flashed device via serial: one-click configure of Wifi (including recovery AP), MQTT, Module and/or Template
  • Dark theme: proven to increase flashing speed and reliability

You can install it on Windows, Linux or Mac. Read more about it here.

Understanding the SONOFF mini

This is a mini and compact DIY smart switch used for different kinds of switch boxes, even the smallest EU standard switch box. Convenient to automate your home appliances with eWeLink app through your smartphone or tablet or your voice command. Support to connect an external rocker light switch unable to automatically spring back for easily managing connected devices in your home, both on your phone or directly from the wall. It supports the DIY mode (designed for developers) which allows users to integrate MINI into worldwide third-party open source smart home control system to achieve LAN control without cloud service, such as Home Assistant, openHAB, ioBroker .etc.

Features:

  • Control your home appliances with the app.
  • Ask devices to turn on/off just by a voice command.
  • Set a time for devices to make it start or stop running automatically.
  • Allow developers to flash the firmware to access more features they want.
  • Support the rocker light switch to control devices (self-return switch not included).
  • Create smart scenes to trigger groups of SONOFF devices on/off via tapping on your phone.
  • Make an action to trigger another or receive a message alert to your phone.
  • Share the device with your family to control it together.
  • Check the device status change on your phone in real time.
  • Run the device on your phone albeit no normal Wi-Fi connection.
  • Keep the device in the status before power failure when the electricity system is restored.

Specifications:

  • Input: AC 100-240V 50/60Hz 10A Max;
  • Output: AC 100-240V 50/60Hz 10A Max;
  • Wi-Fi: IEEE 802.11 b/g/n 2.4GHZ;
  • Material: PC V0;
  • Dimension: 42.6X42.6X20mm;

You can download Quick Installation Guide, User Manual. You can read more about it here.

Tasmota can be flashed on this device via OTA using the Sonoff DIY feature.

Several free GPIOs are available. The OTA jumper pin is the most accessible and very easy to use on a pin header.

Signals and connections of the SONOFF mini

sonoff mini
Image credit: Tasmota
SONOFF mini
Image credit: Tasmota

GPIO0 – Button

GPIO1-TX

GPIO2- Available

GPIO3 -RX

GPIO4 – S2 (external switch input)

GPIO12 – Relay and red LED

GPIO13 – Blue LED

GPIO16 – OTA jumper pin

GND – S1 (external switch input)

sonoff mini

Wiring

tasmota sonoff mini

Step by Step instruction

1.Preparation

1. Please note that you have several options to download and install the Tasmotizer: Option 1: get Windows standalone executable, Option 2: pip3 install tasmotizer and then simply run tasmotizer.py from the shell/command line; Option 3: Clone the repo, pip3 install PyQt5 pyserial followed by python3 tasmotizer.py and flash away!

2. Go to Github and download the latest release of Tasmotizer. As we are using the Windows 7 64Bits OS version – we download tasmotizer-1.1a.exe.

tasmota

3.Please note that you do not need to install it.

4. Go to Github and download the latest version of tasmota-lite.bin.

tasmota sonoff mini

2. Flashing

1. Make sure that your SONOFF mini is not connected to mains power. DISCONNECT MAINS POWER, WHEN MAINS POWER CONNECTED COVER BOX MUST BE CLOSED!

sonoff mini

2. Open the white cover.

sonoff mini

3.Do wiring. You will need to solder jumper cables.

tasmota sonoff mini
tasmota sonoff mini

4.Press and hold the configuration button/manual switch and plug in your USB to TTL converter to your PC USB port.

5.Double click on tasmotizer-1.1a.exe. tasmotizer-1.1a.exe and tasmota-kite.bin should be in the same folder of your PC. Select port (we have COM7, where the USB to TTL attached to) and select image type (bin) and image – tasmota-lite.bin. Click on Tasmotize button.

tasmota sonoff mini

6.The flashing process starts.

7. When the flashing process completed click on OK button.

tasmota sonoff mini

3. Configuring

1.Close the white cover and prepare your SONOFF mini to connect to mains power. Blue wire (N, neutral) and Brown wire (L, live).

sonoff mini

2. Connect your SONOFF mini to the mains power. The tasmota_xxxxxx-xxxx SSID should be available.

tasmoto sonoff mini

3.Connect to the tasmota_xxxxxx-xxxx network. Go to any web browser and type the http://192.168.4.1.

tasmota sonoff mini
tasmota sonoff mini

4.Now we can configure the Wifi network. Click Scan for networks and select your own Wifi network.

tasmota sonoff mini

5.Type your Wifi network password and click on Save button. The SONOFF mini reboots and connects your network.

tasmota sonoff mini

6.Use a program like Advance IP scanner to find the IP of you SONOFF mini or check your routers DHCP list.

tasmota sonoff mini

7.Type your SONOFF mini IP address in any web browser (in our case 192.168.1.149). The Tasmota GUI appears.

8.Click on Configuration. Then click on Configure Module.

tasmota sonoff mini

9.Set these Settings:

tasmota sonoff mini

Module type: Generic (0)
D3 GPIO0 Button1: Button1 (17)
D2 GPIO04: Switch1 (9)
D6 GPIO12 Relay1: Relay1 (21)
D7 GPIO13 Led1i: Led1 (52)

tasmota sonoff mini

10.Click on Save and the SONOFF mini will reboot.

sonoff mini tasmota

11. Congrats. Your SONOFF mini is ready for use.

Summary

We have learnt how to flash SONOFF mini with Tasmota firmware using USB to TTL converter.

Thank you for reading and supporting us.

Libraries:

  • No libraries required for this project

Project resources:

  • See attachments on the beginning of this project description

AcoptexCom

Leave a Reply

Your email address will not be published.