Comments on: ESP8266 Publishing DHT22 Readings with MQTT to Raspberry Pi https://randomnerdtutorials.com/esp8266-publishing-dht22-readings-with-mqtt-to-raspberry-pi/ Learn ESP8266, ESP32, Arduino, and Raspberry Pi Wed, 22 Nov 2023 16:59:06 +0000 hourly 1 https://wordpress.org/?v=6.8.2 By: Mawdz09 https://randomnerdtutorials.com/esp8266-publishing-dht22-readings-with-mqtt-to-raspberry-pi/#comment-873616 Wed, 22 Nov 2023 16:59:06 +0000 http://randomnerdtutorials.com/?p=31752#comment-873616 Hi , is there any reason I’m getting two sets of results on the web server page as below ?

ID Temperature Humidity Date Time Device
1037 19.89 53.3 2023-11-22 16:44:46 esp8266
1036 19.89 53.3 2023-11-22 16:44:46 esp8266
1035 19.89 53.4 2023-11-22 16:44:16 esp8266
1034 19.89 53.4 2023-11-22 16:44:16 esp8266
by the way brilliant topic to try , I’ve learnt loads about it all, thanks so much for taking the time to prepare this tutorial

]]>
By: Bernard https://randomnerdtutorials.com/esp8266-publishing-dht22-readings-with-mqtt-to-raspberry-pi/#comment-844859 Mon, 03 Jul 2023 08:47:47 +0000 http://randomnerdtutorials.com/?p=31752#comment-844859 In reply to Sara Santos.

Hi it works! thanks. May i check with you how do i change the QoS to 1 or 2?

]]>
By: Sara Santos https://randomnerdtutorials.com/esp8266-publishing-dht22-readings-with-mqtt-to-raspberry-pi/#comment-833136 Wed, 03 May 2023 08:57:06 +0000 http://randomnerdtutorials.com/?p=31752#comment-833136 In reply to Bernard.

Also try to restart your Raspberry Pi to restart the MQTT broker.
Regards,
Sara

]]>
By: Bernard https://randomnerdtutorials.com/esp8266-publishing-dht22-readings-with-mqtt-to-raspberry-pi/#comment-833094 Wed, 03 May 2023 02:10:25 +0000 http://randomnerdtutorials.com/?p=31752#comment-833094 In reply to Sara Santos.

Yes. but still giving the same message. ” Attempting MQTT connection failed…., rc=2 try again in 5 seconds”

]]>
By: Sara Santos https://randomnerdtutorials.com/esp8266-publishing-dht22-readings-with-mqtt-to-raspberry-pi/#comment-833013 Tue, 02 May 2023 13:35:54 +0000 http://randomnerdtutorials.com/?p=31752#comment-833013 In reply to Bernard.

Did you add the mqtt broker username and password on the Arduino sketch?

]]>
By: Bernard https://randomnerdtutorials.com/esp8266-publishing-dht22-readings-with-mqtt-to-raspberry-pi/#comment-832980 Tue, 02 May 2023 09:24:27 +0000 http://randomnerdtutorials.com/?p=31752#comment-832980 In reply to Bernard.

Probably I know the reasons. Because mqtt I added mosquitto username and password authentication. I have modified app.py in order to get “connect code 0” But i still getting rc= 2 from Arduino ide. Any other parts that I may have left out? Please help. thank you.

]]>
By: Sara Santos https://randomnerdtutorials.com/esp8266-publishing-dht22-readings-with-mqtt-to-raspberry-pi/#comment-832971 Tue, 02 May 2023 08:38:16 +0000 http://randomnerdtutorials.com/?p=31752#comment-832971 In reply to Bernard.

Hi.
Take a look at the Mosquitto broker installation tutorial: https://randomnerdtutorials.com/how-to-install-mosquitto-broker-on-raspberry-pi/

Check the section “Enable Remote Access/ Authentication”.
To test it right away, follow the section without authentication.

Regards,
Sara

]]>
By: Bernard https://randomnerdtutorials.com/esp8266-publishing-dht22-readings-with-mqtt-to-raspberry-pi/#comment-832961 Tue, 02 May 2023 06:59:06 +0000 http://randomnerdtutorials.com/?p=31752#comment-832961 additional findings is from the arduino ide’s serial monitor message is getting ” Attempting MQTT connection failed…., rc=2 try again in 5 seconds

]]>
By: Bernard https://randomnerdtutorials.com/esp8266-publishing-dht22-readings-with-mqtt-to-raspberry-pi/#comment-832960 Tue, 02 May 2023 06:58:35 +0000 http://randomnerdtutorials.com/?p=31752#comment-832960 In reply to Bernard.

additional findings is from the arduino ide’s serial monitor message is getting ” Attempting MQTT connection failed…., rc=2 try again in 5 seconds

]]>
By: Bernard https://randomnerdtutorials.com/esp8266-publishing-dht22-readings-with-mqtt-to-raspberry-pi/#comment-832826 Mon, 01 May 2023 08:18:31 +0000 http://randomnerdtutorials.com/?p=31752#comment-832826 I have issue of getting the readings of Humidity and temperature as follows:
DHT Readings (updated )
Temperature: ºC
Humidity: %
From the raspberry pi, I’m getting this messages:
“GET / HTTP/1.1” 200 –
“GET /socket.io/?EIO=3&transport=polling&t=1682928889001-0 HTTP/1.1” 400 –
May i know what the issues of not getting the readings?

]]>