njh / sonoff-ota-flash-cli

Bash script to perform an OTA (Over the Air) firmware update for Sonoff 'DIY Mode' device on the command line
http://sonoff-ota.aelius.com/
MIT License
129 stars 19 forks source link

Mini R2 cannot send REST commands or use this script #16

Closed backslashV closed 1 year ago

backslashV commented 1 year ago

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?

backslashV commented 1 year ago

Got it to work. For anyone else wondering: 1) Removed the device from the ewelink app. 2) Put device in DIY mode. 3) Made sure there are no active request to the device IP (pings, sonoff-ota-flash-cli script running from any terminal, REST requests in progress, etc.) because sonoff can only handle a single request at any moment. 4) Sent REST commands and received the responses successfully. 5) At this point, still this script was getting stuck at "GETTING MODULE INFO". I found this tutorial that outlined how to also push the firmware using a REST command.

and voilà!