These steps are for Mac OS X, a lot of this is copied from https://blog.bilka.sk/how-to-flash-sonoff-mini-in-mac-os/ but added docker and removed the need for adding own AP.
-
solder or put jumper between OTA and GND
-
Entering the Compatible Pairing Mode (AP) by long press the paring button for 5 seconds after power on
-
Connecting the Access Point named ITEAD-XXXXXXXX with default password 12345678 via mobile phone or PC
-
Browser visits http://10.10.7.1/
-
Filling in the existing WiFi network SSID and password and hit save
-
in terminal run
sudo dns-sd -B _ewelink._tcp
and wait for a response
11:47 $ sudo dns-sd -B _ewelink._tcp
Password:
Browsing for _ewelink._tcp
DATE: ---Sat 26 Sep 2020---
11:47:54.157 ...STARTING...
Timestamp A/R Flags if Domain Service Type Instance Name
11:52:24.649 Add 2 6 local. _ewelink._tcp. eWeLink_1000e0e000
-
Not the part after eWeLink_ as your device id.
-
Use your favourite tool to look for the ipaddress. Port 8081 will be open
-
run
curl http://<deviceIP>:8081/zeroconf/ota_unlock -XPOST --data '{"deviceid":"<deviceID>","data":{} }'
curl http://<deviceIP>:8081/zeroconf/info -XPOST --data '{"deviceid":"<deviceID>","data":{} }'
# output should be something containing "otaUnlock": true
- Download tasmota
curl http://192.168.86.48:8081/zeroconf/ota_flash -XPOST --data '{"deviceid":"1000e9e0f7","data":{"downloadUrl": "http://192.168.86.32/tasmota-lite.bin", "sha256sum": "c4c8347666c4fd1e412a11338fe4a599f8010d5eaa5418bacb43bbc3b5149dbd"} }'
shasum -a 256 tasmota-lite.bin
- Start docker nginx
docker run -it --rm -d -p 80:80 --name nginx1 -v ~/<path to your tasmota nin file>:/usr/share/nginx/html nginx
- update firmware to tasmota
curl http://<deviceIP>:8081/zeroconf/ota_flash -XPOST --data '{"deviceid":"<deviceID>","data":{"downloadUrl": "http://<HTTPserverIP>/tasmota-lite.bin", "sha256sum": "<SHA256>"} }'
-
Connect to tasmota AP and set network credentials
-
Find your tasmota flashed sonoffs ipaddress (probably the same as before) and open it in a webbrowser
-
Follow the steps in https://esphome.io/guides/migrate_sonoff_tasmota.html
good links:
- https://github.com/itead/Sonoff_Devices_DIY_Tools/blob/master/SONOFF%20DIY%20MODE%20Protocol%20Doc%20v2.0%20Doc.pdf
- https://blog.bilka.sk/how-to-flash-sonoff-mini-in-mac-os/
- https://tasmota.github.io/docs/devices/Sonoff-Mini/
- https://esphome.io/guides/migrate_sonoff_tasmota.html
- https://esphome-configs.io/devices/sonoff-mini-relay/
- https://community.home-assistant.io/t/sonoff-mini-in-uk-switched-live/151481/6