diff --git a/404.html b/404.html index 025cb17..dc52c77 100644 --- a/404.html +++ b/404.html @@ -7,13 +7,13 @@ - +
Skip to main content

Page Not Found

We could not find what you were looking for.

Please contact the owner of the site that linked you to the original URL and let them know their link is broken.

- + \ No newline at end of file diff --git a/assets/js/0e384e19.ab487a62.js b/assets/js/0e384e19.7654b5dc.js similarity index 78% rename from assets/js/0e384e19.ab487a62.js rename to assets/js/0e384e19.7654b5dc.js index a31e52d..b8627b2 100644 --- a/assets/js/0e384e19.ab487a62.js +++ b/assets/js/0e384e19.7654b5dc.js @@ -1 +1 @@ -"use strict";(self.webpackChunkelegantota_docs=self.webpackChunkelegantota_docs||[]).push([[671],{3905:(e,t,r)=>{r.d(t,{Zo:()=>u,kt:()=>m});var n=r(7294);function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var s=n.createContext({}),c=function(e){var t=n.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},u=function(e){var t=c(e.components);return n.createElement(s.Provider,{value:t},e.children)},p="mdxType",f={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},d=n.forwardRef((function(e,t){var r=e.components,o=e.mdxType,a=e.originalType,s=e.parentName,u=l(e,["components","mdxType","originalType","parentName"]),p=c(r),d=o,m=p["".concat(s,".").concat(d)]||p[d]||f[d]||a;return r?n.createElement(m,i(i({ref:t},u),{},{components:r})):n.createElement(m,i({ref:t},u))}));function m(e,t){var r=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var a=r.length,i=new Array(a);i[0]=d;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[p]="string"==typeof e?e:o,i[1]=l;for(var c=2;c{r.r(t),r.d(t,{assets:()=>s,contentTitle:()=>i,default:()=>f,frontMatter:()=>a,metadata:()=>l,toc:()=>c});var n=r(7462),o=(r(7294),r(3905));const a={title:"Intro",hide_title:!0,sidebar_label:"Introduction",sidebar_position:1,slug:"/"},i=void 0,l={unversionedId:"intro",id:"intro",title:"Intro",description:" ",source:"@site/docs/intro.md",sourceDirName:".",slug:"/",permalink:"/",draft:!1,tags:[],version:"current",sidebarPosition:1,frontMatter:{title:"Intro",hide_title:!0,sidebar_label:"Introduction",sidebar_position:1,slug:"/"},sidebar:"tutorialSidebar",next:{title:"Installation",permalink:"/installation"}},s={},c=[],u={toc:c},p="wrapper";function f(e){let{components:t,...r}=e;return(0,o.kt)(p,(0,n.Z)({},u,r,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("br",null),(0,o.kt)("img",{src:"/v3/img/feature.png",width:"700px"}),(0,o.kt)("br",null),(0,o.kt)("br",null),(0,o.kt)("img",{src:"https://img.shields.io/github/last-commit/ayushsharma82/ESP-DASH?style=for-the-badge"}),"\xa0 \xa0",(0,o.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/ayushsharma82/ESP-DASH/ci.yml?branch=master&style=for-the-badge"}),(0,o.kt)("br",null),(0,o.kt)("br",null),(0,o.kt)("p",null,"ElegantOTA provides a beautiful user interface to upload over-the-air firmware/filesystem updates to your hardware with precise status and progress. ElegantOTA is designed to make the process of OTA updates slick and simple!"),(0,o.kt)("small",null,(0,o.kt)("i",null,'Note: This documentation serves both the versions of ElegantOTA ( Lite - Open Source and Pro ). Therefore, if you notice "(Pro)" mentioned on any of the features in the documentation, that means it is only available in ',(0,o.kt)("a",{href:"https://elegantota.pro"},"ElegantOTA Pro"),".")))}f.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunkelegantota_docs=self.webpackChunkelegantota_docs||[]).push([[671],{3905:(e,t,r)=>{r.d(t,{Zo:()=>u,kt:()=>m});var n=r(7294);function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var s=n.createContext({}),c=function(e){var t=n.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},u=function(e){var t=c(e.components);return n.createElement(s.Provider,{value:t},e.children)},p="mdxType",f={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},d=n.forwardRef((function(e,t){var r=e.components,o=e.mdxType,a=e.originalType,s=e.parentName,u=l(e,["components","mdxType","originalType","parentName"]),p=c(r),d=o,m=p["".concat(s,".").concat(d)]||p[d]||f[d]||a;return r?n.createElement(m,i(i({ref:t},u),{},{components:r})):n.createElement(m,i({ref:t},u))}));function m(e,t){var r=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var a=r.length,i=new Array(a);i[0]=d;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[p]="string"==typeof e?e:o,i[1]=l;for(var c=2;c{r.r(t),r.d(t,{assets:()=>s,contentTitle:()=>i,default:()=>f,frontMatter:()=>a,metadata:()=>l,toc:()=>c});var n=r(7462),o=(r(7294),r(3905));const a={title:"Intro",hide_title:!0,sidebar_label:"Introduction",sidebar_position:1,slug:"/"},i=void 0,l={unversionedId:"intro",id:"intro",title:"Intro",description:" ",source:"@site/docs/intro.md",sourceDirName:".",slug:"/",permalink:"/",draft:!1,tags:[],version:"current",sidebarPosition:1,frontMatter:{title:"Intro",hide_title:!0,sidebar_label:"Introduction",sidebar_position:1,slug:"/"},sidebar:"tutorialSidebar",next:{title:"Installation",permalink:"/installation"}},s={},c=[],u={toc:c},p="wrapper";function f(e){let{components:t,...r}=e;return(0,o.kt)(p,(0,n.Z)({},u,r,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("br",null),(0,o.kt)("img",{src:"/v3/img/feature.png",width:"700px"}),(0,o.kt)("br",null),(0,o.kt)("br",null),(0,o.kt)("img",{src:"https://img.shields.io/github/last-commit/ayushsharma82/ElegantOTA?style=for-the-badge"}),"\xa0 \xa0",(0,o.kt)("img",{src:"https://img.shields.io/github/actions/workflow/status/ayushsharma82/ElegantOTA/ci.yml?branch=master&style=for-the-badge"}),(0,o.kt)("br",null),(0,o.kt)("br",null),(0,o.kt)("p",null,"ElegantOTA provides a beautiful user interface to upload over-the-air firmware/filesystem updates to your hardware with precise status and progress. ElegantOTA is designed to make the process of OTA updates slick and simple!"),(0,o.kt)("small",null,(0,o.kt)("i",null,'Note: This documentation serves both the versions of ElegantOTA ( Lite - Open Source and Pro ). Therefore, if you notice "(Pro)" mentioned on any of the features in the documentation, that means it is only available in ',(0,o.kt)("a",{href:"https://elegantota.pro"},"ElegantOTA Pro"),".")))}f.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/runtime~main.802c5d4a.js b/assets/js/runtime~main.81fda686.js similarity index 98% rename from assets/js/runtime~main.802c5d4a.js rename to assets/js/runtime~main.81fda686.js index e69e7fe..75df99d 100644 --- a/assets/js/runtime~main.802c5d4a.js +++ b/assets/js/runtime~main.81fda686.js @@ -1 +1 @@ -(()=>{"use strict";var e,t,r,a,o,n={},d={};function f(e){var t=d[e];if(void 0!==t)return t.exports;var r=d[e]={id:e,loaded:!1,exports:{}};return n[e].call(r.exports,r,r.exports,f),r.loaded=!0,r.exports}f.m=n,f.c=d,e=[],f.O=(t,r,a,o)=>{if(!r){var n=1/0;for(l=0;l=o)&&Object.keys(f.O).every((e=>f.O[e](r[c])))?r.splice(c--,1):(d=!1,o0&&e[l-1][2]>o;l--)e[l]=e[l-1];e[l]=[r,a,o]},f.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return f.d(t,{a:t}),t},r=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,f.t=function(e,a){if(1&a&&(e=this(e)),8&a)return e;if("object"==typeof e&&e){if(4&a&&e.__esModule)return e;if(16&a&&"function"==typeof e.then)return e}var o=Object.create(null);f.r(o);var n={};t=t||[null,r({}),r([]),r(r)];for(var d=2&a&&e;"object"==typeof d&&!~t.indexOf(d);d=r(d))Object.getOwnPropertyNames(d).forEach((t=>n[t]=()=>e[t]));return n.default=()=>e,f.d(o,n),o},f.d=(e,t)=>{for(var r in t)f.o(t,r)&&!f.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},f.f={},f.e=e=>Promise.all(Object.keys(f.f).reduce(((t,r)=>(f.f[r](e,t),t)),[])),f.u=e=>"assets/js/"+({30:"09d5ad39",53:"935f2afb",162:"d589d3a7",168:"625b1ed7",217:"3b8c55ea",361:"4d37f007",514:"1be78505",611:"a81a9ba7",671:"0e384e19",739:"3865d09d",757:"35754347",784:"eb3cd3e5",816:"ff93640d",818:"a5ec7539",861:"64b0ce6a",918:"17896441",924:"21834f87",936:"e78cdf98",989:"f39b3a0b"}[e]||e)+"."+{30:"52178145",53:"f41ad960",162:"7905838d",168:"c87acc12",202:"f5b878aa",217:"de5cc3a2",361:"970b1d5d",514:"5303ed6d",611:"3efe1b70",671:"ab487a62",739:"68864eb6",757:"947fc652",784:"ca8ae6dd",816:"190f2c21",818:"d8c77f85",861:"c832846e",918:"a019dfd7",924:"6e87f8a0",936:"bc3b0a9b",972:"aacabf51",989:"f455d83e"}[e]+".js",f.miniCssF=e=>{},f.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),f.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),a={},o="elegantota-docs:",f.l=(e,t,r,n)=>{if(a[e])a[e].push(t);else{var d,c;if(void 0!==r)for(var i=document.getElementsByTagName("script"),l=0;l{d.onerror=d.onload=null,clearTimeout(s);var o=a[e];if(delete a[e],d.parentNode&&d.parentNode.removeChild(d),o&&o.forEach((e=>e(r))),t)return t(r)},s=setTimeout(b.bind(null,void 0,{type:"timeout",target:d}),12e4);d.onerror=b.bind(null,d.onerror),d.onload=b.bind(null,d.onload),c&&document.head.appendChild(d)}},f.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},f.p="/",f.gca=function(e){return e={17896441:"918",35754347:"757","09d5ad39":"30","935f2afb":"53",d589d3a7:"162","625b1ed7":"168","3b8c55ea":"217","4d37f007":"361","1be78505":"514",a81a9ba7:"611","0e384e19":"671","3865d09d":"739",eb3cd3e5:"784",ff93640d:"816",a5ec7539:"818","64b0ce6a":"861","21834f87":"924",e78cdf98:"936",f39b3a0b:"989"}[e]||e,f.p+f.u(e)},(()=>{var e={303:0,532:0};f.f.j=(t,r)=>{var a=f.o(e,t)?e[t]:void 0;if(0!==a)if(a)r.push(a[2]);else if(/^(303|532)$/.test(t))e[t]=0;else{var o=new Promise(((r,o)=>a=e[t]=[r,o]));r.push(a[2]=o);var n=f.p+f.u(t),d=new Error;f.l(n,(r=>{if(f.o(e,t)&&(0!==(a=e[t])&&(e[t]=void 0),a)){var o=r&&("load"===r.type?"missing":r.type),n=r&&r.target&&r.target.src;d.message="Loading chunk "+t+" failed.\n("+o+": "+n+")",d.name="ChunkLoadError",d.type=o,d.request=n,a[1](d)}}),"chunk-"+t,t)}},f.O.j=t=>0===e[t];var t=(t,r)=>{var a,o,n=r[0],d=r[1],c=r[2],i=0;if(n.some((t=>0!==e[t]))){for(a in d)f.o(d,a)&&(f.m[a]=d[a]);if(c)var l=c(f)}for(t&&t(r);i{"use strict";var e,t,r,a,o,n={},d={};function f(e){var t=d[e];if(void 0!==t)return t.exports;var r=d[e]={id:e,loaded:!1,exports:{}};return n[e].call(r.exports,r,r.exports,f),r.loaded=!0,r.exports}f.m=n,f.c=d,e=[],f.O=(t,r,a,o)=>{if(!r){var n=1/0;for(l=0;l=o)&&Object.keys(f.O).every((e=>f.O[e](r[c])))?r.splice(c--,1):(d=!1,o0&&e[l-1][2]>o;l--)e[l]=e[l-1];e[l]=[r,a,o]},f.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return f.d(t,{a:t}),t},r=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,f.t=function(e,a){if(1&a&&(e=this(e)),8&a)return e;if("object"==typeof e&&e){if(4&a&&e.__esModule)return e;if(16&a&&"function"==typeof e.then)return e}var o=Object.create(null);f.r(o);var n={};t=t||[null,r({}),r([]),r(r)];for(var d=2&a&&e;"object"==typeof d&&!~t.indexOf(d);d=r(d))Object.getOwnPropertyNames(d).forEach((t=>n[t]=()=>e[t]));return n.default=()=>e,f.d(o,n),o},f.d=(e,t)=>{for(var r in t)f.o(t,r)&&!f.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},f.f={},f.e=e=>Promise.all(Object.keys(f.f).reduce(((t,r)=>(f.f[r](e,t),t)),[])),f.u=e=>"assets/js/"+({30:"09d5ad39",53:"935f2afb",162:"d589d3a7",168:"625b1ed7",217:"3b8c55ea",361:"4d37f007",514:"1be78505",611:"a81a9ba7",671:"0e384e19",739:"3865d09d",757:"35754347",784:"eb3cd3e5",816:"ff93640d",818:"a5ec7539",861:"64b0ce6a",918:"17896441",924:"21834f87",936:"e78cdf98",989:"f39b3a0b"}[e]||e)+"."+{30:"52178145",53:"f41ad960",162:"7905838d",168:"c87acc12",202:"f5b878aa",217:"de5cc3a2",361:"970b1d5d",514:"5303ed6d",611:"3efe1b70",671:"7654b5dc",739:"68864eb6",757:"947fc652",784:"ca8ae6dd",816:"190f2c21",818:"d8c77f85",861:"c832846e",918:"a019dfd7",924:"6e87f8a0",936:"bc3b0a9b",972:"aacabf51",989:"f455d83e"}[e]+".js",f.miniCssF=e=>{},f.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),f.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),a={},o="elegantota-docs:",f.l=(e,t,r,n)=>{if(a[e])a[e].push(t);else{var d,c;if(void 0!==r)for(var i=document.getElementsByTagName("script"),l=0;l{d.onerror=d.onload=null,clearTimeout(s);var o=a[e];if(delete a[e],d.parentNode&&d.parentNode.removeChild(d),o&&o.forEach((e=>e(r))),t)return t(r)},s=setTimeout(b.bind(null,void 0,{type:"timeout",target:d}),12e4);d.onerror=b.bind(null,d.onerror),d.onload=b.bind(null,d.onload),c&&document.head.appendChild(d)}},f.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},f.p="/",f.gca=function(e){return e={17896441:"918",35754347:"757","09d5ad39":"30","935f2afb":"53",d589d3a7:"162","625b1ed7":"168","3b8c55ea":"217","4d37f007":"361","1be78505":"514",a81a9ba7:"611","0e384e19":"671","3865d09d":"739",eb3cd3e5:"784",ff93640d:"816",a5ec7539:"818","64b0ce6a":"861","21834f87":"924",e78cdf98:"936",f39b3a0b:"989"}[e]||e,f.p+f.u(e)},(()=>{var e={303:0,532:0};f.f.j=(t,r)=>{var a=f.o(e,t)?e[t]:void 0;if(0!==a)if(a)r.push(a[2]);else if(/^(303|532)$/.test(t))e[t]=0;else{var o=new Promise(((r,o)=>a=e[t]=[r,o]));r.push(a[2]=o);var n=f.p+f.u(t),d=new Error;f.l(n,(r=>{if(f.o(e,t)&&(0!==(a=e[t])&&(e[t]=void 0),a)){var o=r&&("load"===r.type?"missing":r.type),n=r&&r.target&&r.target.src;d.message="Loading chunk "+t+" failed.\n("+o+": "+n+")",d.name="ChunkLoadError",d.type=o,d.request=n,a[1](d)}}),"chunk-"+t,t)}},f.O.j=t=>0===e[t];var t=(t,r)=>{var a,o,n=r[0],d=r[1],c=r[2],i=0;if(n.some((t=>0!==e[t]))){for(a in d)f.o(d,a)&&(f.m[a]=d[a]);if(c)var l=c(f)}for(t&&t(r);i - +

Async Mode

NOTE: Async Mode is supported for ESP8266 & ESP32 microcontrollers only

Introduction

One of the features of ElegantOTA is the async mode, which provides asynchronous web server functionality for handling OTA updates. This mode should only be enabled if you are using ESPAsyncWebServer library in your project/firmware.

Enabling Async Mode

For Arduino IDE:

  1. Go to your Arduino libraries directory

  2. Open ElegantOTA folder and then open src folder

  3. Locate the ELEGANTOTA_USE_ASYNC_WEBSERVER macro in the ElegantOTA.h file, and set it to 1:

    #define ELEGANTOTA_USE_ASYNC_WEBSERVER 1
  4. Save the changes to the ElegantOTA.h file.

  5. You are now ready to use ElegantOTA in async mode for your OTA updates, utilizing the ESPAsyncWebServer library.

For PlatformIO:

If you use PlatformIO then we can use a neat trick! You can set build_flags in your platformio.ini file that enables Async Mode of ElegantOTA.

  1. Open platformio.ini file of your project
  2. Paste this line build_flags=-DELEGANTOTA_USE_ASYNC_WEBSERVER=1 at bottom
  3. Done!

PlatformIO will now compile ElegantOTA in Async Mode!

Benefits of Async Mode

Enabling async mode for ElegantOTA offers several advantages:

  1. Non-blocking Operation: In async mode, ElegantOTA leverages the asynchronous web server capabilities of ESPAsyncWebServer. This means that OTA updates won't block your device's main loop. It allows your device to continue executing other tasks while handling OTA updates in the background.

  2. Improved Responsiveness: Your device can remain responsive to user interactions or other processes during OTA updates, ensuring a smoother user experience.

- + \ No newline at end of file diff --git a/authentication/index.html b/authentication/index.html index 853fa5f..7bb15d4 100644 --- a/authentication/index.html +++ b/authentication/index.html @@ -7,13 +7,13 @@ - +

Authentication

Introduction

The Authentication feature in ElegantOTA enhances the security of your Internet of Things (IoT) devices by requiring authentication before allowing firmware updates or configuration changes. This feature ensures that only authorized individuals or systems can access and modify your devices, adding an extra layer of protection to your IoT ecosystem.

Setting Authentication

You can set up authentication for your device using the ElegantOTA.setAuth("username", "password"); function. This function requires two parameters: a username and a password. These credentials act as a gatekeeper, preventing unauthorized access to the device's OTA (Over-The-Air) update and configuration interfaces.

Example Usage

#include <ElegantOTA.h>

void setup() {
// Initialize your hardware and other configurations here

// Set Authentication Credentials
ElegantOTA.setAuth("myUsername", "myPassword");

// Additional setup code
}

void loop() {
// Your main loop code here
}

In the above example, the ElegantOTA.setAuth("myUsername", "myPassword"); function call sets the username to "myUsername" and the password to "myPassword" for device authentication.

Clearing Authentication

Authentication once set can also be cleared by calling:

ElegantOTA.clearAuth();

Use Cases

The Authentication feature is crucial in various scenarios:

  1. Security: It safeguards your IoT devices against unauthorized access, reducing the risk of malicious updates or configuration changes.

  2. Access Control: By setting unique credentials for each device, you can control access to individual devices, ensuring that only authorized personnel or systems can modify them.

  3. Compliance: Some security and compliance standards require authentication mechanisms for IoT devices. ElegantOTA's Authentication feature helps you meet these requirements.

Best Practices

To ensure the effectiveness of the Authentication feature, consider these best practices:

  • Choose strong and unique usernames and passwords for each device.

  • Avoid using default or easily guessable credentials to enhance security.

  • Keep the credentials in a secure location and avoid hardcoding them directly into your code to prevent accidental exposure.

  • Regularly update and rotate the authentication credentials to maintain security.

  • Test the authentication setup thoroughly to ensure that only authorized users can access the device.

- + \ No newline at end of file diff --git a/autoreboot/index.html b/autoreboot/index.html index 4314c19..96229ef 100644 --- a/autoreboot/index.html +++ b/autoreboot/index.html @@ -7,13 +7,13 @@ - +

Auto Reboot

Introduction

Often there comes a situation where you don't want to reboot automatically. In these cases, you can use the setAutoReboot function which will enable/disable automatic reboot of your microcontroller after a successful OTA update.

Setting Auto Reboot

You can set up auto reboot for your device using the ElegantOTA.setAutoReboot(false); function. This functions takes true or false to enable / disable automatic reboot. You can use this function anywhere in your code.

Example Usage

#include <ElegantOTA.h>

void setup() {
// Initialize your hardware and other configurations here

// Disable Auto Reboot
ElegantOTA.setAutoReboot(false);

// Additional setup code
}

void loop() {
// Your main loop code here
}

In the above example, the ElegantOTA.setAutoReboot(false); function call disables automatic reboot.

- + \ No newline at end of file diff --git a/branding/index.html b/branding/index.html index 3e900ac..cdb0025 100644 --- a/branding/index.html +++ b/branding/index.html @@ -7,13 +7,13 @@ - +

Branding

This feature is only available in ElegantOTA Pro.



Branding

Overview

Branding in this context refers to the custom logo that is displayed on the ElegantOTA portal during the OTA update process. You can customize the logo by defining the logo image as a byte array in the logo.h and logo.cpp files of the library's source code.

To add your custom logo on the ElegantOTA portal, follow these steps:

First, you need to create or obtain the logo image you want to display on the ElegantOTA portal during OTA updates. Ensure that the logo image is in a suitable format, such as a SVG (recommended) / PNG or JPG file and make sure your image is optimized & small in file size.

Step 2: Convert Logo Image to a Byte Array

To include the logo in your library, you'll need to convert the image into a byte array.

  1. Go to File2Raw utility ( I created this utility a few years back for the purpose of converting files into byte array for C++ applications ).
  2. Select your logo.
  3. Select "Gzip Compress" & "Use PROGMEM (Arduino)".
  4. Click "Convert".

Step 3: Modify logo.h

  1. Open the logo.h file in your ElegantOTA library source code.

  2. Locate the ELEGANTOTA_LOGO byte array declaration, which should look like this:

    extern const uint8_t ELEGANTOTA_LOGO[];
  3. Replace the length of the ELEGANTOTA_LOGO array with your custom logo's byte array length.

  4. Locate the ELEGANTOTA_LOGO_MIME variable, which defines the MIME type of your logo image. By default, it is set to image/png. If your logo is in a different format (e.g., JPEG), update the ELEGANTOTA_LOGO_MIME variable to the appropriate MIME type.

  5. Set ELEGANTOTA_LOGO_WIDTH & ELEGANTOTA_LOGO_HEIGHT according to your desired size which will be displayed on the webpage.

Step 4: Modify logo.cpp

  1. Open the logo.cpp file in your ElegantOTA library source code.

  2. Replace the contents of the ELEGANTOTA_LOGO array with your custom logo's byte array generated in File2Raw utility.

Step 5: Upload the Modified Library

After making these changes, compile and upload the modified ElegantOTA library to your device.

Once you have uploaded the modified ElegantOTA library to your device, the custom logo will be displayed on the ElegantOTA Portal webpage during OTA updates.

That's it! You have successfully added custom branding to the ElegantOTA portal by defining the logo as a byte array in the logo.h and logo.cpp files. Your logo will now be displayed on the ElegantOTA portal.

Please note that branding, including logos and images, may be subject to copyright and trademark laws. Ensure you have the necessary rights or permissions to use any branding elements in your project.

- + \ No newline at end of file diff --git a/callbacks/index.html b/callbacks/index.html index c613d6d..78ea384 100644 --- a/callbacks/index.html +++ b/callbacks/index.html @@ -7,13 +7,13 @@ - +

Callbacks

Overview

The ElegantOTA library offers three callbacks that allow you to customize the behavior of your OTA update process. These callbacks enable you to execute specific functions at different stages of the update process, giving you control over the update flow. Here are the available callbacks:

  1. void onStart(void callable(void));
  2. void onProgress(void callable(size_t current, size_t final));
  3. void onEnd(void callable(bool success));

Let's delve into the details of each callback and how to use them effectively.

1. onStart Callback

The onStart callback is triggered when the OTA update process begins. It's a convenient way to perform any setup or initialization tasks before the update process starts. You can use this callback to prepare your device for the update, such as saving important data, configuring pins, or setting up any required resources.

Example:

ElegantOTA.onStart([]() {
Serial.println("OTA update process started.");
// Add your initialization tasks here.
});

2. onProgress Callback

The onProgress callback is called periodically during the OTA update to provide information about the progress of the update. It's useful for tracking the percentage of completion or displaying progress information to the user. This callback passes two parameters: current (the number of bytes transferred so far) and final (the total number of bytes to be transferred).

Note: onProgress callback can be called very frequently while the update is getting downloaded. It's neccessary to defer any tasks or logging so that core is not overloaded. Please refer to 'demo' example where progress is logged after every second.

Example:

ElegantOTA.onProgress([](size_t current, size_t final) {
Serial.printf("Progress: %u%%\n", (current * 100) / final);
});

3. onEnd Callback

The onEnd callback is invoked when the OTA update process completes, whether it succeeds or fails. It passes a boolean parameter success indicating the outcome of the update. You can use this callback to perform cleanup tasks or take action based on whether the update was successful or not.

Example:

ElegantOTA.onEnd([](bool success) {
if (success) {
Serial.println("OTA update completed successfully.");
// Add success handling here.
} else {
Serial.println("OTA update failed.");
// Add failure handling here.
}
});
- + \ No newline at end of file diff --git a/commercial-license/index.html b/commercial-license/index.html index cf4b432..b5bc044 100644 --- a/commercial-license/index.html +++ b/commercial-license/index.html @@ -7,13 +7,13 @@ - +

Commercial License

ElegantOTA Lite (open-source version) and ElegantOTA Pro are two different versions of the same OTA (Over-The-Air) update library, each with its own set of features and licensing terms. Here's a comparison between ElegantOTA Lite, which is open-source and AGPL-3.0 based, and ElegantOTA Pro:

  1. Licensing:

    • ElegantOTA Lite: This version is open-source and released under the AGPL-3.0 license. It means that it's freely available for anyone to use, modify, and distribute. However, if you use ElegantOTA Lite in a commercial product, the AGPL-3.0 license requires you to make the source code of your product, including any modifications to ElegantOTA Lite, available to the public.

    • ElegantOTA Pro: This version is offered under a one-time charge for a commercial license. It allows you to use ElegantOTA Pro in a commercial product without the requirement to open-source your proprietary code. The commercial license provides more flexibility and protection for businesses.

  2. Support:

    • ElegantOTA Lite: Support for ElegantOTA Lite is typically community-driven. You may find help through online forums, documentation, or user-contributed resources. However, professional support may be limited.

    • ElegantOTA Pro: ElegantOTA Pro includes dedicated support and assistance. This can be essential for businesses that require timely and reliable support to ensure their OTA update process runs smoothly.

In summary, the choice between ElegantOTA Lite and ElegantOTA Pro depends on your specific needs and the nature of your project:

  • If you are working on an open-source project or have no concerns about the AGPL-3.0 license's requirements and need basic OTA update functionality, ElegantOTA Lite is a viable choice.

  • If you are developing a commercial product, ElegantOTA Pro provides a more comprehensive and professionally supported solution while allowing you to maintain the proprietary nature of your code. However, it comes with a one-time commercial licensing fee.

You can get ElegantOTA Pro via the official product page at: https://elegantota.pro

- + \ No newline at end of file diff --git a/custom-title/index.html b/custom-title/index.html index a6dfeae..f353f9d 100644 --- a/custom-title/index.html +++ b/custom-title/index.html @@ -7,13 +7,13 @@ - +

Custom Title

This feature is only available in ElegantOTA Pro.


Custom Title

Overview

The setTitle() function is a method provided by the ElegantOTA Pro library. It is used to set the title of the OTA (Over-The-Air) update portal. This title is displayed at the top of the update portal web page, providing a user-friendly and customizable interface for managing firmware updates.

Syntax

void setTitle(const char* title);

Example

#include <ElegantOTA.h>

void setup() {
// Initialize the ElegantOTA library
ElegantOTA.begin();

// Set the title of the OTA update portal
ElegantOTA.setTitle("OTA Update - XYZ Inc");
}

void loop() {
// Your main program loop
}

Usage

  1. Include the ElegantOTA library in your Arduino sketch.
  2. In the setup() function of your sketch, initialize the ElegantOTA library using ElegantOTA.begin().
  3. Use the setTitle() function to set a meaningful title for your OTA update portal. This title will be displayed at the top of the update portal web page when users access it.
  4. Continue with the rest of your sketch's setup and loop functions.
- + \ No newline at end of file diff --git a/disable-filesystem-ota/index.html b/disable-filesystem-ota/index.html index ae6ac1e..c990ef3 100644 --- a/disable-filesystem-ota/index.html +++ b/disable-filesystem-ota/index.html @@ -7,13 +7,13 @@ - +

Disable Filesystem OTA

This feature is only available in ElegantOTA Pro.



Modes

ElegantOTA allows you to selective enable or disable OTA modes of your choice for security reasons or when you have a important task running where you don't want it to get interrupted by an OTA update. This will be represented in the portal (ElegantOTA webpage) too.

Using these functions you can enable or disable filesystem updates ( SPIFFS or LittleFS ).

Disable Filesystem OTA:

// Pass 'false' to disable Filesystem mode
ElegantOTA.setFilesystemMode(true);

Enable Filesystem OTA:

// Pass 'true' to enable Filesystem mode
ElegantOTA.setFilesystemMode(false);

Get Filesystem OTA mode status:

// You can use this logic inside a function if neccessary
if(ElegantOTA.checkFilesystemMode() == true) {
Serial.println("Filesystem mode is enabled");
} else {
Serial.println("Filesystem mode is disabled");
}
- + \ No newline at end of file diff --git a/disable-firmware-ota/index.html b/disable-firmware-ota/index.html index ee38581..7bb17c1 100644 --- a/disable-firmware-ota/index.html +++ b/disable-firmware-ota/index.html @@ -7,13 +7,13 @@ - +

Disable Firmware OTA

This feature is only available in ElegantOTA Pro.



Modes

ElegantOTA allows you to selective enable or disable OTA modes of your choice for security reasons or when you have a important task running where you don't want it to get interrupted by an OTA update. This will be represented in the portal (ElegantOTA webpage) too.

This function should be used very carefully as it blocks firmware update! If by mistake this is left disabled, your device will not be recoverable by an OTA update.

Disable Firmware OTA:

// Pass 'false' to disable Firmware mode
ElegantOTA.setFirmwareMode(false);

Enable Firmware OTA:

// Pass 'true' to enable Firmware mode
ElegantOTA.setFirmwareMode(true);

Get Firmware OTA mode status:

// You can use this logic inside a function if neccessary
if(ElegantOTA.checkFirmwareMode() == true) {
Serial.println("Firmware mode is enabled");
} else {
Serial.println("Firmware mode is disabled");
}
- + \ No newline at end of file diff --git a/examples/index.html b/examples/index.html index 57f10dd..77cc843 100644 --- a/examples/index.html +++ b/examples/index.html @@ -7,13 +7,13 @@ - +

Examples

ElegantOTA repository comes with Demo and AsyncDemo examples.

Demo Example

Demo example is for people who are using the inbuilt webserver of their platform. This is meant to run without any dependencies.

Async Demo Example

Async demo example utilizes AsyncWebServer which has significant performance gains. Only use this example as reference when your project is using AsyncWebServer. Know more about this in "Async Mode" documentation.

You can find those examples in the ElegantOTA repository.

- + \ No newline at end of file diff --git a/firmware-version/index.html b/firmware-version/index.html index 59fb495..54c5293 100644 --- a/firmware-version/index.html +++ b/firmware-version/index.html @@ -7,13 +7,13 @@ - +

Firmware Version

This feature is only available in ElegantOTA Pro.



Firmware Version

Introduction

The Firmware Version feature in ElegantOTA allows you to specify and manage the version of the firmware running on your Internet of Things (IoT) devices. By setting a firmware version, you can easily track and control the software running on your devices, making it simpler to perform updates, monitor compatibility, and manage your IoT ecosystem effectively.

You can set the Firmware Version for your device using the ElegantOTA.setFWVersion("version"); function.

Example Usage:

#include <ElegantOTA.h>

void setup() {
// Initialize your hardware and other configurations here

// Set the Firmware Version
ElegantOTA.setFWVersion("1.0.0");

// Additional setup code
}

void loop() {
// Your main loop code here
}

In the above example, the ElegantOTA.setFWVersion("1.0.0"); function call assigns the firmware version "1.0.0" to the device.

Use Cases

The Firmware Version feature can be beneficial in various scenarios:

  1. Firmware Updates: When new firmware versions become available, the Firmware Version identifier helps you check if an update is necessary. It also allows you to verify that devices have received the correct update.

  2. Compatibility: By knowing the firmware version of each device, you can ensure that all components of your IoT network are compatible. This is especially important when devices communicate or interact with each other.

  3. Historical Tracking: You can maintain a history of firmware versions installed on each device, which can be useful for troubleshooting issues or understanding the evolution of your firmware.

  4. Remote Diagnostics: When diagnosing issues remotely, having access to the firmware version can help you identify potential problems related to specific software releases.

Best Practices

To make the most of the Firmware Version feature, consider the following best practices:

  • Follow a consistent versioning scheme for your firmware, such as Semantic Versioning (SemVer), to ensure clarity and compatibility tracking.

  • Set the firmware version during the device's initialization phase, such as in the setup() function, to guarantee that it accurately reflects the installed firmware.

  • When updating firmware, always ensure that the new version is correctly set using ElegantOTA.setFWVersion() to maintain accurate version information.

- + \ No newline at end of file diff --git a/getting-started/index.html b/getting-started/index.html index 859d8f6..853d27f 100644 --- a/getting-started/index.html +++ b/getting-started/index.html @@ -7,13 +7,13 @@ - +

Getting Started

Getting started with ElegantOTA is pretty simple. This guide assumes that you already have a simple webserver code prepared and you just need to inject the following lines in your existing code:

Include Dependency

At the very beginning of sketch include the ElegantOTA library.

#include <ElegantOTA.h>

Add begin function

Now add the begin function of ElegantOTA in setup block of your sketch. This will inject ElegantOTA routes and logic into the web server.

ElegantOTA.begin(&server);

Add loop function

Last part is to call the loop function of ElegantOTA in loop block of your sketch. This loop block is necessary for ElegantOTA to handle reboot after OTA update.

ElegantOTA.loop();

Final Code

That's it! This is how a ready to use example will look like. After uploading the code to your platform, you can access ElegantOTA portal on http://<YOUR_DEVICE_IP>/update.

/*
-----------------------
ElegantOTA - Demo Example
-----------------------

Skill Level: Beginner

This example provides with a bare minimal app with ElegantOTA functionality.

Github: https://github.com/ayushsharma82/ElegantOTA
WiKi: https://docs.elegantota.pro

Works with both ESP8266 & ESP32

-------------------------------

Upgrade to ElegantOTA Pro: https://elegantota.pro

*/


#if defined(ESP8266)
#include <ESP8266WiFi.h>
#include <WiFiClient.h>
#include <ESP8266WebServer.h>
#elif defined(ESP32)
#include <WiFi.h>
#include <WiFiClient.h>
#include <WebServer.h>
#endif

#include <ElegantOTA.h>

const char* ssid = "........";
const char* password = "........";

#if defined(ESP8266)
ESP8266WebServer server(80);
#elif defined(ESP32)
WebServer server(80);
#endif

void setup(void) {
Serial.begin(115200);
WiFi.mode(WIFI_STA);
WiFi.begin(ssid, password);
Serial.println("");

// Wait for connection
while (WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.print(".");
}
Serial.println("");
Serial.print("Connected to ");
Serial.println(ssid);
Serial.print("IP address: ");
Serial.println(WiFi.localIP());

server.on("/", []() {
server.send(200, "text/plain", "Hi! This is ElegantOTA Demo.");
});

ElegantOTA.begin(&server); // Start ElegantOTA
server.begin();
Serial.println("HTTP server started");
}

void loop(void) {
server.handleClient();
ElegantOTA.loop();
}
- + \ No newline at end of file diff --git a/hardware-id/index.html b/hardware-id/index.html index bfd3770..afa2024 100644 --- a/hardware-id/index.html +++ b/hardware-id/index.html @@ -7,13 +7,13 @@ - +

Hardware ID

This feature is only available in ElegantOTA Pro.



Hardware ID

Introduction

The Hardware ID feature in ElegantOTA is shown on the ElegantOTA Pro portal. This ID should be a unique string that helps you easily identify the specific hardware device among others in your network.

Example Usage:

#include <ElegantOTA.h>

void setup() {
// Initialize your hardware and other configurations here

// Set the Hardware ID
ElegantOTA.setID("my_device_001");

// Additional setup code
}

void loop() {
// Your main loop code here
}

In the above example, the ElegantOTA.setID("my_device_001"); function call assigns the Hardware ID "my_device_001" to the device.

Best Practices

To make the most of the Hardware ID feature, consider the following best practices:

  • Choose a Hardware ID that is unique to each device to avoid conflicts.

  • Avoid using special characters or spaces in the Hardware ID, as these might cause issues when used in network communication or file naming.

  • Document and keep track of the Hardware IDs for all your devices to ensure proper management.

  • Ensure that the Hardware ID is set during the device's initialization phase, such as in the setup() function, to guarantee that it is properly configured before any network or communication activities.

- + \ No newline at end of file diff --git a/index.html b/index.html index 5b38b01..5d627c4 100644 --- a/index.html +++ b/index.html @@ -7,13 +7,13 @@ - +
-



   

ElegantOTA provides a beautiful user interface to upload over-the-air firmware/filesystem updates to your hardware with precise status and progress. ElegantOTA is designed to make the process of OTA updates slick and simple!

Note: This documentation serves both the versions of ElegantOTA ( Lite - Open Source and Pro ). Therefore, if you notice "(Pro)" mentioned on any of the features in the documentation, that means it is only available in ElegantOTA Pro.
- +



   

ElegantOTA provides a beautiful user interface to upload over-the-air firmware/filesystem updates to your hardware with precise status and progress. ElegantOTA is designed to make the process of OTA updates slick and simple!

Note: This documentation serves both the versions of ElegantOTA ( Lite - Open Source and Pro ). Therefore, if you notice "(Pro)" mentioned on any of the features in the documentation, that means it is only available in ElegantOTA Pro.
+ \ No newline at end of file diff --git a/installation/index.html b/installation/index.html index dfdcab0..7f979e0 100644 --- a/installation/index.html +++ b/installation/index.html @@ -7,13 +7,13 @@ - +

Installation

ElegantOTA requires no dependencies and runs out of the box with existing libraries provided in Arduino core. You can install ElegantOTA through one of the following methods:


1. Via Arduino IDE - Library Manager

Go to Sketch > Include Library > Library Manager > Search for "ElegantOTA" > Install


2. Manual Install

For Windows:
  • Download the Repository
  • Extract the .zip in Documents > Arduino > Libraries > {Place "ElegantOTA" folder Here}
For Linux:
  • Download the Repository
  • Extract the .zip in Sketchbook > Libraries > {Place "ElegantOTA" folder Here}

3. Import through Arduino IDE

  • Download the Repository
  • Go to Sketch > Include Library > Add .zip Library > Select the Downloaded .zip File.

- + \ No newline at end of file