Page 1 of 1

problem with revpi-getpin node

Posted: 26 Nov 2021, 05:56
by connextingsrl
hi we are using revpi-getpin node with http response node but it returns an error.

"No response object"

where are we wrong?

Re: problem with revpi-getpin node

Posted: 24 Jan 2022, 15:37
by Salma Benamor
Hello,

the problem was because the req and res objects in the message objects get lost and you should save it to the flow and then restore it from the flow.

Here is the Nodered flow:

Code: Select all

[{"id":"753b0b28.3ad9f4","type":"http in","z":"8146d687.063a78","name":"","url":"/test2","method":"get","upload":false,"swaggerDoc":"","x":100,"y":220,"wires":[["bc0d6ab9.be03e8"]]},{"id":"c05a34f7.f42198","type":"http response","z":"8146d687.063a78","name":"","statusCode":"","headers":{},"x":890,"y":660,"wires":[]},{"id":"ef72eb3e.c6fcf8","type":"revpi-getpin","z":"8146d687.063a78","server":"c2b95924.413b88","getoverwritevalue":false,"inputpin":"AOut_1","x":490,"y":420,"wires":[["88f74cb5.18f73"]]},{"id":"bc0d6ab9.be03e8","type":"change","z":"8146d687.063a78","name":"flow.req to msg.req","rules":[{"t":"set","p":"req","pt":"flow","to":"req","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":230,"y":320,"wires":[["a2b08437.d88648"]]},{"id":"88f74cb5.18f73","type":"change","z":"8146d687.063a78","name":"msg.req to flow.req","rules":[{"t":"set","p":"req","pt":"msg","to":"req","tot":"flow"}],"action":"","property":"","from":"","to":"","reg":false,"x":710,"y":500,"wires":[["e4fbf00.f356b1"]]},{"id":"a2b08437.d88648","type":"change","z":"8146d687.063a78","name":"flow.res to msg.res","rules":[{"t":"set","p":"res","pt":"flow","to":"res","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":270,"y":360,"wires":[["ef72eb3e.c6fcf8"]]},{"id":"e4fbf00.f356b1","type":"change","z":"8146d687.063a78","name":"msg.res to flow.res","rules":[{"t":"set","p":"res","pt":"msg","to":"res","tot":"flow"}],"action":"","property":"","from":"","to":"","reg":false,"x":710,"y":540,"wires":[["c05a34f7.f42198"]]},{"id":"9dc3ce55.2972a","type":"comment","z":"8146d687.063a78","name":"save to flow","info":"","x":230,"y":280,"wires":[]},{"id":"68f4c56a.d3ee4c","type":"comment","z":"8146d687.063a78","name":"restore from flow","info":"","x":780,"y":460,"wires":[]},{"id":"c2b95924.413b88","type":"revpi-server","host":"localhost","port":"8000","user":"","password":"","rejectUnauthorized":false,"ca":""}]


Best regards.