From my experience, the status
node reads other node statuses upon change and does not reflect the initial state.
For example, if the MQTT node connects upon deployment, the status is not pushed:
Then, if I stop and restart the MQTT broker, I get the statuses:
Similarly, with the state machine node. Upon deployment it enters the initial
state, but status
node does not reflect that:
On the first and subsequent state changes, status
generates a message.
[{"id":"28d3a864.2ba658","type":"state-machine","z":"ea7ceec7.99905","name":"","triggerProperty":"payload","triggerPropertyType":"msg","stateProperty":"topic","statePropertyType":"msg","outputStateChangeOnly":true,"throwException":true,"states":["initial","state1","state2"],"transitions":[{"name":"go to state 1","from":"*","to":"state1"},{"name":"go to state 2","from":"*","to":"state2"}],"x":200,"y":80,"wires":[["726cb4c2.7b2fac"]]},{"id":"726cb4c2.7b2fac","type":"switch","z":"ea7ceec7.99905","name":"","property":"topic","propertyType":"msg","rules":[{"t":"eq","v":"initial","vt":"str"},{"t":"eq","v":"state1","vt":"str"},{"t":"eq","v":"state2","vt":"str"}],"checkall":"true","repair":false,"outputs":3,"x":370,"y":80,"wires":[["73ca5b46.c76904"],["4fe2533d.d71afc"],["73ca5b46.c76904"]]},{"id":"a2bb1e76.ef576","type":"link in","z":"ea7ceec7.99905","name":"New State","links":["aa121696.6d6be8"],"x":75,"y":80,"wires":[["28d3a864.2ba658"]]},{"id":"73ca5b46.c76904","type":"delay","z":"ea7ceec7.99905","name":"","pauseType":"delay","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":560,"y":60,"wires":[["ba0b31a8.f7d7e"]]},{"id":"4fe2533d.d71afc","type":"delay","z":"ea7ceec7.99905","name":"","pauseType":"delay","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":560,"y":100,"wires":[["58f22587.39099c"]]},{"id":"ba0b31a8.f7d7e","type":"change","z":"ea7ceec7.99905","name":"go to state 1","rules":[{"t":"set","p":"payload","pt":"msg","to":"go to state 1","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":730,"y":60,"wires":[["aa121696.6d6be8"]]},{"id":"58f22587.39099c","type":"change","z":"ea7ceec7.99905","name":"go to state 2","rules":[{"t":"set","p":"payload","pt":"msg","to":"go to state 2","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":730,"y":100,"wires":[["aa121696.6d6be8"]]},{"id":"aa121696.6d6be8","type":"link out","z":"ea7ceec7.99905","name":"","links":["a2bb1e76.ef576"],"x":875,"y":80,"wires":[]},{"id":"e6a036fd.720c08","type":"debug","z":"ea7ceec7.99905","name":"State (text)","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"status.text","targetType":"msg","x":430,"y":180,"wires":[]},{"id":"1d3d9993.eac0f6","type":"status","z":"ea7ceec7.99905","name":"","scope":["28d3a864.2ba658"],"x":200,"y":180,"wires":[["e6a036fd.720c08","7ae3e103.81836"]]},{"id":"7ae3e103.81836","type":"debug","z":"ea7ceec7.99905","name":"State (msg)","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":430,"y":220,"wires":[]}]
Is this intended?
Is there a way to force status
node to fetch the initial state of other nodes? Or get it through some other method?
I know that I can, and I actually get the initial status from the state machine's output - the above is just an example with shareable code - I am asking about checking statuses of other node types.