Comments (5)
Increasing MAXBUFFERSIZE
does the trick. Not sure how stable this solution is but it works for me so far.
Edit: Still had issues. Went with https://github.com/plapointe6/EspMQTTClient which allows changing the max packet size and worked first go.
from adafruit_mqtt_library.
I'm having a similar issue, but it's only sending 89 chars. It's on an ESP32-S2. Using 2.4.2 installed via the Arduino IDE.
If I set QoS to 1 or 2, it fails to send at all.
char encoded[2000];
// Some JSON generation here.
// I've tried this with just creating a long string by hand, e.g.:
// char *encoded = "very long string";
// with exactly the same truncation.
Serial.println(motion_config_topic.c_str());
Serial.println(encoded);
Serial.println(strlen(encoded));
if (!messages->publish(motion_config_topic.c_str(), encoded, 0)) {
Serial.println("Failed to send motion config.");
}
The related output:
16:50:01.893 -> homeassistant/binary_sensor/esp32s2-0edc60-motion/config
16:50:01.893 -> {"name":"esp32s2-0edc60","unique_id":"esp32s2-0edc60-motion","device_class":"motion","state_topic":"homeassistant/binary_sensor/esp32s2-0edc60-motion/state"}
16:50:01.893 -> 157
I've successfully sent a longer message using using another MQTT client. I've received the truncation using two separate clients (home assistant and a rust app). Here is the truncated message for completeness:
{"name":"esp32s2-0edc60","unique_id":"esp32s2-0edc60-motion","device_class":"motion","sta
from adafruit_mqtt_library.
I have this exact issue, seems to always send 88 characters for me before truncating my message. Seems like a pretty big issue.
from adafruit_mqtt_library.
Exactly same issue, I am facing. Now moving back to move to pubsub client lib again.
from adafruit_mqtt_library.
Increasing MAXBUFFERSIZE also "fixed" it for me. Should be configurable or larger in the first place, maybe depending on platform.
from adafruit_mqtt_library.
Related Issues (20)
- How to use to set callback to a class member function ? HOT 1
- Dynamically Assigning Adafruit IO credentials to Adafruit MQTT object
- Client disconected due protocol error when counting PUBLISH packets from 0 HOT 6
- connection closed: Error: read ECONNRESET
- packet_id_counter incrementing even if packet is dropped
- ESP32 won't reconnect to wifi after disconnecting HOT 1
- Support for FONA 3G cellular card HOT 1
- In several minitues my device always disconnect but connect back immediately HOT 1
- Feature Request: Add functionality for the Arduino Protenta Pro Series of boards HOT 2
- Connectivity issue when using broker on local IP HOT 2
- retain breaks old code - wippersnapper CI builds HOT 5
- Silent Limit on the number of subscribed topics, callback ignored HOT 1
- Mqtt port issue . Not recognizing from config file.
- [ESP32] MQTT Payload not getting triggered only when the payload is exactly 104 and 105 characters?!?
- Dual band wifi connection issue with esp32
- Won't Complie on ESP32 HOT 1
- ESP32 expect a WDT, but none is configured
- Connection failure occurs when the connection length is greater than 128
- Overzealous library dependencies HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from adafruit_mqtt_library.