Status Node - how does it work?

Hi all, New guy here - so please be gentle :slight_smile:

I'm very new at this so probably a silly question but... I'm having trouble getting the Status node to work.

I have a flow with 1 injector (named Test_inj), 1 status node and 2 debug nodes (one each for the output from the injector and the status node) - I will try and post the flow here (first time)

In the status node I have selected to report status from Test_inj and in its associated debug node I have selected to output the complete msg object.

When I deploy I can see the debug output from the Test_inj node but I get nothing from the Status node?

My guess is that this should be something very simple - so obviously, I'm missing something. If someone could point me in the right direction I would be very grateful.

Blockquote
31/05/2020, 11:43:24node: Dbg_InjString : msg : Object

{ _msgid: "8201d2d.b3c3e3", topic: "String", payload: "Test Inject" }

Blockquote
'I'm sorry, I have no idea how to post the status node - since it has no apparent output?

Ah - perhaps this is how I post the flow?

Blockquote
[{"id":"2f2f6320.3a495c","type":"tab","label":"Flow 2","disabled":false,"info":""},{"id":"2246a973.bde196","type":"inject","z":"2f2f6320.3a495c","name":"Test_inj","topic":"String","payload":"Test Inject","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":230,"y":140,"wires":[["e96e29e4.fee9c8"]]},{"id":"ec74c5c2.4d9d58","type":"status","z":"2f2f6320.3a495c","name":"Test_Status","scope":["2246a973.bde196"],"x":250,"y":240,"wires":[["38e283c4.136eac"]]},{"id":"38e283c4.136eac","type":"debug","z":"2f2f6320.3a495c","name":"Dbg_Status","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":430,"y":240,"wires":},{"id":"e96e29e4.fee9c8","type":"debug","z":"2f2f6320.3a495c","name":"Dbg_Inj","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":400,"y":140,"wires":}]

Blockquote

This thread is a good description of how the status node works;

Please export your flow again from node-red, edit your post, click the </> button in the editor and paste the flow between the backticks

```
your flow code
```

Ok - how's that?

[{"id":"2f2f6320.3a495c","type":"tab","label":"Flow 2","disabled":false,"info":""},{"id":"2246a973.bde196","type":"inject","z":"2f2f6320.3a495c","name":"Test_inj","topic":"String","payload":"Test Inject","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":230,"y":140,"wires":[["e96e29e4.fee9c8"]]},{"id":"ec74c5c2.4d9d58","type":"status","z":"2f2f6320.3a495c","name":"Test_Status","scope":["2246a973.bde196"],"x":250,"y":240,"wires":[["38e283c4.136eac"]]},{"id":"38e283c4.136eac","type":"debug","z":"2f2f6320.3a495c","name":"Dbg_Status","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":430,"y":240,"wires":[]},{"id":"e96e29e4.fee9c8","type":"debug","z":"2f2f6320.3a495c","name":"Dbg_Inj","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":400,"y":140,"wires":[]}]

I think you have a misconception about what the status node does. The status it refers to the text that sometimes appears under certain nodes. Take for an example this microphone node:
image
Here it has a status of recording. When you start recording and this changes to recording the status node will give you a msg like this;
image
So as the inject node doesn’t display its status you can’t get any feedback from the status node about it.

4 Likes

Hmmn. Ok - understood.

So I changed the status node to reflect the status of an email out node - which clearly has 'sending' shown underneath (as well as a few other experiments). I have the debug node set to show the whole msg but I'm still getting the same result - see below. Obviously, I'm still missing something?

Thanks for your help - I appreciate it (and learning lots)

[{"id":"d0a0c3ed.6a34b","type":"tab","label":"Flow 1","disabled":false,"info":""},{"id":"a4f0fb0a.e63de8","type":"mqtt in","z":"d0a0c3ed.6a34b","name":"MQQT In","topic":"Peter_Truman/feeds/onoff","qos":"2","datatype":"auto","broker":"28618461.d70b1c","x":80,"y":100,"wires":[["a6dde575.f2db98"]]},{"id":"89f1a0ed.f4fe8","type":"rpi-gpio in","z":"d0a0c3ed.6a34b","name":"Pi_Input","pin":"3","intype":"up","debounce":"25","read":true,"x":80,"y":240,"wires":[["7a85c626.b9d198","641c9260.94965c"]]},{"id":"7a85c626.b9d198","type":"mqtt out","z":"d0a0c3ed.6a34b","name":"MQQT_Out","topic":"Peter_Truman/feeds/input","qos":"2","retain":"true","broker":"28618461.d70b1c","x":250,"y":240,"wires":[]},{"id":"784fbae.1329d44","type":"rpi-gpio out","z":"d0a0c3ed.6a34b","name":"LED Out","pin":"12","set":true,"level":"0","freq":"","out":"out","x":560,"y":80,"wires":[]},{"id":"99b816.69e437e8","type":"change","z":"d0a0c3ed.6a34b","name":"Cng On 2 1","rules":[{"t":"change","p":"payload","pt":"msg","from":"On","fromt":"str","to":"1","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":370,"y":80,"wires":[["784fbae.1329d44","11a8e39c.f4df0c"]]},{"id":"1a095357.07444d","type":"change","z":"d0a0c3ed.6a34b","name":"Chg Off 2 0","rules":[{"t":"change","p":"payload","pt":"msg","from":"Off","fromt":"str","to":"0","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":370,"y":120,"wires":[["784fbae.1329d44","11a8e39c.f4df0c"]]},{"id":"11a8e39c.f4df0c","type":"rpi-gpio out","z":"d0a0c3ed.6a34b","name":"Pi_Out","pin":"8","set":false,"level":"1","freq":"","out":"out","x":550,"y":120,"wires":[]},{"id":"a6dde575.f2db98","type":"switch","z":"d0a0c3ed.6a34b","name":"Sw_Node","property":"payload","propertyType":"msg","rules":[{"t":"cont","v":"On","vt":"str"},{"t":"cont","v":"Off","vt":"str"}],"checkall":"false","repair":false,"outputs":2,"x":220,"y":100,"wires":[["99b816.69e437e8"],["1a095357.07444d"]]},{"id":"f25075b3.e21528","type":"function","z":"d0a0c3ed.6a34b","name":"Comparison","func":"context.node = context.node ||0;\ncontext.node1 = context.node1 ||0;\n\nif(msg.topic == 'a'){\n    context.node = msg.payload;\n} else if (msg.topic == 'b'){\n    context.node1 = msg.payload;\n}\n\nif (context.node == context.node1){\n    return{ topic: 'd', payload: 'equal'}\n}else{\n    return{ topic: 'e', payload: 'not equal'}\n}    \n","outputs":1,"noerr":0,"x":330,"y":500,"wires":[["3628fdac.b6bf92","bdd67bb9.4cbb98"]]},{"id":"3628fdac.b6bf92","type":"debug","z":"d0a0c3ed.6a34b","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":510,"y":500,"wires":[]},{"id":"34597e16.6af5f2","type":"ui_numeric","z":"d0a0c3ed.6a34b","name":"","label":"numeric","tooltip":"","group":"8271a89c.eff538","order":0,"width":0,"height":0,"wrap":false,"passthru":true,"topic":"a","format":"{{value}}","min":0,"max":10,"step":1,"x":100,"y":440,"wires":[["f25075b3.e21528"]]},{"id":"2148df81.ec0a8","type":"ui_numeric","z":"d0a0c3ed.6a34b","name":"","label":"numeric","tooltip":"","group":"8271a89c.eff538","order":1,"width":0,"height":0,"wrap":false,"passthru":true,"topic":"b","format":"{{value}}","min":0,"max":10,"step":1,"x":100,"y":500,"wires":[["f25075b3.e21528"]]},{"id":"bdd67bb9.4cbb98","type":"ui_text","z":"d0a0c3ed.6a34b","group":"8271a89c.eff538","order":2,"width":0,"height":0,"name":"","label":"text","format":"{{msg.payload}}","layout":"row-spread","x":500,"y":560,"wires":[]},{"id":"b7ae1ebf.c4373","type":"e-mail","z":"d0a0c3ed.6a34b","server":"smtp.gmail.com","port":"465","secure":true,"tls":true,"name":"peter@waterwire.com.au","dname":"Start_Email","x":790,"y":280,"wires":[]},{"id":"f057ff0c.9e18c","type":"change","z":"d0a0c3ed.6a34b","name":"Chg 1 2 Started","rules":[{"t":"change","p":"payload","pt":"msg","from":"1","fromt":"num","to":"Fan is Running","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":400,"y":280,"wires":[["54b12a23.e9da64","5b0329cd.118ef8"]]},{"id":"d7e054b6.dc0548","type":"change","z":"d0a0c3ed.6a34b","name":"Chg 0 to Stopped","rules":[{"t":"change","p":"payload","pt":"msg","from":"0","fromt":"num","to":"Fan has Stopped","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":410,"y":320,"wires":[["54b12a23.e9da64","5b0329cd.118ef8"]]},{"id":"54b12a23.e9da64","type":"debug","z":"d0a0c3ed.6a34b","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":610,"y":320,"wires":[]},{"id":"641c9260.94965c","type":"switch","z":"d0a0c3ed.6a34b","name":"Sel Msg","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"1","vt":"str"},{"t":"eq","v":"0","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":180,"y":300,"wires":[["f057ff0c.9e18c"],["d7e054b6.dc0548"]]},{"id":"5b0329cd.118ef8","type":"delay","z":"d0a0c3ed.6a34b","name":"Delay","pauseType":"delay","timeout":"2","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":610,"y":280,"wires":[["b7ae1ebf.c4373"]]},{"id":"7c01757f.6dca9c","type":"status","z":"d0a0c3ed.6a34b","name":"Email_out","scope":["b7ae1ebf.c4373"],"x":600,"y":400,"wires":[["8dbc058f.c15b68"]]},{"id":"8dbc058f.c15b68","type":"debug","z":"d0a0c3ed.6a34b","name":"Email_Dbg","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":770,"y":400,"wires":[]},{"id":"28618461.d70b1c","type":"mqtt-broker","z":"","name":"Adafruit","broker":"io.adafruit.com","port":"1883","clientid":"","usetls":false,"compatmode":false,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","closeTopic":"","closeQos":"0","closePayload":"","willTopic":"","willQos":"0","willPayload":""},{"id":"8271a89c.eff538","type":"ui_group","z":"","name":"Input 2","tab":"ad4ee04d.f0009","order":1,"disp":true,"width":"6","collapse":false},{"id":"ad4ee04d.f0009","type":"ui_tab","z":"","name":"Home","icon":"dashboard","disabled":false,"hidden":false}]

Can you try this simple test and see if it works

Set the debug node to complete msg object and not just msg.payload

Ok - did that - debug node is set to display the whole message. Still not what I expected though!

I've copied the flow below - be interesting to see what happens if it run on another machine?

[{"id":"927511ca.cfc0e","type":"status","z":"dc772838.cf2318","name":"","scope":null,"x":180,"y":240,"wires":[["ceebb2.8454845"]]}]

Your getting exactly what you should be getting :slight_smile:

What is it that you`re expecting to get?

Oh - I've got it now! Rookie mistake on my part. A bit embarrassed that I didn't know I could expand on the result by clicking the little arrows doh!

Thanks for your help - I appreciate it.

1 Like

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