Page 4 of 4

Re: thingsboard, hivemq etc. using ESP32 or ESP8266 MQTT. I failed to send data. What am I doing wrong?

Posted: Thu Feb 20, 2025 6:32 am
by mnfisher
Actually you don't need to do this.
True - however, the component used here should allow the secure connection on port 8883.

The config passed to the esp_mqtt_connect needs some slight changes (the verification key needs to be set, and the broker address needs to change to connect to the secure port) - I'm hoping this will prove to be straightforward (famous last words?))

Martin

Re: thingsboard, hivemq etc. using ESP32 or ESP8266 MQTT. I failed to send data. What am I doing wrong?

Posted: Fri Feb 21, 2025 8:30 pm
by mnfisher
Here it connects securely.

The hard part was finding the correct certificate (in the end I downloaded from DigiCert)

The code also needs to get the current time - which it does using the SNTP component.

As before - needs channel, password, username and SSID details..

Martin