WLED - Send payload to scrolling Text effect?

Hello Fellow NodeRed users,

I have build a Led matrix display 8x32 which I'm driving with an ESP32 and Wled. I want to display different scrolling messages from Home Assistant via NodeRed.

I have managed, to send the Text via a POST Http request. Im sending this payload from a ChangeNode.

{
    "on": true,
    "bri": 50,
    "seg": [
        {
            "fx": 122,
            "pal": 2,
            "col": [
                [
                    0,
                    0,
                    255
                ]
            ],
            "n": "BlueText"
        }
    ]
}

and I get what I want.

Now, I would like to send a specific Payload based on different events to this change Node and have the text displayed on the WLED Matrix Screen.

image

in order to achive this, I have changed in the above Json the hard coded "BlueText" with {{payload}} but for some reason is not working. The matrix is displaying exact the payload text within currly brackets instead the payload itself.

What do i'm doing wrong? Please guide me in the right direction. Thank you.

{
    "on": true,
    "bri": 50,
    "seg": [
        {
            "fx": 122,
            "pal": 2,
            "col": [
                [
                    255,
                    0,
                    0
                ]
            ],
            "n": "{{Payload}}"
        }
    ]
}

Change the node to use JSONata J:
with

{
    "on": true,
    "bri": 50,
    "seg": [
        {
            "fx": 122,
            "pal": 2,
            "col": [
                [
                    255,
                    0,
                    0
                ]
            ],
            "n": $$.payload
        }
    ]
}
1 Like

Oh my... that did the Trick!

Thank you E1cid for your answer! Have a great evening!

If somebody else needs this, the complete config of the Change node looks like this.

image

1 Like

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