Hi Everyone
I might have found a potential bug on node red 3.1
Environment
- Pi4b with bullseye 32bit
- Nodered 3.1 installed via script
- start as service on boot
- node-red-contrib-modbus 5.26.0
- bare minimum flow setup as below
The bug
- modbus via serial tty0 works fine on boot
- but it would stop working after I deploy and update to the flow
- after about 10 minutes modbus via serial would work again automatically (I tried a few times, always approx. 10 minutes, refer to screenshot for exact timeout duration)
- if I manually do node-red-stop then node-red-start, modbus would start working immediately
- this bug does not exist on buster, I tested and modbus keep working after every deploy
Sorry I couldn't test further why this 10minute time out issue on bullseye, limited knowledge of linux.
[
{
"id": "7c54e13bb9f3d04d",
"type": "tab",
"label": "Flow 1",
"disabled": false,
"info": "",
"env": []
},
{
"id": "354c5ff55bd6b705",
"type": "inject",
"z": "7c54e13bb9f3d04d",
"name": "interval",
"props": [
{
"p": "topic",
"v": "",
"vt": "date"
}
],
"repeat": "5",
"crontab": "",
"once": true,
"onceDelay": "2.5",
"topic": "",
"x": 260,
"y": 500,
"wires": [
[
"2342f926fad2ec1d"
]
]
},
{
"id": "2342f926fad2ec1d",
"type": "function",
"z": "7c54e13bb9f3d04d",
"name": "SOC",
"func": "msg.payload = { \n 'fc': 4, \n 'unitid': 1, \n 'address': 0x311A, \n 'quantity': 1\n}\n\nreturn msg;",
"outputs": 1,
"timeout": "",
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 410,
"y": 500,
"wires": [
[
"be91aba91ba5f83e"
]
]
},
{
"id": "09c72e188c904c36",
"type": "modbus-response",
"z": "7c54e13bb9f3d04d",
"name": "View Response",
"registerShowMax": 20,
"x": 660,
"y": 560,
"wires": []
},
{
"id": "be91aba91ba5f83e",
"type": "modbus-flex-getter",
"z": "7c54e13bb9f3d04d",
"name": "Flex get uart",
"showStatusActivities": false,
"showErrors": false,
"showWarnings": true,
"logIOActivities": false,
"server": "0713c2694f47eec6",
"useIOFile": false,
"ioFile": "",
"useIOForPayload": false,
"emptyMsgOnFail": false,
"keepMsgProperties": false,
"delayOnStart": false,
"startDelayTime": "",
"x": 550,
"y": 500,
"wires": [
[
"fb208dc46429ba1d"
],
[
"09c72e188c904c36"
]
]
},
{
"id": "fb208dc46429ba1d",
"type": "debug",
"z": "7c54e13bb9f3d04d",
"name": "debug 1",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 760,
"y": 480,
"wires": []
},
{
"id": "0713c2694f47eec6",
"type": "modbus-client",
"name": "Pi ttyS0",
"clienttype": "simpleser",
"bufferCommands": true,
"stateLogEnabled": false,
"queueLogEnabled": false,
"failureLogEnabled": true,
"tcpHost": "127.0.0.1",
"tcpPort": "502",
"tcpType": "DEFAULT",
"serialPort": "/dev/ttyS0",
"serialType": "RTU-BUFFERD",
"serialBaudrate": "115200",
"serialDatabits": "8",
"serialStopbits": "1",
"serialParity": "none",
"serialConnectionDelay": "100",
"serialAsciiResponseStartDelimiter": "0x3A",
"unit_id": "1",
"commandDelay": "1",
"clientTimeout": "1000",
"reconnectOnTimeout": true,
"reconnectTimeout": "2000",
"parallelUnitIdsAllowed": true,
"showWarnings": true,
"showLogs": true
}
]