Emil CHERICHES

Emil CHERICHES

Sonoff Mini

Flash Tasmota on the Sonoff Mini – Linux user experience

August 14, 2020 Emil C
No Comments

The module supports the new DIY mode from Itead. This is probably a good ideea poorly implemented. The firmware on itself uses a kind of restfull API which is much slower than MQTT and more important Home Assistant does not yet support it (at leas not natively).

The initial version of the DIY mode needed a tiny jumper to be installed on the board itself, but since version 3.5.0 of the Itead’s software there’s no need for the jumper anymore. In order to flash it we need to install a local web server, a basic one (my choice this time was nginx). Being on Ubuntu the installation is very simple:

sudo apt install nginx

Then copy the tasmota firmware in the web folder.

sudo cd /var/www/html
sudo wget http://thehackbox.org/tasmota/tasmota-lite.bin
sha256sum tasmota-lite.bin

Remember the sha256sum of the file as it’s needed further.

Here are a few steps, on how to flash Tasmota (Open Source firmware that works very well on this device).

Unbox the mini and plug it in. Run the eWelink App on your Android phone to connect to the module.

After the module is connected, update the firmware to the latest version. After you update the firmware just disconnect the device. This will do a factory reset it.

After the device restarts press and hold on the button (on the module itself) until the LED blinks continuously. Few seconds afterwords you should see a wifi network called ITEAD-<deviceid>. Connect to it, the password is “12345678”. Then from your favorite browser open http://10.10.7.1

Set up your Local WIfi password and let the module connect to your wifi network. After the device is connected, try to find it’s IP address. you’ll find that it has port 8081 open, accepting HTTP POST commands. In this example my device has the IP 192.168.3.158

Now we need to query the device for some basic information:

curl http://192.168.3.158:8081/zeroconf/info -XPOST --data '{"deviceid":"","data":{} }'

We can now see that there’s a flag “otaUnlock” that is false, meaning we won’t be able to flash it, so we need to unlock it. To do so we send the following command:

curl http://192.168.3.158:8081/zeroconf/ota_unlock -XPOST --data '{"deviceid":"1000b6b3df","data":{} }'

Don’t forget to put your own deviceid.

The next step is the flashing process itself, yet another command:

curl http://192.168.3.158:8081/zeroconf/ota_flash -XPOST --data '{"deviceid":"1000b6742f","data":{"downloadUrl": "http://192.168.3.104/tasmota-lite.bin", "sha256sum": "fd99857f87f447a77dbb5e2000ef1ffd05373b54f1cc3cc966448a1d2a0a7774"} }'

Check your deviceid and sha256sum. The downloadUrl is actually your own local nginx install with the bin file accessible.

Now if you check your webserver log you’ll get something like this:

When you get the last line you can already check your wireless networks for an “tasmota-id” ssid.

After your device is connected to the network I suggest you do a “Firmware upgrade” in order to get the full firmware.

Enjoy!

Smart Home linuxNginxSonoffTasmotaubuntu
Previous Post

DokuWiki a simple solution to sorting documentation

Leave a Reply Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Recent Posts
  • Flash Tasmota on the Sonoff Mini – Linux user experience
  • DokuWiki a simple solution to sorting documentation
  • I discovered Wireguard
  • Using Let’s Encrypt with CentOS (for now)
  • Let’s Encrypt is Trusted
Categories
  • from the web
  • just blog
  • linux
    • Mail Server Series
  • News
  • phones
  • Phones & Tablets
  • programing
  • security
  • Smart Home
  • Tips & Tricks
  • Uncategorized
  • Web development
  • Windows
Blogroll
  • cheriches.fr
Subscribe by Email
Recent Posts
  • Flash Tasmota on the Sonoff Mini – Linux user experience
  • DokuWiki a simple solution to sorting documentation
  • I discovered Wireguard
  • Using Let’s Encrypt with CentOS (for now)
  • Let’s Encrypt is Trusted
Categories
  • from the web (3)
  • just blog (1)
  • linux (23)
    • Mail Server Series (7)
  • News (1)
  • phones (1)
  • Phones & Tablets (2)
  • programing (1)
  • security (2)
  • Smart Home (1)
  • Tips & Tricks (15)
  • Uncategorized (3)
  • Web development (1)
  • Windows (1)
Blogroll
  • cheriches.fr
Tags cloud
adb ADS aircrack-ng Android Apache apt-get CentOS Chrome ClamAV Cluster CSS Debconf debian DKIM Dovecot EasyRSA EPEL Firefox Firewall GNOME High Availability iptables KVM linux MariaDB Milter MySQL Nginx php Postfix Postfix Admin Proxy_ARP Python release Roundcube Samba SELinux Sonoff SpamAssassin ssh Tasmota ubuntu VRRP windows Youtube
Recent Comments
  • Frank on Dedicated Mail Server Hosting Multiple Domains – Step 3 – Postfix and Dovecot
  • Andrew Schott on Dedicated Mail Server Hosting Multiple Domains – Step 3 – Postfix and Dovecot
  • Emil C on Dedicated Mail Server Hosting Multiple Domains – Step 3 – Postfix and Dovecot
  • Andrew Schott on Dedicated Mail Server Hosting Multiple Domains – Step 3 – Postfix and Dovecot
  • Emil C on Dedicated Mail Server Hosting Multiple Domains – Step 3 – Postfix and Dovecot
Proudly powered by WordPress | Theme: Fmi by Forrss.
Manage Cookie Consent
We use cookies to optimize our website and our service.
Functional cookies Always active
The technical storage or access is strictly necessary for the legitimate purpose of enabling the use of a specific service explicitly requested by the subscriber or user, or for the sole purpose of carrying out the transmission of a communication over an electronic communications network.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
The technical storage or access that is used exclusively for statistical purposes. The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
The technical storage or access is required to create user profiles to send advertising, or to track the user on a website or across several websites for similar marketing purposes.
Manage options Manage services Manage vendors Read more about these purposes
View preferences
{title} {title} {title}