I can’t seem to get the screen to work for my project. I have tried updating and restarting Node-Red, getting rid of the temperature and button widgets individually, creating the project5 from scratch in Node-Red.
I see the button’s status update correctly and I can see the new temperatures updating in msg.payload.
I’ve tried different browsers and even different devices. No luck. 🙁
Any hints would be appreciated.
Thanks,
David
Hi.
What do you mean by “blank screen”?
When do you get a “blank” screen? And call you tell me exactly which project are you trying to follow and which course? We have several courses that cover projects with Node-RED.
Regards,
Sara
Hi, Sara,
Thank you for getting back to me so quickly!
It might have been a Firefox problem because when I tried my iPhone with Safari and it started working. Then I went back to my PC and tried Edge which also worked. Just for giggles, I tried Firefox and it also worked. This, naturally, meant I’m totally insane!
Now I’m trying to control the LED on the ESP with Node-RED. While the UI toggle works, the control of the LED does not. Any suggestions, please?
Cheers,
David
I tried un-checking the “Pass through msg if payload matches new state” for the switch node. For the Indicator, I select “Switch icon shows state of the input” (the state on the edit window won’t work if it’s not set to that). Finally, I renamed the Topic of the Out Node from “esp32/led” to “esp32/led/toggle”. This _appears_ to work; the LED state on the ESP32 correctly reflects the button’s state. I’ll do a little research on it
Here’s my Flow:
[{“id”:”5eab3692.0c046″,”type”:”tab”,”label”:”Flow 1″,”disabled”:false,”info”:””},{“id”:”6123a2c3.fe7654″,”type”:”mqtt in”,”z”:”5eab3692.0c046″,”name”:”Temperature”,”topic”:”esp32/temperature”,”qos”:”2″,”datatype”:”auto”,”broker”:”7feb1ee.e00dc6″,”x”:270,”y”:160,”wires”:[[“1911f9c8.4f8936″,”22550808.173f08”]]},{“id”:”1911f9c8.4f8936″,”type”:”debug”,”z”:”5eab3692.0c046″,”name”:””,”active”:true,”tosidebar”:true,”console”:false,”tostatus”:false,”complete”:”false”,”x”:470,”y”:120,”wires”:[]},{“id”:”22550808.173f08″,”type”:”ui_chart”,”z”:”5eab3692.0c046″,”name”:””,”group”:”ee2bc999.f7e77″,”order”:0,”width”:0,”height”:0,”label”:”Temperature”,”chartType”:”line”,”legend”:”false”,”xformat”:”HH:mm:ss”,”interpolate”:”linear”,”nodata”:””,”dot”:false,”ymin”:””,”ymax”:””,”removeOlder”:1,”removeOlderPoints”:””,”removeOlderUnit”:”3600″,”cutout”:0,”useOneColor”:false,”useUTC”:false,”colors”:[“#1f77b4″,”#aec7e8″,”#ff7f0e”,”#2ca02c”,”#98df8a”,”#d62728″,”#ff9896″,”#9467bd”,”#c5b0d5″],”useOldStyle”:false,”outputs”:1,”x”:470,”y”:200,”wires”:[[]]},{“id”:”df10f221.2fd978″,”type”:”mqtt out”,”z”:”5eab3692.0c046″,”name”:””,”topic”:”esp32/led/toggle”,”qos”:””,”retain”:””,”broker”:”7feb1ee.e00dc6″,”x”:630,”y”:340,”wires”:[]},{“id”:”238d538f.d4422c”,”type”:”ui_switch”,”z”:”5eab3692.0c046″,”name”:””,”label”:”LED”,”tooltip”:””,”group”:”ee2bc999.f7e77″,”order”:0,”width”:0,”height”:0,”passthru”:false,”decouple”:”true”,”topic”:””,”style”:””,”onvalue”:”on”,”onvalueType”:”str”,”onicon”:””,”oncolor”:””,”offvalue”:”off”,”offvalueType”:”str”,”officon”:””,”offcolor”:””,”x”:450,”y”:340,”wires”:[[“df10f221.2fd978”]]},{“id”:”73f2509d.6c5348″,”type”:”mqtt in”,”z”:”5eab3692.0c046″,”name”:””,”topic”:”esp32/led/toggle”,”qos”:”2″,”datatype”:”auto”,”broker”:”7feb1ee.e00dc6″,”x”:280,”y”:300,”wires”:[[“238d538f.d4422c”,”27c06abd.db14e6″]]},{“id”:”27c06abd.db14e6″,”type”:”debug”,”z”:”5eab3692.0c046″,”name”:””,”active”:true,”tosidebar”:true,”console”:false,”tostatus”:false,”complete”:”false”,”x”:470,”y”:260,”wires”:[]},{“id”:”7feb1ee.e00dc6″,”type”:”mqtt-broker”,”z”:””,”name”:””,”broker”:”localhost”,”port”:”1883″,”clientid”:””,”usetls”:false,”compatmode”:true,”keepalive”:”60″,”cleansession”:true,”birthTopic”:””,”birthQos”:”0″,”birthPayload”:””,”closeTopic”:””,”closeQos”:”0″,”closePayload”:””,”willTopic”:””,”willQos”:”0″,”willPayload”:””},{“id”:”ee2bc999.f7e77″,”type”:”ui_group”,”z”:””,”name”:”Main”,”tab”:”ee7e0df5.005a68″,”order”:1,”disp”:true,”width”:”6″,”collapse”:false},{“id”:”ee7e0df5.005a68″,”type”:”ui_tab”,”z”:””,”name”:”Dashboard”,”icon”:”dashboard”}]
Hi David.
We usually use Google Chrome to access Node-RED and Node-RED UI.
Is your project working ok, now?
I can’t use your flow. There’s an error somewhere. Can you use pastebin or github to share your code?
Regards,
Sara
Sorry about the difficulty. Yes, I’ll update this afternoon. My ESP32 code for the display is a little different because my 1602 does not have the I2C board. Instead, I did a direct connection because I have so many free GPIO pins.
Yes, everything works. 🙂
I’m having great fun with the course. Thanks to you and Rui!
Best regards,
David
OK. The problem was with my web browser. Sigh.
I’ve sent invitations to you through github to look at the code I have. You might see that the LCD gizmo can set the LED state of the temperature gizmo.
In ESP32_Client_2_LCD_PUSHBUTTON.ino, take special notice of double calls to mqttClient.subscribe on lines 171 and 174.
Please let me know if you have any trouble accessing or working with those files.
Best regards,
David
Hi David.
I can see your files just fine. Thanks.
Is everything working as expected now? What browser were you using?
Regards,
Sara
Hi, Sara,
All is working quite nicely, thank you. I generally use FireFox. Strangely, when it wasn’t working, I could not make it work on both my PC and my iPhone with Firefox. While I can’t make sense of it, I’m not motivated to untangle the mess.
I think the functionality for the LED is more complete with my scripts, and there is a stop in the Node-RED form for an infinite loop when toggling the LED in the Node form.
That said, I’ll continue with the remaining tutorials.
Best regards,
David