njh / sonoff-ota-flash-cli Goto Github PK
View Code? Open in Web Editor NEWBash script to perform an OTA (Over the Air) firmware update for Sonoff 'DIY Mode' device on the command line
Home Page: http://sonoff-ota.aelius.com/
License: MIT License
Bash script to perform an OTA (Over the Air) firmware update for Sonoff 'DIY Mode' device on the command line
Home Page: http://sonoff-ota.aelius.com/
License: MIT License
Hi,
I recently purchased the Mini R2 and upgraded the firmware to 3.7.6. REST POST commands do not work (get stuck in sending mode). Also, this script gets stuck at "GETTNG MODULE INFO". I can ping the device and can confirm it is connected to the router. I can also control it fine using the ewelink app. Any ideas?
For some reason, the script was not working on a Mini (I think R1? I got it a long time ago) running firmware 3.7.6.
I was able to get it working by completely removing the "deviceid" from the body variable in the sonoff_http_request
function, and also from the ota_flash
function.
That made the script start working and got Tasmota flashed.
Hi,
do you think, the script can be enhanced to also flash the new Sonoff Mini Extreme (ESP32), that also runs with Ewelink SW?
Hi,
after i run the script, terminal is locked on "Unlocking for OTA flashing..." for some time, and next receive this error
curl: (52) Empty reply from server
Error posting to: http://xxxxxxxxxxx/zeroconf/ota_unlock
Help me, please?
I've now bricked 2 devices trying to flash with this. I run ./sonoff-ota-flash.sh and it detects my Sonoff, gets to the step of "Please wait for your device to finish flashing." and after restarting, it never comes back. I get no wifi network. The on off switch will still toggle the relay but I can't connect to it at all. The s1 / s2 connected switch doesn't toggle the relay either. I see a slow blink on the sonoff. can you advise?
Can you direct me to anyone that may have addressed Window in DIY Sononff Mini R2
Hi, I am getting this error. Do you have any idea what I should do to fix it?
Thanks.
./sonoff-ota-flash.sh tasmota-latest-lite.bin
Checking new firmware file exists
OK
Looking up sha256sum for firmware
OK
Searching for Sonoff module on network...
Found module on network.
Hostname: eWeLink_10011f2dfb
IPv4 Address: 192.168.0.121
Getting Module Info...
curl: (52) Empty reply from server
Error posting to: http://192.168.0.121:8081/zeroconf/info
have done everything as described here..and everything looked great...then the sonoff mini r2 always just blinked regularly but gives no ssid (ap) ..what am I doing wrong ?
Not at all clear what operating systems this does or does NOT work on.
Work where other failed on a MiniR2 (with no jumper).
Would it work on a Sonoff TH ?
Hi Nicholas, sorry for contacting you this way but I can't find any of your working contacts.
I need to add one more function to mochad: ability to toggle unit off then on with fixed or configurable delay. I'm running mochad on RPi with X10 to toggle my lights in house but really want to be able to restart cable modem and router remotely. So, I need (on server side) to turn specific unit off, wait for nn second, than turn it on. Number of seconds can be hardcoded or whatever ๐
I used your script to flash my mini r2 and it worked great. I then realised that I have no neutral behind some of my switches in the back boxes (old house wiring). I have seen that this can be overcome using diodes and fusible resistors as shown here https://www.youtube.com/watch?v=oBR5O391m_c
however sonoff has an out of the box no neutral "mini r3 + s-mate" solution that feels less error prone and tidier. The question would your script successfully tasmotise this ota and if it can has tasmota been updated to have a configuration for this model. (some of this is clearly googleable and I apologise for my laziness in asking some of this here).
I am tempted to buy the mini r3 and s-mate and just try it working on a bench. Great work btw and thanks for sharing it.
Worked very well for me - Mac OS 13.0 - on MiniR2, but installs an 'old' Tasmota-lite version (9.5.0), without Domoticz support.
Once configured, I did OTA upgrade to latest Tasmota version (12.4.0).
Suggest change to script, please.
Hello,
If i run the script, i'm getting the following error: Failed to create client object: Daemon not running
I'm running the Ubuntu app on windows installation.
Could you help me to see why this is happening? Thanks!
dl.itead.cn
when i run your most excellent script it just sits there:
./sonoff-ota-flash.sh -i 192.168.20.13 tasmota-9.2.0-lite.bin
Checking new firmware file exists
OK
Looking up sha256sum for firmware
OK
Getting Module Info...
{
"seq":2,
"error":0,
"data":
{
"switch":"off",
"startup":"off",
"pulse":"off",
"pulseWidth":500,
"ssid":"koala-iot",
"otaUnlock":false,
"fwVersion":"3.6.0",
"deviceid":"1000a05bf6",
"bssid":"46:d9:e7:49:83:a8",
"signalStrength":-43
}
}
Unlocking for OTA flashing...
and then after a couple of minutes it says:
curl: (52) Empty reply from server
Error posting to: http://192.168.20.13:8081/zeroconf/ota_unlock
i have been trying to post ota_unlock to the mini for several hours now.
am i doing something wrong?
The hosted binaries of tasmota firmwares with SHA is down: http://sonoff-ota.aelius.com/
Script still works if binary is hosted locally.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.