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

For general Flowcode discussion that does not belong in the other sections.
mnfisher
Valued Contributor
Posts: 1453
http://meble-kuchenne.info.pl
Joined: Wed Dec 09, 2020 9:37 pm
Has thanked: 135 times
Been thanked: 707 times

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

Post 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

mnfisher
Valued Contributor
Posts: 1453
Joined: Wed Dec 09, 2020 9:37 pm
Has thanked: 135 times
Been thanked: 707 times

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

Post 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
Attachments
mqtt.fcfx
(29.02 KiB) Downloaded 11 times

Post Reply