Open coolcodecding opened 4 years ago
See here: https://github.com/knolleary/pubsubclient/issues/355
I'm still trying to figure out what exactly I need to change. So if you get it running, could you please post your solution?
@frederikheld I gave up on this code, as I couldn't figure it out and am not willing to spend another 20h+ on it.
I switched to this, on the first sight a bit more complex code: https://github.com/tsi-software/Secure_ESP8266_MQTT_poc/tree/master/top-level-components/secure_esp8266_mqtt_client
It worked smoothly for me, hopefully for you too!
So, i am back to the problem again. After setting up a new mqtt server, the same script does not work anymore.. Have there been update for the libraries?
I have setup mosquitto on docker using certificates to secure the connection. I have no username and password configured in mosquitto. I am using this code to connect my wemos d1 mini to mosquitto with pubsubclient.
https://github.com/debsahu/ESP_MQTT_Secure/blob/master/ESP8266_MQTT_SSL/Arduino/ESP8266_PubSubClient_SSL/ESP8266_PubSubClient_SSL.ino
I do not use the secrets.h file, but I tried it before with the same result.
After inserting my credentials, mqtt data and ca.crt i get the following serial output:
mosquitto gives the following log:
At least I get the last line: disconnected because of timeout. And 192.168.0.8 is the wemos D1 mini. I used the MQTTfx to connect to mosquitto with the ca.crt file before and it worked fine.
my mosquitto.conf:
why does mosquitto not recognise the client name that I have specified in the code? Why can I not connect to mosquitto? And how can I solve this?