Comments on: ESP8266 NodeMCU MQTT – Publish DHT11/DHT22 Temperature and Humidity Readings (Arduino IDE) https://randomnerdtutorials.com/esp8266-nodemcu-mqtt-publish-dht11-dht22-arduino/ Learn ESP8266, ESP32, Arduino, and Raspberry Pi Thu, 16 Jan 2025 12:26:48 +0000 hourly 1 https://wordpress.org/?v=6.8.2 By: Bedez https://randomnerdtutorials.com/esp8266-nodemcu-mqtt-publish-dht11-dht22-arduino/#comment-1000383 Thu, 16 Jan 2025 12:26:48 +0000 https://randomnerdtutorials.com/?p=96340#comment-1000383 In reply to Sara Santos.

Merci Sarah
Sa fonctionne.

]]>
By: Sara Santos https://randomnerdtutorials.com/esp8266-nodemcu-mqtt-publish-dht11-dht22-arduino/#comment-1000342 Thu, 16 Jan 2025 10:35:30 +0000 https://randomnerdtutorials.com/?p=96340#comment-1000342 In reply to Bedez.

Hi.
Try moving the
void connectToMqtt() {
Serial.println(“Connecting to MQTT…”);
mqttClient.connect();
}

To a place before this line:
void onWifiConnect(const WiFiEventStationModeGotIP& event) {

Regards,
Sara

]]>
By: Bedez https://randomnerdtutorials.com/esp8266-nodemcu-mqtt-publish-dht11-dht22-arduino/#comment-1000319 Thu, 16 Jan 2025 09:01:43 +0000 https://randomnerdtutorials.com/?p=96340#comment-1000319 Bonjour,
Je comprends pas j’ai une erreur:
connectToMqtt’ was not declared in this scope; did you mean ‘connectToWifi’
pour cette partie de programme
void onWifiConnect(const WiFiEventStationModeGotIP& event) {
Serial.println(“Connected to Wi-Fi.”);
connectToMqtt();
J’utilise Visual studio code.
Je suis bloqué car je ne trouve pas la solution.
Merci pour votre aide.
Daniel

]]>
By: Sara Santos https://randomnerdtutorials.com/esp8266-nodemcu-mqtt-publish-dht11-dht22-arduino/#comment-933704 Wed, 03 Jul 2024 14:27:45 +0000 https://randomnerdtutorials.com/?p=96340#comment-933704 In reply to Roshan.

Hi.
Make sure you set your retain messages to true.
Regards,
Sara

]]>
By: Roshan https://randomnerdtutorials.com/esp8266-nodemcu-mqtt-publish-dht11-dht22-arduino/#comment-933688 Wed, 03 Jul 2024 12:53:47 +0000 https://randomnerdtutorials.com/?p=96340#comment-933688 I have follow your tutorial & works perfect. I have only one issue. I have publish topic with qos = 1, & also subscribe topic with qos = 1.
qos = 1 ensure that single time data will receive on subscriber.
i am transfering one numeric number 100 times, that time subscriber was disconnected with server,now i turn on subscriber & connect it but no last publish message received.
where i am making mistake?

]]>
By: Sara Santos https://randomnerdtutorials.com/esp8266-nodemcu-mqtt-publish-dht11-dht22-arduino/#comment-842722 Sun, 25 Jun 2023 10:40:36 +0000 https://randomnerdtutorials.com/?p=96340#comment-842722 In reply to Moss.

Hi.
You can’t install a broker on the ESP8266.
You can install on your computer, if you don’t want to install on a Raspberry Pi. Or you can also use a cloud mqtt broker.
Regards,
Sara

]]>
By: Moss https://randomnerdtutorials.com/esp8266-nodemcu-mqtt-publish-dht11-dht22-arduino/#comment-842287 Thu, 22 Jun 2023 14:33:44 +0000 https://randomnerdtutorials.com/?p=96340#comment-842287 Hello, can I install an MQTT broker on my ESP8266 instead of using a Raspberry Pi? I have a simple project involving two load cells. Or should I get a Raspberry Pi for this purpose?

]]>
By: Bernard https://randomnerdtutorials.com/esp8266-nodemcu-mqtt-publish-dht11-dht22-arduino/#comment-840302 Mon, 12 Jun 2023 08:30:21 +0000 https://randomnerdtutorials.com/?p=96340#comment-840302 Hi. Thanks for the tutorials. I have learnt a lot. May I know do you have tried MQTT with SSL certificates? I am trying to figure out how it does with MQTT broker (raspberry pi) to client (esp8266).

]]>
By: name https://randomnerdtutorials.com/esp8266-nodemcu-mqtt-publish-dht11-dht22-arduino/#comment-833154 Wed, 03 May 2023 11:41:51 +0000 https://randomnerdtutorials.com/?p=96340#comment-833154 will this work with homeassistant

]]>
By: Sara Santos https://randomnerdtutorials.com/esp8266-nodemcu-mqtt-publish-dht11-dht22-arduino/#comment-819859 Sat, 18 Feb 2023 10:40:11 +0000 https://randomnerdtutorials.com/?p=96340#comment-819859 In reply to Emmanuel.

Great!
Thanks for sharing the solution.
Regards,
Sara

]]>