Comments on: ESP8266 NodeMCU WebSocket Server: Display Sensor Readings https://randomnerdtutorials.com/esp8266-nodemcu-websocket-server-sensor/ Learn ESP8266, ESP32, Arduino, and Raspberry Pi Mon, 17 Mar 2025 11:04:48 +0000 hourly 1 https://wordpress.org/?v=6.8.2 By: Sara Santos https://randomnerdtutorials.com/esp8266-nodemcu-websocket-server-sensor/#comment-893929 Fri, 23 Feb 2024 16:32:44 +0000 https://randomnerdtutorials.com/?p=130826#comment-893929 In reply to Ingvar.

Hi.
Yes. You are right.
There was a semicolon missing.

That shouldn’t be there. It’s from other project. It was basically to use icons from fontawesome: fontawesome.com/
Regards,
Sara

]]>
By: Ingvar https://randomnerdtutorials.com/esp8266-nodemcu-websocket-server-sensor/#comment-893468 Thu, 22 Feb 2024 09:52:51 +0000 https://randomnerdtutorials.com/?p=130826#comment-893468 Hi Sara.
First I have to say that you are doing a great job for us that is not an Einstain.
I really like the LittleFS technology. It’s much more convenient to modify and test webfiles before they’re uploaded.
I tried to change in styles.css file but nothing happened. Then I discovered that there was a semicolon missing in the original file. In the class: card-title: color. After that changes was working.

Have a question also:
What are the class: “fas fa-thermometer-threequarters” in index.html doing?

Regards,
Ingvar Ask

]]>
By: Marcos Rinaldi https://randomnerdtutorials.com/esp8266-nodemcu-websocket-server-sensor/#comment-852368 Mon, 31 Jul 2023 18:04:10 +0000 https://randomnerdtutorials.com/?p=130826#comment-852368 In reply to Sara Santos.

The problem was reading the sensors. When I opened the browser and called the sensor reading, the problem happened. Even using the scripts you made available. I changed all the sending logic via WebSocket and managed to make it work. Thank you for your attention.

]]>
By: Sara Santos https://randomnerdtutorials.com/esp8266-nodemcu-websocket-server-sensor/#comment-852353 Mon, 31 Jul 2023 15:52:41 +0000 https://randomnerdtutorials.com/?p=130826#comment-852353 In reply to Marcos Rinaldi.

How are you sending the readings to the web browser?
Regards,
Sara

]]>
By: Marcos Rinaldi https://randomnerdtutorials.com/esp8266-nodemcu-websocket-server-sensor/#comment-852026 Sat, 29 Jul 2023 13:48:17 +0000 https://randomnerdtutorials.com/?p=130826#comment-852026 Hi Sara,

In the JS console, appears this:

Trying to open a WebSocket connection… script.js:16
Connection opened script.js:25
Failed to load resource: the server responded with
a status of 500 (Internal Server Error) /favicon.png:1
Connection closed script.js:30
Trying to open a WebSocket connection… script.js:16
Connection opened script.js:25
Connection closed script.js:30

]]>
By: Sara Santos https://randomnerdtutorials.com/esp8266-nodemcu-websocket-server-sensor/#comment-852002 Sat, 29 Jul 2023 10:39:17 +0000 https://randomnerdtutorials.com/?p=130826#comment-852002 In reply to Marcos Rinaldi.

Hi.
do you get any errors on the web browser?
Open the Javascript console and check if you get any errors on the browser.
To open the Javascript console:
Windows/Linux: Press Control + Shift + J.
Mac: Press Command + Option + J.

Regards,
Sara

]]>
By: Marcos Rinaldi https://randomnerdtutorials.com/esp8266-nodemcu-websocket-server-sensor/#comment-851933 Fri, 28 Jul 2023 23:17:05 +0000 https://randomnerdtutorials.com/?p=130826#comment-851933 Hi Sara,

First of all I want to thank you very much for the tutorials that you make available here. Are amazing!! I’m a hobbyist so I have a lot of difficulties, since I don’t know programming in depth. Just a basic.

I’ve been trying to use this tutorial for a personal project but it seems like there’s an error in it.

At first I was only using the WebSocket functions from your tutorial in my sketch and it was giving me a memory allocation error. As my sketch is quite large, I spent several days trying to figure out what the problem was. Today, as I couldn’t find it, I decided to reproduce yours exactly as it is (the only difference is that I use a DS18B20 sensor). And the error also happened, which leads me to believe that there is something wrong with the code you provided.
The following happens:

I compile the sketch in the Arduino IDE and it loads to the ESP without problems. On the monitor, also all right. The SerialsPrints show that everything looks correct. But when I open the browser, almost immediately the problem happens. I’m going to paste here just a piece but it’s quite big. And almost immediately the esp8266 reboots. And again the problem happens. ESP just stops restarting when I close the browser.

The error is this:

Connecting to WiFi .......192.168.68.107
LittleFS mounted successfully
{"temperature":19.125}WebSocket client #1 connected from 192.168.68.109

User exception (panic/abort/assert)
--------------- CUT HERE FOR EXCEPTION DECODER ---------------

Panic core_esp8266_main.cpp:191 __yield

>>>stack>>>

ctx: sys
sp: 3fffed20 end: 3fffffb0 offset: 0010
3fffed30: 3fffed70 0000a245 3ffeef90 40212895
3fffed40: 000002ed 0000a245 3ffeef90 40210376
3fffed50: 0000000b 3ffeef90 3fffed8c 40206637
3fffed60: 3fff0fbc 00000020 3fff141c 40100bac
3fffed70: 0000000b 0000000b 3fff1d98 4020671c
3fffed80: 00001250 0000024a 3ffe8618 4010085e
3fffed90: 00001ae0 0000035c 3ffe8618 3fff1078
3fffeda0: 3fff1064 00000020 3fff1d98 40215684
3fffedb0: 3fffedc0 3fff1050 3fff100c 40211695
3fffedc0: 0000000b 3fff1d98 3fff18bc 00000004
3fffedd0: 3fff187c 3ffeefd8 3fff0fbc 3fff187c
3fffede0: 00000011 3fff0eb4 3fff1d92 40208a74
3fffedf0: 00001538 000002a7 3ffe8618 4010085e
3fffee00: 3fff1da3 0000003a 9be76c8b 00bb9e2c

MORE A LOT OF LINES........

3fffff90: 00000000 0016001f 40215644 3ffef2a0
3fffffa0: 3fffdad0 00000000 3ffef274 3ffef2a0
<<<stack<<<

--------------- CUT HERE FOR EXCEPTION DECODER ---------------

ets Jan 8 2013,rst cause:2, boot mode:(3,6)

load 0x4010f000, len 3424, room 16
tail 0
chksum 0x2e
load 0x3fff20b8, len 40, room 8
tail 0
chksum 0x2b
csum 0x2b
v000579c0
~ld
⸮œ⸮⸮N⸮s⸮⸮o|⸮d⸮l`#⸮⸮⸮⸮|s⸮l⸮o⸮⸮N⸮l`⸮œN⸮$⸮$⸮Connecting to WiFi .....

Thanks a lot if you can check what might be happening.

]]>
By: Sara Santos https://randomnerdtutorials.com/esp8266-nodemcu-websocket-server-sensor/#comment-848263 Fri, 21 Jul 2023 09:08:47 +0000 https://randomnerdtutorials.com/?p=130826#comment-848263 In reply to Bruno Hoegger.

Thanks for sharing.
Regards,
Sara

]]>
By: Bruno Hoegger https://randomnerdtutorials.com/esp8266-nodemcu-websocket-server-sensor/#comment-848151 Thu, 20 Jul 2023 14:45:57 +0000 https://randomnerdtutorials.com/?p=130826#comment-848151 In reply to Sara Santos.

Hi Sara, I just ordered four of the ESP32 Expansion Boards with Ali Express SAMIORE Store

ESP32 Entwicklung Bord
Expansion Board
CHF 0.96×5
AliExpress

Have a nice rest of the day, Bruno

]]>
By: Sara Santos https://randomnerdtutorials.com/esp8266-nodemcu-websocket-server-sensor/#comment-848145 Thu, 20 Jul 2023 14:13:08 +0000 https://randomnerdtutorials.com/?p=130826#comment-848145 In reply to Bruno Hoegger.

That’s great!
Thanks for the recommendation. Can you share a link to the expansion board you’re talking about?
Regards,
Sara

]]>