Is there a way to check status on node red gpio node?


Is there a way to check status on node red gpio node?

I am trying to convert the status code in the red box in the picture attached to the image here into text data.

I want to check the status value of the gpio node and convert it to text data.

Is there any possible way?

You should be able to use the status node to read the status of compliant nodes

Oh! I see, thank you. Is it possible to check the status regularly?

The status outputs when the status changes/updatees, it would be a good idea to store the output in a context var, then you could poll the context at will.

Um, that's right. I want to poll and check the status, but I have to try, but it doesn't work...

Here is one example there are numerous ways to do this, you will need to experiment.

[{"id":"57d32972f363a89b","type":"status","z":"b9860b4b9de8c8da","name":"","scope":["13a0349fe14a7e6a"],"x":300,"y":3680,"wires":[["8c5eb87664f0c480"]]},{"id":"8c5eb87664f0c480","type":"change","z":"b9860b4b9de8c8da","name":"","rules":[{"t":"set","p":"status[msg.status.source.name]","pt":"global","to":"status","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":570,"y":3680,"wires":[[]]},{"id":"084eba573302a14b","type":"debug","z":"b9860b4b9de8c8da","name":"debug 322","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":650,"y":3580,"wires":[]},{"id":"61fe1c88b772832c","type":"inject","z":"b9860b4b9de8c8da","name":"poll stored status","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":280,"y":3580,"wires":[["a5a5a08bca803a7a"]]},{"id":"a5a5a08bca803a7a","type":"change","z":"b9860b4b9de8c8da","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"status.node_name","tot":"global"}],"action":"","property":"","from":"","to":"","reg":false,"x":480,"y":3580,"wires":[["084eba573302a14b"]]},{"id":"d62ab06081401e14","type":"inject","z":"b9860b4b9de8c8da","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":300,"y":3760,"wires":[["13a0349fe14a7e6a"]]},{"id":"13a0349fe14a7e6a","type":"delay","z":"b9860b4b9de8c8da","name":"node_name","pauseType":"rate","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":450,"y":3760,"wires":[[]]}]
1 Like

OMG! It's what I was hoping for! Thank you very much.

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