Welcome to our Knowledge Base
Flash Sonoff Mini with Tasmota OTA
Preinstall Setup
- Verify and/or update eWelink firmware version
- If quick pairing doesn’t work, use alternative pairing method
- Prerequisite Tools Installation
- Enter DIY Mode
- Enter Unlock OTA mode
Prerequisite Steps
- Install Rester extension in Chrome or Firefox or any other preferred tool to perform REST API operations.
- Setup Local Firmware File Server
1. Enter DIY mode
Guide originally from @Brunas
- Power on;
- Long press the button for 5 seconds for entering Compatible Pairing Mode (AP) User tips: If the device has been paired with eWeLink APP, reset the device is necessary by long press the pairing button for 5 seconds, then press another 5 seconds for entering Compatible Pairing Mode (AP)
- The LED indicator will blink continuously;
- From mobile phone or PC WiFi setting, an Access Point of the device named ITEAD-XXXXXXXX will be found, connect it with default password 12345678
- Open the browser and access http://10.10.7.1/
- Next, Fill in WiFi SSID and password that the device would have connected with
- Succeed, Now the device is in DIY mode.
Note: Follow instructions how to enter DIY mode from Sonoff.
It may be necessary to change IP address to 10.10.7.2, 255.0.0.0 with gateway 10.10.7.1 in adapter TCP/IPv4 settings to access that IP address.
2. Unlock OTA Mode
- Find IP address of your Sonoff Mini device. MAC Vendor most likely is Espressif, name “ESP_XXXXXX”, and the device has 8081 port open.
- Install Rester extension in Chrome or Firefox or any other preferred tool to perform REST API operations.
- To test your device DIY mode create new request in Rester:Method: POST
- URL: http://<IP of your device>:8081/zeroconf/info
- Body:
{"data": {}} - You might need to add Header Content-Type with value application/json
- Press SEND
- If all is OK, status code 200 should be returned with bunch of data:
{
"seq": 4,
"error": 0,
"data": {
"switch": "off",
"startup": "off",
"pulse": "off",
"pulseWidth": 500,
"ssid": "Parsons_IoT",
"otaUnlock": false,
"fwVersion": "3.6.0",
"deviceid": "1000a4e9d5",
"bssid": "e0:63:da:3d:22:31",
"signalStrength": -53
}
}
Enter unlock OTA Mode:
- Method: POST
- URL: http://<IP of your device>:8081/zeroconf/ota_unlock
- Body:
{"data": {}} - You might need to add Header Content-Type with value application/json
- Press SEND
- You should get status code 200
- Optionally for curiosity you could retry info query to check if otaUnlock value now is true
Setup Local Firmware File Server
- Install file browser
Note: Not sure if pointing the firmware URL directly to Github raw binary (and therefore skipping this step) would work.
I used Docker-based Nginx server to quickly serve the file the right way (look at the end of the article for details on why I chose Nginx server).
docker run -p 8002:80 \
-v ~/Downloads/sonoff-mini-flash/:/opt/www/files/ \
config backup/Device Firmware/Tasmota/Tasmota bins
- download latest tasmota firmware at http://ota.tasmota.com/tasmota/
- Get sha256sum value https://emn178.github.io/online-tools/sha256_checksum.html
- check http://localhost:8000 if the firmware file is available.
Flash Initial Firmware
Send POST request to http://{{sonoffURL}}/zeroconf/ota_flash with payload
{
"deviceid": "",
"data": {
"downloadUrl": "http://FILE_SERVER_IP/files/tasmota-lite.bin",
"sha256sum": "FIRMWARE_SHA256_HASH"
}
}
EXAMPLE
{
"deviceid": "",
"data": {
"downloadUrl": "http://192.168.1.10:8002/files/tasmota-lite.bin",
"sha256sum": "fdc4dfdd8fd870cb25df32c89264aec119767cab47aeb2fff45616fd5e7ff6ad"
}
}
where:
FILE_SERVER_IPis IP address of your computer (i.e. the server where you have tasmota-lite.bin served from)FIRMWARE_SHA256_HASHis SHA-256 hash of the tasmota-lite.bin file
When you execute this API call, you should get success response immediately.
You can now observe log from Docker Nginx server and see how Sonoff Mini is fetching firmware chunks.
Post Installation Setup
Configuration Details
Once the desired firmware is on the device, continue the regular Tasmota setup process.
- Connect to the sonoff itead network
- Enter WIFI SSID and Password
- Connect to sonoff IP and configure with Tasmota WEB UI
Sonoff Mini Relay

| GPIO # | Component |
|---|---|
| GPIO00 | Button1 |
| GPIO01 | None |
| GPIO02 | None |
| GPIO03 | None |
| GPIO04 | Switch1 |
| GPIO05 | None |
| GPIO09 | None |
| GPIO10 | None |
| GPIO12 | Relay1 |
| GPIO13 | Led1i |
| GPIO14 | None |
| GPIO15 | None |
| GPIO16 | User |
| FLAG | None |
{"NAME":"Sonoff Mini","GPIO":[17,0,0,0,9,0,0,0,21,56,0,0,255],"FLAG":0,"BASE":1}
References
- https://tasmota.github.io/docs/Sonoff-DIY/
- https://tasmota.github.io/docs/#/installation/
- https://tasmota.github.io/docs/#/Home
- https://blog.lukaskukacka.com/smarthome/2020/09/09/sonoff-mini-firmware-3.6-flashing-tasmota.html
- https://github.com/mohamnag/nginx-file-browser
- https://github.com/arendst/Tasmota/wiki/Sonoff-Mini
- https://emn178.github.io/online-tools/sha256_checksum.html