Hello everyone
I need to send a command that includes a payload
command example:
{“cmd”:“air.sldaire.val=20”}
assuming payload is 20
how would the code be?
I’ve tried this and a thousand other things but nothing… it doesn’t work
{“cmd”:“air.sldaire.val=” payload}
Thank you very much in advance
WallyR
(Wally)
April 2, 2022, 7:12pm
2
What do you have now?
A guess could be msg.payload, but its hard to say, since we do not know if it in a call service node, a function node or something else.
Hello, sorry for not being more explicit
is a “send command” service call from a nextion screen
with this syntax it works :
{“cmd”:“aire.sldaire.val=20” }
{“cmd”:“aire.sldaire.val”= msg.payload}
{“cmd”:“aire.sldaire.val”= payload}
it does not work
{“cmd”:“aire.sldaire.val=” payload}
{“cmd”:“aire.sldaire.val=” msg.payload}
it does not work
I always do a test to get 20 per payload
any idea of syntax ?
I’ve already got it to work
using a template node
I leave my solution in case someone can help
and thank you all very much
Kermit
April 3, 2022, 4:52am
5
Inside the call-service node
{ "cmd": "air.sldaire.val=" & payload }
Thank you very much for answering, I know something new