You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Make ESP8266 use LittleFS instead of deprecated SPIFFS
Make framework use the correct filesystem automatically and handle the call the FS.begin()
Change default MQTT keepalive to 60 seconds
Fix lodash security issue
Copy file name to clipboardExpand all lines: README.md
+6-12Lines changed: 6 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -76,13 +76,13 @@ platformio run -t upload
76
76
77
77
The interface has been configured with create-react-app and react-app-rewired so the build can customized for the target device. The large artefacts are gzipped and source maps and service worker are excluded from the production build. This reduces the production build to around ~150k, which easily fits on the device.
78
78
79
-
The interface will be automatically built by PlatformIO before it builds the firmware. The project can be configured to serve the interface from either PROGMEM or SPIFFS as your project requires. The default configuration is to serve the content from PROGMEM, serving from SPIFFS requires an additional upload step which is documented below.
79
+
The interface will be automatically built by PlatformIO before it builds the firmware. The project can be configured to serve the interface from either PROGMEM or the filesystem as your project requires. The default configuration is to serve the content from PROGMEM, serving from the filesystem requires an additional upload step which is [documented below](#serving-the-interface-from-the-filesystem).
80
80
81
81
#### Serving the interface from PROGMEM
82
82
83
83
By default, the project is configured to serve the interface from PROGMEM.
84
84
85
-
> **Tip**: You do not need to upload a file system image unless you configure the framework to [serve the interface from SPIFFS](#serving-the-interface-from-spiffs).
85
+
> **Tip**: You do not need to upload a file system image unless you configure the framework to [serve the interface from the filesystem](#serving-the-interface-from-the-filesystem).
86
86
87
87
The interface will consume ~150k of program space which can be problematic if you already have a large binary artefact or if you have added large dependencies to the interface. The ESP32 binaries are fairly large in there simplest form so the addition of the interface resources requires us to use special partitioning for the ESP32.
88
88
@@ -96,9 +96,9 @@ platform = espressif32
96
96
board = node32s
97
97
```
98
98
99
-
#### Serving the interface from SPIFFS
99
+
#### Serving the interface from the filesystem
100
100
101
-
If you choose to serve the interface from SPIFFS you will need to change the default configuration and upload the file system image manually.
101
+
If you choose to serve the interface from the filesystem you will need to change the default configuration and upload the file system image manually.
102
102
103
103
Disable `-D PROGMEM_WWW build` flag in ['platformio.ini'](platformio.ini) and re-build the firmware. The build process will now copy the compiled interface to the `data/` directory and it may be uploaded to the device by pressing the "Upload File System image" button:
104
104
@@ -340,7 +340,7 @@ The following code creates the web server and esp8266React framework:
340
340
341
341
```cpp
342
342
AsyncWebServer server(80);
343
-
ESP8266React esp8266React(&server, &SPIFFS);
343
+
ESP8266React esp8266React(&server);
344
344
```
345
345
346
346
Now in the `setup()` function the initialization is performed:
@@ -350,13 +350,6 @@ void setup() {
350
350
// start serial and filesystem
351
351
Serial.begin(SERIAL_BAUD_RATE);
352
352
353
-
// start the file system (must be done before starting the framework)
354
-
#ifdef ESP32
355
-
SPIFFS.begin(true);
356
-
#elif defined(ESP8266)
357
-
SPIFFS.begin();
358
-
#endif
359
-
360
353
// start the framework and demo project
361
354
esp8266React.begin();
362
355
@@ -615,6 +608,7 @@ The framework supplies access to various features via getter functions:
0 commit comments