A tool to help automate applying a new firmware to a Sonoff DIY device.
-
Put your firmware to upload in
files/firmware.bin -
Install an HTTP server that will be able to serve the file. Note that python's
http.servermodule appears to fail when attempting to serve the file, although that may have been that I did not leave it long enough.$ npm install -
Prepare your network
- Start a network with SSID
sonoffDiy, WPA2 key20170618snThis must have access to the internet, and to the machine you are running this code from. - Unplug your Sonoff Mini/DIY device
- Add the supplied jumper to the DIY pin (GPIO16)
- Plug the device back in
- Wait for the blue LED to double-flash
-
Start the flash:
$ ./flasher.sh
This should then run to completion. By default, it waits 30 seconds for the upload to complete - that was plenty for me but I did have the AP right next to the Sonoff Mini.
Please let me know if you have any issues: I only had one Sonoff DIY device, and have already flashed that one, so was unable to try the automated process.