• Skip to main content
  • Skip to primary sidebar

RNTLab.com

The Ultimate Shortcut to Learn Electronics and Programming with Open Source Hardware and Software

  • Courses
  • Forum
    • Forum
    • Ask Question
  • Shop
  • Account
  • Blog
  • Login

How to cancel Websocket message

Q&A Forum › Category: ESP32 › How to cancel Websocket message
0 Vote Up Vote Down
paulfjujo asked 1 year ago

Hello,
is there somewhere  a  ON/OFF verbose option to cancell websocket message
example 

Cpt= 1 , BMP085 P. 991 mBar , Humid: 50.70,Temp: 18.50,DS18B20.0 = 18.44 C , Slider = 0 .
WebSocket client #1 EVT Data
Msg :1s22
225
22
Cpt= 2 , BMP085 P. 991 mBar , Humid: 50.70,Temp: 18.50,DS18B20.0 = 18.31 C , Slider = 225 .
WebSocket client #1 EVT Data
Msg :1s52
531
52
Cpt= 3 , BMP085 P. 991 mBar , Humid: 51.40,Temp: 19.20,DS18B20.0 = 18.38 C , Slider = 531 .
Cpt= 4 , BMP085 P. 991 mBar , Humid: 50.80,Temp: 18.50,DS18B20.0 = 18.31 C , Slider = 531 .
… etc ….
Cpt= 21 , BMP085 P. 991 mBar , Humid: 50.80,Temp: 18.50,DS18B20.0 = 18.31 C , Slider = 531 .
Cpt= 22 , BMP085 P. 991 mBar , Humid: 50.80,Temp: 18.50,DS18B20.0 = 18.44 C , Slider = 531 .
 
 
 

 
because when i move the slider ,i get the message
WebSocket client #1 EVT Data
Msg :1s52
531
52

Question Tags: websocket
3 Answers
0 Vote Up Vote Down
Sara Santos Staff answered 1 year ago

Hi.
I don’t I understand your question.
Can you reformulate it?
Regards,
Sarea

0 Vote Up Vote Down
paulfjujo answered 11 months ago

Hello,
How can i delete the Socket Msg
sended by  handleWebSocketMessage(arg, data, len);
example :
Msg :1s52
531
52

void onEvent(AsyncWebSocket *server, AsyncWebSocketClient *client, AwsEventType type, void *arg, uint8_t *data, size_t len) {
switch (type) {
case WS_EVT_CONNECT:
Serial.printf("WebSocket client #%u connected from %s\n", client->id(), client->remoteIP().toString().c_str());
break;
case WS_EVT_DISCONNECT:
Serial.printf("WebSocket client #%u disconnected\n", client->id());
break;
case WS_EVT_DATA:
// suppression partielle du message 01/06/2024
// Serial.printf("WebSocket client #%u EVT Data\n", client->id());
handleWebSocketMessage(arg, data, len);
break;
case WS_EVT_PONG:
case WS_EVT_ERROR:
break;
}
}

 

image PB_socket_Msg_code.jpg on github …
unexpected socket Msg

0 Vote Up Vote Down
Sara Santos Staff answered 11 months ago

Hi.
That message is being sent via Websocket.
You need to check your javascript file to see in which part it is sending that message.
Regards,
Sara

Primary Sidebar

Login to Ask or Answer Questions

This Forum is private and it’s only available for members enrolled in our Courses.

Login »

Latest Course Updates

  • [New Edition] Build ESP32-CAM Projects eBook – 2nd Edition April 16, 2025
  • [eBook Updated] Learn ESP32 with Arduino IDE eBook – Version 3.2 April 16, 2025

You must be logged in to view this content.

Contact Support - Refunds - Privacy - Terms - MakerAdvisor.com - Member Login

Copyright © 2013-2025 · RandomNerdTutorials.com · All Rights Reserved

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.