Hello everyone! I've been struggling with this issue for quite a while and I can't seem to understand how to fix it.
I'm using an ESP32 TTGO OLED v1 to send temperature information through mosquitto MQTT to be displayed in node red, being the MQTT broker and node red hosted by my computer which is running windows 10.
As you can see in my code, I'm connecting my ESP to the WiFi (yes I change the password to the "real" password not the three dots) and then to the PC IP (192.168.1.74) which corresponds to the MQTT broker IP. Although node-red connects to the broker as you can see in the images, the ESP32 refuses to establish connection. Can someone help me find the solution to this problem?
This is the error I get from ESP:
Attempting MQTT connection...failed, rc=-2 try again in 5 seconds
I've aso tried to allow listeners on the mosquitto.conf file and allow_anonymous but it is irrelevant as it continues to print out this error.
I'm a bit desperate cause I've searched all the internet, all issues and none of the solutions fit my case. Thank you everyone :)
Hello everyone! I've been struggling with this issue for quite a while and I can't seem to understand how to fix it. I'm using an ESP32 TTGO OLED v1 to send temperature information through mosquitto MQTT to be displayed in node red, being the MQTT broker and node red hosted by my computer which is running windows 10. As you can see in my code, I'm connecting my ESP to the WiFi (yes I change the password to the "real" password not the three dots) and then to the PC IP (192.168.1.74) which corresponds to the MQTT broker IP. Although node-red connects to the broker as you can see in the images, the ESP32 refuses to establish connection. Can someone help me find the solution to this problem?
This is the error I get from ESP: Attempting MQTT connection...failed, rc=-2 try again in 5 seconds
I've aso tried to allow listeners on the mosquitto.conf file and allow_anonymous but it is irrelevant as it continues to print out this error.
I'm a bit desperate cause I've searched all the internet, all issues and none of the solutions fit my case. Thank you everyone :)