I would like to control a text field in a Nextion display with a variable text.
The command must be at the end: NEXTION, t1.txt = "Hello"
"Hello" should correspond to the payload. But it is imperative that the
Quotation marks.
I tried to write a function node.
Can someone help me with the syntax for this?
so what exact does the command need to be ? and where is the text you want to display coming from (is it already in msg.payload? ) - and what is the function you have tried so far ?
exactly the content is already included in msg.payload.
I can't do that with the quotation times.
I want to send the message to the display via MQTT.
The "fixed" part is: NEXTION, t1.txt =
The variable part would then be "msg.payload"
But as already mentioned the quotation marks have to be.
The content of msg.payload should then be shown in the text field "t1" of the display.
I tested this with MQTT.fix and it works. Now Nodered should send the variable data.
the hint was good.
I just can't get the syntax right. My msg.payload has the following content: A.
At the end NEXTION, t1.txt = "A" should be generated.
Do you have a suggestion for me?
sorry, you don't have it easy with me.
I thought I have to create 2 nodes. That didn't work.
Now just used the template node and now it works.
With the template node I can control the Nextion display via MQTT.
The command NEXTION, t1.txt = "{{payload}}" generates the desired event.
I didn't get the function node to run.
Thanks for your support. You notice I have no idea about the syntax.
Should the function node also work on its own?