Sending variable to lcd easy esp

299 views
Skip to first unread message

Ziomek Ziomkowski

unread,
Jan 3, 2018, 8:04:06 AM1/3/18
to Node-RED
Good morning, I'm trying to send a variable from node red to lcd display connected to exp8266.

the text is sent in this form to the esp easy

Zenofmud

unread,
Jan 3, 2018, 8:50:18 AM1/3/18
to 'Avalon Parkes-barton' via Node-RED
So…...
1) what is your issue? 
2) what platform are you using?
3) how are they connected?
4) what nodes are you using?
5) What have you tried? 
6) what versions of NR and node are you using?
7) what type of variable are you sending?



--
http://nodered.org
 
Join us on Slack to continue the conversation: http://nodered.org/slack
---
You received this message because you are subscribed to the Google Groups "Node-RED" group.
To unsubscribe from this group and stop receiving emails from it, send an email to node-red+u...@googlegroups.com.
To post to this group, send email to node...@googlegroups.com.
Visit this group at https://groups.google.com/group/node-red.
To view this discussion on the web, visit https://groups.google.com/d/msgid/node-red/b7f21c6e-194b-44b8-bbb6-5ee19367d772%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

David Caparrós

unread,
Jan 3, 2018, 2:41:04 PM1/3/18
to Node-RED
Hello Ziomek

If you have flashed ESPEASY on your ESP module and you are using the LCD configured trough I2C it accepts HTTP request to turn on/off the display or to send the message.

Just as example I copy you my flow, I capture some power values and when a presence from a sensor is detected turn on the lcd and display some values, once there is no presence the lcd turns off.

[{"id":"21b77e7.330cc82","type":"debug","z":"f16a1e08.38ccc","name":"","active":false,"console":"false","complete":"false","x":670,"y":400,"wires":[]},{"id":"eb845279.9f233","type":"http request","z":"f16a1e08.38ccc","name":"","method":"PUT","ret":"txt","url":"http://192.168.1.28/control?cmd=lcd,1,0,{{{payload}}}W","tls":"","x":850,"y":160,"wires":[[]]},{"id":"ae5cfb87.272e98","type":"delay","z":"f16a1e08.38ccc","name":"","pauseType":"rate","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":true,"x":450,"y":160,"wires":[["89b2f42d.82a648"]]},{"id":"7e532138.504e","type":"delay","z":"f16a1e08.38ccc","name":"","pauseType":"rate","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":true,"x":450,"y":120,"wires":[["5e8c19d.58269e8"]]},{"id":"da9bc219.83ed7","type":"http request","z":"f16a1e08.38ccc","name":"","method":"PUT","ret":"txt","url":"http://192.168.1.28/control?cmd=lcd,1,10,{{{payload}}}A","tls":"","x":850,"y":120,"wires":[[]]},{"id":"f8670330.72818","type":"mqtt in","z":"f16a1e08.38ccc","name":"","topic":"ESP-2/Amp","qos":"2","broker":"32ed8c49.582164","x":230,"y":120,"wires":[["7e532138.504e"]]},{"id":"5c02da6c.fab0a4","type":"mqtt in","z":"f16a1e08.38ccc","name":"","topic":"ESP-2/Watt","qos":"2","broker":"32ed8c49.582164","x":230,"y":160,"wires":[["ae5cfb87.272e98"]]},{"id":"8809dd5.fe42a2","type":"switch","z":"f16a1e08.38ccc","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"0","vt":"str"},{"t":"eq","v":"1","vt":"str"}],"checkall":"true","outputs":2,"x":710,"y":260,"wires":[["3be690b2.1e03d","9c246c1c.53f38"],["53ee2329.bc671c","6d7b63b4.5ea91c","f965bdd1.d9b6d"]]},{"id":"9c246c1c.53f38","type":"http request","z":"f16a1e08.38ccc","name":"APAGAR LCD","method":"PUT","ret":"txt","url":"http://192.168.1.28/control?cmd=lcdcmd,off","tls":"","x":900,"y":240,"wires":[[]]},{"id":"6fc67f43.12824","type":"http request","z":"f16a1e08.38ccc","name":"ENCENDER LCD","method":"PUT","ret":"txt","url":"http://192.168.1.28/control?cmd=lcdcmd,on","tls":"","x":1070,"y":320,"wires":[[]]},{"id":"5cdb7cea.f566d4","type":"inject","z":"f16a1e08.38ccc","name":"apagar lcd","topic":"","payload":"0","payloadType":"str","repeat":"","crontab":"","once":true,"x":230,"y":360,"wires":[["8809dd5.fe42a2"]]},{"id":"3ac5ba98.ff7bc6","type":"inject","z":"f16a1e08.38ccc","name":"encender lcd","topic":"","payload":"1","payloadType":"str","repeat":"","crontab":"","once":false,"x":230,"y":400,"wires":[["8809dd5.fe42a2"]]},{"id":"aa1cc489.136fc8","type":"rbe","z":"f16a1e08.38ccc","name":"","func":"rbe","gap":"","start":"","inout":"out","x":430,"y":260,"wires":[["8809dd5.fe42a2"]]},{"id":"53275cba.50b5f4","type":"link in","z":"f16a1e08.38ccc","name":"","links":["7a543c24.5204b4"],"x":195,"y":260,"wires":[["aa1cc489.136fc8"]]},{"id":"53ee2329.bc671c","type":"delay","z":"f16a1e08.38ccc","name":"","pauseType":"delay","timeout":"500","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":890,"y":320,"wires":[["6fc67f43.12824"]]},{"id":"f965bdd1.d9b6d","type":"http request","z":"f16a1e08.38ccc","name":"CLEAR LCD","method":"PUT","ret":"txt","url":"http://192.168.1.28/control?cmd=lcdcmd,clear","tls":"","x":890,"y":280,"wires":[[]]},{"id":"3be690b2.1e03d","type":"change","z":"f16a1e08.38ccc","name":"","rules":[{"t":"set","p":"lcd","pt":"global","to":"off","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":870,"y":200,"wires":[[]]},{"id":"6d7b63b4.5ea91c","type":"change","z":"f16a1e08.38ccc","name":"","rules":[{"t":"set","p":"lcd","pt":"global","to":"on","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":870,"y":360,"wires":[[]]},{"id":"5e8c19d.58269e8","type":"switch","z":"f16a1e08.38ccc","name":"","property":"lcd","propertyType":"global","rules":[{"t":"eq","v":"on","vt":"str"}],"checkall":"true","outputs":1,"x":650,"y":120,"wires":[["da9bc219.83ed7"]]},{"id":"89b2f42d.82a648","type":"switch","z":"f16a1e08.38ccc","name":"","property":"lcd","propertyType":"global","rules":[{"t":"eq","v":"on","vt":"str"}],"checkall":"true","outputs":1,"x":650,"y":160,"wires":[["21b77e7.330cc82","eb845279.9f233"]]},{"id":"32ed8c49.582164","type":"mqtt-broker","z":"","broker":"127.0.0.1","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"willTopic":"","willQos":"0","willPayload":"","birthTopic":"","birthQos":"0","birthPayload":""}]



Take a look on documentation website:    https://www.letscontrolit.com/wiki/index.php/LCDDisplay


It's really simple.

Regards
Reply all
Reply to author
Forward
0 new messages