GithubHelp home page GithubHelp logo

njh / sonoff-ota-flash-cli Goto Github PK

View Code? Open in Web Editor NEW
128.0 6.0 18.0 53 KB

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

Shell 59.03% Makefile 7.91% Ruby 33.06%
tasmota sonoff sonoff-diy-firmare-update sonoff-diy

sonoff-ota-flash-cli's Issues

Mini R2 cannot send REST commands or use this script

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?

3.7.6 - Mini - Needs change to work

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.

Enhance for Sonoff Mini Extreme

Hi,
do you think, the script can be enhanced to also flash the new Sonoff Mini Extreme (ESP32), that also runs with Ewelink SW?

Bricking MiniR2

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?

Window 10 users

Can you direct me to anyone that may have addressed Window in DIY Sononff Mini R2

Empty reply from server

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

flash failed ???

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 ?

Worked like a charm

Work where other failed on a MiniR2 (with no jumper).

Would it work on a Sonoff TH ?

Need some help with mochad

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 ๐Ÿ˜Š

Will script flash tasmota to mini r3 with s-mate for no neutral solution

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.

Installs Tasmota-lite, so Domoticz support missing

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.

manually call /zeroconf/ota_unlock

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!

cannot flash a Sonoff Mini

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?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.