Odd issue with Modbus Flex Getter

Hi folks,
I have a system running on a PI 4B.
It talks to a couple of PLC's and 4 energy meters via Modbus TCP.

One of the meters is RTU, remote, as in over the public network, and connected by a Waveshare RS485 to Ethernet Converter.
Each FlexGetter node is set to que, and is triggered from a common inject, every second. with a small delay, each being different.
The remote one is also rate limited at i message every 2 seconds.

All looks good and I get data at the rate I expect easily. However about once a day the node handling the remote meter will change its status to initializing and then hang untill the flow is redeployed.

I have searched for an explanation and even disconnected the meter to see if that triggers the behavior, which isn't the case. Obviously I get a timeout but reconnecting the meter causes the node to resume, as you would expect.
I haven't been able to force this error no matter what silly settings I give things.

Firstly, any thoughts?
Secondly... Is there a way to catch the aberrant state and re-initilise the node?

I am catching the timeout state so already have a trigger of sorts.
I ideally want to give the node a kick, disable and then enable perhaps, rather than redeploying the whole flow.

Looking at the GitHGub and WIKI hasnt suggested a way to force the node to do anything beyond 'normal' operating commands.

Its the last getter in the flow, indicator turns yellow. (Sorry no screenshot)

[
    {
        "id": "7d4912f24a34f873",
        "type": "function",
        "z": "992ceee39b1a55a8",
        "name": "function 6",
        "func": "msg.payload = \n{\n  fc:       4, \n  unitid:   1,\n  address:  0, \n  quantity: 82\n} \nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 540,
        "y": 780,
        "wires": [
            [
                "d6e7dafb70def598"
            ]
        ]
    },
    {
        "id": "91941e4e12b3ee90",
        "type": "delay",
        "z": "992ceee39b1a55a8",
        "name": "",
        "pauseType": "rate",
        "timeout": "300",
        "timeoutUnits": "milliseconds",
        "rate": "1",
        "nbRateUnits": "2",
        "rateUnits": "second",
        "randomFirst": "1",
        "randomLast": "5",
        "randomUnits": "seconds",
        "drop": true,
        "allowrate": false,
        "outputs": 1,
        "x": 360,
        "y": 780,
        "wires": [
            [
                "7d4912f24a34f873"
            ]
        ]
    },
    {
        "id": "d6e7dafb70def598",
        "type": "modbus-flex-getter",
        "z": "992ceee39b1a55a8",
        "name": "",
        "showStatusActivities": true,
        "showErrors": true,
        "showWarnings": true,
        "logIOActivities": false,
        "server": "e1e943701a8f8af9",
        "useIOFile": false,
        "ioFile": "",
        "useIOForPayload": false,
        "emptyMsgOnFail": true,
        "keepMsgProperties": false,
        "delayOnStart": false,
        "startDelayTime": "",
        "x": 750,
        "y": 780,
        "wires": [
            [
                "2b4a1bc3a513cb31",
                "4108fa9da29e0088"
            ],
            []
        ]
    },
    {
        "id": "2b4a1bc3a513cb31",
        "type": "switch",
        "z": "992ceee39b1a55a8",
        "name": "",
        "property": "payload",
        "propertyType": "msg",
        "rules": [
            {
                "t": "nempty"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 1,
        "x": 550,
        "y": 900,
        "wires": [
            [
                "c439a05051bcd3cf"
            ]
        ]
    },
    {
        "id": "c439a05051bcd3cf",
        "type": "buffer-parser",
        "z": "992ceee39b1a55a8",
        "name": "",
        "data": "payload",
        "dataType": "msg",
        "specification": "spec",
        "specificationType": "ui",
        "items": [
            {
                "type": "floatle",
                "name": "voltage",
                "offset": 0,
                "length": 1,
                "offsetbit": 0,
                "scale": "1",
                "mask": ""
            },
            {
                "type": "floatle",
                "name": "current",
                "offset": 12,
                "length": 1,
                "offsetbit": 0,
                "scale": "1",
                "mask": ""
            },
            {
                "type": "floatle",
                "name": "power",
                "offset": 24,
                "length": 1,
                "offsetbit": 0,
                "scale": "1",
                "mask": ""
            },
            {
                "type": "floatle",
                "name": "frequency",
                "offset": 140,
                "length": 1,
                "offsetbit": 0,
                "scale": "1",
                "mask": ""
            },
            {
                "type": "uint16le",
                "name": "importkwh",
                "offset": 144,
                "length": 1,
                "offsetbit": 0,
                "scale": "1",
                "mask": ""
            },
            {
                "type": "uint16le",
                "name": "exportkwh",
                "offset": 148,
                "length": 1,
                "offsetbit": 0,
                "scale": "1",
                "mask": ""
            }
        ],
        "swap1": "swap32",
        "swap2": "",
        "swap3": "",
        "swap1Type": "swap",
        "swap2Type": "swap",
        "swap3Type": "swap",
        "msgProperty": "payload",
        "msgPropertyType": "str",
        "resultType": "keyvalue",
        "resultTypeType": "return",
        "multipleResult": false,
        "fanOutMultipleResult": false,
        "setTopic": true,
        "outputs": 1,
        "x": 850,
        "y": 920,
        "wires": [
            [
                "941e502fd3f5a7b3"
            ]
        ]
    },
    {
        "id": "4108fa9da29e0088",
        "type": "switch",
        "z": "992ceee39b1a55a8",
        "name": "",
        "property": "payload",
        "propertyType": "msg",
        "rules": [
            {
                "t": "empty"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 1,
        "x": 690,
        "y": 980,
        "wires": [
            [
                "644a223c73571ffe"
            ]
        ]
    },
    {
        "id": "644a223c73571ffe",
        "type": "change",
        "z": "992ceee39b1a55a8",
        "name": "",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "0",
                "tot": "num"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 880,
        "y": 980,
        "wires": [
            [
                "424328c862fe62d7"
            ]
        ]
    },
    {
        "id": "941e502fd3f5a7b3",
        "type": "function",
        "z": "992ceee39b1a55a8",
        "name": "power",
        "func": "msg.payload = (Math.round(msg.payload.power / 100)/10)*-1;\n//msg.payload = -10;\nmsg.topic = \"power\";\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 1070,
        "y": 920,
        "wires": [
            [
                "424328c862fe62d7"
            ]
        ]
    },
    {
        "id": "424328c862fe62d7",
        "type": "change",
        "z": "992ceee39b1a55a8",
        "name": "",
        "rules": [
            {
                "t": "set",
                "p": "HSE_KW_OBYC",
                "pt": "global",
                "to": "payload",
                "tot": "msg"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 1340,
        "y": 980,
        "wires": [
            [
                "a7d23aca8a7be989"
            ]
        ]
    },
    {
        "id": "a7d23aca8a7be989",
        "type": "ui_gauge",
        "z": "992ceee39b1a55a8",
        "name": "",
        "group": "30801dbae6e257d8",
        "order": 13,
        "width": 3,
        "height": 3,
        "gtype": "gage",
        "title": "OBYC House",
        "label": "kW",
        "format": "{{value| number:2}}",
        "min": 0,
        "max": "-30",
        "colors": [
            "#00b500",
            "#00b500",
            "#00b500"
        ],
        "seg1": "",
        "seg2": "",
        "diff": false,
        "className": "",
        "x": 1600,
        "y": 980,
        "wires": []
    },
    {
        "id": "baf6f0e59f634044",
        "type": "delay",
        "z": "992ceee39b1a55a8",
        "name": "",
        "pauseType": "delay",
        "timeout": "300",
        "timeoutUnits": "milliseconds",
        "rate": "1",
        "nbRateUnits": "1",
        "rateUnits": "second",
        "randomFirst": "1",
        "randomLast": "5",
        "randomUnits": "seconds",
        "drop": false,
        "allowrate": false,
        "outputs": 1,
        "x": 350,
        "y": 900,
        "wires": [
            [
                "91941e4e12b3ee90"
            ]
        ]
    },
    {
        "id": "e1e943701a8f8af9",
        "type": "modbus-client",
        "name": "OBYC Meter",
        "clienttype": "tcp",
        "bufferCommands": true,
        "stateLogEnabled": false,
        "queueLogEnabled": false,
        "failureLogEnabled": true,
        "tcpHost": "xxxxxxxx.ourhydrosite.com",
        "tcpPort": "xxxx",
        "tcpType": "DEFAULT",
        "serialPort": "/dev/ttyUSB",
        "serialType": "RTU-BUFFERD",
        "serialBaudrate": "9600",
        "serialDatabits": "8",
        "serialStopbits": "1",
        "serialParity": "none",
        "serialConnectionDelay": "100",
        "serialAsciiResponseStartDelimiter": "0x3A",
        "unit_id": "1",
        "commandDelay": "10",
        "clientTimeout": "1000",
        "reconnectOnTimeout": true,
        "reconnectTimeout": "2000",
        "parallelUnitIdsAllowed": true,
        "showWarnings": true,
        "showLogs": true
    },
    {
        "id": "30801dbae6e257d8",
        "type": "ui_group",
        "name": "Cwm Pennant & Ty'n Y Cablyd House",
        "tab": "647eed3084182c30",
        "order": 3,
        "disp": true,
        "width": "11",
        "collapse": false,
        "className": ""
    },
    {
        "id": "647eed3084182c30",
        "type": "ui_tab",
        "name": "Cwm Pennant Estate - Energy",
        "icon": "dashboard",
        "disabled": false,
        "hidden": false
    }
]


I got a screenshot of the problem...

I have added code that uses the status node to detect this and send a new message to the getter that has bad Modbus ID, this, most of the time, causes the getter to try and fail, clearing the frozen state in the process, and the original flow then works again.
Its been fine for several days but stopped again just recently.
When I found it the status it was stuck/stalled and hadn't reset, injecting a bad request didn't help.
redeploying this flow fixed it but only after I changed the position of the node on the flow.
Nothing. other than where on the flow page the node sits was altered.

I am stumped here, several other flexGetters and 4 getters pulling serial data are all fine and all configured the same way, other than the target,

I even went to the site an unplugged the target to see iof a coms fail would cause the issue and it failed, obviously, but recovered as soon as the target was connected the ther internet again.

Any thought guys?


The whole thing in its 'normal' operating state.

The flow segment as it is now... The entire flow was too long to post

[
    {
        "id": "86f72b76237789b4",
        "type": "inject",
        "z": "992ceee39b1a55a8",
        "name": "Node Reset",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "",
        "payloadType": "date",
        "x": 130,
        "y": 820,
        "wires": [
            [
                "d8903ebe98dcd6b1"
            ]
        ]
    },
    {
        "id": "c32f7e0bd3a83b25",
        "type": "inject",
        "z": "992ceee39b1a55a8",
        "name": "",
        "props": [
            {
                "p": "ts",
                "v": "",
                "vt": "date"
            }
        ],
        "repeat": "0.8",
        "crontab": "",
        "once": true,
        "onceDelay": "3",
        "topic": "",
        "x": 130,
        "y": 480,
        "wires": [
            [
                "27a252d5cbf74d6b",
                "2b5570eb8ae0d752",
                "88c4c14a983d4e99",
                "bc2bb26b077b63e8",
                "9e92e409a97b044e",
                "baf6f0e59f634044"
            ]
        ]
    },
    {
        "id": "baf6f0e59f634044",
        "type": "delay",
        "z": "992ceee39b1a55a8",
        "name": "",
        "pauseType": "delay",
        "timeout": "300",
        "timeoutUnits": "milliseconds",
        "rate": "1",
        "nbRateUnits": "1",
        "rateUnits": "second",
        "randomFirst": "1",
        "randomLast": "5",
        "randomUnits": "seconds",
        "drop": false,
        "allowrate": false,
        "outputs": 1,
        "x": 350,
        "y": 720,
        "wires": [
            [
                "91941e4e12b3ee90"
            ]
        ]
    },
    {
        "id": "91941e4e12b3ee90",
        "type": "delay",
        "z": "992ceee39b1a55a8",
        "name": "",
        "pauseType": "rate",
        "timeout": "300",
        "timeoutUnits": "milliseconds",
        "rate": "1",
        "nbRateUnits": "2",
        "rateUnits": "second",
        "randomFirst": "1",
        "randomLast": "5",
        "randomUnits": "seconds",
        "drop": true,
        "allowrate": false,
        "outputs": 1,
        "x": 360,
        "y": 780,
        "wires": [
            [
                "7d4912f24a34f873"
            ]
        ]
    },
    {
        "id": "7d4912f24a34f873",
        "type": "function",
        "z": "992ceee39b1a55a8",
        "name": "OBYC Detail",
        "func": "msg.payload = \n{\n  fc:       4, \n  unitid:   1,\n  address:  0, \n  quantity: 82\n} \nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 570,
        "y": 780,
        "wires": [
            [
                "d6e7dafb70def598"
            ]
        ]
    },
    {
        "id": "d8903ebe98dcd6b1",
        "type": "function",
        "z": "992ceee39b1a55a8",
        "name": "Invalid device ID",
        "func": "msg.payload = \n{\n  fc:       4, \n  unitid:   100,\n  address:  0, \n  quantity: 82\n} \nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 580,
        "y": 820,
        "wires": [
            [
                "d6e7dafb70def598"
            ]
        ]
    },
    {
        "id": "6e90e6ad9ae2f532",
        "type": "link in",
        "z": "992ceee39b1a55a8",
        "name": "Reset OBYC Com",
        "links": [
            "71b91fdfd0213ea6"
        ],
        "x": 295,
        "y": 860,
        "wires": [
            [
                "d8903ebe98dcd6b1"
            ]
        ]
    },
    {
        "id": "d6e7dafb70def598",
        "type": "modbus-flex-getter",
        "z": "992ceee39b1a55a8",
        "name": "OBYC_Energy_Meter",
        "showStatusActivities": true,
        "showErrors": true,
        "showWarnings": true,
        "logIOActivities": false,
        "server": "e1e943701a8f8af9",
        "useIOFile": false,
        "ioFile": "",
        "useIOForPayload": false,
        "emptyMsgOnFail": true,
        "keepMsgProperties": false,
        "delayOnStart": false,
        "startDelayTime": "",
        "x": 800,
        "y": 780,
        "wires": [
            [
                "641224c55753dd30",
                "b7b3b24847f4275c"
            ],
            []
        ]
    },
    {
        "id": "641224c55753dd30",
        "type": "debug",
        "z": "992ceee39b1a55a8",
        "name": "debug 69",
        "active": false,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "false",
        "statusVal": "",
        "statusType": "auto",
        "x": 1020,
        "y": 840,
        "wires": []
    },
    {
        "id": "2b4a1bc3a513cb31",
        "type": "switch",
        "z": "992ceee39b1a55a8",
        "name": "",
        "property": "payload",
        "propertyType": "msg",
        "rules": [
            {
                "t": "nempty"
            },
            {
                "t": "empty"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 2,
        "x": 590,
        "y": 900,
        "wires": [
            [
                "c439a05051bcd3cf"
            ],
            [
                "644a223c73571ffe"
            ]
        ]
    },
    {
        "id": "c439a05051bcd3cf",
        "type": "buffer-parser",
        "z": "992ceee39b1a55a8",
        "name": "",
        "data": "payload",
        "dataType": "msg",
        "specification": "spec",
        "specificationType": "ui",
        "items": [
            {
                "type": "floatle",
                "name": "voltage",
                "offset": 0,
                "length": 1,
                "offsetbit": 0,
                "scale": "1",
                "mask": ""
            },
            {
                "type": "floatle",
                "name": "current",
                "offset": 12,
                "length": 1,
                "offsetbit": 0,
                "scale": "1",
                "mask": ""
            },
            {
                "type": "floatle",
                "name": "power",
                "offset": 24,
                "length": 1,
                "offsetbit": 0,
                "scale": "1",
                "mask": ""
            },
            {
                "type": "floatle",
                "name": "frequency",
                "offset": 140,
                "length": 1,
                "offsetbit": 0,
                "scale": "1",
                "mask": ""
            },
            {
                "type": "uint16le",
                "name": "importkwh",
                "offset": 144,
                "length": 1,
                "offsetbit": 0,
                "scale": "1",
                "mask": ""
            },
            {
                "type": "uint16le",
                "name": "exportkwh",
                "offset": 148,
                "length": 1,
                "offsetbit": 0,
                "scale": "1",
                "mask": ""
            }
        ],
        "swap1": "swap32",
        "swap2": "",
        "swap3": "",
        "swap1Type": "swap",
        "swap2Type": "swap",
        "swap3Type": "swap",
        "msgProperty": "payload",
        "msgPropertyType": "str",
        "resultType": "keyvalue",
        "resultTypeType": "return",
        "multipleResult": false,
        "fanOutMultipleResult": false,
        "setTopic": true,
        "outputs": 1,
        "x": 770,
        "y": 880,
        "wires": [
            [
                "941e502fd3f5a7b3"
            ]
        ]
    },
    {
        "id": "644a223c73571ffe",
        "type": "change",
        "z": "992ceee39b1a55a8",
        "name": "",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "0",
                "tot": "num"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 780,
        "y": 920,
        "wires": [
            [
                "6d85deea93154bc5"
            ]
        ]
    },
    {
        "id": "941e502fd3f5a7b3",
        "type": "function",
        "z": "992ceee39b1a55a8",
        "name": "power",
        "func": "msg.payload = (Math.round(msg.payload.power / 100)/10)*-1;\n//msg.payload = -10;\nmsg.topic = \"power\";\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 1010,
        "y": 880,
        "wires": [
            [
                "424328c862fe62d7"
            ]
        ]
    },
    {
        "id": "6d85deea93154bc5",
        "type": "delay",
        "z": "992ceee39b1a55a8",
        "name": "",
        "pauseType": "delay",
        "timeout": "10",
        "timeoutUnits": "seconds",
        "rate": "1",
        "nbRateUnits": "1",
        "rateUnits": "second",
        "randomFirst": "1",
        "randomLast": "5",
        "randomUnits": "seconds",
        "drop": false,
        "allowrate": false,
        "outputs": 1,
        "x": 1020,
        "y": 920,
        "wires": [
            [
                "424328c862fe62d7",
                "998e62995ed2400a"
            ]
        ]
    },
    {
        "id": "424328c862fe62d7",
        "type": "change",
        "z": "992ceee39b1a55a8",
        "name": "",
        "rules": [
            {
                "t": "set",
                "p": "HSE_KW_OBYC",
                "pt": "global",
                "to": "payload",
                "tot": "msg"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 1340,
        "y": 920,
        "wires": [
            [
                "a7d23aca8a7be989"
            ]
        ]
    },
    {
        "id": "a7d23aca8a7be989",
        "type": "ui_gauge",
        "z": "992ceee39b1a55a8",
        "name": "",
        "group": "30801dbae6e257d8",
        "order": 13,
        "width": 3,
        "height": 3,
        "gtype": "gage",
        "title": "OBYC House",
        "label": "kW",
        "format": "{{value| number:2}}",
        "min": 0,
        "max": "-30",
        "colors": [
            "#00b500",
            "#00b500",
            "#00b500"
        ],
        "seg1": "",
        "seg2": "",
        "diff": false,
        "className": "",
        "x": 1600,
        "y": 920,
        "wires": []
    },
    {
        "id": "998e62995ed2400a",
        "type": "debug",
        "z": "992ceee39b1a55a8",
        "name": "debug delayed",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "true",
        "targetType": "full",
        "statusVal": "",
        "statusType": "auto",
        "x": 1380,
        "y": 1100,
        "wires": []
    },
    {
        "id": "010d52154135f17e",
        "type": "debug",
        "z": "992ceee39b1a55a8",
        "name": "debug status",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "true",
        "targetType": "full",
        "statusVal": "",
        "statusType": "auto",
        "x": 1370,
        "y": 1160,
        "wires": []
    },
    {
        "id": "698baee021e31544",
        "type": "change",
        "z": "992ceee39b1a55a8",
        "name": "",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "status.text",
                "tot": "msg"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 1180,
        "y": 1100,
        "wires": [
            [
                "998e62995ed2400a"
            ]
        ]
    },
    {
        "id": "71b91fdfd0213ea6",
        "type": "link out",
        "z": "992ceee39b1a55a8",
        "name": "Reset OBYC Com",
        "mode": "link",
        "links": [
            "6e90e6ad9ae2f532"
        ],
        "x": 1115,
        "y": 1060,
        "wires": []
    },
    {
        "id": "bde12c2051f56e7f",
        "type": "delay",
        "z": "992ceee39b1a55a8",
        "name": "",
        "pauseType": "delay",
        "timeout": "2",
        "timeoutUnits": "seconds",
        "rate": "1",
        "nbRateUnits": "1",
        "rateUnits": "second",
        "randomFirst": "1",
        "randomLast": "5",
        "randomUnits": "seconds",
        "drop": false,
        "allowrate": false,
        "outputs": 1,
        "x": 1000,
        "y": 1100,
        "wires": [
            [
                "698baee021e31544",
                "71b91fdfd0213ea6"
            ]
        ]
    },
    {
        "id": "0d2e9fbdc4a36883",
        "type": "change",
        "z": "992ceee39b1a55a8",
        "name": "",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "status.text",
                "tot": "msg"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 1020,
        "y": 1160,
        "wires": [
            [
                "010d52154135f17e"
            ]
        ]
    },
    {
        "id": "81ee26bcabe880e5",
        "type": "change",
        "z": "992ceee39b1a55a8",
        "name": "",
        "rules": [
            {
                "t": "delete",
                "p": "payload",
                "pt": "msg"
            },
            {
                "t": "set",
                "p": "reset",
                "pt": "msg",
                "to": "1",
                "tot": "num"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 780,
        "y": 1100,
        "wires": [
            [
                "bde12c2051f56e7f",
                "6d85deea93154bc5"
            ]
        ]
    },
    {
        "id": "145687c0281da717",
        "type": "switch",
        "z": "992ceee39b1a55a8",
        "name": "",
        "property": "status.text",
        "propertyType": "msg",
        "rules": [
            {
                "t": "cont",
                "v": "initialize",
                "vt": "str"
            },
            {
                "t": "else"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 2,
        "x": 750,
        "y": 1160,
        "wires": [
            [
                "bde12c2051f56e7f",
                "0d2e9fbdc4a36883"
            ],
            [
                "0d2e9fbdc4a36883"
            ]
        ]
    },
    {
        "id": "e56177b5db375fa1",
        "type": "switch",
        "z": "992ceee39b1a55a8",
        "name": "",
        "property": "status.text",
        "propertyType": "msg",
        "rules": [
            {
                "t": "cont",
                "v": "active",
                "vt": "str"
            },
            {
                "t": "cont",
                "v": "activated",
                "vt": "str"
            },
            {
                "t": "cont",
                "v": "queueing",
                "vt": "str"
            },
            {
                "t": "cont",
                "v": "reading done",
                "vt": "str"
            },
            {
                "t": "else"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 5,
        "x": 590,
        "y": 1120,
        "wires": [
            [
                "81ee26bcabe880e5"
            ],
            [],
            [],
            [],
            [
                "145687c0281da717"
            ]
        ]
    },
    {
        "id": "944316a4c3c2e8b5",
        "type": "status",
        "z": "992ceee39b1a55a8",
        "name": "",
        "scope": [
            "d6e7dafb70def598"
        ],
        "x": 340,
        "y": 1120,
        "wires": [
            [
                "e56177b5db375fa1"
            ]
        ]
    },
    {
        "id": "e1e943701a8f8af9",
        "type": "modbus-client",
        "name": "OBYC Meter",
        "clienttype": "tcp",
        "bufferCommands": true,
        "stateLogEnabled": false,
        "queueLogEnabled": false,
        "failureLogEnabled": true,
        "tcpHost": "obyc-mtr.ourhydrosite.com",
        "tcpPort": "1502",
        "tcpType": "TCP-RTU-BUFFERED",
        "serialPort": "/dev/ttyUSB",
        "serialType": "RTU-BUFFERD",
        "serialBaudrate": "9600",
        "serialDatabits": "8",
        "serialStopbits": "1",
        "serialParity": "none",
        "serialConnectionDelay": "100",
        "serialAsciiResponseStartDelimiter": "0x3A",
        "unit_id": "1",
        "commandDelay": "10",
        "clientTimeout": "800",
        "reconnectOnTimeout": true,
        "reconnectTimeout": "1000",
        "parallelUnitIdsAllowed": true,
        "showWarnings": true,
        "showLogs": true
    },
    {
        "id": "30801dbae6e257d8",
        "type": "ui_group",
        "name": "Cwm Pennant & Ty'n Y Cablyd House",
        "tab": "647eed3084182c30",
        "order": 3,
        "disp": true,
        "width": "11",
        "collapse": false,
        "className": ""
    },
    {
        "id": "647eed3084182c30",
        "type": "ui_tab",
        "name": "Cwm Pennant Estate - Energy",
        "icon": "dashboard",
        "disabled": false,
        "hidden": false
    }
]

The code above is the selected nodes in the screenshot

what version of Node.js are you using ? Check with command node -v
In the past there was an issue with the reconnection of Modbus nodes because something changed with the "newer" versions of Nodejs .. but that was way back and that issue was fixed.

  1. Make sure you are using Nodejs up to version 18 which is the version currently supported with the modbus nodes.
  2. check if your modbus nodes are updated to the latest version
  3. try with the option to queue msgs unchecked since you are implementing your own delay queue .
    This can simplify the nodes internal logic of queuing that may be the cause of the issues.
    image

Nodejs version isn't easy to check as this in in a RPI 4 B on a site miles away with only some ports temporarily forwarded. Unless I can check that from the NodeRed interface.

That said, the system was installed about 8 months ago and would have been fully updated then, I did not select any specific version of anything... Perhaps I should have, live and learn I guess.

It just stopped again and ....
The inject node, intended to shock it back to life didn't work, no message was sent by the FlexGetter after a new message arrived at it.
Redeploying only the node or the flow didn't work, I had to fully redeploy. On sun, redeploying the flow only worked... Its akll a bit odd.

Will take queuing off all of them now... Cant get any worse. All nodes updated to latest last Fri.

Note, no other flex getters doing this and all write nodes work OK too. About 10 in all I think.

I apriciate the lelp, thanks.

Press Ctrl+P in the Editor to bring up the Action list panel
Choose Show System Info

image

Ctrl-shift-p (or right click in the workspace -> actions)

Sys info posted below...
I am still having this issue, Modbus Getter hangs, saying 'Initialise' at least once per day.

I took out the flex getter for the affected instrument and replaced it with a Getter, as noted above I have time delays between requests to different targets so wasn't using the que's anyway.

When it hangs you either have to redeploy everything, not just the affected node/flow, or disable/deploy/enable/deploy the effected node.

There are no issues with other FlexGetters, or anything else for that matter.

I realise the issue could be with the target device but even if that is the issue driving the failure I don't understand what the node will not recover from whatever com issue is causing the problem.

In general the site has had some network problems that stop NodeRed seeing the internet occasionally. Most, but not all, of the time, the the coms fail the node will, eventually lock up.
I have tried simulating a com fail by ....

  1. blocking internet access.
  2. disconnecting the TCP/RTU gateway.
  3. Disconnecting the RTU device

In all three cases the node recovered, as it should, after a brief comes fail of a minute or so.

Thus far I cant consistently cause it to fail/lock up. It will occasionally go a day or two and keep working but generally 1-2 failures per day are typical.

Anyone have any suggestions, I am pulling my hair out here!

To be fair I would be happy, well happy ish, If I could find a way to force the node to reinitialise once messages stopped arriving but I don't want to have to resort to restarting the entire system.

Any and all help / suggestions welcome, even if you just need to tell me how dumb I am being about something...

Thanks for looking.

{
    "report": "diagnostics",
    "scope": "basic",
    "time": {
        "utc": "Sun, 07 Jan 2024 12:47:58 GMT",
        "local": "07/01/2024, 12:47:58"
    },
    "intl": {
        "locale": "en-GB",
        "timeZone": "Europe/London"
    },
    "nodejs": {
        "version": "v16.20.0",
        "arch": "arm",
        "platform": "linux",
        "memoryUsage": {
            "rss": 217092096,
            "heapTotal": 95752192,
            "heapUsed": 65829368,
            "external": 25775753,
            "arrayBuffers": 18815013
        }
    },
    "os": {
        "wsl": false,
        "totalmem": 3977596928,
        "freemem": 3433230336,
        "arch": "arm",
        "loadavg": [
            0.3,
            0.31,
            0.28
        ],
        "platform": "linux",
        "release": "6.1.21-v8+",
        "type": "Linux",
        "uptime": 875054.68,
        "version": "#1642 SMP PREEMPT Mon Apr  3 17:24:16 BST 2023"
    },
    "runtime": {
        "version": "3.0.2",
        "isStarted": true,
        "flows": {
            "state": "start",
            "started": true
        },
        "modules": {
            "node-red": "3.0.2",
            "node-red-contrib-buffer-parser": "3.2.2",
            "node-red-contrib-play-audio": "2.5.0",
            "node-red-node-pi-gpio": "2.0.6",
            "node-red-node-ping": "0.3.3",
            "node-red-node-random": "0.4.1",
            "node-red-node-serialport": "2.0.2",
            "node-red-node-smooth": "0.1.2",
            "node-red-contrib-modbus": "5.27.2",
            "node-red-contrib-boolean-logic-ultimate": "1.1.1",
            "node-red-contrib-ui-areyousure": "0.1.0",
            "node-red-node-ui-lineargauge": "0.3.7",
            "node-red-node-ui-duallineargauge": "0.0.1",
            "node-red-contrib-ui-state-trail": "1.0.2",
            "node-red-contrib-ui-statechart": "0.2.0",
            "node-red-contrib-ui-multistate-switch": "1.2.3",
            "node-red-contrib-ui-level": "0.1.46",
            "node-red-contrib-ui-digital-display": "1.0.3",
            "node-red-contrib-ui-button_state": "0.2.2",
            "node-red-contrib-ui-artless-gauge": "0.3.12",
            "node-red-dashboard": "3.6.2",
            "node-red-contrib-cpu": "0.0.4",
            "node-red-contrib-ui-svg": "2.3.3",
            "node-red-contrib-drawsvg": "1.3.0",
            "node-red-contrib-bitunloader": "0.4.1",
            "node-red-contrib-simple-gate": "0.5.2",
            "node-red-contrib-delay-gate": "1.0.1",
            "node-red-contrib-bool-gate": "1.0.2",
            "node-red-contrib-graphs": "0.3.5",
            "node-red-contrib-xterm": "1.0.1",
            "node-red-node-ui-table": "0.4.3"
        },
        "settings": {
            "available": true,
            "apiMaxLength": "UNSET",
            "disableEditor": false,
            "contextStorage": {
                "default": {
                    "module": "localfilesystem"
                }
            },
            "debugMaxLength": 1000,
            "editorTheme": {
                "palette": {},
                "projects": {
                    "enabled": false,
                    "workflow": {
                        "mode": "manual"
                    }
                },
                "codeEditor": {
                    "lib": "monaco",
                    "options": {}
                }
            },
            "flowFile": "flows.json",
            "mqttReconnectTime": 15000,
            "serialReconnectTime": 15000,
            "socketReconnectTime": "UNSET",
            "socketTimeout": "UNSET",
            "tcpMsgQueueSize": "UNSET",
            "inboundWebSocketTimeout": "UNSET",
            "runtimeState": {
                "enabled": false,
                "ui": false
            },
            "adminAuth": "UNSET",
            "httpAdminRoot": "/",
            "httpAdminCors": "UNSET",
            "httpNodeAuth": "UNSET",
            "httpNodeRoot": "/",
            "httpNodeCors": "UNSET",
            "httpStatic": "UNSET",
            "httpStaticRoot": "UNSET",
            "httpStaticCors": "UNSET",
            "uiHost": "SET",
            "uiPort": "SET",
            "userDir": "SET",
            "nodesDir": "UNSET"
        }
    }
}

So its the Modbus node that is connecting through that Waveshare converter that hangs.
Im guessing those converters have a web interface in order to configure it.

  1. During the hang .. have you tried to connect to the Waveshare web interface to see if it connects or if it has some log or status? Is this the manual ?

  2. Try to disable the "Reconnect on timeout" in Modbus node
    image
    From my tests i saw that if the device disconnects (timeout) .. a new message to the node will try to make the connection again. But if the "Reconnect on timeout" is enabled the node stays in a loop trying to reconnect without allowing the node to receive new messages to trigger a read. Dont know if the two options make a difference in the internal logic of the nodes .. but worth trying.

Everything else looks ok.
You nodejs version 16 is listed as compatible
You modbus nodes version 5.27.2 are up to date

For a more detailed logging in the terminal, of what the Modbus nodes are doing .. you can start node-red with this command DEBUG=contribModbus* node-red -v
(Source)

Modbus to Waveshare / Web interface, Yes and Yes.

I disabled reconnect yesterday at about 13:00 when I replaced the FlexGetter with a basic Getter, just for that device.
All* getters are called on a cycle, once per second, with a 100mS delay between devices.
there are some writes to a couple of PLC's tagged on to that schedule but they are also delayed with respect to the initial inject.

  • The Waveshare Getter is also rate limited to one message, not queuing, every 2 seconds.

In total I am reading 4 energy meters and two PLC's. I am writing to both PLC's.
Everything other than the meter on the Waveshare is within a single LAN, class C subnet.

That subnet is routed, via a second subnet, provided by a BT router, to the WAN.

There are network problems on the BT subnet, which may or may not be connected to the issue. When the coms go down, as in Node red can no longer see the WAN, the node in question locks up and fails to recover.
ALL other nodes continue to communicate over the LAN local to NodeRed, Controls LAN, with the other devices.

Obviously I have to find and fix whatever traffic is compromising the BT LAN but that not withstanding, the node failing to recover once coms are back up is still wrong IMHO.

I just arranged a test, disconnecting the two subnets, to see if the issues on the BT LAN are being caused by traffic coming from the Controls LAN. I doubt it but its worth a check.

Is there a way to disable/enable nodes from within a flow?
That would at least give me a workaround whilst sorting out the LAN issues...

Thanks for looking folks...

PS. I will try the debug log suggested as soon as I get chance, thanks.

Hello @Dyslexicbloke .. any luck with the tests ?
I didnt understand from you answer above whether you can access the Waveshare web interface when you notice the hang. Or better if you have another modbus tool try to poll some value from it just to be certain whether its the Modbus node that fails to reconnect or the Waveshare not accepting new connections.


Another test you can try is re-enable the Reconnect on timeout but this time set a Reconnect timeout quite high .. like 20 seconds .. maybe this will give the Waveshare device enough time to timeout any hanged connections and allow it to recover and accept new ones.

image

OK... Update.
I will try the long timeout/reconnect suggestion.

Yes the Waveshare has consistently been available, web and Modbus, when the FlexGetter / Getter has hung up.

There have been network issues which have muddied the waters a little. These are now, more or less, mitigated.

When the Getter hangs, disabling it, deploying and then enabling and deploying again, fixes it all the time, as far as I can tell. Almost all of the time, deploying just the changed node, the single getter, works just fine.

Is there a way to do that from within a flow? Detecting the issue isn't a problem, kicking it back into action I have thus far failed to accomplish, at least automatically.

Its disabled right now, due to go back on AM when I will test the longer timeout suggestion.
Thanks all,
Al

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