cyijun / esp32mqttclient Goto Github PK
View Code? Open in Web Editor NEWA thread-safe MQTT client for Arduino ESP32xx, based on ESP-IDF MQTT component. | Need help for adapting the latest mqtt component.
License: MIT License
A thread-safe MQTT client for Arduino ESP32xx, based on ESP-IDF MQTT component. | Need help for adapting the latest mqtt component.
License: MIT License
When trying to compile it for an ESP32-WROOM-32, I get following error:
#error "This library only supports boards with an AVR, SAM, SAMD, NRF52 or STM32F4 processor."
I thought this lib is for the ESP32?
i now use PubSubClient v2.8 for a ESP32-S3 Arduno IDE project
and want use TLS with HIVEMQ FREE ACCOUNT
possible?
Currently, the ESP32MQTTClient library only provides a publish method that accepts String type for both topic and payload. While this is suitable for text-based messages, it poses a problem when trying to publish binary data, such as image or sensor data, as it leads to potential data corruption and incorrect interpretation.
To address this issue, I kindly request the addition of a new publish method or an enhancement to the existing one to support binary payloads. This new method should accept a pointer to the binary data along with its length, allowing for the direct transmission of binary content over the MQTT protocol.
By doing so, the library will become more versatile and suitable for a wider range of applications that require the transmission of non-textual data.
Thank you for considering this enhancement to the ESP32MQTTClient library. Your efforts in creating and maintaining this library are highly appreciated, and I look forward to seeing this feature implemented in a future version.
Best regards, Kyour
@cyijun please create a new 0.2.0 release with the latest changes for CA cert, client cert and client keys so I can use them automatically with the Arduino IDE.
Thanks!!
hi,
i've been messing around with this library and its pretty great for what i need it for, however i cant seem to get any of the isConnected(), isWifiConnected(),isMqttConnected() options to work at all.
they just sit there and never connect. if i remove those options and just let it try and connect without those checks then it connects just fine. but i would like to do different things if the wifi or mqtt connections fail or disconnect.
here is a basic example of how I've tried to get it working.
void loop () {
bool USB = bdl.getVbusPresent();
while(USB == true){
if(client.isConnected()){
Serial.println("MQTT Connected");
if (lostPower == 1){
lostPowerCounter = lostPowerCounter+1;
delay(2000);
readFile(SD, "/backup.txt");
deleteFile(SD,"/backup.txt");
Serial.println("Backup Dumped to MQTT");
}
lostPower = 0;
sendMQTT();
delay(1000);
}
else{
Serial.print("Connecting");
for(int i = 0; i < 50; i++){
delay(500); // Wait for half a second
Serial.print(".");
}
Serial.println("");
}
}
}
if tried it with !isConnected() for false detection, ive tried isConnected() == false; and vise versa for connected. is there something im doing wrong here?
thanks!
Keinerlei Funktion
Egal was man fΓΌr eine ip eingibt, es funktioniert nicht.
MQTT_CLIENT: There are no transports valid, stop mqtt client, config scheme = http
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.