Serial timeout causes flow to stop

Hi,
I'm using the serial node to send ascii commands to a rs232 device with a Pi4. It used to run correctly, although i had timeout from time to time which didn't cause any harm.

Yesterday i did an "apt-get update/upgrade" on my Pi4, and since then, i'm getting more random timeout errors which ultimately cause the flow to stop, even if the flow is a loop. Using catch and status nodes doesn't give me anything, as well as the log. I tried to reinstall the serial node, change the input options, add the output terminal character in a function node, to no avail. Maybe i'm missing something.

Node-red version : 1.0.3
Serial node version : 0.10.2
npm version : 6.14.4
node.js version : 12.17.0

[{"id":"a5379e72.e17d6","type":"comment","z":"9f6560a9.1442c","name":"ASCII requests","info":"","x":1380,"y":300,"wires":[]},{"id":"4697224.469385c","type":"split","z":"9f6560a9.1442c","name":"","splt":",","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"","x":1350,"y":360,"wires":[["6cc3c521.6eb34c"]]},{"id":"82e403b2.b4e23","type":"string","z":"9f6560a9.1442c","name":"","methods":[{"name":"toFloat","params":[{"type":"num","value":"2"}]}],"prop":"payload","propout":"payload","object":"msg","objectout":"msg","x":1610,"y":360,"wires":[["3ffbb6d7.c49f22"]]},{"id":"6cc3c521.6eb34c","type":"switch","z":"9f6560a9.1442c","name":"","property":"payload","propertyType":"msg","rules":[{"t":"index","v":"5","vt":"num","v2":"5","v2t":"num"}],"checkall":"true","repair":false,"outputs":1,"x":1470,"y":360,"wires":[["82e403b2.b4e23"]]},{"id":"3ffbb6d7.c49f22","type":"switch","z":"9f6560a9.1442c","name":"","property":"topic","propertyType":"msg","rules":[{"t":"cont","v":"Channel1","vt":"str"},{"t":"cont","v":"Channel2","vt":"str"},{"t":"cont","v":"Channel3","vt":"str"},{"t":"cont","v":"Channel4","vt":"str"}],"checkall":"true","repair":false,"outputs":4,"x":1770,"y":360,"wires":[["19636862.c8ce18"],["9d36f846.ace12"],["9366d977.cff808"],["1bb7d8a9.15ac57"]]},{"id":"2f5c1cc5.78d774","type":"split","z":"9f6560a9.1442c","name":"","splt":",","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"","x":1350,"y":540,"wires":[["69328a1f.2203a4"]]},{"id":"69328a1f.2203a4","type":"switch","z":"9f6560a9.1442c","name":"","property":"payload","propertyType":"msg","rules":[{"t":"index","v":"4","vt":"num","v2":"4","v2t":"num"}],"checkall":"true","repair":false,"outputs":1,"x":1470,"y":540,"wires":[["9911ea08.d10648"]]},{"id":"9911ea08.d10648","type":"string","z":"9f6560a9.1442c","name":"","methods":[{"name":"toFloat","params":[{"type":"num","value":"2"}]}],"prop":"payload","propout":"payload","object":"msg","objectout":"msg","x":1590,"y":540,"wires":[["3ce27e12.ee1802"]]},{"id":"3ce27e12.ee1802","type":"switch","z":"9f6560a9.1442c","name":"","property":"topic","propertyType":"msg","rules":[{"t":"cont","v":"Channel1","vt":"str"},{"t":"cont","v":"Channel2","vt":"str"},{"t":"cont","v":"Channel3","vt":"str"},{"t":"cont","v":"Channel4","vt":"str"}],"checkall":"true","repair":false,"outputs":4,"x":1770,"y":540,"wires":[["c4759874.5c98"],["3b92b7ca.510c58"],["b6968b1d.87f9b8"],["1d0b7ab5.1e31f5"]]},{"id":"4dec3979.38a4b8","type":"split","z":"9f6560a9.1442c","name":"","splt":",","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"","x":1350,"y":720,"wires":[["a96563cf.0c8e6"]]},{"id":"a96563cf.0c8e6","type":"switch","z":"9f6560a9.1442c","name":"","property":"payload","propertyType":"msg","rules":[{"t":"index","v":"4","vt":"num","v2":"4","v2t":"num"}],"checkall":"true","repair":false,"outputs":1,"x":1470,"y":720,"wires":[["10caeb6c.edde3d"]]},{"id":"10caeb6c.edde3d","type":"change","z":"9f6560a9.1442c","name":"","rules":[{"t":"change","p":"payload","pt":"msg","from":"0","fromt":"str","to":"Normal","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"1","fromt":"str","to":"Closed","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"2","fromt":"str","to":"Opened","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1620,"y":720,"wires":[["43ddedae.c04fd4"]]},{"id":"43ddedae.c04fd4","type":"switch","z":"9f6560a9.1442c","name":"","property":"topic","propertyType":"msg","rules":[{"t":"cont","v":"Channel1","vt":"str"},{"t":"cont","v":"Channel2","vt":"str"},{"t":"cont","v":"Channel3","vt":"str"},{"t":"cont","v":"Channel4","vt":"str"}],"checkall":"true","repair":false,"outputs":4,"x":1770,"y":720,"wires":[["d47ca911.b8d37"],["731f607b.d963d"],["15d2529c.012a1d"],["60b63dd0.45d644"]]},{"id":"b763f2af.54554","type":"function","z":"9f6560a9.1442c","name":"Read PV1","func":"msg.payload = \"AZ.01K\"+\"\\r\";\nmsg.topic = \"Sulfu2/Flow/Channel1/PV\";\nreturn msg;","outputs":1,"noerr":0,"x":810,"y":300,"wires":[["bd0ebc8a.148418"]]},{"id":"596ea1bd.0f795","type":"function","z":"9f6560a9.1442c","name":"Read PV2","func":"msg.payload = \"AZ.03K\"+\"\\r\";\nmsg.topic = \"Sulfu2/Flow/Channel2/PV\";\nreturn msg;","outputs":1,"noerr":0,"x":810,"y":340,"wires":[["4b0ca8f2.2691b"]]},{"id":"8b0a8d86.191af","type":"function","z":"9f6560a9.1442c","name":"Read PV3","func":"msg.payload = \"AZ.05K\"+\"\\r\";\nmsg.topic = \"Sulfu2/Flow/Channel3/PV\";\nreturn msg;","outputs":1,"noerr":0,"x":810,"y":380,"wires":[["e1543508.a4d1e8"]]},{"id":"4eb55d42.1eb9d4","type":"function","z":"9f6560a9.1442c","name":"Read PV4","func":"msg.payload = \"AZ.07K\"+\"\\r\";\nmsg.topic = \"Sulfu2/Flow/Channel4/PV\";\nreturn msg;","outputs":1,"noerr":0,"x":810,"y":420,"wires":[["b1c87438.92bc48"]]},{"id":"8088ebfc.a9c9d8","type":"function","z":"9f6560a9.1442c","name":"Read SP1","func":"msg.payload = \"AZ.02P01?\"+\"\\r\";\nmsg.topic = \"Sulfu2/Flow/Channel1/SP\";\nreturn msg;","outputs":1,"noerr":0,"x":810,"y":480,"wires":[["3923c558.8588ca"]]},{"id":"938c8983.3a0e5","type":"function","z":"9f6560a9.1442c","name":"Read SP2","func":"msg.payload = \"AZ.04P01?\"+\"\\r\";\nmsg.topic = \"Sulfu2/Flow/Channel2/SP\";\nreturn msg;","outputs":1,"noerr":0,"x":810,"y":520,"wires":[["6ea66c2f.e8a16c"]]},{"id":"13d5cc45.9ee414","type":"function","z":"9f6560a9.1442c","name":"Read SP3","func":"msg.payload = \"AZ.06P01?\"+\"\\r\";\nmsg.topic = \"Sulfu2/Flow/Channel3/SP\";\nreturn msg;","outputs":1,"noerr":0,"x":810,"y":560,"wires":[["d5f5793e.2dd7a"]]},{"id":"c1eff5d8.021638","type":"function","z":"9f6560a9.1442c","name":"Read SP4","func":"msg.payload = \"AZ.08P01?\"+\"\\r\";\nmsg.topic = \"Sulfu2/Flow/Channel4/SP\";\nreturn msg;","outputs":1,"noerr":0,"x":810,"y":600,"wires":[["795b5acb.e5f81c"]]},{"id":"134b35a8.aead3a","type":"function","z":"9f6560a9.1442c","name":"Read VOR1","func":"msg.payload = \"AZ.02P29?\"+\"\\r\";\nmsg.topic = \"Sulfu2/Flow/Channel1/VOR\";\nreturn msg;","outputs":1,"noerr":0,"x":810,"y":660,"wires":[["dc31dfb3.91a37"]]},{"id":"4cfcdbfe.50b3bc","type":"function","z":"9f6560a9.1442c","name":"Read VOR2","func":"msg.payload = \"AZ.04P29?\"+\"\\r\";\nmsg.topic = \"Sulfu2/Flow/Channel2/VOR\";\nreturn msg;","outputs":1,"noerr":0,"x":810,"y":700,"wires":[["98229c24.e116a8"]]},{"id":"ee162f85.4576b8","type":"function","z":"9f6560a9.1442c","name":"Read VOR3","func":"msg.payload = \"AZ.06P29?\"+\"\\r\";\nmsg.topic = \"Sulfu2/Flow/Channel3/VOR\";\nreturn msg;","outputs":1,"noerr":0,"x":810,"y":740,"wires":[["ba18abf9.1fe4"]]},{"id":"a18cf77d.87bdf","type":"function","z":"9f6560a9.1442c","name":"Read VOR4","func":"msg.payload = \"AZ.08P29?\"+\"\\r\";\nmsg.topic = \"Sulfu2/Flow/Channel4/VOR\";\nreturn msg;","outputs":1,"noerr":0,"x":810,"y":780,"wires":[["a86ae904.cf4ba"]]},{"id":"6f12ba9d.15879c","type":"inject","z":"9f6560a9.1442c","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":true,"onceDelay":0.1,"x":150,"y":100,"wires":[["ea71b62b.d9b5b8"]]},{"id":"1004eec2.4c63c9","type":"delay","z":"9f6560a9.1442c","name":"","pauseType":"delay","timeout":"50","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":630,"y":340,"wires":[["596ea1bd.0f795"]]},{"id":"f1b50530.723738","type":"delay","z":"9f6560a9.1442c","name":"","pauseType":"delay","timeout":"50","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":630,"y":380,"wires":[["8b0a8d86.191af"]]},{"id":"81843ee1.d8e5c","type":"delay","z":"9f6560a9.1442c","name":"","pauseType":"delay","timeout":"50","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":630,"y":420,"wires":[["4eb55d42.1eb9d4"]]},{"id":"f6ef0fe9.5cd5f","type":"delay","z":"9f6560a9.1442c","name":"","pauseType":"delay","timeout":"50","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":630,"y":480,"wires":[["8088ebfc.a9c9d8"]]},{"id":"1350f45c.23d274","type":"delay","z":"9f6560a9.1442c","name":"","pauseType":"delay","timeout":"50","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":630,"y":520,"wires":[["938c8983.3a0e5"]]},{"id":"4a8d118.67b257","type":"delay","z":"9f6560a9.1442c","name":"","pauseType":"delay","timeout":"50","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":630,"y":560,"wires":[["13d5cc45.9ee414"]]},{"id":"c0f2cffa.6b249","type":"delay","z":"9f6560a9.1442c","name":"","pauseType":"delay","timeout":"50","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":630,"y":600,"wires":[["c1eff5d8.021638"]]},{"id":"33046e94.92653a","type":"delay","z":"9f6560a9.1442c","name":"","pauseType":"delay","timeout":"50","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":630,"y":660,"wires":[["134b35a8.aead3a"]]},{"id":"7788e885.cee908","type":"delay","z":"9f6560a9.1442c","name":"","pauseType":"delay","timeout":"50","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":630,"y":700,"wires":[["4cfcdbfe.50b3bc"]]},{"id":"df6cd180.2684a8","type":"delay","z":"9f6560a9.1442c","name":"","pauseType":"delay","timeout":"50","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":630,"y":740,"wires":[["ee162f85.4576b8"]]},{"id":"2b36eca5.1954bc","type":"delay","z":"9f6560a9.1442c","name":"","pauseType":"delay","timeout":"50","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":630,"y":780,"wires":[["a18cf77d.87bdf"]]},{"id":"e358e50.d23fd98","type":"delay","z":"9f6560a9.1442c","name":"","pauseType":"delay","timeout":"50","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":630,"y":300,"wires":[["b763f2af.54554"]]},{"id":"19636862.c8ce18","type":"link out","z":"9f6560a9.1442c","name":"PV1 out","links":["8236abf1.d4a77","8f357a5.7b28e88"],"x":1915,"y":300,"wires":[]},{"id":"9d36f846.ace12","type":"link out","z":"9f6560a9.1442c","name":"PV2 out","links":["37af36c4.72919a","8f357a5.7b28e88"],"x":1915,"y":340,"wires":[]},{"id":"9366d977.cff808","type":"link out","z":"9f6560a9.1442c","name":"PV3 out","links":["cf0ba437.1623a8","8f357a5.7b28e88"],"x":1915,"y":380,"wires":[]},{"id":"1bb7d8a9.15ac57","type":"link out","z":"9f6560a9.1442c","name":"PV4 out","links":["b78f40ed.8ad22","8f357a5.7b28e88"],"x":1915,"y":420,"wires":[]},{"id":"c4759874.5c98","type":"link out","z":"9f6560a9.1442c","name":"SP1 out","links":["fbeec63b.9e8cf8","8f357a5.7b28e88"],"x":1915,"y":480,"wires":[]},{"id":"3b92b7ca.510c58","type":"link out","z":"9f6560a9.1442c","name":"SP2 out","links":["ce34bf65.af757","8f357a5.7b28e88"],"x":1915,"y":520,"wires":[]},{"id":"b6968b1d.87f9b8","type":"link out","z":"9f6560a9.1442c","name":"SP3 out","links":["ee565dfe.8e986","8f357a5.7b28e88"],"x":1915,"y":560,"wires":[]},{"id":"1d0b7ab5.1e31f5","type":"link out","z":"9f6560a9.1442c","name":"SP4 out","links":["51399425.a3ac24","8f357a5.7b28e88"],"x":1915,"y":600,"wires":[]},{"id":"d47ca911.b8d37","type":"link out","z":"9f6560a9.1442c","name":"VOR1 out","links":["627bf803.3618c","8f357a5.7b28e88"],"x":1915,"y":660,"wires":[]},{"id":"731f607b.d963d","type":"link out","z":"9f6560a9.1442c","name":"VOR2 out","links":["f769ac67.fe9f58","8f357a5.7b28e88"],"x":1915,"y":700,"wires":[]},{"id":"15d2529c.012a1d","type":"link out","z":"9f6560a9.1442c","name":"VOR3 out","links":["968b2153.d7d9a8","8f357a5.7b28e88"],"x":1915,"y":740,"wires":[]},{"id":"60b63dd0.45d644","type":"link out","z":"9f6560a9.1442c","name":"VOR4 out","links":["724ec2fa.a33b4c","8f357a5.7b28e88"],"x":1915,"y":780,"wires":[]},{"id":"40b6f468.88d74c","type":"change","z":"9f6560a9.1442c","name":"Channel 1 State","rules":[{"t":"set","p":"payload","pt":"msg","to":"#:(file)::channel1_state","tot":"flow"}],"action":"","property":"","from":"","to":"","reg":false,"x":200,"y":300,"wires":[["7b8905ce.6e0af4"]]},{"id":"da9dd1af.0b2ce","type":"change","z":"9f6560a9.1442c","name":"Channel 1 State","rules":[{"t":"set","p":"payload","pt":"msg","to":"#:(file)::channel1_state","tot":"flow"}],"action":"","property":"","from":"","to":"","reg":false,"x":200,"y":480,"wires":[["e2dd270a.1a6148"]]},{"id":"ae2b72a6.214c08","type":"change","z":"9f6560a9.1442c","name":"Channel 1 State","rules":[{"t":"set","p":"payload","pt":"msg","to":"#:(file)::channel1_state","tot":"flow"}],"action":"","property":"","from":"","to":"","reg":false,"x":200,"y":660,"wires":[["8146f983.c3fdf"]]},{"id":"7b8905ce.6e0af4","type":"switch","z":"9f6560a9.1442c","name":"Disable Channel","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"Enabled","vt":"str"},{"t":"eq","v":"Disabled","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":410,"y":300,"wires":[["e358e50.d23fd98"],["f1616cae.5cf6b"]]},{"id":"605848e9.fcfb98","type":"link out","z":"9f6560a9.1442c","name":"Read End Out","links":["3bae842a.88c5c4"],"x":1315,"y":820,"wires":[]},{"id":"3bae842a.88c5c4","type":"link in","z":"9f6560a9.1442c","name":"Read End In","links":["605848e9.fcfb98"],"x":655,"y":40,"wires":[["ea71b62b.d9b5b8"]]},{"id":"f1616cae.5cf6b","type":"change","z":"9f6560a9.1442c","name":"Channel 2 State","rules":[{"t":"set","p":"payload","pt":"msg","to":"#:(file)::channel2_state","tot":"flow"}],"action":"","property":"","from":"","to":"","reg":false,"x":200,"y":340,"wires":[["c29369ff.1a043"]]},{"id":"c29369ff.1a043","type":"switch","z":"9f6560a9.1442c","name":"Disable Channel","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"Enabled","vt":"str"},{"t":"eq","v":"Disabled","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":410,"y":340,"wires":[["1004eec2.4c63c9"],["d8551d9c.20819"]]},{"id":"7a13193d.312e28","type":"switch","z":"9f6560a9.1442c","name":"Disable Channel","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"Enabled","vt":"str"},{"t":"eq","v":"Disabled","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":410,"y":380,"wires":[["f1b50530.723738"],["577bc6f2.11044"]]},{"id":"b9948408.945c6","type":"switch","z":"9f6560a9.1442c","name":"Disable Channel","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"Enabled","vt":"str"},{"t":"eq","v":"Disabled","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":410,"y":420,"wires":[["81843ee1.d8e5c"],["da9dd1af.0b2ce"]]},{"id":"e2dd270a.1a6148","type":"switch","z":"9f6560a9.1442c","name":"Disable Channel","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"Enabled","vt":"str"},{"t":"eq","v":"Disabled","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":410,"y":480,"wires":[["f6ef0fe9.5cd5f"],["78ea4ccd.67d8fc"]]},{"id":"61e37910.e63d48","type":"switch","z":"9f6560a9.1442c","name":"Disable Channel","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"Enabled","vt":"str"},{"t":"eq","v":"Disabled","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":410,"y":520,"wires":[["1350f45c.23d274"],["73c5cf39.a0975"]]},{"id":"39b49e51.6d8c42","type":"switch","z":"9f6560a9.1442c","name":"Disable Channel","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"Enabled","vt":"str"},{"t":"eq","v":"Disabled","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":410,"y":560,"wires":[["4a8d118.67b257"],["8328f1f2.b7ac78"]]},{"id":"6261c7c0.a1ac2","type":"switch","z":"9f6560a9.1442c","name":"Disable Channel","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"Enabled","vt":"str"},{"t":"eq","v":"Disabled","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":410,"y":600,"wires":[["c0f2cffa.6b249"],["ae2b72a6.214c08"]]},{"id":"8146f983.c3fdf","type":"switch","z":"9f6560a9.1442c","name":"Disable Channel","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"Enabled","vt":"str"},{"t":"eq","v":"Disabled","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":410,"y":660,"wires":[["33046e94.92653a"],["ec09748e.f532d8"]]},{"id":"41be887f.9bde58","type":"switch","z":"9f6560a9.1442c","name":"Disable Channel","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"Enabled","vt":"str"},{"t":"eq","v":"Disabled","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":410,"y":700,"wires":[["7788e885.cee908"],["7b91f4c8.1e4f14"]]},{"id":"80c2980d.7e4d3","type":"switch","z":"9f6560a9.1442c","name":"Disable Channel","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"Enabled","vt":"str"},{"t":"eq","v":"Disabled","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":410,"y":740,"wires":[["df6cd180.2684a8"],["11580d46.dfa28b"]]},{"id":"203b1a.079f04e6","type":"switch","z":"9f6560a9.1442c","name":"Disable Channel","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"Enabled","vt":"str"},{"t":"eq","v":"Disabled","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":410,"y":780,"wires":[["2b36eca5.1954bc"],["605848e9.fcfb98"]]},{"id":"78ea4ccd.67d8fc","type":"change","z":"9f6560a9.1442c","name":"Channel 2 State","rules":[{"t":"set","p":"payload","pt":"msg","to":"#:(file)::channel2_state","tot":"flow"}],"action":"","property":"","from":"","to":"","reg":false,"x":200,"y":520,"wires":[["61e37910.e63d48"]]},{"id":"ec09748e.f532d8","type":"change","z":"9f6560a9.1442c","name":"Channel 2 State","rules":[{"t":"set","p":"payload","pt":"msg","to":"#:(file)::channel2_state","tot":"flow"}],"action":"","property":"","from":"","to":"","reg":false,"x":200,"y":700,"wires":[["41be887f.9bde58"]]},{"id":"d8551d9c.20819","type":"change","z":"9f6560a9.1442c","name":"Channel 3 State","rules":[{"t":"set","p":"payload","pt":"msg","to":"#:(file)::channel3_state","tot":"flow"}],"action":"","property":"","from":"","to":"","reg":false,"x":200,"y":380,"wires":[["7a13193d.312e28"]]},{"id":"577bc6f2.11044","type":"change","z":"9f6560a9.1442c","name":"Channel 4 State","rules":[{"t":"set","p":"payload","pt":"msg","to":"#:(file)::channel4_state","tot":"flow"}],"action":"","property":"","from":"","to":"","reg":false,"x":200,"y":420,"wires":[["b9948408.945c6"]]},{"id":"73c5cf39.a0975","type":"change","z":"9f6560a9.1442c","name":"Channel 3 State","rules":[{"t":"set","p":"payload","pt":"msg","to":"#:(file)::channel3_state","tot":"flow"}],"action":"","property":"","from":"","to":"","reg":false,"x":200,"y":560,"wires":[["39b49e51.6d8c42"]]},{"id":"8328f1f2.b7ac78","type":"change","z":"9f6560a9.1442c","name":"Channel 4 State","rules":[{"t":"set","p":"payload","pt":"msg","to":"#:(file)::channel4_state","tot":"flow"}],"action":"","property":"","from":"","to":"","reg":false,"x":200,"y":600,"wires":[["6261c7c0.a1ac2"]]},{"id":"7b91f4c8.1e4f14","type":"change","z":"9f6560a9.1442c","name":"Channel 3 State","rules":[{"t":"set","p":"payload","pt":"msg","to":"#:(file)::channel3_state","tot":"flow"}],"action":"","property":"","from":"","to":"","reg":false,"x":200,"y":740,"wires":[["80c2980d.7e4d3"]]},{"id":"11580d46.dfa28b","type":"change","z":"9f6560a9.1442c","name":"Channel 4 State","rules":[{"t":"set","p":"payload","pt":"msg","to":"#:(file)::channel4_state","tot":"flow"}],"action":"","property":"","from":"","to":"","reg":false,"x":200,"y":780,"wires":[["203b1a.079f04e6"]]},{"id":"31af6ec4.50868a","type":"change","z":"9f6560a9.1442c","name":"set flow.channel1_state","rules":[{"t":"set","p":"#:(file)::channel1_state","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":2110,"y":100,"wires":[["439f5828.421ac"]]},{"id":"3f115c0e.82c31c","type":"change","z":"9f6560a9.1442c","name":"set flow.channel2_state","rules":[{"t":"set","p":"#:(file)::channel2_state","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":2110,"y":140,"wires":[["e5f3acd.1e733d"]]},{"id":"adf71f6c.1ae2","type":"change","z":"9f6560a9.1442c","name":"set flow.channel3_state","rules":[{"t":"set","p":"#:(file)::channel3_state","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":2110,"y":180,"wires":[["be0cfdfa.56c"]]},{"id":"e72e7591.5ef81","type":"function","z":"9f6560a9.1442c","name":"Read Channel 4 Status","func":"msg.payload = \"AZ.07P00?\"+\"\\r\";\nmsg.topic = \"Sulfu2/Flow/Channel4/State\";\nreturn msg;","outputs":1,"noerr":0,"x":850,"y":220,"wires":[["f758295a.734ca"]]},{"id":"1cc9e928.175c67","type":"split","z":"9f6560a9.1442c","name":"","splt":",","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"","x":1350,"y":220,"wires":[["6c588fdf.064cc"]]},{"id":"6c588fdf.064cc","type":"switch","z":"9f6560a9.1442c","name":"","property":"payload","propertyType":"msg","rules":[{"t":"index","v":"4","vt":"num","v2":"4","v2t":"num"}],"checkall":"true","repair":false,"outputs":1,"x":1470,"y":220,"wires":[["951bc04b.60e7b"]]},{"id":"b11f4e1a.63f8f","type":"function","z":"9f6560a9.1442c","name":"Read Channel 3 Status","func":"msg.payload = \"AZ.05P00?\"+\"\\r\";\nmsg.topic = \"Sulfu2/Flow/Channel3/State\";\nreturn msg;","outputs":1,"noerr":0,"x":850,"y":180,"wires":[["f75c70be.7bb828"]]},{"id":"381cdefe.91bda2","type":"split","z":"9f6560a9.1442c","name":"","splt":",","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"","x":1350,"y":180,"wires":[["573d73e7.b4e1fc"]]},{"id":"573d73e7.b4e1fc","type":"switch","z":"9f6560a9.1442c","name":"","property":"payload","propertyType":"msg","rules":[{"t":"index","v":"4","vt":"num","v2":"4","v2t":"num"}],"checkall":"true","repair":false,"outputs":1,"x":1470,"y":180,"wires":[["be65d877.411b9"]]},{"id":"9ca5ceea.2d56d","type":"function","z":"9f6560a9.1442c","name":"Read Channel 2 Status","func":"msg.payload = \"AZ.03P00?\"+\"\\r\";\nmsg.topic = \"Sulfu2/Flow/Channel2/State\";\nreturn msg;","outputs":1,"noerr":0,"x":850,"y":140,"wires":[["661ea239.6575c4"]]},{"id":"1a3c27c5.17c3b","type":"split","z":"9f6560a9.1442c","name":"","splt":",","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"","x":1350,"y":140,"wires":[["f87a3f5c.141b58"]]},{"id":"f87a3f5c.141b58","type":"switch","z":"9f6560a9.1442c","name":"","property":"payload","propertyType":"msg","rules":[{"t":"index","v":"4","vt":"num","v2":"4","v2t":"num"}],"checkall":"true","repair":false,"outputs":1,"x":1470,"y":140,"wires":[["fdd520b8.2665c"]]},{"id":"ea71b62b.d9b5b8","type":"function","z":"9f6560a9.1442c","name":"Read Channel 1 Status","func":"msg.payload = \"AZ.01P00?\"+\"\\r\";\nmsg.topic = \"Sulfu2/Flow/Channel1/State\";\nreturn msg;","outputs":1,"noerr":0,"x":850,"y":100,"wires":[["2b531182.ea1afe"]]},{"id":"a1486bf8.006cd","type":"split","z":"9f6560a9.1442c","name":"","splt":",","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"","x":1350,"y":100,"wires":[["de30eaaf.78b148"]]},{"id":"de30eaaf.78b148","type":"switch","z":"9f6560a9.1442c","name":"","property":"payload","propertyType":"msg","rules":[{"t":"index","v":"4","vt":"num","v2":"4","v2t":"num"}],"checkall":"true","repair":false,"outputs":1,"x":1470,"y":100,"wires":[["618df212.3a42a4"]]},{"id":"439f5828.421ac","type":"delay","z":"9f6560a9.1442c","name":"","pauseType":"delay","timeout":"50","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":630,"y":140,"wires":[["9ca5ceea.2d56d"]]},{"id":"e5f3acd.1e733d","type":"delay","z":"9f6560a9.1442c","name":"","pauseType":"delay","timeout":"50","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":630,"y":180,"wires":[["b11f4e1a.63f8f"]]},{"id":"be0cfdfa.56c","type":"delay","z":"9f6560a9.1442c","name":"","pauseType":"delay","timeout":"50","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":630,"y":220,"wires":[["e72e7591.5ef81"]]},{"id":"14744e66.3a006a","type":"change","z":"9f6560a9.1442c","name":"set flow.channel4_state","rules":[{"t":"set","p":"#:(file)::channel4_state","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":2110,"y":220,"wires":[["40b6f468.88d74c"]]},{"id":"618df212.3a42a4","type":"function","z":"9f6560a9.1442c","name":"Change Channel 1 State","func":"if (msg.payload === '000')\n{\n msg.payload = 'Disabled';\n}\nelse{\n msg.payload = 'Enabled';\n}\n\nreturn msg;","outputs":1,"noerr":0,"x":1830,"y":100,"wires":[["31af6ec4.50868a"]]},{"id":"951bc04b.60e7b","type":"function","z":"9f6560a9.1442c","name":"Change Channel 4 State","func":"if (msg.payload === '000')\n{\n msg.payload = \"Disabled\";\n}\nelse{\n msg.payload = \"Enabled\";\n}\n\nreturn msg;","outputs":1,"noerr":0,"x":1830,"y":220,"wires":[["14744e66.3a006a"]]},{"id":"be65d877.411b9","type":"function","z":"9f6560a9.1442c","name":"Change Channel 3 State","func":"if (msg.payload === '000')\n{\n msg.payload = \"Disabled\";\n}\nelse{\n msg.payload = \"Enabled\";\n}\n\nreturn msg;","outputs":1,"noerr":0,"x":1830,"y":180,"wires":[["adf71f6c.1ae2"]]},{"id":"fdd520b8.2665c","type":"function","z":"9f6560a9.1442c","name":"Change Channel 2 State","func":"if (msg.payload === '000')\n{\n msg.payload = \"Disabled\";\n}\nelse{\n msg.payload = \"Enabled\";\n}\n\nreturn msg;","outputs":1,"noerr":0,"x":1830,"y":140,"wires":[["3f115c0e.82c31c"]]},{"id":"a86ae904.cf4ba","type":"serial request","z":"9f6560a9.1442c","name":"0254 ASCII Requests","serial":"2181aeb2.ac8cd2","x":1120,"y":780,"wires":[["4dec3979.38a4b8","605848e9.fcfb98"]]},{"id":"ba18abf9.1fe4","type":"serial request","z":"9f6560a9.1442c","name":"0254 ASCII Requests","serial":"2181aeb2.ac8cd2","x":1120,"y":740,"wires":[["4dec3979.38a4b8","11580d46.dfa28b"]]},{"id":"98229c24.e116a8","type":"serial request","z":"9f6560a9.1442c","name":"0254 ASCII Requests","serial":"2181aeb2.ac8cd2","x":1120,"y":700,"wires":[["4dec3979.38a4b8","7b91f4c8.1e4f14"]]},{"id":"dc31dfb3.91a37","type":"serial request","z":"9f6560a9.1442c","name":"0254 ASCII Requests","serial":"2181aeb2.ac8cd2","x":1120,"y":660,"wires":[["4dec3979.38a4b8","ec09748e.f532d8"]]},{"id":"795b5acb.e5f81c","type":"serial request","z":"9f6560a9.1442c","name":"0254 ASCII Requests","serial":"2181aeb2.ac8cd2","x":1120,"y":600,"wires":[["2f5c1cc5.78d774","ae2b72a6.214c08"]]},{"id":"d5f5793e.2dd7a","type":"serial request","z":"9f6560a9.1442c","name":"0254 ASCII Requests","serial":"2181aeb2.ac8cd2","x":1120,"y":560,"wires":[["2f5c1cc5.78d774","8328f1f2.b7ac78"]]},{"id":"6ea66c2f.e8a16c","type":"serial request","z":"9f6560a9.1442c","name":"0254 ASCII Requests","serial":"2181aeb2.ac8cd2","x":1120,"y":520,"wires":[["2f5c1cc5.78d774","73c5cf39.a0975"]]},{"id":"3923c558.8588ca","type":"serial request","z":"9f6560a9.1442c","name":"0254 ASCII Requests","serial":"2181aeb2.ac8cd2","x":1120,"y":480,"wires":[["2f5c1cc5.78d774","78ea4ccd.67d8fc"]]},{"id":"b1c87438.92bc48","type":"serial request","z":"9f6560a9.1442c","name":"0254 ASCII Requests","serial":"2181aeb2.ac8cd2","x":1120,"y":420,"wires":[["4697224.469385c","da9dd1af.0b2ce"]]},{"id":"e1543508.a4d1e8","type":"serial request","z":"9f6560a9.1442c","name":"0254 ASCII Requests","serial":"2181aeb2.ac8cd2","x":1120,"y":380,"wires":[["4697224.469385c","577bc6f2.11044"]]},{"id":"4b0ca8f2.2691b","type":"serial request","z":"9f6560a9.1442c","name":"0254 ASCII Requests","serial":"2181aeb2.ac8cd2","x":1120,"y":340,"wires":[["4697224.469385c","d8551d9c.20819"]]},{"id":"bd0ebc8a.148418","type":"serial request","z":"9f6560a9.1442c","name":"0254 ASCII Requests","serial":"2181aeb2.ac8cd2","x":1120,"y":300,"wires":[["4697224.469385c","f1616cae.5cf6b"]]},{"id":"f758295a.734ca","type":"serial request","z":"9f6560a9.1442c","name":"0254 ASCII Requests","serial":"2181aeb2.ac8cd2","x":1120,"y":220,"wires":[["1cc9e928.175c67"]]},{"id":"f75c70be.7bb828","type":"serial request","z":"9f6560a9.1442c","name":"0254 ASCII Requests","serial":"2181aeb2.ac8cd2","x":1120,"y":180,"wires":[["381cdefe.91bda2"]]},{"id":"661ea239.6575c4","type":"serial request","z":"9f6560a9.1442c","name":"0254 ASCII Requests","serial":"2181aeb2.ac8cd2","x":1120,"y":140,"wires":[["1a3c27c5.17c3b"]]},{"id":"2b531182.ea1afe","type":"serial request","z":"9f6560a9.1442c","name":"0254 ASCII Requests","serial":"2181aeb2.ac8cd2","x":1120,"y":100,"wires":[["a1486bf8.006cd","6bbea380.7380e4"]]},{"id":"6bbea380.7380e4","type":"debug","z":"9f6560a9.1442c","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":1370,"y":40,"wires":[]},{"id":"2181aeb2.ac8cd2","type":"serial-port","z":"","serialport":"/dev/ttyUSB0","serialbaud":"9600","databits":"8","parity":"none","stopbits":"1","waitfor":"","dtr":"none","rts":"none","cts":"none","dsr":"none","newline":"100","bin":"false","out":"time","addchar":"","responsetimeout":"5000"}]

Same behaviour for the modbus node, when an instrument is unplugged. So it seems that the nodes stop working after a few retry to connect to the instruments. This shouldn't be the case, so it's a internal node problem.

Have you checked that, when it stops, you are still triggering the serial node to try again (assuming it is a serial request node)? Connect a debug node to its input to check. I can't import your flow at the moment (and actually it is so large that I have no intention of trying) so I don't know how you are triggering it. If you need to post a flow please post just the relevant parts.

Thanks for your reply. As the flow is basically a loop, the nodes are always triggered. But at some point, one random serial node doesn't output anymore, which breaks the flow.

The flow would be more resilient if you used a regular trigger to start the sequence rather than relying on a successful run right through to re-trigger it.
If you hit the inject node (assuming the purpose of that is to start it off) does it start up again?

So occasionally despite a request going in - you get nothing at all out - not even a timeout status message on one of the request nodes ?

Indeed, i could retrigger the flow, but i prefer it to go at its own pace. To me it's more comfortable this way. For example, with the modbus nodes, it's much better as i don't have to deal with queue problems.

Indeed the flow starts again if i press the inject node. So it seems to be stuck somewhere in the request node that has timed out. Using an inject node could be a temporary fix, but would not fix the core problem imo.

Exactly, not a single message.

As the flow goes, i can get timeout (probably due to the instrument or the usb/rs232 converter), but the flow continues. But after some time, i get a timeout on a request node, and nothing on the output, so the flow stops. As I said, i tried a catch node and a status node, but they didn't get me far. Catch node doesn't show a thing, and status node shows the timeout but nothing else on why the flow would stop.

Also, i've upgraded node-red to v1.0.6, with no changes.

How do you know you are getting a timeout?

As you can see on the image, the activity of the node is shown. Plus, a status node confirms this.

Ah cool - so it's working ok then :slight_smile: ... up to you to use that info to re-trigger something ... either from the start or from some other point.

I could. But the fact that a node doesn't output anything is bothering me. Plus, the flow has been going on for weeks, and now it simply doesn't behave as usual.

What did you used to get on the output when you had a timeout?

I see from your initial post

So does a Catch node catch the timeout (I don't know whether it should or not).

No I think the status does though.. - as the timeout will send through whatever it has at that point (maybe nothing) and also adds a msg.status to the main msg... as well as setting the node.status...

I may be on to something.

My split function splits the response according to comas (my response is xxx,xxxx,xxxx typically).
When i get a timeout, i actually get a message, but it's written "undefined". I missed this. So my split function can't treat this. I need to use a switch function to deal with this.

I'll run some tests and come back.

Looks like the split function doesn't output anything if it doesn't find a match, which stops the flow. So i'm putting a switch node with "is null/ is not null" rules to discard "undefined" messages produced by a timeout request. This is working well so far.

1 Like

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