axcap / esp-github-ota Goto Github PK
View Code? Open in Web Editor NEWArduino OTA updater that uses Github releases as storage
Arduino OTA updater that uses Github releases as storage
I was curious, what from the github release is being collected by the esp32 device to update itself? Is it a firmware.bin file?
How is the firmware.bin and filesystem.bin placed in the release?
When I install the library ESP-GitHub-OTA to legacy Arduino IDE 1.18.19, it installs but then it complains in the log window:
Invalid library found in /Users/pavol/Documents/Arduino/libraries/Esp-GitHub-OTA: Missing 'paragraph' from library
Invalid library found in /Users/pavol/Documents/Arduino/libraries/Esp-GitHub-OTA: Missing 'paragraph' from library
Invalid library found in /Users/pavol/Documents/Arduino/libraries/Esp-GitHub-OTA: Missing 'paragraph' from library
Invalid library found in /Users/pavol/Documents/Arduino/libraries/Esp-GitHub-OTA: Missing 'paragraph' from library
Invalid library found in /Users/pavol/Documents/Arduino/libraries/Esp-GitHub-OTA: Missing 'paragraph' from library
Invalid library found in /Users/pavol/Documents/Arduino/libraries/Esp-GitHub-OTA: Missing 'paragraph' from library
According to the library.properties
format specification: https://arduino.github.io/arduino-cli/0.28/library-specification/
paragraph - a longer description of the library. The value of sentence will be prepended to this, so you should start by writing the second sentence here
Can you please add it?
Thanks,
Pavol
When running the example project in ESP32 I get the following error:
assert failed: heap_caps_free heap_caps.c:360 (heap != NULL && "free() target pointer is outside heap areas")
Brilliant job here. I've been looking at ESP OTA update code for about a week now and this is the cleanest, most straightforward version I have seen. Well done! Are you planning to take it further to add updating of spiffs or littlefs files related to the ESP32 project?
Steps to reproduce
Produces the following error
In file included from C:/Users/__USERNAME__/Documents/git/Esp-GitHub-OTA/examples/ESP32_example/ESP32_example.ino:4:0:
src/ota.h:8:28: fatal error: HttpsOTAUpdate.h: No such file or directory
Full build log
Processing nodemcu-32s (platform: espressif32; board: nodemcu-32s; framework: arduino)
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/nodemcu-32s.html
PLATFORM: Espressif 32 (2.0.0) > NodeMCU-32S
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
DEBUG: Current (esp-prog) External (esp-prog, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa)
PACKAGES:
- framework-arduinoespressif32 @ 3.10004.201016 (1.0.4)
- tool-esptoolpy @ 1.20600.0 (2.6.0)
- toolchain-xtensa32 @ 2.50200.80 (5.2.0)
Converting ESP32_example.ino
C:/Users/__USERNAME__/Documents/git/Esp-GitHub-OTA/examples/ESP32_example/ESP32_example.ino:15:0: warning: "RELEASE_URL" redefined
#define RELEASE_URL "https://github.com/your_username/your_repo/releases/latest"
^
C:/Users/__USERNAME__/Documents/git/Esp-GitHub-OTA/examples/ESP32_example/ESP32_example.ino:11:0: note: this is the location of the previous definition
#define RELEASE_URL "https://api.github.com/repos/your_username/your_repo/releases/latest"
^
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 69 compatible libraries
Scanning dependencies...
Dependency Graph
|-- HTTPClient @ 1.2
| |-- WiFi @ 1.0
| |-- WiFiClientSecure @ 1.0
| | |-- WiFi @ 1.0
|-- Esp-GitHub-OTA @ 0.0.9
| |-- ArduinoJson @ 6.20.0
| |-- WiFiClientSecure @ 1.0
| | |-- WiFi @ 1.0
| |-- HTTPClient @ 1.2
| | |-- WiFi @ 1.0
| | |-- WiFiClientSecure @ 1.0
| | | |-- WiFi @ 1.0
| |-- HTTPUpdate @ 1.3
| | |-- HTTPClient @ 1.2
| | | |-- WiFi @ 1.0
| | | |-- WiFiClientSecure @ 1.0
| | | | |-- WiFi @ 1.0
| | |-- Update @ 1.0
| | |-- WiFi @ 1.0
| |-- Update @ 1.0
|-- Update @ 1.0
|-- WiFi @ 1.0
Building in release mode
Compiling .pio\build\nodemcu-32s\src\ESP32_example.ino.cpp.o
Generating partitions .pio\build\nodemcu-32s\partitions.bin
Compiling .pio\build\nodemcu-32s\libdb4\WiFi\ETH.cpp.o
Compiling .pio\build\nodemcu-32s\libdb4\WiFi\WiFi.cpp.o
Compiling .pio\build\nodemcu-32s\libdb4\WiFi\WiFiAP.cpp.o
Compiling .pio\build\nodemcu-32s\libdb4\WiFi\WiFiClient.cpp.o
Compiling .pio\build\nodemcu-32s\libdb4\WiFi\WiFiGeneric.cpp.o
Compiling .pio\build\nodemcu-32s\libdb4\WiFi\WiFiMulti.cpp.o
Compiling .pio\build\nodemcu-32s\libdb4\WiFi\WiFiSTA.cpp.o
Compiling .pio\build\nodemcu-32s\libdb4\WiFi\WiFiScan.cpp.o
Compiling .pio\build\nodemcu-32s\libdb4\WiFi\WiFiServer.cpp.o
Compiling .pio\build\nodemcu-32s\libdb4\WiFi\WiFiUdp.cpp.o
Compiling .pio\build\nodemcu-32s\libe0b\WiFiClientSecure\WiFiClientSecure.cpp.o
In file included from C:/Users/__USERNAME__/Documents/git/Esp-GitHub-OTA/examples/ESP32_example/ESP32_example.ino:4:0:
src/ota.h:8:28: fatal error: HttpsOTAUpdate.h: No such file or directory
************************************************************************
* Looking for HttpsOTAUpdate.h dependency? Check our library registry!
*
* CLI > platformio lib search "header:HttpsOTAUpdate.h"
* Web > https://registry.platformio.org/search?q=header:HttpsOTAUpdate.h
*
************************************************************************
compilation terminated.
*** [.pio\build\nodemcu-32s\src\ESP32_example.ino.cpp.o] Error 1
============================================================================================================================ [FAILED] Took 6.33 seconds ============================================================================================================================
* The terminal process "C:\Users\__USERNAME__\.platformio\penv\Scripts\platformio.exe 'run'" terminated with exit code: 1.
* Terminal will be reused by tasks, press any key to close it.
This lib is really promising. I wanted a similar approach as esp_ghota for Arduino.
So as i see in the examples this lib automatically updates if it finds a firmware.
Is it possible to check on demand and get back a result with the new firmware infos like version and such?
I don't want my device to just start to update whenever it finds a new release. I want it to be user controllable. ( the download part at least )
Handle needs some form of timeout, if there isn't network access, you can't just block anything else
My build for an ESP32 is failing with the following, but what's odd is that within VS code I can click through and it does find the file
.pio/libdeps/esp32_4MB_M/Esp-GitHub-OTA/src/GitHubOTA.h:8:30: fatal error: WiFiClientSecure.h: No such file or directory
Looks like I needed to add the following to the dependencies. Should this library declare these so they get resolved automatically?
WiFiClientSecure
HTTPUpdate
HTTPClient
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.