Sonoff mini r2
February 23rd, 2022 by Dr_Kosh

pin up

Using windows 10 & Windows 11 (tested on Windows 11):

  • Click on start and type Windows features click on “Turn windows features on or off”
  • Make sure that both Hyper-V and Windows subsystem for linux are installed
Windows features needed for flashing Sonoff mini R2 with Tasmota firmware
Windows features
  • Click on start and open “Windows Store” and search for wsl ubunty

Current version Ubuntu 20.04 would take few minutes to install

  • Once installed, click on start and type cmd to open command prompt
  • Once in command prompt type: bash to start WSL
  • System is ready, now Sonoff mini R2 needs to prepared
  • Turn off mobile data on your cell phone!!! (you might get an error if it is on and WiFi is on)
  • Put sonoff mini R2 into pairing mode (hold reset button for 5+ seconds) blue light should blink 3 times than pause, 3 times pause…..
  • Open eWeLink app on you phone and do Pairing. Once device is paired, try to switch it on and off. Device should click. Make sure that this works, then proceed
  • Delete device in eWeLink app, that will warn you that it will do factory reset (we need this)
  • Once device is deleted from eWeLink app, put it in ioT mode – press reset button for 5+ seconds, this time we need continues blink. If you get into pairing mode, just press reset for another 5 second for ioT.
  • Now there will be new WiFi SSID available Something like ITEPxxxxxx and some numbers
  • Connect to it, default password is 12345678
  • You should get 10.10.7.2 as IP address, device is on IP 10.10.7.1
  • Use web browser to connect to 10.10.7.1 and use prompt to change Wifi settings (use your regular home WiFi SSID and password)
  • Once changed there will be prompt that SSID configured successfully.
  • Find out wat is IP address of sonoff miniR2 on your LAN ( I used tool called AdvancedIPScanner, it is free)
IP Scanner for finding IP of  Sonoff mini R2
IP Scanner
  • Now back to WSL (see step 5.)
  • Thanks to Nicholas J Humfrey, we have script that would do this for us
  • Get script by typing:

curl -O https://raw.githubusercontent.com/njh/sonoff-ota-flash-cli/main/sonoff-ota-flash.sh

  • Change mod on this script by typing:

chmod a+rx sonoff-ota-flash.sh

  • Now we can use script to flash Tasmota, type:

./sonoff-ota-flash.sh –i ipaddresOfDevice        (ipaddressOfDevice is addres we got in previos picture.)

  • Script will run and you should get screen like on picture below, type Y to proceed once asked to “Proceed with flashing”:
IP Scanner
  • Now wait for couple of minutes, then check for new SSID TasmotaXXXXX
  • Flashing is completed.

Specs:

  • Sonoff Mini R2 – firmware 3.6.0
  • Wifi needs to support 2.4Ghz connections
  • Wsl version 2. (it should work on version 1, did not test)

Optional

If you liked this article maybe you will find this one interesting.

Posted in DIY, Home Automation Tagged with: