GithubHelp home page GithubHelp logo

simplehttpupdater's Introduction

SimpleHTTPUpdater

Library for automatic generated FIRMWARE_BUILD numbers and for retrieving firmware updates from HTTP servers.

Installation (PlatformIO)

Add the following line to your platformio.ini:

lib_deps = https://github.com/sivar2311/SimpleHTTPUpdater

Use

Including the automatically generated version.h

#include "version.h"

Define the download URLs for firmware.bin and firmware.nfo:

const char* firmware_download_url = "http://server/firmware.bin";
const char* firmware_info_url     = "http://server/firmware.nfo";

Initialize the library in setup():

SimpleHTTPUpdate.begin(firmware_download_url, firmware_info_url, FIRMWARE_BUILD);

Call the library's handle function periodically in loop():

SimpleHTTPUpdate.handle();

Note: FIRMWARE_BUILDis defined in version.h and increases automatically on each firmware-build

Compile & Upload to your webserver

Compile your project and upload the new versions of firmware.bin and firmware.h to your webserver.

Using HTTPS

If you'd like to use HTTPS, you can do the following:

WiFiClientSecure client;
client.setCACert("-----BEGIN CERTIFICATE----- your cert here .....");
SimpleHTTPUpdate.setClient(&client);

Example

For details, see the example: HTTPUpdate.ino

How it works (PlatformIO)

The library maks use of PlatformIO scripting and creates and updates automatically the files version.h in your source folder and firmware.nfo in the project folder.

The version number increases on each firmware build.

SimpleHTTPUpdate.handle() checks periodically if new firmware updates are available on the web server. If a higher version is found, it will be downloaded and installed automatically.

simplehttpupdater's People

Contributors

sivar2311 avatar szantogab avatar

Watchers

 avatar

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.