Skip to content

Commit

Permalink
Merge pull request #135 from ayushsharma82/v4
Browse files Browse the repository at this point in the history
Bump to V4
  • Loading branch information
ayushsharma82 authored Nov 3, 2022
2 parents be79e19 + f70e8ed commit 0a39e6d
Show file tree
Hide file tree
Showing 76 changed files with 3,656 additions and 22,364 deletions.
7 changes: 5 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
*.lo
*.o
*.obj
.docusaurus

# Precompiled Headers
*.gch
Expand All @@ -31,7 +32,9 @@
*.out
*.app

/.vscode
/build
node_modules
.DS_Store
.vscode
./vue-frontend/dist
/build
/portal
4 changes: 4 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[submodule "portal"]
path = portal
url = https://github.com/ayushsharma82/espdash-portal
branch = main
90 changes: 43 additions & 47 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<p>
<br/>
</p>
<p align="center"><img src="/docs/logo.png?sanitize=true&raw=true" width="300"></p>
<p align="center"><img src="/docs/dash-github-splash.png?sanitize=true&raw=true" width="700"></p>
<br/>
<br/>

Expand All @@ -11,80 +11,76 @@
<img src="https://img.shields.io/github/workflow/status/ayushsharma82/ESP-DASH/Arduino%20Library%20CI/master?style=for-the-badge" />
&nbsp;
<img src="https://img.shields.io/github/license/ayushsharma82/ESP-DASH.svg?style=for-the-badge" />
&nbsp;
<a href="https://www.buymeacoffee.com/6QGVpSj" target="_blank"><img src="https://img.shields.io/badge/Buy%20me%20a%20coffee-%245-orange?style=for-the-badge&logo=buy-me-a-coffee" /></a>
</p>

<br/>
<br/>
<p align="center"><b>DASH V4</b> is the 4th-gen blazing fast library to create a functional & real-time dashboard for <b>ESP8266</b> & <b>ESP32</b> microcontrollers. This library includes charts, display cards, interactive buttons and many more components to create a perfect dashboard which is accessible locally via your IoT device's IP. DASH does not require any kind of internet connection, everything is stored locally.</p>

<p align="center"><b>DASH V3</b> is a blazing fast library to create a functional & real-time dashboard for <b>ESP8266</b> & <b>ESP32</b> microcontrollers. This library includes charts, display cards, interactive buttons and many more components to create a perfect dashboard which is accessible locally via your device IP without the need of an internet connection.</p>
<br/>

<h2>Features</h2>

- 🔥 Automatic webpage generation.
- ⏱️ Realtime updates to all connected clients.
- 🎷 No need to learn HTML/CSS/JS. ESP-DASH provides you with a C++ interface.
- 🛫 Ready to use components for your data.
- 🏀 It's dynamic! Add or remove components anytime from the webpage.
- 📈 Inbuilt charts support.

<br/>
<br/>

<h2>Preview</h2>
<img src="/docs/preview.png?raw=true">

<h2>Upgrade to Pro</h2>
Checkout the Pro version of ESP-DASH which comes with extended functionality and exclusive cards & charts. ESP-DASH Pro supports custom order of cards and no "Buy me a coffee" button on the dashboard.
<h2>Documentation</h2>
<p>Learn more about Installation & Usage: <a href="https://docs.espdash.pro">Click Here</a></p>

<br> <b>Available Here: </b>
<ol>
<li>https://www.buymeacoffee.com/6QGVpSj/e/28263</li>
<li>https://espdash.pro</li>
</ol>
<br/>
<br/>

<a href="https://espdash.pro" target="_blank">
<img src="/docs/dashboard-mockup.png" alt="ESP-DASH Pro">
</a>
<h2>Open-Source Preview</h2>
<img src="/docs/preview.png?raw=true">

<br/>
<br/>

<h2>Features</h2>
<p>
<ul style="list-style-position: inside;">
<li>Works on Websockets</li>
<li>Real-time push updates</li>
<li>Charts Support</li>
<li>Interactive UI Components</li>
<li>Uses AsyncWebserver for better performance</li>
</ul>
</p>
<h2>Want More? Upgrade to Pro</h2>

<br>
<br>
ESP-DASH Pro comes with the following extended functionality:
- More charts ( Line, Area, Pie )
- More cards ( Air, Energy, Text Input & Joystick )
- Tabs Support! Add multiple pages to your dashboard.
- Custom title
- Custom logo
- Custom size support for cards & charts
- Atlast, It is a fantastic way to support the developer for the time went into the making & maintaining the library.

<h2>Documentation</h2>
<p>Learn more about Installation & Usage: <a href="https://ayushsharma82.github.io/ESP-DASH/">Click Here</a></p>
<br> <b>Available here: </b>

- [BMC Page](https://www.buymeacoffee.com/6QGVpSj/e/28263)
- [Official Website](https://espdash.pro)

<br/>
<br/>

<h2>Sponsor</h2>
<p>
This project was created in collaboration with <a href="https://naturalistic.io">Naturalistic Design Studio</a>:
<a href="https://espdash.pro" target="_blank">
<img src="/docs/pro-preview.png" alt="ESP-DASH Pro">
</a>

<br>
<br>
<a href="https://naturalistic.io" target="_blank"><img src="/docs/studio.png" alt="Naturalistic Studio" width="350px"></a>
</p>

<br/>
<br/>
<br/>

<h2>Contributions</h2>
<p>Every contribution to this repository is highly appreciated! Don't fear to create issues / pull requests which enhance or fix the library, our maintainers are always ready to keep this library up & compiling.</p>
<p>
If you like this amazing library, You can buy me a coffee:
<br/><br/>
<a href="https://www.buymeacoffee.com/6QGVpSj" target="_blank"><img src="https://img.shields.io/badge/Buy%20me%20a%20coffee-%245-orange?style=for-the-badge&logo=buy-me-a-coffee" /></a>
</p>
<p>Every contribution to this repository is highly appreciated! If you spot any bug or problem, open a issue or pull request so that it can be rectified for everyone.</p>

**For feature requests:** Please open a issue and I'll add the feature in a future release once I get some time in my hands.

<br/>
<br/>


<h2>License</h2>
ESP-DASH is licensed under General Public License v3 ( GPLv3 ).

ESP-DASH is licensed under General Public License v3 ( GPLv3 ). If you are intending to use ESP-DASH in a commercial project, please consider buying the [ESP-DASH Pro](https://espdash.pro) which comes with a less restrictive Apache-2.0 license.

<br>
<br>
Binary file added docs/dash-github-splash.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/dash-github-splash.psd
Binary file not shown.
Binary file removed docs/dashboard-mockup.png
Binary file not shown.
1 change: 1 addition & 0 deletions docs/logo-collapsed.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed docs/logo.png
Binary file not shown.
1 change: 1 addition & 0 deletions docs/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/preview.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/pro-preview.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed docs/studio.png
Binary file not shown.
2 changes: 1 addition & 1 deletion examples/AccessPoint/AccessPoint.ino
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
and initialize our dashboard which can be accessed via 192.168.4.1
Github: https://github.com/ayushsharma82/ESP-DASH
WiKi: https://ayushsharma82.github.io/ESP-DASH/
WiKi: https://docs.espdash.pro
Works with both ESP8266 & ESP32
Expand Down
2 changes: 1 addition & 1 deletion examples/Basic/Basic.ino
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
of some cards and then update them in realtime ( at 3s interval ).
Github: https://github.com/ayushsharma82/ESP-DASH
WiKi: https://ayushsharma82.github.io/ESP-DASH/
WiKi: https://docs.espdash.pro
Works with both ESP8266 & ESP32
Expand Down
118 changes: 118 additions & 0 deletions examples/Benchmark/Benchmark.ino
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
/*
-----------------------------
ESPDASH Lite - Benchmark Example
-----------------------------
Use this benchmark example to test if ESP-DASH is working properly on your platform.
Github: https://github.com/ayushsharma82/ESP-DASH
WiKi: https://docs.espdash.pro
Works with both ESP8266 & ESP32
-------------------------------
Upgrade to ESP-DASH Pro: https://espdash.pro
*/

#include <Arduino.h>
#if defined(ESP8266)
/* ESP8266 Dependencies */
#include <ESP8266WiFi.h>
#include <ESPAsyncTCP.h>
#include <ESPAsyncWebServer.h>
#elif defined(ESP32)
/* ESP32 Dependencies */
#include <WiFi.h>
#include <AsyncTCP.h>
#include <ESPAsyncWebServer.h>
#endif

#include <ESPDash.h>


/* Your WiFi Credentials */
const char* ssid = ""; // SSID
const char* password = ""; // Password

/* Start Webserver */
AsyncWebServer server(80);

/* Attach ESP-DASH to AsyncWebServer */
ESPDash dashboard(&server);

Card generic(&dashboard, GENERIC_CARD, "Generic");
Card temp(&dashboard, TEMPERATURE_CARD, "Temperature", "°C");
Card hum(&dashboard, HUMIDITY_CARD, "Humidity", "%");
Card status1(&dashboard, STATUS_CARD, "Status 1", "success");
Card status2(&dashboard, STATUS_CARD, "Status 2", "warning");
Card status3(&dashboard, STATUS_CARD, "Status 3", "danger");
Card status4(&dashboard, STATUS_CARD, "Status 4", "idle");
Card progress(&dashboard, PROGRESS_CARD, "Progress", "", 0, 100);
Card button(&dashboard, BUTTON_CARD, "Test Button");
Card slider(&dashboard, SLIDER_CARD, "Test Slider", "", 0, 255);

Chart bar(&dashboard, BAR_CHART, "Power Usage (kWh)");

// Bar Chart Data
String XAxis[] = {"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"};
int YAxis[] = {0, 0, 0, 0, 0, 0, 0};


void setup() {
Serial.begin(115200);

/* Connect WiFi */
WiFi.mode(WIFI_STA);
WiFi.begin(ssid, password);
if (WiFi.waitForConnectResult() != WL_CONNECTED) {
Serial.printf("WiFi Failed!\n");
return;
}
Serial.print("IP Address: ");
Serial.println(WiFi.localIP());

bar.updateX(XAxis, 7);

/* Attach Button Callback */
button.attachCallback([&](bool value){
/* Print our new button value received from dashboard */
Serial.println("Button Triggered: "+String((value)?"true":"false"));
/* Make sure we update our button's value and send update to dashboard */
button.update(value);
dashboard.sendUpdates();
});

/* Attach Slider Callback */
slider.attachCallback([&](int value){
/* Print our new slider value received from dashboard */
Serial.println("Slider Triggered: "+String(value));
/* Make sure we update our slider's value and send update to dashboard */
slider.update(value);
dashboard.sendUpdates();
});

/* Start AsyncWebServer */
server.begin();
}

void loop() {
// Randomize YAxis Values ( for demonstration purposes only )
for(int i=0; i < 7; i++){
YAxis[i] = (int)random(0, 200);
}

/* Update Chart Y Axis (yaxis_array, array_size) */
bar.updateY(YAxis, 7);

// Update all cards with random values
generic.update((int)random(0, 100));
temp.update((int)random(0, 100));
hum.update((int)random(0, 100));
status1.update("success");
status2.update("warning");
status3.update("danger");
status4.update("idle");
progress.update((int)random(0, 100));

dashboard.sendUpdates();
delay(2000);
}
2 changes: 1 addition & 1 deletion examples/Chart/Chart.ino
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
and then update it at a regular interval.
Github: https://github.com/ayushsharma82/ESP-DASH
WiKi: https://ayushsharma82.github.io/ESP-DASH/
WiKi: https://docs.espdash.pro
Works with both ESP8266 & ESP32
Expand Down
2 changes: 1 addition & 1 deletion examples/Dynamic/Dynamic.ino
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
of some cards and then remove a card from dashboard after some time.
Github: https://github.com/ayushsharma82/ESP-DASH
WiKi: https://ayushsharma82.github.io/ESP-DASH/
WiKi: https://docs.espdash.pro
Works with both ESP8266 & ESP32
Expand Down
2 changes: 1 addition & 1 deletion examples/Interactive/Interactive.ino
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
of a button and a slider.
Github: https://github.com/ayushsharma82/ESP-DASH
WiKi: https://ayushsharma82.github.io/ESP-DASH/
WiKi: https://docs.espdash.pro
Works with both ESP8266 & ESP32
Expand Down
2 changes: 2 additions & 0 deletions keywords.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
ESPDash KEYWORD1
Card KEYWORD1
Chart KEYWORD1
Statistic KEYWORD1
setAuthentication KEYWORD2
sendUpdates KEYWORD2
refreshLayout KEYWORD2
add KEYWORD2
remove KEYWORD2
update KEYWORD2
Expand Down
2 changes: 1 addition & 1 deletion library.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"maintainer": true
}
],
"version": "3.0.8",
"version": "4.0.0",
"frameworks": "arduino",
"platforms": "espressif",
"dependencies":
Expand Down
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=ESP-DASH
version=3.0.8
version=4.0.0
author=Ayush Sharma
category=Communication
maintainer=Ayush Sharma <asrocks5@gmail.com>
Expand Down
1 change: 1 addition & 0 deletions portal
Submodule portal added at e0d551
Loading

0 comments on commit 0a39e6d

Please sign in to comment.