|Paolo Asperti 373185c19a||5 months ago|
|rootfs||6 months ago|
|LICENSE||6 months ago|
|README.md||6 months ago|
|todo.txt||5 months ago|
An AlpineLinux image targeted at raspberry pi zero W for sonoff-diy autoflashing with Tasmota.
** this is only a proof of concept, that's no guarantee whatsoever that it's working as intended **
** there's a big chance to brick your device **
** as with anything that works with mains voltage, there's also risk of injury **
** go on if you're ok with all that, and also don't blame me if something goes wrong **
Power on the raspberry with the microSD card you just created and wait a minute for the OS to load.
It is imperative to have ewelink firmware >=3.1 !!! You can check current version in ewelink app. Sadly there's no way to overcome this, for now. We don't know if we need firmware >=3.1 AND ewelink registration OR firmware >=3.1 only. We haven't found a single sonoff mini with stock firmware >=3.1.
Disconnect all the cables from your brand new Sonoff-mini, open it and insert the “DIY jumper” in the proper place. Close it, reconnect the wires and power it on.
In 2-3 minutes you should see a new wifi called “SONOFF-xxxx”, this is created by the newly-tasmotized sonoff-mini.
When you enable the “DIY mode” for a sonoff, you should create a new wireless network called “sonoffDiy” with password “20170618sn”, the sonoff connects with that network and you have the possibility to flash a different firmware using the “itead diy tool”.
More info on that procedure here.
As stated here we use the “sonoff-basic.bin” firmware (6.7.1) and it's mandatory to issue a “reset 5” and flash the complete firmware (I usually flash the “sonoff-minimal.bin” and then the “sonoff.bin”).
You can use your PC to power the raspberry, through the OTG port. If you do that, you have an emulated USB ethernet, with an IP address different from that on the wireless side.
SSH is enabled with root user and the default password is “root” (we need little to no security, as we won't need the raspberry anymore after the flashing)
The IP address on the USB side is: 10.111.101.1
The IP address on the WIRELESS side is: 10.101.111.1
You can find a log of the flashing script in /var/log/flasher.log You can find dnsmasq logs in /var/log/messages
Everything is cleared at each reboot as the whole system is running from RAM. If you want to keep some modifications (e.g. an authorized_keys for ssh autologin) take a look at how it's done here
ACF (Alpine Configuration Framework) is enabled and reachable via HTTPS (you must login with root credentials). From this web interface, you can restart services and take a look at the logs
As of today, this is a very basic script. It has never been tested with two sonoff-mini at the same time, for example (and I'm very confident that this condition is not working). Maybe this works with Sonoff Basic R3 or Sonoff RF R3, it has never been tested. This tool is designed to work without internet connection so it hasn't got access to different firmwares other than the 6.7.1 that is loaded onboard.