Hi everybody
I try to input nr from api to entity.
But i have api error like in photo.
Somebady could help mi what is wrong? Thanks in advance
Hi everybody
I try to input nr from api to entity.
But i have api error like in photo.
Somebady could help mi what is wrong? Thanks in advance
It’s much better of you export your sequence as JSON when you need help.
But I would guess in your function node below msg.m29 add this line:
msg.data = {}
Or add a change node that moves msg.data to msg.something. and then clears the values in msg.data.
Data and payload are message variables that can cause issues, it’s recommended to keep them clean by getting inputs to other msg variables.
Unfortunetly without succes
Below code of my nodes:
[{"id":"5c22510efe9957a4","type":"http request","z":"fb89f848e3531f82","name":"","method":"GET","ret":"obj","paytoqs":"ignore","url":"https://moldmaker.eu/panel/api_client.php?key=d98d86ef555514ccbb56c0c464e80958&action=list_tools","tls":"","persist":false,"proxy":"","authType":"","senderr":false,"x":290,"y":140,"wires":[["46bd396b0947e98e"]]},{"id":"92cf110caffa9138","type":"debug","z":"fb89f848e3531f82","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":650,"y":140,"wires":[]},{"id":"8c7820d631dd94f5","type":"inject","z":"fb89f848e3531f82","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":100,"y":140,"wires":[["5c22510efe9957a4"]]},{"id":"46bd396b0947e98e","type":"function","z":"fb89f848e3531f82","name":"","func":"\nmsg.m29=Number(msg.payload.data.list_tools[101].counter);\nmsg.data = {}\nreturn msg;\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":440,"y":200,"wires":[["92cf110caffa9138","0d674ef0c99abb72"]]}]
Slight adjustment to this suggestion, put this in the function node:
msg.payload = {}
or just this
delete msg.payload
things within msg.payload
can accidentally impact your service calls. msg.data
doesn’t matter.
Yes that is correct.
The “data” in the error fooled me.
But still, I try and keep payload and data free from variables since it can easily do things like this.
Thanks You, that works with msg.payload = {}
I’m newbe could You tell me how mark Your answer as Solve
You can’t do that in the Node red forum.