Picked up some of the new Sonoff Mini’s recently with the plan to build them into some light switches. Consensus is that the stock ewelink firmware leaves a bit to be desired, but their new DIY mode does make it doable to OTA unlock & re-flash - with a few hoops. Also varying warnings that their Windows app triggers some antivirus warnings for unknown reasons.
Found a couple of reasonably comprehensive guides on doing it manually without using the App, including the following two, but it’s pretty roundabout and time consuming.
Long story short - I used tuya-convert recently to convert some cheap hardware store wifi plugs to tasmota - quite a tidy package and process. Also this week had another 6 sonoff mini’s arrive that I wanted to convert as well, so I re-wrote some of the functions, and added a few of mine own to automate the process in tuya-convert fashion.
They still need to have the diy/ota mode jumper fitted refer earlier links for photos, but it’s a whole lot easier than re-soldering them.
If it’s of use to people, you’re welcome to use it. There’s a few bits where the code isn’t as tidy as it could be, but it works, so that’s good enough for me. Install it alongside a tuya-convert install on a pi or similar and it’ll do the device id read, ota unlock, and reflash the firmware all a bit under a minute.
EDIT: Copy of the readme file from the zip below so you know what to expect.
# Jp - jpwise - 20200111 - sonoff diy convert tools building on tuya-convert functions. # tuya-convert - all credit for their work to the original authors # https://github.com/ct-Open-Source/tuya-convert A packaged set of scripts to make converting SonOff DIY modules on linux easy. Runs on top off the tuya-convert project package. - add on scripts to obtain mDNS device ID's - updated wifi config for snonffDiy config - enable IP forwarding + Masquerade for OTA unlock - automate SonOff otaUnlock requests - uses tuya-convert bundled firmware files. No guaranatees, express or implied - if it breaks things for you, you're on your own. Testing done using a raspberry pi using eth0 LAN, and enables wlan0 for OTA functions. Installation - same as tuya-convert # git clone https://github.com/ct-Open-Source/tuya-convert # cd tuya-convert # ./install_prereq.sh Additional package - pip3 zeroconf - mDNS functions. #python3 -m pip install zeroconf Extract contents of zip into tuya-convert folder alongside existing files. Then start the flashing process :) # ./start_flash_sonoff.sh There's a few areas that could probably be tidied, but it works, and that was the goal.