Greetings Sara, again I have a query about the Web Server SSE… I am using example 3.1 as a reference
I describe my project and the problem:
1-I use the Libraries indicated and they are well installed
#include <Arduino.h>
#include <ESP8266WiFi.h>
#include <ESPAsyncTCP.h>
#include <ESPAsyncWebServer.h>
#include “LittleFS.h”
#include <Arduino_JSON.h>
2-The files in the ….data…..folder are installed correctly
3-The html code is different from the one in example 3.1 but it is correct because I see it perfectly in the browser using the html visualization extension that I have installed in VS
3-To simulate the sensor……I generate random numbers every 1sec…..this can affect the display of the DASH BOARD…??
4-I have NO compilation errors and everything installs fine on the ESP8266
5-In the Terminal I see my “measurements” (random numbers)
6-WHAT IS MY PROBLEM..??…….The Dash Board does NOT appear when I put the IP: 192.168.1.69
Only events appear in JSON format with:
192.168.1.69/events
ID: 98905
event: new_readings
data: {“voltage”:”110.00″,”frequency”:”57.00″,”factorpot”:”0.00″,”current”:”10.00″,”power”:”267.00″,”qreact”:”128.00″ ,”sapart”:”265.00″,”eactive”:”522.00″,”ereact”:”1469.00″}
WHAT COULD BE HAPPENING….???
I appreciate your advice, regards.
Nestor.
Hi.
No, changing the values won’t mess up with the display as long as the JSON variable is correct.
Open the JavaScript console on the browser and tell me if you get any errors.
Regards,
Sara
This is what the CONSOLE option shows:
(index):6774 crbug/1173575, non-JS module files deprecated.
(anonymous) @ (index):6774
192.168.1.69/:1 Failed to load resource: the server responded with a status of 404 (Not Found)
Thanks for your attention, best regards.
Nestor.
Hi.
“Failed to load resource:” it means that it couldn’t find the files it’s looking for. Make sure you have the files index.html and the others with the correct name and in the right place.
Regards,
Sara
Greetings Sara, thanks for your message…..please, look, it is the message that I receive after doing the BuildFileSystem……you can see that all the necessary files are in the correct data folder
What else can cause the ERROR 404..??
|– EspSoftwareSerial @ 6.12.7
|– LittleFS @ 0.1.0
|– ESP8266WiFi @ 1.0
Building in release mode
Building file system image from ‘data’ directory to .pio\build\esp12e\spiffs.bin
/index.html
/LCT_SF.png
/script.js
/style.css
======================================================= [SUCCESS] Took 7.33 seconds =======================================================
* Terminal will be reused by tasks, press any key to close it.
I appreciate your support, Regards.
Nestor
Hi Sara, problem solved, as you can see from the previous message is
#include “LittleFS.h”
but in plarformio.ini, it was NOT specified …………
board_build.filesystem = littlefs
This caused that
Building file system image from ‘data’ directory to .pio\build\esp12e\spiffs.bin
It will take the format… spiffs.bin……which is NOT the right one
I did Declared ……..board_build.filesystem = littlefs……….and the problem is solved.
Thanks and regards.
Nestor.