Problems to get payload data to debug

Hello greetings,

Sorry this is my first contact with the nodered platform and I have been having this problem for three days, I already searched and did not find the information to solve this problem, I have already read various topics and tutorials and I could not understand the problem I am experiencing .
I've read this tutorial several times and I can't understand what is wrong. https://nodered.org/docs/user-guide/messages
I am trying to show only the information from the T4ACC topic in the debug node, but I am not getting it.
I made a simple flow to understand but I am not able to solve the problem.


I tried to use this syntax for the debug node and am getting error messages
msg.payload."T4ACC"

Please how would be the correct syntax for this debug node?
My nodered flux:

[
{
"id": "6bc670f.5dd2b9",
"type": "tab",
"label": "Flow 1",
"disabled": false,
"info": ""
},
{
"id": "6b864fdd.66bf88",
"type": "pccc in",
"z": "6bc670f.5dd2b9",
"endpoint": "db7c09e4.fdcf7",
"mode": "all-split",
"variable": "N7.0",
"diff": false,
"name": "PLC",
"x": 130,
"y": 240,
"wires": [
[
"a156d74e.5690a"
]
]
},
{
"id": "a156d74e.5690a",
"type": "debug",
"z": "6bc670f.5dd2b9",
"name": "",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload."T4ACC"",
"targetType": "msg",
"x": 460,
"y": 240,
"wires":
},
{
"id": "db7c09e4.fdcf7",
"type": "pccc endpoint",
"z": "",
"address": "192.168.0.197",
"port": "44818",
"userouting": false,
"routing": "0x01,0x00,0x01,0x00",
"cycletime": "500",
"timeout": "1500",
"name": "ML1100",
"vartable": [
{
"addr": "T4:0.ACC",
"name": "T4ACC"
},
{
"addr": "T4:1.ACC",
"name": "T41ACC"
}
]
}
]

Thank you for your help

Why? Its just a debug node for viewing what's in a message. Why would you spend days trying to achieve something your first picture shows you achieved anyway?

I don't understand.

This is not valid JavaScript.

Just put msg.payload in the debug setting.

Ps, please wrap code with backticks like this...

```
code here
```

To access the value of topic in a change or switch node, just enter topic

To access the value of payload in a change or switch node, just enter payload

To access these in a function node, use msg.topic or msg.payload

If you just want to see items with a topic of T4ACC then use a switch node set to


inserted before the debug node.

2 Likes

Hi dceejay,

Thanks for the help it worked perfectly, I was using the debug node to test and verify the data I wanted to see, if it showed the correct value because I wanted to send it to the dashboard gauge node.

image

thank you
best regards

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