Let me know if this works. I am new at paste.bin.
This is the sketch of my course and I have managed to work through it and have one problem that I can’t seem to find. The Temperature feature will not show a value in the dashboard. The gauge is there but now value will be presented. The serial monitor shows the humidity, both C and F temps as well as the heat index value. It produces values every two minute as expected. I have removed the temp and replaced the temp section from the flow, The blank gauge is displayed with the correct values as selected, the needle is on the lower left side but it never shows any value. The same thing happens on my phone as well. There just seems to be some disconnect between the ESP8266 and the MQTT. I tried a different ESP8266 but with the same results . I was certain that I had misspelled something somewhere and maybe I have but I have looked it for long that I just don’t see it. Almost every error I have had has been some typing error and after awhile they get hard to see.
Please let me know if the text file with the flow worked. As I mentioned, I have never used the “Paste.bin” before .
Yes, that Pastebin is perfect and I can load your flow in my Node-RED.
(Note: you should always delete any credentials username/password when you post on Pastebin or GitHub).
Ok, let’s see what it can be:
- Your Node-RED flow looks correct and the MQTT topics too
- If the ESP is printing the DHT readings in the Serial Monitor it’s a great step
- Double-check that you’ve entered the right MQTT broker in the Arduino code
- Can you add the following debug nodes to the MQTT node? Does it print any messages in the debug window every 2 seconds? (After deploying your flow)
Thanks for posting your detailed problem. Regards,
Rui, thanks for the tips. But I have not found anything wrong yet. One photo shows the serial monitor and the other shows the nodered flow/debug outputs. The SM clearly shows that data is being produced but for some reason the debug window shows that the temperature string value is “0”. If I had made an error in the broker designation, would the humidity work?
Regarding the debug messages, they occur every thirty seconds just like the SM entries. I am not sure what you are referring to regarding “2secs”.
In addition to other things, I tried a different NodeMCU device and the results were the same.
Can you post the section of your Arduino code that is publishing the temperature via MQTT to Node-RED? Please post that full section, because it looks like it’s a problem with the variable type. Thanks!
I found the problem with the temp readings. The problem was an error in the code. The two versions of the code came from different sources. The correct version was copied from the pdf file included with the course. The incorrect code came from the downloaded code in the code folder called “mqtt-esp8266-final” . The two versions are included in two images attached. I am not sure what the two numbers represent unless they are actually the number of digits in the string. One version says  and the correct one says …
They deal with the temp and humidity. But I did find out that they both have to be correct. They actually occur in three places but one area is commented out depending on your choice of C or F display.
I am moving on to my next issues with “smoke” and “motion”. I am trying to decide if these two displays are supposed to reset or if once triggered, do they have to be manually reset.
Maybe you can provide with an explanation of these two sensors.
Thanks for your help
Thanks for letting me know! I’ve updated the code on GitHub with the correct size  in those three variables: https://github.com/RuiSantosdotme/Home-Automation-Course/blob/master/code/v2/mqtt_esp8266_final.ino
Those two sensors are reseted manually through the Node-RED dashboard (you’ll need to disarm and arm again, after they are triggered).