Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Web Server OTA (https) #68

Open
probonopd opened this issue Feb 28, 2019 · 15 comments
Open

Implement Web Server OTA (https) #68

probonopd opened this issue Feb 28, 2019 · 15 comments

Comments

@probonopd
Copy link
Owner

probonopd commented Feb 28, 2019

Currently it is cumbersome to update the firmware. It would be nice if one could update from the HTTP interface directly with the firmware being downloaded from a https link

We should get as the default firmware URL the latest GitHub Release, from https://api.github.com/repos/probonopd/WirelessPrinting/releases [0]["assets"][0]["browser_download_url"] but we should alsohave the possibility to load from custom URLs.

@probonopd
Copy link
Owner Author

Could also implement uploading the firmware via a web form:
me-no-dev/ESPAsyncWebServer#35

@probonopd
Copy link
Owner Author

probonopd commented Mar 2, 2019

We should get as the default firmware URL the latest GitHub Release, from https://api.github.com/repos/probonopd/WirelessPrinting/releases [0]["assets"][0]["browser_download_url"]

@yknivag seems to have been working on this at
https://github.com/yknivag/test/blob/master/temp/temp.ino

Indeed it would be good to turn this type of functionality into an easy-to-consume library.

Also see
https://gist.github.com/yknivag/2707e27787abeafa69b33c4e9d043c3a

@chepo92 chepo92 assigned chepo92 and unassigned chepo92 Mar 4, 2019
probonopd added a commit that referenced this issue Mar 8, 2019
@ayushsharma82
Copy link
Contributor

Any thoughts about using ElegantOTA ? It will provide a pleasant UI for uploading OTAs.

https://github.com/ayushsharma82/ElegantOTA

@probonopd
Copy link
Owner Author

Thanks for the pointer @ayushsharma82. I was not aware of ElegantOTA so far but it does look elegant indeed.

  • We are using AsyncHTTPServer in this project. Would this work for ElegantOTA?
  • Would using ElegantOTA provide any benefit over our current web OTA plus using ESP-DASH for a better UI?

@ayushsharma82
Copy link
Contributor

ayushsharma82 commented Apr 24, 2019

It works with default Webserver of ESP. But it should take about an hour to port it to AsyncWebServer. I will develop a Async Version Soon.

Currently there is just one benefit, It shows progress of OTA via a progress bar on webpage and shows a good and clear status when OTA is done. ElegantOTA is certainly for beauty purposes only. 😄

@probonopd
Copy link
Owner Author

I will develop a Async Version Soon.

Cool. Please let me know when it is available.

It shows progress of OTA via a progress bar

Definitely an advantage.

Does updating work using the command line (e.g., wget/curl) too, like our current solution?

@ayushsharma82
Copy link
Contributor

Yes, In fact the webpage does the same but with a AJAX Request to a upload URL.

@ayushsharma82
Copy link
Contributor

@probonopd Just Released AsyncElegantOTA , It works on AsyncWebServer and has support for both esp8266 and esp32.

https://github.com/ayushsharma82/AsyncElegantOTA

@probonopd
Copy link
Owner Author

@ayushsharma82 that's great news. Would you like to give it a try to integrate it into WirelessPrinting?

@ayushsharma82
Copy link
Contributor

@probonopd Created a Pull Request. Edit travis cli to copy AsyncElegantOTA repo for successful builds. #118

@yknivag
Copy link

yknivag commented Nov 13, 2019

Apologies for the very late reply, but I think I now have this working. See https://github.com/yknivag/ESP_OTA_GitHub

@probonopd
Copy link
Owner Author

Wow this is useful. Would you like to send a pull request to this repository incorporating it @yknivag?

@yknivag
Copy link

yknivag commented Nov 14, 2019

Thank you for your appreciation and excitement. :-)

I only just got it working yesterday after waiting 6 months for a bug fix to
the ESPhttpUpdate library.

I think maybe a some more thorough testing is in order before I would be presumptuous enough to submit a PR with it to someone else's project. It's definitely a beta atm!

Please do feel free to test it out though, but I would keep it in your dev branch until there is a release on the repo.

@probonopd
Copy link
Owner Author

@yknivag is it still working and being maintained?

@yknivag
Copy link

yknivag commented Apr 27, 2022

@probonopd It was still working last time I checked it. I haven't had cause to use it myself for a little while due to working on other things, but I see no reason why the library shouldn't still work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants