Merge branch 'development' into main

This commit is contained in:
Stephan Mühl
2023-03-31 15:34:34 +02:00
committed by GitHub
16 changed files with 1087 additions and 558 deletions

View File

@@ -0,0 +1,320 @@
const uint8_t Fallout[] PROGMEM = {
0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x1F, 0xF8,
0xF9, 0xCF, 0x9C, 0xF9, 0xCF, 0x9F, 0xF9, 0xF0, 0x3E, 0x3E, 0x1F, 0x1F,
0x0F, 0x8F, 0x87, 0xC7, 0xC3, 0xE3, 0xE7, 0xFF, 0xF3, 0xFF, 0xF8, 0x7C,
0x7C, 0x3E, 0x3E, 0x1F, 0x1F, 0x3F, 0xFF, 0xFF, 0xFF, 0xF3, 0xE3, 0xE1,
0xF1, 0xF0, 0xF8, 0xF8, 0x7C, 0x7C, 0x3E, 0x3E, 0x00, 0x07, 0xC0, 0x0F,
0x80, 0xFF, 0xF9, 0xFF, 0xF3, 0xFF, 0xFF, 0x00, 0x3E, 0x00, 0x1F, 0xF8,
0x3F, 0xF0, 0x7F, 0xE0, 0x00, 0xF8, 0x01, 0xFF, 0xFF, 0x1F, 0xFE, 0x3F,
0xFC, 0x03, 0xE0, 0x07, 0xC0, 0xF8, 0x01, 0x8F, 0x80, 0x18, 0xF8, 0x0F,
0x8F, 0x80, 0xF8, 0xF8, 0x0F, 0x80, 0x03, 0xE0, 0x00, 0x3E, 0x00, 0x1F,
0x00, 0x01, 0xF0, 0x00, 0x1F, 0x00, 0x07, 0xC0, 0x00, 0x7C, 0x00, 0x3E,
0x01, 0xF3, 0xE0, 0x1F, 0x3E, 0x01, 0xFF, 0x80, 0x1F, 0xF8, 0x01, 0xF0,
0x07, 0xF0, 0x03, 0xF8, 0x0F, 0x8F, 0x87, 0xC7, 0xC3, 0xE3, 0xE0, 0x3F,
0x80, 0x1F, 0xC0, 0x7F, 0x9F, 0x3F, 0xCF, 0x9F, 0xE7, 0xFE, 0x7F, 0x9F,
0x3F, 0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0x3F, 0xF0, 0xFF, 0xFF, 0xFF, 0xFC, 0x07, 0xC0, 0x0F, 0x80, 0x1F,
0x00, 0xF8, 0x01, 0xF0, 0x1F, 0x00, 0x3E, 0x00, 0x7C, 0x03, 0xFF, 0xFF,
0xFF, 0xF0, 0x07, 0xF0, 0x7F, 0x3E, 0x03, 0xE0, 0x3E, 0x03, 0xE0, 0x3E,
0x0F, 0x80, 0xF8, 0x0F, 0x80, 0x3E, 0x03, 0xE0, 0x3E, 0x03, 0xE0, 0x3E,
0x00, 0x7F, 0x07, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xFE, 0x0F, 0xE0, 0x07, 0xC0, 0x7C,
0x07, 0xC0, 0x7C, 0x07, 0xC0, 0x1F, 0x01, 0xF0, 0x1F, 0x07, 0xC0, 0x7C,
0x07, 0xC0, 0x7C, 0x07, 0xCF, 0xE0, 0xFE, 0x00, 0x3E, 0x0E, 0x7C, 0x1F,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x3E, 0x30, 0x7C, 0x00 };
const GFXglyph FalloutGlyphs[] PROGMEM = {
{ 0, 1, 1, 12, 0, 0 }, // 0x20 ' '
{ 1, 5, 17, 7, 0, -16 }, // 0x21 '!'
{ 12, 12, 5, 15, 0, -19 }, // 0x22 '"'
{ 20, 17, 17, 20, 0, -16 }, // 0x23 '#'
{ 57, 15, 17, 17, 0, -16 }, // 0x24 '$'
{ 89, 20, 17, 22, 0, -16 }, // 0x25 '%'
{ 132, 17, 17, 20, 0, -16 }, // 0x26 '&'
{ 169, 5, 5, 7, 0, -19 }, // 0x27 '''
{ 173, 10, 17, 12, 0, -16 }, // 0x28 '('
{ 195, 10, 17, 12, 0, -16 }, // 0x29 ')'
{ 217, 17, 13, 20, 0, -14 }, // 0x2A '*'
{ 245, 15, 13, 17, 0, -14 }, // 0x2B '+'
{ 270, 7, 7, 10, 0, -4 }, // 0x2C ','
{ 277, 15, 3, 17, 0, -9 }, // 0x2D '-'
{ 283, 5, 5, 7, 0, -4 }, // 0x2E '.'
{ 287, 15, 17, 17, 0, -16 }, // 0x2F '/'
{ 319, 15, 17, 17, 0, -16 }, // 0x30 '0'
{ 351, 10, 17, 12, 0, -16 }, // 0x31 '1'
{ 373, 15, 17, 17, 0, -16 }, // 0x32 '2'
{ 405, 15, 17, 17, 0, -16 }, // 0x33 '3'
{ 437, 15, 17, 17, 0, -16 }, // 0x34 '4'
{ 469, 15, 17, 17, 0, -16 }, // 0x35 '5'
{ 501, 15, 17, 17, 0, -16 }, // 0x36 '6'
{ 533, 15, 17, 17, 0, -16 }, // 0x37 '7'
{ 565, 15, 17, 17, 0, -16 }, // 0x38 '8'
{ 597, 15, 17, 17, 0, -16 }, // 0x39 '9'
{ 629, 5, 15, 7, 0, -14 }, // 0x3A ':'
{ 639, 7, 17, 10, 0, -14 }, // 0x3B ';'
{ 654, 12, 17, 15, 0, -16 }, // 0x3C '<'
{ 680, 15, 10, 17, 0, -11 }, // 0x3D '='
{ 699, 12, 17, 15, 0, -16 }, // 0x3E '>'
{ 725, 15, 17, 17, 0, -16 }, // 0x3F '?'
{ 757, 17, 17, 20, 0, -16 }, // 0x40 '@'
{ 794, 20, 17, 22, 0, -16 }, // 0x41 'A'
{ 837, 17, 17, 20, 0, -16 }, // 0x42 'B'
{ 874, 15, 17, 17, 0, -16 }, // 0x43 'C'
{ 906, 17, 17, 20, 0, -16 }, // 0x44 'D'
{ 943, 15, 17, 17, 0, -16 }, // 0x45 'E'
{ 975, 15, 17, 17, 0, -16 }, // 0x46 'F'
{ 1007, 17, 17, 20, 0, -16 }, // 0x47 'G'
{ 1044, 17, 17, 20, 0, -16 }, // 0x48 'H'
{ 1081, 5, 17, 7, 0, -16 }, // 0x49 'I'
{ 1092, 17, 17, 20, 0, -16 }, // 0x4A 'J'
{ 1129, 17, 17, 20, 0, -16 }, // 0x4B 'K'
{ 1166, 15, 17, 17, 0, -16 }, // 0x4C 'L'
{ 1198, 17, 17, 20, 0, -16 }, // 0x4D 'M'
{ 1235, 17, 17, 20, 0, -16 }, // 0x4E 'N'
{ 1272, 17, 17, 20, 0, -16 }, // 0x4F 'O'
{ 1309, 17, 17, 20, 0, -16 }, // 0x50 'P'
{ 1346, 17, 19, 20, 0, -16 }, // 0x51 'Q'
{ 1387, 17, 17, 20, 0, -16 }, // 0x52 'R'
{ 1424, 17, 17, 20, 0, -16 }, // 0x53 'S'
{ 1461, 15, 17, 17, 0, -16 }, // 0x54 'T'
{ 1493, 17, 17, 20, 0, -16 }, // 0x55 'U'
{ 1530, 20, 17, 22, 0, -16 }, // 0x56 'V'
{ 1573, 17, 17, 20, 0, -16 }, // 0x57 'W'
{ 1610, 20, 17, 22, 0, -16 }, // 0x58 'X'
{ 1653, 17, 17, 20, 0, -16 }, // 0x59 'Y'
{ 1690, 17, 17, 20, 0, -16 }, // 0x5A 'Z'
{ 1727, 10, 17, 12, 0, -16 }, // 0x5B '['
{ 1749, 17, 17, 20, 0, -16 }, // 0x5C '\'
{ 1786, 10, 17, 12, 0, -16 }, // 0x5D ']'
{ 1808, 17, 10, 20, 0, -16 }, // 0x5E '^'
{ 1830, 15, 2, 17, 0, -1 }, // 0x5F '_'
{ 1834, 7, 7, 10, 0, -16 }, // 0x60 '`'
{ 1841, 15, 12, 17, 0, -11 }, // 0x61 'a'
{ 1864, 15, 17, 17, 0, -16 }, // 0x62 'b'
{ 1896, 12, 12, 15, 0, -11 }, // 0x63 'c'
{ 1914, 15, 17, 17, 0, -16 }, // 0x64 'd'
{ 1946, 15, 12, 17, 0, -11 }, // 0x65 'e'
{ 1969, 12, 17, 15, 0, -16 }, // 0x66 'f'
{ 1995, 15, 17, 17, 0, -11 }, // 0x67 'g'
{ 2027, 15, 17, 17, 0, -16 }, // 0x68 'h'
{ 2059, 5, 12, 7, 0, -11 }, // 0x69 'i'
{ 2067, 12, 17, 15, 0, -11 }, // 0x6A 'j'
{ 2093, 15, 17, 17, 0, -16 }, // 0x6B 'k'
{ 2125, 5, 17, 7, 0, -16 }, // 0x6C 'l'
{ 2136, 17, 12, 20, 0, -11 }, // 0x6D 'm'
{ 2162, 15, 12, 17, 0, -11 }, // 0x6E 'n'
{ 2185, 15, 12, 17, 0, -11 }, // 0x6F 'o'
{ 2208, 15, 17, 17, 0, -11 }, // 0x70 'p'
{ 2240, 15, 17, 17, 0, -11 }, // 0x71 'q'
{ 2272, 12, 12, 15, 0, -11 }, // 0x72 'r'
{ 2290, 15, 12, 17, 0, -11 }, // 0x73 's'
{ 2313, 15, 17, 17, 0, -16 }, // 0x74 't'
{ 2345, 15, 12, 17, 0, -11 }, // 0x75 'u'
{ 2368, 17, 12, 20, 0, -11 }, // 0x76 'v'
{ 2394, 17, 12, 20, 0, -11 }, // 0x77 'w'
{ 2420, 15, 12, 17, 0, -11 }, // 0x78 'x'
{ 2443, 15, 17, 17, 0, -11 }, // 0x79 'y'
{ 2475, 15, 12, 17, 0, -11 }, // 0x7A 'z'
{ 2498, 12, 17, 15, 0, -16 }, // 0x7B '{'
{ 2524, 5, 22, 7, 0, -19 }, // 0x7C '|'
{ 2538, 12, 17, 15, 0, -16 }, // 0x7D '}'
{ 2564, 15, 7, 17, 0, -11 } }; // 0x7E '~'
const GFXfont Fallout__1_20pt7b PROGMEM = {
(uint8_t *)Fallout__1_20pt7bBitmaps,
(GFXglyph *)Fallout__1_20pt7bGlyphs,
0x20, 0x7E, 38 };
// Approx. 3250 bytes

View File

@@ -28,7 +28,7 @@
*/ */
#include "MatrixDisplayUi.h" #include "MatrixDisplayUi.h"
#include "AwtrixFont.h" #include "Fonts/AwtrixFont.h"
MatrixDisplayUi::MatrixDisplayUi(FastLED_NeoMatrix *matrix) MatrixDisplayUi::MatrixDisplayUi(FastLED_NeoMatrix *matrix)
{ {

View File

@@ -29,6 +29,11 @@ void FSWebServer::addHandler(const Uri &uri, WebServerClass::THandlerFunction ha
webserver->on(uri, HTTP_ANY, handler); webserver->on(uri, HTTP_ANY, handler);
} }
void FSWebServer::onNotFound(WebServerClass::THandlerFunction handler)
{
webserver->onNotFound(handler);
}
// List all files saved in the selected filesystem // List all files saved in the selected filesystem
bool FSWebServer::checkDir(char *dirname, uint8_t levels) bool FSWebServer::checkDir(char *dirname, uint8_t levels)
{ {
@@ -80,7 +85,7 @@ bool FSWebServer::begin(const char *path)
webserver->on("/edit", HTTP_PUT, std::bind(&FSWebServer::handleFileCreate, this)); webserver->on("/edit", HTTP_PUT, std::bind(&FSWebServer::handleFileCreate, this));
webserver->on("/edit", HTTP_DELETE, std::bind(&FSWebServer::handleFileDelete, this)); webserver->on("/edit", HTTP_DELETE, std::bind(&FSWebServer::handleFileDelete, this));
#endif #endif
webserver->onNotFound(std::bind(&FSWebServer::handleRequest, this)); //webserver->onNotFound(std::bind(&FSWebServer::handleRequest, this));
webserver->on("/favicon.ico", HTTP_GET, std::bind(&FSWebServer::replyOK, this)); webserver->on("/favicon.ico", HTTP_GET, std::bind(&FSWebServer::replyOK, this));
webserver->on("/", HTTP_GET, std::bind(&FSWebServer::handleIndex, this)); webserver->on("/", HTTP_GET, std::bind(&FSWebServer::handleIndex, this));
#ifdef INCLUDE_SETUP_HTM #ifdef INCLUDE_SETUP_HTM
@@ -153,7 +158,6 @@ IPAddress FSWebServer::startWiFi(uint32_t timeout, const char *apSSID, const cha
#elif defined(ESP32) #elif defined(ESP32)
wifi_config_t conf; wifi_config_t conf;
esp_wifi_get_config(WIFI_IF_STA, &conf); esp_wifi_get_config(WIFI_IF_STA, &conf);
_ssid = reinterpret_cast<const char *>(conf.sta.ssid); _ssid = reinterpret_cast<const char *>(conf.sta.ssid);
_pass = reinterpret_cast<const char *>(conf.sta.password); _pass = reinterpret_cast<const char *>(conf.sta.password);
#endif #endif

View File

@@ -86,6 +86,7 @@ public:
void addHandler(const Uri &uri, HTTPMethod method, WebServerClass::THandlerFunction fn); void addHandler(const Uri &uri, HTTPMethod method, WebServerClass::THandlerFunction fn);
void addHandler(const Uri &uri, WebServerClass::THandlerFunction handler); void addHandler(const Uri &uri, WebServerClass::THandlerFunction handler);
void onNotFound(WebServerClass::THandlerFunction handler);
void setCaptiveWebage(const char *url); void setCaptiveWebage(const char *url);

View File

@@ -622,6 +622,9 @@ void NotifyApp(FastLED_NeoMatrix *matrix, MatrixDisplayUiState *state)
DisplayManager.getInstance().resetTextColor(); DisplayManager.getInstance().resetTextColor();
} }
//Unattractive to have a function for every customapp wich does the same, but currently still no other option found TODO
void CApp1(FastLED_NeoMatrix *matrix, MatrixDisplayUiState *state, int16_t x, int16_t y, bool firstApp, bool lastApp) void CApp1(FastLED_NeoMatrix *matrix, MatrixDisplayUiState *state, int16_t x, int16_t y, bool firstApp, bool lastApp)
{ {
String name = getAppNameByFunction(CApp1); String name = getAppNameByFunction(CApp1);
@@ -682,6 +685,66 @@ void CApp10(FastLED_NeoMatrix *matrix, MatrixDisplayUiState *state, int16_t x, i
ShowCustomApp(name, matrix, state, x, y, firstApp, lastApp); ShowCustomApp(name, matrix, state, x, y, firstApp, lastApp);
} }
void CApp11(FastLED_NeoMatrix *matrix, MatrixDisplayUiState *state, int16_t x, int16_t y, bool firstApp, bool lastApp)
{
String name = getAppNameByFunction(CApp11);
ShowCustomApp(name, matrix, state, x, y, firstApp, lastApp);
}
void CApp12(FastLED_NeoMatrix *matrix, MatrixDisplayUiState *state, int16_t x, int16_t y, bool firstApp, bool lastApp)
{
String name = getAppNameByFunction(CApp12);
ShowCustomApp(name, matrix, state, x, y, firstApp, lastApp);
}
void CApp13(FastLED_NeoMatrix *matrix, MatrixDisplayUiState *state, int16_t x, int16_t y, bool firstApp, bool lastApp)
{
String name = getAppNameByFunction(CApp13);
ShowCustomApp(name, matrix, state, x, y, firstApp, lastApp);
}
void CApp14(FastLED_NeoMatrix *matrix, MatrixDisplayUiState *state, int16_t x, int16_t y, bool firstApp, bool lastApp)
{
String name = getAppNameByFunction(CApp14);
ShowCustomApp(name, matrix, state, x, y, firstApp, lastApp);
}
void CApp15(FastLED_NeoMatrix *matrix, MatrixDisplayUiState *state, int16_t x, int16_t y, bool firstApp, bool lastApp)
{
String name = getAppNameByFunction(CApp15);
ShowCustomApp(name, matrix, state, x, y, firstApp, lastApp);
}
void CApp16(FastLED_NeoMatrix *matrix, MatrixDisplayUiState *state, int16_t x, int16_t y, bool firstApp, bool lastApp)
{
String name = getAppNameByFunction(CApp16);
ShowCustomApp(name, matrix, state, x, y, firstApp, lastApp);
}
void CApp17(FastLED_NeoMatrix *matrix, MatrixDisplayUiState *state, int16_t x, int16_t y, bool firstApp, bool lastApp)
{
String name = getAppNameByFunction(CApp17);
ShowCustomApp(name, matrix, state, x, y, firstApp, lastApp);
}
void CApp18(FastLED_NeoMatrix *matrix, MatrixDisplayUiState *state, int16_t x, int16_t y, bool firstApp, bool lastApp)
{
String name = getAppNameByFunction(CApp18);
ShowCustomApp(name, matrix, state, x, y, firstApp, lastApp);
}
void CApp19(FastLED_NeoMatrix *matrix, MatrixDisplayUiState *state, int16_t x, int16_t y, bool firstApp, bool lastApp)
{
String name = getAppNameByFunction(CApp19);
ShowCustomApp(name, matrix, state, x, y, firstApp, lastApp);
}
void CApp20(FastLED_NeoMatrix *matrix, MatrixDisplayUiState *state, int16_t x, int16_t y, bool firstApp, bool lastApp)
{
String name = getAppNameByFunction(CApp20);
ShowCustomApp(name, matrix, state, x, y, firstApp, lastApp);
}
const uint16_t *getWeatherIcon(int code) const uint16_t *getWeatherIcon(int code)
{ {
switch (code) switch (code)

View File

@@ -13,6 +13,7 @@
#include "ServerManager.h" #include "ServerManager.h"
#include "MenuManager.h" #include "MenuManager.h"
#include "Apps.h" #include "Apps.h"
#include "Dictionary.h"
Ticker AlarmTicker; Ticker AlarmTicker;
Ticker TimerTicker; Ticker TimerTicker;
@@ -214,7 +215,7 @@ void pushCustomApp(String name, int position)
if (customApps.count(name) == 0) if (customApps.count(name) == 0)
{ {
++customPagesCount; ++customPagesCount;
void (*customApps[10])(FastLED_NeoMatrix *, MatrixDisplayUiState *, int16_t, int16_t, bool, bool) = {CApp1, CApp2, CApp3, CApp4, CApp5, CApp6, CApp7, CApp8, CApp9, CApp10}; void (*customApps[20])(FastLED_NeoMatrix *, MatrixDisplayUiState *, int16_t, int16_t, bool, bool) = {CApp1, CApp2, CApp3, CApp4, CApp5, CApp6, CApp7, CApp8, CApp9, CApp10, CApp11, CApp12, CApp13, CApp14, CApp15, CApp16, CApp17, CApp18, CApp19, CApp20};
if (position < 0) // Insert at the end of the vector if (position < 0) // Insert at the end of the vector
{ {
@@ -230,6 +231,7 @@ void pushCustomApp(String name, int position)
} }
ui.setApps(Apps); // Add Apps ui.setApps(Apps); // Add Apps
DisplayManager.getInstance().setAutoTransition(true);
} }
} }
@@ -785,6 +787,7 @@ void DisplayManager_::updateAppVector(const char *json)
int position = -1; int position = -1;
if (app.containsKey("show")) if (app.containsKey("show"))
{ {
show = app["show"].as<bool>(); show = app["show"].as<bool>();
} }
@@ -815,13 +818,17 @@ void DisplayManager_::updateAppVector(const char *json)
callback = HumApp; callback = HumApp;
SHOW_HUM = show; SHOW_HUM = show;
} }
#ifdef ULANZI #ifdef ULANZI
else if (name == "bat") else if (name == "bat")
{ {
callback = BatApp; callback = BatApp;
SHOW_BAT = show; SHOW_BAT = show;
} }
#endif #endif
else else
{ {
// If the app is not one of the built-in apps, check if it's already in the vector // If the app is not one of the built-in apps, check if it's already in the vector
@@ -881,3 +888,25 @@ void DisplayManager_::updateAppVector(const char *json)
ui.setApps(Apps); ui.setApps(Apps);
saveSettings(); saveSettings();
} }
String DisplayManager_::getStat()
{
StaticJsonDocument<200> doc;
char buffer[5];
doc[BatKey] = BATTERY_PERCENT;
doc[BatRawKey] = BATTERY_RAW;
snprintf(buffer, 5, "%.0f", CURRENT_LUX);
doc[LuxKey] = buffer;
doc[LDRRawKey] = LDR_RAW;
doc[BrightnessKey] = BRIGHTNESS;
snprintf(buffer, 5, "%.0f", CURRENT_TEMP);
doc[TempKey] = buffer;
snprintf(buffer, 5, "%.0f", CURRENT_HUM);
doc[HumKey] = buffer;
doc[UpTimeKey] = PeripheryManager.readUptime();
doc[SignalStrengthKey] = WiFi.RSSI();
String jsonString;
serializeJson(doc, jsonString);
return jsonString;
}

View File

@@ -60,6 +60,7 @@ public:
void drawBMP(int16_t x, int16_t y, const uint16_t bitmap[], int16_t w, int16_t h); void drawBMP(int16_t x, int16_t y, const uint16_t bitmap[], int16_t w, int16_t h);
void drawBarChart(int16_t x, int16_t y, const int data[], byte dataSize, bool withIcon, uint16_t color); void drawBarChart(int16_t x, int16_t y, const int data[], byte dataSize, bool withIcon, uint16_t color);
void updateAppVector(const char *json); void updateAppVector(const char *json);
String getStat();
}; };
extern DisplayManager_ &DisplayManager; extern DisplayManager_ &DisplayManager;

View File

@@ -1,6 +1,8 @@
#include "Globals.h" #include "Globals.h"
#include "Preferences.h" #include "Preferences.h"
#include <WiFi.h> #include <WiFi.h>
#include <ArduinoJson.h>
#include <LittleFS.h>
Preferences Settings; Preferences Settings;
@@ -13,8 +15,48 @@ char *getID()
return macStr; return macStr;
} }
void startLittleFS()
{
if (LittleFS.begin())
{
LittleFS.mkdir("/MELODIES");
LittleFS.mkdir("/ICONS");
}
else
{
Serial.println("ERROR on mounting LittleFS. It will be formmatted!");
LittleFS.format();
ESP.restart();
}
}
void loadDevSettings()
{
Serial.println("laodSettings");
File file = LittleFS.open("/dev.json", "r");
if (!file)
{
return;
}
DynamicJsonDocument doc(128);
DeserializationError error = deserializeJson(doc, file);
if (error)
{
Serial.println(F("Failed to read dev settings"));
return;
}
if (doc.containsKey("bootsound"))
{
BOOT_SOUND = doc["bootsound"].as<String>();
}
file.close();
}
void loadSettings() void loadSettings()
{ {
startLittleFS();
Settings.begin("awtrix", false); Settings.begin("awtrix", false);
MATRIX_FPS = Settings.getUChar("FPS", 23); MATRIX_FPS = Settings.getUChar("FPS", 23);
BRIGHTNESS = Settings.getUChar("BRI", 120); BRIGHTNESS = Settings.getUChar("BRI", 120);
@@ -34,9 +76,11 @@ void loadSettings()
#ifdef ULANZI #ifdef ULANZI
SHOW_BAT = Settings.getBool("BAT", true); SHOW_BAT = Settings.getBool("BAT", true);
#endif #endif
SOUND_ACTIVE = Settings.getBool("SOUND", true);
Settings.end(); Settings.end();
uniqueID = getID(); uniqueID = getID();
MQTT_PREFIX = String(uniqueID); MQTT_PREFIX = String(uniqueID);
loadDevSettings();
} }
void saveSettings() void saveSettings()
@@ -60,6 +104,8 @@ void saveSettings()
#ifdef ULANZI #ifdef ULANZI
Settings.putBool("BAT", SHOW_BAT); Settings.putBool("BAT", SHOW_BAT);
#endif #endif
=======
Settings.putBool("SOUND", SOUND_ACTIVE);
Settings.end(); Settings.end();
} }
@@ -131,3 +177,5 @@ bool MATRIX_OFF;
bool TIMER_ACTIVE; bool TIMER_ACTIVE;
bool ALARM_ACTIVE; bool ALARM_ACTIVE;
uint16_t TEXTCOLOR_565 = 0xFFFF; uint16_t TEXTCOLOR_565 = 0xFFFF;
bool SOUND_ACTIVE;
String BOOT_SOUND = "";

View File

@@ -66,7 +66,8 @@ extern String TIME_FORMAT;
extern String DATE_FORMAT; extern String DATE_FORMAT;
extern bool START_ON_MONDAY; extern bool START_ON_MONDAY;
extern bool IS_CELSIUS; extern bool IS_CELSIUS;
extern bool SOUND_ACTIVE;
extern String BOOT_SOUND;
void loadSettings(); void loadSettings();
void saveSettings(); void saveSettings();
#endif // Globals_H #endif // Globals_H

View File

@@ -6,8 +6,7 @@
#include <WiFi.h> #include <WiFi.h>
#include <ArduinoJson.h> #include <ArduinoJson.h>
#include "Dictionary.h" #include "Dictionary.h"
#include "PeripheryManager.h"
unsigned long startTime;
WiFiClient espClient; WiFiClient espClient;
uint8_t lastBrightness; uint8_t lastBrightness;
@@ -216,7 +215,8 @@ void onMqttConnected()
"/nextapp", "/nextapp",
"/apps" "/apps"
}; };
for (const char* topic : topics) {
for (const char *topic : topics)
String fullTopic = prefix + topic; String fullTopic = prefix + topic;
mqtt.subscribe(fullTopic.c_str()); mqtt.subscribe(fullTopic.c_str());
} }
@@ -247,7 +247,7 @@ char batID[40];
void MQTTManager_::setup() void MQTTManager_::setup()
{ {
startTime = millis();
if (HA_DISCOVERY) if (HA_DISCOVERY)
{ {
Serial.println(F("Starting Homeassistant discorvery")); Serial.println(F("Starting Homeassistant discorvery"));
@@ -262,6 +262,9 @@ void MQTTManager_::setup()
device.setManufacturer(HAmanufacturer); device.setManufacturer(HAmanufacturer);
device.setModel(HAmodel); device.setModel(HAmodel);
device.setAvailability(true); device.setAvailability(true);
device.enableSharedAvailability();
device.enableLastWill();
String uniqueIDWithSuffix; String uniqueIDWithSuffix;
@@ -418,22 +421,6 @@ void MQTTManager_::setCurrentApp(String value)
curApp->setValue(value.c_str()); curApp->setValue(value.c_str());
} }
const char *readUptime()
{
static char uptime[25]; // Make the array static to keep it from being destroyed when the function returns
unsigned long currentTime = millis();
unsigned long elapsedTime = currentTime - startTime;
unsigned long uptimeSeconds = elapsedTime / 1000;
unsigned long uptimeMinutes = uptimeSeconds / 60;
unsigned long uptimeHours = uptimeMinutes / 60;
unsigned long uptimeDays = uptimeHours / 24;
unsigned long hours = uptimeHours % 24;
unsigned long minutes = uptimeMinutes % 60;
unsigned long seconds = uptimeSeconds % 60;
sprintf(uptime, "P%dDT%dH%dM%dS", uptimeDays, hours, minutes, seconds);
return uptime;
}
void MQTTManager_::sendStats() void MQTTManager_::sendStats()
{ {
if (HA_DISCOVERY) if (HA_DISCOVERY)
@@ -466,7 +453,7 @@ void MQTTManager_::sendStats()
int freeHeapBytes = ESP.getFreeHeap(); int freeHeapBytes = ESP.getFreeHeap();
itoa(freeHeapBytes, rambuffer, 10); itoa(freeHeapBytes, rambuffer, 10);
ram->setValue(rambuffer); ram->setValue(rambuffer);
uptime->setValue(readUptime()); uptime->setValue(PeripheryManager.readUptime());
version->setValue(VERSION); version->setValue(VERSION);
transition->setState(AUTO_TRANSITION, false); transition->setState(AUTO_TRANSITION, false);
} }
@@ -474,25 +461,7 @@ void MQTTManager_::sendStats()
{ {
} }
StaticJsonDocument<200> doc; publish(StatsTopic, DisplayManager.getStat().c_str());
char buffer[5];
#ifdef ULANZI
doc[BatKey] = BATTERY_PERCENT;
doc[BatRawKey] = BATTERY_RAW;
#endif
snprintf(buffer, 5, "%.0f", CURRENT_LUX);
doc[LuxKey] = buffer;
doc[LDRRawKey] = LDR_RAW;
doc[BrightnessKey] = BRIGHTNESS;
snprintf(buffer, 5, "%.0f", CURRENT_TEMP);
doc[TempKey] = buffer;
snprintf(buffer, 5, "%.0f", CURRENT_HUM);
doc[HumKey] = buffer;
doc[UpTimeKey] = readUptime();
doc[SignalStrengthKey] = WiFi.RSSI();
String jsonString;
serializeJson(doc, jsonString);
publish(StatsTopic, jsonString.c_str());
} }
void MQTTManager_::sendButton(byte btn, bool state) void MQTTManager_::sendButton(byte btn, bool state)

View File

@@ -26,6 +26,7 @@ enum MenuState
WeekdayMenu, WeekdayMenu,
TempMenu, TempMenu,
Appmenu, Appmenu,
SoundMenu
}; };
const char *menuItems[] PROGMEM = { const char *menuItems[] PROGMEM = {
@@ -40,10 +41,11 @@ const char *menuItems[] PROGMEM = {
"WEEKDAY", "WEEKDAY",
"TEMP", "TEMP",
"APPS", "APPS",
"SOUND",
"UPDATE"}; "UPDATE"};
int8_t menuIndex = 0; int8_t menuIndex = 0;
uint8_t menuItemCount = 12; uint8_t menuItemCount = 13;
const char *timeFormat[] PROGMEM = { const char *timeFormat[] PROGMEM = {
"%H:%M:%S", "%H:%M:%S",
@@ -82,7 +84,6 @@ const char *appsItems[][2] PROGMEM = {
{"2075", "hum"}}; {"2075", "hum"}};
#endif #endif
int8_t appsIndex; int8_t appsIndex;
uint8_t appsCount = 5; uint8_t appsCount = 5;
@@ -134,6 +135,8 @@ String MenuManager_::menutext()
return "0x" + String(textColors[currentColor], HEX); return "0x" + String(textColors[currentColor], HEX);
case SwitchMenu: case SwitchMenu:
return AUTO_TRANSITION ? "ON" : "OFF"; return AUTO_TRANSITION ? "ON" : "OFF";
case SoundMenu:
return SOUND_ACTIVE ? "ON" : "OFF";
case TspeedMenu: case TspeedMenu:
return String(TIME_PER_TRANSITION / 1000.0, 1) + "s"; return String(TIME_PER_TRANSITION / 1000.0, 1) + "s";
case AppTimeMenu: case AppTimeMenu:
@@ -238,6 +241,9 @@ void MenuManager_::rightButton()
case WeekdayMenu: case WeekdayMenu:
START_ON_MONDAY = !START_ON_MONDAY; START_ON_MONDAY = !START_ON_MONDAY;
break; break;
case SoundMenu:
SOUND_ACTIVE = !SOUND_ACTIVE;
break;
case TempMenu: case TempMenu:
IS_CELSIUS = !IS_CELSIUS; IS_CELSIUS = !IS_CELSIUS;
break; break;
@@ -298,6 +304,9 @@ void MenuManager_::leftButton()
case TempMenu: case TempMenu:
IS_CELSIUS = !IS_CELSIUS; IS_CELSIUS = !IS_CELSIUS;
break; break;
case SoundMenu:
SOUND_ACTIVE = !SOUND_ACTIVE;
break;
default: default:
break; break;
} }
@@ -349,6 +358,9 @@ void MenuManager_::selectButton()
currentState = Appmenu; currentState = Appmenu;
break; break;
case 11: case 11:
currentState = SoundMenu;
break;
case 12:
if (FirmwareVersionCheck()) if (FirmwareVersionCheck())
{ {
updateFirmware(); updateFirmware();
@@ -433,6 +445,7 @@ void MenuManager_::selectButtonLong()
DATE_FORMAT = dateFormat[dateFormatIndex]; DATE_FORMAT = dateFormat[dateFormatIndex];
saveSettings(); saveSettings();
case WeekdayMenu: case WeekdayMenu:
case SoundMenu:
case TempMenu: case TempMenu:
saveSettings(); saveSettings();
break; break;

View File

@@ -9,8 +9,6 @@
#include <LightDependentResistor.h> #include <LightDependentResistor.h>
#include <MenuManager.h> #include <MenuManager.h>
#define SOUND_OFF false
#ifdef ULANZI #ifdef ULANZI
// Pinouts für das ULANZI-Environment // Pinouts für das ULANZI-Environment
#define BATTERY_PIN 34 #define BATTERY_PIN 34
@@ -53,6 +51,7 @@ unsigned long previousMillis_LDR = 0;
const unsigned long interval_BatTempHum = 10000; const unsigned long interval_BatTempHum = 10000;
const unsigned long interval_LDR = 100; const unsigned long interval_LDR = 100;
int total = 0; int total = 0;
unsigned long startTime;
const int LDRReadings = 10; const int LDRReadings = 10;
int TotalLDRReadings[LDRReadings]; int TotalLDRReadings[LDRReadings];
@@ -108,14 +107,22 @@ void select_button_tripple()
void PeripheryManager_::playBootSound() void PeripheryManager_::playBootSound()
{ {
if (SOUND_OFF) if (!SOUND_ACTIVE)
return; return;
if (BOOT_SOUND == "")
{
const int nNotes = 6; const int nNotes = 6;
String notes[nNotes] = {"E5", "C5", "G4", "E4", "G4", "C5"}; String notes[nNotes] = {"E5", "C5", "G4", "E4", "G4", "C5"};
const int timeUnit = 150; const int timeUnit = 150;
Melody melody = MelodyFactory.load("Nice Melody", timeUnit, notes, nNotes); Melody melody = MelodyFactory.load("Bootsound", timeUnit, notes, nNotes);
player.playAsync(melody); player.playAsync(melody);
} }
else
{
playFromFile("/MELODIES/" + BOOT_SOUND + ".txt");
}
}
void PeripheryManager_::stopSound() void PeripheryManager_::stopSound()
{ {
@@ -124,7 +131,7 @@ void PeripheryManager_::stopSound()
void PeripheryManager_::playFromFile(String file) void PeripheryManager_::playFromFile(String file)
{ {
if (SOUND_OFF) if (!SOUND_ACTIVE)
return; return;
Melody melody = MelodyFactory.loadRtttlFile(file); Melody melody = MelodyFactory.loadRtttlFile(file);
player.playAsync(melody); player.playAsync(melody);
@@ -156,6 +163,7 @@ void fistStart()
void PeripheryManager_::setup() void PeripheryManager_::setup()
{ {
startTime = millis();
pinMode(LDR_PIN, INPUT); pinMode(LDR_PIN, INPUT);
pinMode(BUZZER_PIN, OUTPUT); pinMode(BUZZER_PIN, OUTPUT);
digitalWrite(BUZZER_PIN, LOW); digitalWrite(BUZZER_PIN, LOW);
@@ -291,3 +299,20 @@ void PeripheryManager_::checkAlarms()
} }
} }
} }
const char *PeripheryManager_::readUptime()
{
static char uptime[25]; // Make the array static to keep it from being destroyed when the function returns
unsigned long currentTime = millis();
unsigned long elapsedTime = currentTime - startTime;
unsigned long uptimeSeconds = elapsedTime / 1000;
unsigned long uptimeMinutes = uptimeSeconds / 60;
unsigned long uptimeHours = uptimeMinutes / 60;
unsigned long uptimeDays = uptimeHours / 24;
unsigned long hours = uptimeHours % 24;
unsigned long minutes = uptimeMinutes % 60;
unsigned long seconds = uptimeSeconds % 60;
sprintf(uptime, "P%dDT%dH%dM%dS", uptimeDays, hours, minutes, seconds);
return uptime;
}

View File

@@ -35,6 +35,7 @@ public:
void playFromFile(String file); void playFromFile(String file);
bool isPlaying(); bool isPlaying();
void stopSound(); void stopSound();
const char *readUptime();
}; };
extern PeripheryManager_ &PeripheryManager; extern PeripheryManager_ &PeripheryManager;

View File

@@ -13,22 +13,6 @@
WebServer server(80); WebServer server(80);
FSWebServer mws(LittleFS, server); FSWebServer mws(LittleFS, server);
bool FSOPEN; bool FSOPEN;
void startLittleFS()
{
if (LittleFS.begin())
{
LittleFS.mkdir("/MELODIES");
LittleFS.mkdir("/ICONS");
FSOPEN = true;
}
else
{
Serial.println("ERROR on mounting LittleFS. It will be formmatted!");
LittleFS.format();
ESP.restart();
}
}
// The getter for the instantiated singleton instance // The getter for the instantiated singleton instance
ServerManager_ &ServerManager_::getInstance() ServerManager_ &ServerManager_::getInstance()
@@ -49,14 +33,90 @@ void versionHandler()
void saveHandler() void saveHandler()
{ {
WebServerClass *webRequest = mws.getRequest(); WebServerClass *webRequest = mws.getRequest();
Serial.println("Save");
ServerManager.getInstance().loadSettings(); ServerManager.getInstance().loadSettings();
webRequest->send(200); webRequest->send(200);
} }
void handlePostRequest()
{
WebServerClass *webRequest = mws.getRequest();
String url = webRequest->uri();
url.replace("/api", "");
if (webRequest->method() == HTTP_POST)
{
String body = webRequest->arg("plain");
const char *bodyPtr = body.c_str();
webRequest->send(200);
if (url == "/notify")
{
if (body[0] != '{' || body[strlen(bodyPtr) - 1] != '}')
{
webRequest->send(400, "text/plain", "Invalid payload format");
return;
}
DisplayManager.generateNotification(bodyPtr);
}
else if (url == "/timer")
{
DisplayManager.gererateTimer(bodyPtr);
}
else if (url == "/notify/dismiss")
{
DisplayManager.dismissNotify();
}
else if (url == "/apps")
{
DisplayManager.updateAppVector(bodyPtr);
}
else if (url == "/switch")
{
DisplayManager.switchToApp(bodyPtr);
}
else if (url == "/settings")
{
DisplayManager.setNewSettings(bodyPtr);
}
else if (url == "/nextapp")
{
DisplayManager.nextApp();
}
else if (url == "/previousapp")
{
DisplayManager.previousApp();
}
else if (url.startsWith("/custom"))
{
String topic_str = url.substring(MQTT_PREFIX.length() + 7);
DisplayManager.generateCustomPage(topic_str, bodyPtr);
}
else
{
webRequest->send(400);
}
}
else if (webRequest->method() == HTTP_GET)
{
if (url == "/stats")
{
webRequest->sendContent(DisplayManager.getStat());
}
else
{
webRequest->send(400);
}
}
}
void ServerManager_::setup() void ServerManager_::setup()
{ {
if (!local_IP.fromString(NET_IP) || !gateway.fromString(NET_GW) || !subnet.fromString(NET_SN) || !primaryDNS.fromString(NET_PDNS) || !secondaryDNS.fromString(NET_SDNS)) if (!local_IP.fromString(NET_IP) || !gateway.fromString(NET_GW) || !subnet.fromString(NET_SN) || !primaryDNS.fromString(NET_PDNS) || !secondaryDNS.fromString(NET_SDNS))
NET_STATIC = false; NET_STATIC = false;
if (NET_STATIC) if (NET_STATIC)
@@ -69,6 +129,7 @@ void ServerManager_::setup()
if (isConnected) if (isConnected)
{ {
mws.onNotFound(handlePostRequest);
mws.addOptionBox("Network"); mws.addOptionBox("Network");
mws.addOption("Static IP", NET_STATIC); mws.addOption("Static IP", NET_STATIC);
mws.addOption("Local IP", NET_IP); mws.addOption("Local IP", NET_IP);
@@ -96,7 +157,6 @@ void ServerManager_::setup()
mws.addHandler("/save", HTTP_GET, saveHandler); mws.addHandler("/save", HTTP_GET, saveHandler);
} }
mws.addHandler("/version", HTTP_GET, versionHandler);
mws.begin(); mws.begin();
if (!MDNS.begin(uniqueID)) if (!MDNS.begin(uniqueID))
@@ -129,12 +189,10 @@ uint16_t stringToColor(const String &str)
String gStr = str.substring(comma1 + 1, comma2); String gStr = str.substring(comma1 + 1, comma2);
String bStr = str.substring(comma2 + 1); String bStr = str.substring(comma2 + 1);
int r = rStr.toInt(); int r = rStr.toInt();
int g = gStr.toInt(); int g = gStr.toInt();
int b = bStr.toInt(); int b = bStr.toInt();
if (r < 0 || r > 255 || g < 0 || g > 255 || b < 0 || b > 255) if (r < 0 || r > 255 || g < 0 || g > 255 || b < 0 || b > 255)
{ {
return 0xFFFF; return 0xFFFF;
@@ -164,9 +222,6 @@ String colorToString(uint16_t color)
void ServerManager_::loadSettings() void ServerManager_::loadSettings()
{ {
if (!FSOPEN)
startLittleFS();
if (LittleFS.exists("/config.json")) if (LittleFS.exists("/config.json"))
{ {
File file = LittleFS.open("/config.json", "r"); File file = LittleFS.open("/config.json", "r");

View File

@@ -14,7 +14,6 @@ public:
void tick(); void tick();
void loadSettings(); void loadSettings();
bool isConnected; bool isConnected;
void SaveSettings();
}; };
extern ServerManager_ &ServerManager; extern ServerManager_ &ServerManager;