Syntax for sending mqtt variable

Hi,
This sould be a simple one. I set up an espeasy connected to a lcd, listening for cmd from mqtt to display data.

In NR I use a mqtt node and inject a payload of:
lcd,3,1,abc and the lcd display abc, so all good to display static string.

What is the syntax to change abc to display a variable, say global.var1?

I tried:
lcd,1,1,{{global.var1}} and it display {{global.var1}}

So that does not work. I am sure I ve done this before, just cant remember how.

Thanks,
Ken

Hi Ken,
Here are a couple of links to some tutorial guides I wrote for my IoT students a couple of years ago.
Although I've not used them for over a year, due to the pandemic, they should still work.

OLED_Panel_v5

OLED_Weather_Report

Please note the MQTT nodes in the tutorial show a topic with a leading slash (/).
This is deprecated now, so please don't use that. Also make sure the settings in the MQTT controller in the slave device, that is running ESPeasy, match what you use in Node-RED.

Hope it works out for you.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.