soif / EspBuddy

Wrapper to easily upload (OTA or Serial), backup, batch query, monitor ESP8266 boards using Esptool.py, Espota.py and Platformio
GNU General Public License v3.0
51 stars 10 forks source link

Flashing a custom Firmware to Sonoff DIY devices, from the factory firmware #20

Closed soif closed 7 months ago

soif commented 4 years ago

I've tested all "sonodiy" actions, except the 'flash' command. Because I currently have only one device, and flashing it can not be reversed to the factory firmware, so I would'nt be able to make further tests.

It should work asis, if the device accept an external URL, as the default Tasmota one currently configured in the config-sample.php file.

If it fails, it might be necessary to download the firmware directly to a local web server, and then change the URL according to the new location.

I would appreciate if you could PLEASE report if it works correcly and what were the exact steps that you tried.

Thank you

soif commented 4 years ago

as I feared, the ota_flash endpoint only accepts a local URL ( on the LAN), and silently ignore externals urls. So first download the firmware to a local webserver, and use this URL to flash!

soif commented 4 years ago

use the latest 2.05b2 version espbuddy.php self update 2.05b2

Then try adding the -P Option at the end of the flash command, and please report if it work 🍺

senadaruc commented 4 years ago

Hi,

Thanks for the tool but even with OTA unlock successful message I cant flash my device?

Screenshot 2020-04-12 at 11 34 52

Any help please?

Thanks,

soif commented 4 years ago

it means OTA has NOT been unlocked (while the device doesnt first report any error) ,

try to reboot the device, and send the unlock command again.

You can check if if has been really unlocked, using the sonodiy info command.

If it still failed, it might be the Sonof factory version which need to be updated first, or may be they changed the way the unlock command work in recent firmwares. I dont know, and can not help anymore. You'll have to investigate

If you make any progress, please be kind to report it here to help others, by opening a NEW issue, regarding this specific topic, or even better, push a PR.

mikelgrant commented 3 years ago

senadaruc - did you ever get your Sonoff to flash? I'm having the same problem with a Sonoff mini r2.