Back

Websocket Message too long for my ESP8266??? Can we make it shorter??? THANK YOU <3

  • 0
  • Web
  • Cloud
martinc
1 Feb, 2025, 05:02
TL;DR
Developers are struggling with ESP8266 microcontroller handling long WebSocket messages. Attempts to shorten the messages include modifying Appwrite functions and adjusting subscription parameters. The lengthy data received is causing crashes. A sample message demonstrates the issue, showing detailed payload and event information. The challenge is to find a way to reduce the message size to accommodate ESP8266 limitations.
martinc
1 Feb, 2025, 05:03

{"type":"event","data":{"events":["databases.66b52af30037a607d977.collections.66f9f6c600186f9e6cd7.documents.94B97E01B114.update","databases..collections..documents..update","databases.66b52af30037a607d977.collections..documents.94B97E01B114.update","databases..collections..documents.94B97E01B114.update","databases..collections.66f9f6c600186f9e6cd7.documents.94B97E01B114.update","databases.66b52af30037a607d977.collections.66f9f6c600186f9e6cd7.documents..update","databases..collections.66f9f6c600186f9e6cd7.documents..update","databases.66b52af30037a607d977.collections..documents..update","databases.66b52af30037a607d977.collections.66f9f6c600186f9e6cd7.documents.94B97E01B114","databases..collections..documents.","databases.66b52af30037a607d977.collections..documents.94B97E01B114","databases..collections..documents.94B97E01B114","databases..collections.66f9f6c600186f9e6cd7.documents.94B97E01B114","databases.66b52af30037a607d977.collections.66f9f6c600186f9e6cd7.documents.","databases..collections.66f9f6c600186f9e6cd7.documents.","databases.66b52af30037a607d977.collections..documents.","databases.66b52af30037a607d977.collections.66f9f6c600186f9e6cd7","databases..collections.","databases.66b52af30037a607d977.collections.","databases..collections.66f9f6c600186f9e6cd7","databases.66b52af30037a607d977","databases.*"],"channels":["documents","databases.66b52af30037a607d977.collections.66f9f6c600186f9e6cd7.documents","databases.66b52af30037a607d977.collections.66f9f6c600186f9e6cd7.documents.94B97E01B114"],"timestamp":"2025-02-01T05:00:47.511+00:00","payload":{"model":"4rth723232","MAC":"94:B9:7E:01:B1:14","status":

martinc
1 Feb, 2025, 05:03

"payload":{"model":"4rth723232","MAC":"94:B9:7E:01:B1:14","status":"aa","ip":"192.168.0.113","name":"la negritaa","userId":"677324ab003533a3800b","$id":"94B97E01B114","$createdAt":"2024-11-15T00:14:41.795+00:00","$updatedAt":"2025-02-01T05:00:47.455+00:00","$permissions":["read(user:66fe05a97c2a2a90b111)","update(user:66fe05a97c2a2a90b111)","delete(user:66fe05a97c2a2a90b111)"],"$databaseId":"66b52af30037a607d977","$collectionId":"66f9f6c600186f9e6cd7"}}}

martinc
1 Feb, 2025, 05:03

Hahaha... I can't even paste the msg here

martinc
1 Feb, 2025, 05:04

so the thing is the msg received is tooo long for my ESP8266 (Arduino micro controller) when connecting to Websocket Appwrite

martinc
1 Feb, 2025, 05:04

So it crashes

martinc
1 Feb, 2025, 05:04

Can we make it shorter plesae?

martinc
1 Feb, 2025, 05:04

Im seeing a lot of events

martinc
1 Feb, 2025, 05:04

Im subscribed to more than 1 chanel or what?

martinc
1 Feb, 2025, 05:05
martinc
1 Feb, 2025, 05:05
martinc
1 Feb, 2025, 05:05
martinc
1 Feb, 2025, 05:05

so this is a microcotroller so it can't handle this big chunk

martinc
1 Feb, 2025, 05:06

I see channel 3?¿

martinc
1 Feb, 2025, 05:33
  1. I tried editing channel parameter when suscribing
martinc
1 Feb, 2025, 05:33
  1. i tried editing events parameter when suscribing
martinc
1 Feb, 2025, 05:33
  1. i tried an Appwrite Function to make the websocket message generated shorter
Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more