Comments on: ESP32 MQTT – Publish DHT11/DHT22 Temperature and Humidity Readings (Arduino IDE) https://randomnerdtutorials.com/esp32-mqtt-publish-dht11-dht22-arduino/ Learn ESP8266, ESP32, Arduino, and Raspberry Pi Tue, 01 Apr 2025 09:43:46 +0000 hourly 1 https://wordpress.org/?v=6.8.2 By: Sara Santos https://randomnerdtutorials.com/esp32-mqtt-publish-dht11-dht22-arduino/#comment-1021817 Tue, 01 Apr 2025 09:43:46 +0000 https://randomnerdtutorials.com/?p=95552#comment-1021817 In reply to Ted Han.

Hi.
That’s great.
Thanks for sharing.
Currently, the Raspberry Pi boards are quite expensive. So, that’s a great alternative.
Regards,
Sara

]]>
By: Ted Han https://randomnerdtutorials.com/esp32-mqtt-publish-dht11-dht22-arduino/#comment-1021514 Mon, 31 Mar 2025 15:38:47 +0000 https://randomnerdtutorials.com/?p=95552#comment-1021514 Hi everyone.
Just for giggles I loaded this DHT sketch onto an ESP32-C3 Supermini board. (Postage stamps are much bigger!).

The sketch ran first go and sends the temp and humidity to my MQTT server like a champ.
Thanks for the lesson.

PS. For a MQTT server I bought a “Thin Client” computer on Ebay for 20 UK pounds and put Ubuntu Linux on it. Then installed Mosquitto, NodeRed, InFluxDB and Grafana. 2 years of headless fault free running and cheaper and better equipped than raspberry.

]]>
By: eishneh https://randomnerdtutorials.com/esp32-mqtt-publish-dht11-dht22-arduino/#comment-981187 Wed, 06 Nov 2024 22:28:46 +0000 https://randomnerdtutorials.com/?p=95552#comment-981187 In reply to Ibnuh Sakti.

I am having the same issue. My mosquitto broker is working perfectly I can publish and subscribe to topics but the eps32 is not connecting for some reason. I have to provide user credentials however still no connection….

Did you manage to figure out this issue

]]>
By: chiache https://randomnerdtutorials.com/esp32-mqtt-publish-dht11-dht22-arduino/#comment-980977 Wed, 06 Nov 2024 04:04:36 +0000 https://randomnerdtutorials.com/?p=95552#comment-980977 In reply to Sara Santos.

mqttClient keeps trying to connect,
It wasn’t until I restarted the ESP32 that the mqttClient connection was able to resume normal communication.

]]>
By: chiache https://randomnerdtutorials.com/esp32-mqtt-publish-dht11-dht22-arduino/#comment-980976 Wed, 06 Nov 2024 04:00:31 +0000 https://randomnerdtutorials.com/?p=95552#comment-980976 In reply to Sara Santos.

Hello,
The serial monitor did not respond with any relevant error messages,
Instead, it triggers repeatedly
onMqttConnect, onMqttDisconnect
Sometimes it crashes the watchdog, but magically after I removed AnsycWebServe it worked fine.
But I really like AnsycWebServe!

]]>
By: Sara Santos https://randomnerdtutorials.com/esp32-mqtt-publish-dht11-dht22-arduino/#comment-977678 Wed, 30 Oct 2024 09:51:58 +0000 https://randomnerdtutorials.com/?p=95552#comment-977678 In reply to chiache.

Hi.
Please provide more details about the issue.
What do you get in the Serial Monitor?
Regards,
Sara

]]>
By: chiache https://randomnerdtutorials.com/esp32-mqtt-publish-dht11-dht22-arduino/#comment-976919 Tue, 29 Oct 2024 08:19:30 +0000 https://randomnerdtutorials.com/?p=95552#comment-976919 hi , Have you received any messages from me?
Regarding issues related to the failure of mqtt disconnection and reconnection.

]]>
By: Neal & Pat Rhodes https://randomnerdtutorials.com/esp32-mqtt-publish-dht11-dht22-arduino/#comment-891608 Thu, 15 Feb 2024 17:16:45 +0000 https://randomnerdtutorials.com/?p=95552#comment-891608 Hmm. Using the primary WIFI account on my AT&T Uverse router seems to work fine also. So, this failure is confined to the secondary guest account.

]]>
By: Neal & Pat Rhodes https://randomnerdtutorials.com/esp32-mqtt-publish-dht11-dht22-arduino/#comment-891567 Thu, 15 Feb 2024 15:22:05 +0000 https://randomnerdtutorials.com/?p=95552#comment-891567 Hmmm. Using my phone hotspot, instead of the AT&T Uverse Guest Wifi, it appears to work near flawlessly.
Connecting to MQTT…
Disconnected from MQTT.
Connecting to MQTT…
Connected to MQTT.
Session present: 0
Publishing on topic esp32/dht/temperature at QoS 1, packetId: 1Message: 73.00
Publishing on topic esp32/dht/humidity at QoS 1, packetId 2: Message: 51.00
Publish acknowledged. packetId: 1
Publish acknowledged. packetId: 2
Publishing on topic esp32/dht/temperature at QoS 1, packetId: 3Message: 74.00
Publishing on topic esp32/dht/humidity at QoS 1, packetId 4: Message: 52.00
Publish acknowledged. packetId: 3
Publish acknowledged. packetId: 4
Publishing on topic esp32/dht/temperature at QoS 1, packetId: 5Message: 75.00
Publishing on topic esp32/dht/humidity at QoS 1, packetId 6: Message: 53.00
Publish acknowledged. packetId: 5
Publish acknowledged. packetId: 6
Publishing on topic esp32/dht/temperature at QoS 1, packetId: 7Message: 76.00
Publishing on topic esp32/dht/humidity at QoS 1, packetId 8: Message: 54.00
Publish acknowledged. packetId: 7
Publish acknowledged. packetId: 8
Publishing on topic esp32/dht/temperature at QoS 1, packetId: 9Message: 77.00
Publishing on topic esp32/dht/humidity at QoS 1, packetId 10: Message: 55.00
Publish acknowledged. packetId: 9
Publish acknowledged. packetId: 10
Publishing on topic esp32/dht/temperature at QoS 1, packetId: 11Message: 78.00
Publishing on topic esp32/dht/humidity at QoS 1, packetId 12: Message: 56.00
Publish acknowledged. packetId: 11
Publish acknowledged. packetId: 12
Publishing on topic esp32/dht/temperature at QoS 1, packetId: 13Message: 79.00
Publishing on topic esp32/dht/humidity at QoS 1, packetId 14: Message: 57.00
Publish acknowledged. packetId: 13
Publish acknowledged. packetId: 14
Publishing on topic esp32/dht/temperature at QoS 1, packetId: 15Message: 80.00
Publishing on topic esp32/dht/humidity at QoS 1, packetId 16: Message: 58.00
Publish acknowledged. packetId: 15
Publish acknowledged. packetId: 16
Publishing on topic esp32/dht/temperature at QoS 1, packetId: 17Message: 72.00
Publishing on topic esp32/dht/humidity at QoS 1, packetId 18: Message: 59.00
Publish acknowledged. packetId: 17
Publish acknowledged. packetId: 18
Publishing on topic esp32/dht/temperature at QoS 1, packetId: 19Message: 73.00
Publishing on topic esp32/dht/humidity at QoS 1, packetId 20: Message: 60.00
Publish acknowledged. packetId: 19
Publish acknowledged. packetId: 20

]]>
By: Sara Santos https://randomnerdtutorials.com/esp32-mqtt-publish-dht11-dht22-arduino/#comment-891548 Thu, 15 Feb 2024 14:15:16 +0000 https://randomnerdtutorials.com/?p=95552#comment-891548 In reply to Neal & Pat Rhodes.

Hi.
You can check the wi-fi events here: https://randomnerdtutorials.com/esp32-useful-wi-fi-functions-arduino/#10
Regards,
Sara

]]>