File tree Expand file tree Collapse file tree 4 files changed +22
-1
lines changed Expand file tree Collapse file tree 4 files changed +22
-1
lines changed Original file line number Diff line number Diff line change @@ -114,6 +114,7 @@ A simple ESP32 Based RFID Access Control System for tools or door.
114
114
- Create a generic shipMetric(String metricname, String metricvalue) function rather than individual ship* functions. Why: Too messy.
115
115
116
116
## Done
117
+ - Display spiffs storage details
117
118
- Web Admin: Scan i2c devices and print out
118
119
- Merge /backlighton and /backlightoff into /backlight?state=on/off
119
120
- If no settings file, set default from defaults.h
Original file line number Diff line number Diff line change 25
25
// file upload progress based upon https://codepen.io/PerfectIsShit/pen/zogMXP
26
26
// wifi scanning based upon https://github.com/me-no-dev/ESPAsyncWebServer#scanning-for-available-wifi-networks
27
27
28
- #define FIRMWARE_VERSION " v1.7.6 -ota"
28
+ #define FIRMWARE_VERSION " v1.7.7 -ota"
29
29
30
30
// configuration structure
31
31
struct Config {
@@ -156,6 +156,10 @@ void setup() {
156
156
SPIFFS.remove (filename);
157
157
}
158
158
159
+ Serial.print (" SPIFFS Free: " ); Serial.println (humanReadableSize ((SPIFFS.totalBytes () - SPIFFS.usedBytes ())));
160
+ Serial.print (" SPIFFS Used: " ); Serial.println (humanReadableSize (SPIFFS.usedBytes ()));
161
+ Serial.print (" SPIFFS Total: " ); Serial.println (humanReadableSize (SPIFFS.totalBytes ()));
162
+
159
163
Serial.println (listFiles ());
160
164
161
165
Serial.println (" Loading Configuration ..." );
@@ -642,6 +646,9 @@ String getFullStatus() {
642
646
fullStatusDoc[" TelegrafServer" ] = config.telegrafserver ;
643
647
fullStatusDoc[" TelegrafServerPort" ] = config.telegrafserverport ;
644
648
fullStatusDoc[" TelegrafShipTime" ] = config.telegrafshiptime ;
649
+ fullStatusDoc[" SPIFFSFree" ] = (SPIFFS.totalBytes () - SPIFFS.usedBytes ());
650
+ fullStatusDoc[" SPIFFSUsed" ] = SPIFFS.usedBytes ();
651
+ fullStatusDoc[" SPIFFSTotal" ] = SPIFFS.totalBytes ();
645
652
646
653
String fullStatus = " " ;
647
654
serializeJson (fullStatusDoc, fullStatus);
Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ const char index_html[] PROGMEM = R"rawliteral(
23
23
< h2 > %EEH_HOSTNAME %< /h2 >
24
24
< h3 id = "maintenancemode" > %MAINTENANCEMODE %< /h3 >
25
25
< p > Device Time : < span id = "ntptime" > %DEVICETIME %< /span > | Firmware Version : %FIRMWARE %< /p >
26
+ < p > Free Storage : < span id = "freespiffs" > %FREESPIFFS %< /span > | Used Storage : < span id = "usedspiffs" > %USEDSPIFFS %< /span > | Total Storage : < span id = "totalspiffs" > %TOTALSPIFFS %< /span > < /p >
26
27
< button onclick = "logoutButton()" > Logout Web Admin < /button >
27
28
< button onclick = "getUserDetailsButton()" > Refresh Current Card User Details < /button >
28
29
< button onclick = "grantAccessButton()" %GRANTBUTTONENABLE %> Grant Access to Current Card < /button >
Original file line number Diff line number Diff line change @@ -178,6 +178,18 @@ String processor(const String& var) {
178
178
return String (config.webpagedelay * 1000 );
179
179
}
180
180
181
+ if (var == " FREESPIFFS" ) {
182
+ return humanReadableSize ((SPIFFS.totalBytes () - SPIFFS.usedBytes ()));
183
+ }
184
+
185
+ if (var == " USEDSPIFFS" ) {
186
+ return humanReadableSize (SPIFFS.usedBytes ());
187
+ }
188
+
189
+ if (var == " TOTALSPIFFS" ) {
190
+ return humanReadableSize (SPIFFS.totalBytes ());
191
+ }
192
+
181
193
return String ();
182
194
}
183
195
You can’t perform that action at this time.
0 commit comments