# Nodered resets if trying to use Modbus RTU

**URL:** <https://discourse.nodered.org/t/nodered-resets-if-trying-to-use-modbus-rtu/73492>\
**Category:** General\
**Created:** [10 January 2023 18:16 UTC](https://discourse.nodered.org/t/nodered-resets-if-trying-to-use-modbus-rtu/73492 "2023-01-10T18:16:48Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![PakkoB](https://avatars.discourse-cdn.com/v4/letter/p/df788c/32.png) [@PakkoB](https://discourse.nodered.org/u/PakkoB)\
**Post date:** [10 January 2023 18:16 UTC](https://discourse.nodered.org/t/nodered-resets-if-trying-to-use-modbus-rtu/73492/1 "2023-01-10T18:16:48Z")

</div>

I´m breaking my head against a wall with this problem. The flows attached have been working for more than a year using RTU server.  
Suddenly, last december, RTU stopped working. Thinking it was a hardware problem, I began to use an Elfin EW11a to access my inverter. If I connect with EW11A, not a problem at all.  
After changing the RS485-USB converter, still not working. Checked USB ports. All OK.  
Even if I use mbpoll, I can communicate with teh inveter. But every time I try it using the flow with RTU server, Nodered start rebooting endlessly. It never connect to the inverter.  
Don´t know what more to do.  
I would like to attach my flows in order if someone can find what problem hides in them, but new members aren´t allowed..  
Regards,  
PakkoB

[  
{  
"id": "8f28924.0ff727",  
"type": "tab",  
"label": "Huawei EW11a",  
"disabled": false,  
"info": ""  
},  
{  
"id": "e29c0a21.c96d18",  
"type": "debug",  
"z": "8f28924.0ff727",  
"name": "Linea\_Distribuidora",  
"active": false,  
"tosidebar": true,  
"console": false,  
"tostatus": true,  
"complete": "$number(msg.payload)\t",  
"targetType": "jsonata",  
"statusVal": "$number(msg.payload)\t",  
"statusType": "auto",  
"x": 1050,  
"y": 340,  
"wires":   
},  
{  
"id": "c4ec045d.40f898",  
"type": "switch",  
"z": "8f28924.0ff727",  
"name": "calculo",  
"property": "payload[0]",  
"propertyType": "msg",  
"rules": [  
{  
"t": "lte",  
"v": "0",  
"vt": "num"  
},  
{  
"t": "gt",  
"v": "0",  
"vt": "num"  
}  
],  
"checkall": "true",  
"repair": false,  
"outputs": 2,  
"x": 400,  
"y": 340,  
"wires": [  
[  
"80eb65d.f547998"  
],  
[  
"7ec74764.cc5ed8"  
]  
]  
},  
{  
"id": "80eb65d.f547998",  
"type": "change",  
"z": "8f28924.0ff727",  
"name": "Energía exportada",  
"rules": [  
{  
"t": "set",  
"p": "payload",  
"pt": "msg",  
"to": "$number(payload[1])\t",  
"tot": "jsonata"  
}  
],  
"action": "",  
"property": "",  
"from": "",  
"to": "",  
"reg": false,  
"x": 750,  
"y": 320,  
"wires": [  
[  
"e29c0a21.c96d18",  
"42f18a69.2d8ec4"  
]  
]  
},  
{  
"id": "7ec74764.cc5ed8",  
"type": "change",  
"z": "8f28924.0ff727",  
"name": "Energía Importada",  
"rules": [  
{  
"t": "set",  
"p": "payload",  
"pt": "msg",  
"to": "$number(payload[1]-65535)\t\t",  
"tot": "jsonata"  
}  
],  
"action": "",  
"property": "",  
"from": "",  
"to": "",  
"reg": false,  
"x": 750,  
"y": 360,  
"wires": [  
[  
"e29c0a21.c96d18",  
"42f18a69.2d8ec4"  
]  
]  
},  
{  
"id": "42f18a69.2d8ec4",  
"type": "influxdb out",  
"z": "8f28924.0ff727",  
"influxdb": "2e16cb4dab5c3923",  
"name": "Linea\_Distribuidora",  
"measurement": "Linea\_Distribuidora",  
"precision": "",  
"retentionPolicy": "",  
"database": "database",  
"precisionV18FluxV20": "ms",  
"retentionPolicyV18Flux": "",  
"org": "organisation",  
"bucket": "bucket",  
"x": 1060,  
"y": 400,  
"wires":   
},  
{  
"id": "7a2a308c.bf9ce",  
"type": "influxdb out",  
"z": "8f28924.0ff727",  
"influxdb": "2e16cb4dab5c3923",  
"name": "Energia\_Producida",  
"measurement": "Energia\_Producida",  
"precision": "",  
"retentionPolicy": "",  
"database": "database",  
"precisionV18FluxV20": "ms",  
"retentionPolicyV18Flux": "",  
"org": "organisation",  
"bucket": "bucket",  
"x": 910,  
"y": 680,  
"wires":   
},  
{  
"id": "49a2a6e3.a85e38",  
"type": "debug",  
"z": "8f28924.0ff727",  
"name": "Energía\_Producida",  
"active": false,  
"tosidebar": true,  
"console": false,  
"tostatus": true,  
"complete": "payload",  
"targetType": "msg",  
"statusVal": "payload",  
"statusType": "auto",  
"x": 900,  
"y": 620,  
"wires":   
},  
{  
"id": "625916a4.40d918",  
"type": "change",  
"z": "8f28924.0ff727",  
"name": "Energia\_Producida",  
"rules": [  
{  
"t": "set",  
"p": "payload",  
"pt": "msg",  
"to": "$number(payload[1])\t",  
"tot": "jsonata"  
}  
],  
"action": "",  
"property": "",  
"from": "",  
"to": "",  
"reg": false,  
"x": 560,  
"y": 620,  
"wires": [  
  
]  
},  
{  
"id": "a62d771c.0777f8",  
"type": "modbus-read",  
"z": "8f28924.0ff727",  
"name": "Linea\_D\_37113 (2)",  
"topic": "Linea\_D",  
"showStatusActivities": false,  
"logIOActivities": false,  
"showErrors": false,  
"showWarnings": true,  
"unitid": "1",  
"dataType": "HoldingRegister",  
"adr": "37113",  
"quantity": "2",  
"rate": "5",  
"rateUnit": "s",  
"delayOnStart": false,  
"startDelayTime": "",  
"server": "26d6b97598760778",  
"useIOFile": false,  
"ioFile": "",  
"useIOForPayload": false,  
"emptyMsgOnFail": false,  
"x": 200,  
"y": 340,  
"wires": [  
[  
"c4ec045d.40f898",  
"1fd23c4b.627004",  
"e4d97797.f6ef18"  
],  
[  
"cd3851b8.65dfb",  
"ed556840.5e2388"  
]  
]  
},  
{  
"id": "c2f0cc0d.46ae7",  
"type": "modbus-read",  
"z": "8f28924.0ff727",  
"name": "Potencia Activa\_32080\_(2)",  
"topic": "Produccion\_FV",  
"showStatusActivities": false,  
"logIOActivities": false,  
"showErrors": false,  
"showWarnings": true,  
"unitid": "1",  
"dataType": "HoldingRegister",  
"adr": "32080",  
"quantity": "2",  
"rate": "5",  
"rateUnit": "s",  
"delayOnStart": false,  
"startDelayTime": "",  
"server": "26d6b97598760778",  
"useIOFile": false,  
"ioFile": "",  
"useIOForPayload": false,  
"emptyMsgOnFail": false,  
"x": 230,  
"y": 620,  
"wires": [  
[  
"23511a40.f151d6"  
],  
[  
"ed556840.5e2388"  
]  
]  
},  
{  
"id": "976c1fe7.cbc13",  
"type": "debug",  
"z": "8f28924.0ff727",  
"name": "Linea\_Distribuidora\_Excedente",  
"active": false,  
"tosidebar": true,  
"console": false,  
"tostatus": true,  
"complete": "payload",  
"targetType": "msg",  
"statusVal": "payload",  
"statusType": "auto",  
"x": 1090,  
"y": 440,  
"wires":   
},  
{  
"id": "9633e387.c8012",  
"type": "influxdb out",  
"z": "8f28924.0ff727",  
"influxdb": "2e16cb4dab5c3923",  
"name": "Linea\_Distribuidora\_Excedente",  
"measurement": "Linea\_Distribuidora\_Excedente",  
"precision": "",  
"retentionPolicy": "",  
"database": "database",  
"precisionV18FluxV20": "ms",  
"retentionPolicyV18Flux": "",  
"org": "organisation",  
"bucket": "bucket",  
"x": 1090,  
"y": 500,  
"wires":   
},  
{  
"id": "11693621.5c2c5a",  
"type": "debug",  
"z": "8f28924.0ff727",  
"name": "Linea\_Distribuidora\_Importacion",  
"active": false,  
"tosidebar": true,  
"console": false,  
"tostatus": false,  
"complete": "payload",  
"targetType": "msg",  
"statusVal": "",  
"statusType": "auto",  
"x": 1090,  
"y": 540,  
"wires":   
},  
{  
"id": "48e30f.24a11cf",  
"type": "influxdb out",  
"z": "8f28924.0ff727",  
"influxdb": "2e16cb4dab5c3923",  
"name": "Linea\_Distribuidora\_Importacion",  
"measurement": "Linea\_Distribuidora\_Importacion",  
"precision": "",  
"retentionPolicy": "",  
"database": "database",  
"precisionV18FluxV20": "ms",  
"retentionPolicyV18Flux": "",  
"org": "organisation",  
"bucket": "bucket",  
"x": 1090,  
"y": 580,  
"wires":   
},  
{  
"id": "cd3851b8.65dfb",  
"type": "function",  
"z": "8f28924.0ff727",  
"name": "Calculo",  
"func": "\nif (msg.payload.data[0]\>0){\n //IMPORTACION DE ENERGIA\n energia\_importada=(msg.payload.data[0]-msg.payload.data[1]);\n energia\_excedente=0;\n}\nelse{\n //EXPORTACION DE ENERGIA\n energia\_importada=0;\n energia\_excedente=msg.payload.data[1];\n}\nvar excedente={payload:energia\_excedente};\nvar importada={payload:energia\_importada};\nreturn [excedente,importada];",  
"outputs": 2,  
"noerr": 0,  
"initialize": "",  
"finalize": "",  
"libs": ,  
"x": 410,  
"y": 500,  
"wires": [  
[  
"9633e387.c8012",  
"976c1fe7.cbc13"  
],  
[  
"11693621.5c2c5a",  
"48e30f.24a11cf"  
]  
]  
},  
{  
"id": "ed556840.5e2388",  
"type": "join",  
"z": "8f28924.0ff727",  
"name": "Consumo\_Casa",  
"mode": "custom",  
"build": "object",  
"property": "payload",  
"propertyType": "msg",  
"key": "topic",  
"joiner": "\n",  
"joinerType": "str",  
"accumulate": true,  
"timeout": "",  
"count": "2",  
"reduceRight": false,  
"reduceExp": "",  
"reduceInit": "",  
"reduceInitType": "",  
"reduceFixup": "",  
"x": 540,  
"y": 720,  
"wires": [  
[  
"ce556bef.165858"  
]  
]  
},  
{  
"id": "d47249e8.6a4de8",  
"type": "debug",  
"z": "8f28924.0ff727",  
"name": "Consumo\_casa",  
"active": false,  
"tosidebar": true,  
"console": false,  
"tostatus": true,  
"complete": "payload",  
"targetType": "msg",  
"statusVal": "payload",  
"statusType": "auto",  
"x": 1060,  
"y": 800,  
"wires":   
},  
{  
"id": "ce556bef.165858",  
"type": "function",  
"z": "8f28924.0ff727",  
"name": "consumo casa",  
"func": "//var Consumo\_Casa=0;\n//var signo=parseInt(msg.payload.Linea\_D.data[0]);\n//if (signo==0){\n //estamos exportando\n// Consumo\_Casa=msg.payload.Produccion\_FV.data[1]-msg.payload.Linea\_D.data[1];\n//}\n//else{\n //estamos importando\n// Consumo\_Casa=msg.payload.Produccion\_FV.data[1]+65535-msg.payload.Linea\_D.data[1];\n //Consumo\_Casa=msg.payload.Produccion\_FV.data[1]\n //+msg.payload.Linea\_D.data[0]-msg.payload.Linea\_D.data[1];\n//}\n//var Consumo\_C={payload:Consumo\_Casa};\n//return [Consumo\_C];\n\nvar Consumo\_Casa=0;\nvar signo=parseInt(msg.payload.Produccion\_FV.data[0]);\nif (signo==0){\n //hay producción en paneles o carga en batería\n Consumo\_Casa=msg.payload.Produccion\_FV.data[1]-msg.payload.Linea\_D.data[1]+msg.payload.Linea\_D.data[0];\n}\nelse{\n //no hay producción en paneles o la batería está agotada\n Consumo\_Casa=-msg.payload.Linea\_D.data[1]+msg.payload.Linea\_D.data[0];\n}\nvar Consumo\_C={payload:Consumo\_Casa};\nreturn [Consumo\_C];",  
"outputs": 1,  
"noerr": 0,  
"initialize": "",  
"finalize": "",  
"libs": ,  
"x": 830,  
"y": 860,  
"wires": [  
[  
"d47249e8.6a4de8",  
"927bbd11.26a8a",  
"fbda2f30.64ad6",  
"cf8980adcc55a9ff"  
]  
]  
},  
{  
"id": "927bbd11.26a8a",  
"type": "influxdb out",  
"z": "8f28924.0ff727",  
"influxdb": "2e16cb4dab5c3923",  
"name": "Consumo\_Casa",  
"measurement": "Consumo\_casa",  
"precision": "",  
"retentionPolicy": "",  
"database": "database",  
"precisionV18FluxV20": "ms",  
"retentionPolicyV18Flux": "",  
"org": "organisation",  
"bucket": "bucket",  
"x": 1060,  
"y": 860,  
"wires":   
},  
{  
"id": "b186e29c.c9a85",  
"type": "modbus-read",  
"z": "8f28924.0ff727",  
"name": "Peak Power\_32078\_(2)",  
"topic": "Peak Power",  
"showStatusActivities": false,  
"logIOActivities": false,  
"showErrors": false,  
"showWarnings": true,  
"unitid": "1",  
"dataType": "HoldingRegister",  
"adr": "32078",  
"quantity": "2",  
"rate": "5",  
"rateUnit": "s",  
"delayOnStart": false,  
"startDelayTime": "",  
"server": "26d6b97598760778",  
"useIOFile": false,  
"ioFile": "",  
"useIOForPayload": false,  
"emptyMsgOnFail": false,  
"x": 240,  
"y": 880,  
"wires": [  
,  
[  
"90819a5b.69d4d8",  
"ad71cdbb608ace73"  
]  
]  
},  
{  
"id": "90819a5b.69d4d8",  
"type": "debug",  
"z": "8f28924.0ff727",  
"name": "Peak Power",  
"active": false,  
"tosidebar": true,  
"console": false,  
"tostatus": true,  
"complete": "payload.data[1]",  
"targetType": "msg",  
"statusVal": "payload.data[1]",  
"statusType": "auto",  
"x": 530,  
"y": 880,  
"wires":   
},  
{  
"id": "fbda2f30.64ad6",  
"type": "link out",  
"z": "8f28924.0ff727",  
"name": "link\_consumo\_casa",  
"links": [  
"dc71bff4.9c4fc",  
"55732b2af7ba42d4"  
],  
"x": 1025,  
"y": 940,  
"wires":   
},  
{  
"id": "ab76aba2.87c598",  
"type": "link out",  
"z": "8f28924.0ff727",  
"name": "energiafc\_producida",  
"links": [  
"911b64ed.ddf1b8",  
"a81b66ea02f107de"  
],  
"x": 845,  
"y": 720,  
"wires":   
},  
{  
"id": "1fd23c4b.627004",  
"type": "debug",  
"z": "8f28924.0ff727",  
"name": "1",  
"active": false,  
"tosidebar": true,  
"console": false,  
"tostatus": true,  
"complete": "payload",  
"targetType": "msg",  
"statusVal": "payload",  
"statusType": "auto",  
"x": 360,  
"y": 260,  
"wires":   
},  
{  
"id": "e4d97797.f6ef18",  
"type": "link out",  
"z": "8f28924.0ff727",  
"name": "linead",  
"links": [  
"576ded4b.c08b54",  
"6c9b5768e0a2cbc5"  
],  
"x": 365,  
"y": 220,  
"wires":   
},  
{  
"id": "3e74b834.ac12d8",  
"type": "influxdb out",  
"z": "8f28924.0ff727",  
"influxdb": "2e16cb4dab5c3923",  
"name": "Potencia\_maxima",  
"measurement": "Potencia\_maxima",  
"precision": "",  
"retentionPolicy": "",  
"database": "database",  
"precisionV18FluxV20": "ms",  
"retentionPolicyV18Flux": "",  
"org": "organisation",  
"bucket": "bucket",  
"x": 650,  
"y": 940,  
"wires":   
},  
{  
"id": "358741d9.ae685e",  
"type": "modbus-read",  
"z": "8f28924.0ff727",  
"name": "Input power\_FV\_32064\_(2)",  
"topic": "Produccion\_FV",  
"showStatusActivities": false,  
"logIOActivities": false,  
"showErrors": false,  
"showWarnings": true,  
"unitid": "1",  
"dataType": "HoldingRegister",  
"adr": "32064",  
"quantity": "2",  
"rate": "5",  
"rateUnit": "s",  
"delayOnStart": false,  
"startDelayTime": "",  
"server": "26d6b97598760778",  
"useIOFile": false,  
"ioFile": "",  
"useIOForPayload": false,  
"emptyMsgOnFail": false,  
"x": 210,  
"y": 740,  
"wires": [  
[  
"ce667900.004038",  
"c3bc058e2f5882f3"  
],  
  
]  
},  
{  
"id": "ce667900.004038",  
"type": "debug",  
"z": "8f28924.0ff727",  
"name": "Input Power Inverter",  
"active": false,  
"tosidebar": true,  
"console": false,  
"tostatus": true,  
"complete": "payload",  
"targetType": "msg",  
"statusVal": "payload",  
"statusType": "auto",  
"x": 520,  
"y": 820,  
"wires":   
},  
{  
"id": "23511a40.f151d6",  
"type": "debug",  
"z": "8f28924.0ff727",  
"name": "Input 32080",  
"active": false,  
"tosidebar": true,  
"console": false,  
"tostatus": true,  
"complete": "payload",  
"targetType": "msg",  
"statusVal": "payload",  
"statusType": "auto",  
"x": 490,  
"y": 760,  
"wires":   
},  
{  
"id": "c3bc058e2f5882f3",  
"type": "function",  
"z": "8f28924.0ff727",  
"name": "",  
"func": "\nvar energia\_producida=0;\nvar energia=0;\nenergia\_producida=msg.payload[1];\nif (energia\_producida\>5500){\n energia\_producida=0\n}\nelse {\n energia\_producida=msg.payload[1];\n}\nenergia={payload:energia\_producida}; \n\nreturn [energia];\n\n",  
"outputs": 1,  
"noerr": 0,  
"initialize": "",  
"finalize": "",  
"libs": ,  
"x": 560,  
"y": 660,  
"wires": [  
[  
"7a2a308c.bf9ce",  
"ab76aba2.87c598",  
"49a2a6e3.a85e38",  
"b6a96081dfa6b937"  
]  
]  
},  
{  
"id": "ad71cdbb608ace73",  
"type": "range",  
"z": "8f28924.0ff727",  
"minin": "5501",  
"maxin": "100000",  
"minout": "0",  
"maxout": "0",  
"action": "scale",  
"round": true,  
"property": "payload",  
"name": "POT\_MAX",  
"x": 450,  
"y": 940,  
"wires": [  
[  
"3e74b834.ac12d8"  
]  
]  
},  
{  
"id": "cf8980adcc55a9ff",  
"type": "ui\_gauge",  
"z": "8f28924.0ff727",  
"name": "",  
"group": "e0001ac3815cacbc",  
"order": 0,  
"width": 0,  
"height": 0,  
"gtype": "gage",  
"title": "Consumo de la casa",  
"label": "Watios",  
"format": "{{value}}",  
"min": 0,  
"max": "8000",  
"colors": [  
"#00b500",  
"#e6e600",  
"#ca3838"  
],  
"seg1": "3000",  
"seg2": "6000",  
"diff": false,  
"className": "",  
"x": 1080,  
"y": 740,  
"wires":   
},  
{  
"id": "b6a96081dfa6b937",  
"type": "ui\_gauge",  
"z": "8f28924.0ff727",  
"name": "",  
"group": "e0001ac3815cacbc",  
"order": 1,  
"width": 0,  
"height": 0,  
"gtype": "gage",  
"title": "Producción Instantánea Inversor",  
"label": "Watios",  
"format": "{{value}}",  
"min": 0,  
"max": "5560",  
"colors": [  
"#00b500",  
"#e6e600",  
"#ca3838"  
],  
"seg1": "",  
"seg2": "",  
"diff": false,  
"className": "",  
"x": 850,  
"y": 780,  
"wires":   
},  
{  
"id": "b9d8fc29b2f76fef",  
"type": "modbus-read",  
"z": "8f28924.0ff727",  
"name": "Daily Energy Yield\_32114\_(2)",  
"topic": "Dail Energy Yieldy",  
"showStatusActivities": false,  
"logIOActivities": false,  
"showErrors": false,  
"showWarnings": true,  
"unitid": "1",  
"dataType": "HoldingRegister",  
"adr": "32114",  
"quantity": "2",  
"rate": "5",  
"rateUnit": "s",  
"delayOnStart": false,  
"startDelayTime": "",  
"server": "26d6b97598760778",  
"useIOFile": false,  
"ioFile": "",  
"useIOForPayload": false,  
"emptyMsgOnFail": false,  
"x": 240,  
"y": 120,  
"wires": [  
[  
"d5bc7ea89ca3cc5b",  
"272b374839bb5aef"  
],  
  
]  
},  
{  
"id": "d5bc7ea89ca3cc5b",  
"type": "debug",  
"z": "8f28924.0ff727",  
"name": "",  
"active": false,  
"tosidebar": true,  
"console": false,  
"tostatus": true,  
"complete": "payload[1]",  
"targetType": "msg",  
"statusVal": "payload",  
"statusType": "auto",  
"x": 680,  
"y": 120,  
"wires":   
},  
{  
"id": "28bdb6fac0458077",  
"type": "debug",  
"z": "8f28924.0ff727",  
"name": "",  
"active": false,  
"tosidebar": true,  
"console": false,  
"tostatus": true,  
"complete": "payload[1]",  
"targetType": "msg",  
"statusVal": "payload",  
"statusType": "auto",  
"x": 920,  
"y": 180,  
"wires":   
},  
{  
"id": "92bf1d6e5513503f",  
"type": "ui\_gauge",  
"z": "8f28924.0ff727",  
"name": "",  
"group": "e0001ac3815cacbc",  
"order": 2,  
"width": 0,  
"height": 0,  
"gtype": "gage",  
"title": "Producción del día",  
"label": "kWh",  
"format": "{{payload[1]}}",  
"min": 0,  
"max": "40",  
"colors": [  
"#00b500",  
"#e6e600",  
"#ca3838"  
],  
"seg1": "",  
"seg2": "",  
"diff": false,  
"className": "",  
"x": 930,  
"y": 140,  
"wires":   
},  
{  
"id": "272b374839bb5aef",  
"type": "range",  
"z": "8f28924.0ff727",  
"minin": "0",  
"maxin": "5000",  
"minout": "0",  
"maxout": "50",  
"action": "roll",  
"round": false,  
"property": "payload[1]",  
"name": "",  
"x": 650,  
"y": 220,  
"wires": [  
[  
"28bdb6fac0458077",  
"92bf1d6e5513503f"  
]  
]  
},  
{  
"id": "2e16cb4dab5c3923",  
"type": "influxdb",  
"hostname": "192.168.1.67",  
"port": "8086",  
"protocol": "http",  
"database": "Ormu23",  
"name": "Conexión a Ormu23",  
"usetls": false,  
"tls": "",  
"influxdbVersion": "1.x",  
"url": "[http://localhost:8086](http://localhost:8086)",  
"rejectUnauthorized": true  
},  
{  
"id": "26d6b97598760778",  
"type": "modbus-client",  
"name": "EW11",  
"clienttype": "tcp",  
"bufferCommands": true,  
"stateLogEnabled": false,  
"queueLogEnabled": false,  
"failureLogEnabled": false,  
"tcpHost": "192.168.1.121",  
"tcpPort": "502",  
"tcpType": "DEFAULT",  
"serialPort": "/dev/ttyUSB0",  
"serialType": "RTU-BUFFERD",  
"serialBaudrate": "9600",  
"serialDatabits": "8",  
"serialStopbits": "1",  
"serialParity": "none",  
"serialConnectionDelay": "100",  
"serialAsciiResponseStartDelimiter": "0x3A",  
"unit\_id": "1",  
"commandDelay": "1",  
"clientTimeout": "3000",  
"reconnectOnTimeout": true,  
"reconnectTimeout": "2000",  
"parallelUnitIdsAllowed": true  
},  
{  
"id": "e0001ac3815cacbc",  
"type": "ui\_group",  
"name": "Consumos",  
"tab": "ea4a1e2038369c00",  
"order": 1,  
"disp": true,  
"width": "6",  
"collapse": false,  
"className": ""  
},  
{  
"id": "ea4a1e2038369c00",  
"type": "ui\_tab",  
"name": "Consumo",  
"icon": "dashboard",  
"disabled": false,  
"hidden": false  
}  
]

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [10 January 2023 19:04 UTC](https://discourse.nodered.org/t/nodered-resets-if-trying-to-use-modbus-rtu/73492/2 "2023-01-10T19:04:20Z")

</div>

Welcome to the forum @PakkoB

Stop node red then restart in a command window and copy/paste the full output here, up the time it restarts again. Copy/paste please, not screenshot. Hopefully that will show why it is restarting.

Also tell us what OS you are running on and how you installed node red.

---

<div class="post-metadata">

**Author:** ![PakkoB](https://avatars.discourse-cdn.com/v4/letter/p/df788c/32.png) [@PakkoB](https://discourse.nodered.org/u/PakkoB)\
**Post date:** [10 January 2023 19:53 UTC](https://discourse.nodered.org/t/nodered-resets-if-trying-to-use-modbus-rtu/73492/3 "2023-01-10T19:53:03Z")

</div>

Hi,  
Thxs for your kind reply.  
My OS is Raspbian Bulleye 32bit.  
I run nodered as a container using portainer.  
The log doesn’t show any kind of error, only the usual messages when starting nodered.  
It reboots just after showing them.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [10 January 2023 20:12 UTC](https://discourse.nodered.org/t/nodered-resets-if-trying-to-use-modbus-rtu/73492/4 "2023-01-10T20:12:35Z")

</div>

> [@PakkoB](#):
>
> usual messages when starting nodered.  
> It reboots just after showing them

Show us please. From the welcome to node red message.

---

<div class="post-metadata">

**Author:** ![PakkoB](https://avatars.discourse-cdn.com/v4/letter/p/df788c/32.png) [@PakkoB](https://discourse.nodered.org/u/PakkoB)\
**Post date:** [10 January 2023 20:17 UTC](https://discourse.nodered.org/t/nodered-resets-if-trying-to-use-modbus-rtu/73492/5 "2023-01-10T20:17:57Z")

</div>

That´s all that show in a full reboot:

```auto
2023-01-10T20:16:07.052540654Z

2023-01-10T20:16:07.052662839Z > node-red-docker@2.2.3 start /usr/src/node-red

2023-01-10T20:16:07.052692079Z > node $NODE_OPTIONS node_modules/node-red/red.js $FLOWS "--userDir" "/data"

2023-01-10T20:16:07.052717801Z

2023-01-10T20:16:08.403471122Z 10 Jan 21:16:08 - [info]

2023-01-10T20:16:08.403547140Z

2023-01-10T20:16:08.403574399Z Welcome to Node-RED

2023-01-10T20:16:08.403598417Z ===================

2023-01-10T20:16:08.403621306Z

2023-01-10T20:16:08.406189712Z 10 Jan 21:16:08 - [info] Node-RED version: v2.2.3

2023-01-10T20:16:08.407056965Z 10 Jan 21:16:08 - [info] Node.js version: v12.22.8

2023-01-10T20:16:08.407644608Z 10 Jan 21:16:08 - [info] Linux 5.10.103-v7l+ arm LE

2023-01-10T20:16:08.945083703Z 10 Jan 21:16:08 - [info] Loading palette nodes

2023-01-10T20:16:11.077623287Z 10 Jan 21:16:11 - [info] Dashboard version 3.3.1 started at /ui

2023-01-10T20:16:11.116478509Z 10 Jan 21:16:11 - [info] Settings file : /data/settings.js

2023-01-10T20:16:11.118333828Z 10 Jan 21:16:11 - [info] Context store : 'default' [module=memory]

2023-01-10T20:16:11.120281572Z 10 Jan 21:16:11 - [info] User directory : /data

2023-01-10T20:16:11.120795643Z 10 Jan 21:16:11 - [warn] Projects disabled : editorTheme.projects.enabled=false

2023-01-10T20:16:11.122674795Z 10 Jan 21:16:11 - [info] Flows file : /data/flows.json

2023-01-10T20:16:11.154055462Z 10 Jan 21:16:11 - [warn]

2023-01-10T20:16:11.154154054Z

2023-01-10T20:16:11.154182554Z ---------------------------------------------------------------------

2023-01-10T20:16:11.154206517Z Your flow credentials file is encrypted using a system-generated key.

2023-01-10T20:16:11.154250035Z

2023-01-10T20:16:11.154272664Z If the system-generated key is lost for any reason, your credentials

2023-01-10T20:16:11.154316812Z file will not be recoverable, you will have to delete it and re-enter

2023-01-10T20:16:11.154341979Z your credentials.

2023-01-10T20:16:11.154364053Z

2023-01-10T20:16:11.154404126Z You should set your own key using the 'credentialSecret' option in

2023-01-10T20:16:11.154427811Z your settings file. Node-RED will then re-encrypt your credentials

2023-01-10T20:16:11.154450441Z file using your chosen key the next time you deploy a change.

2023-01-10T20:16:11.154493274Z ---------------------------------------------------------------------

2023-01-10T20:16:11.154516422Z

2023-01-10T20:16:11.206773781Z 10 Jan 21:16:11 - [info] Server now running at http://127.0.0.1:1880/

2023-01-10T20:16:11.208925876Z 10 Jan 21:16:11 - [info] Starting flows

2023-01-10T20:16:12.195493722Z 10 Jan 21:16:12 - [info] Started flows

2023-01-10T20:16:12.250100416Z 10 Jan 21:16:12 - [metric] {"level":99,"nodeid":"15edb2e7.a89c9d","event":"node.inject.receive","timestamp":1673381772249}

2023-01-10T20:16:12.254843657Z 10 Jan 21:16:12 - [metric] {"level":99,"nodeid":"15edb2e7.a89c9d","event":"node.inject.send","msgid":"977dd18790d0009c","timestamp":1673381772254}

2023-01-10T20:16:12.257772394Z 10 Jan 21:16:12 - [metric] {"level":99,"nodeid":"15edb2e7.a89c9d","event":"node.inject.done","msgid":"977dd18790d0009c","timestamp":1673381772257}

2023-01-10T20:16:12.259172421Z 10 Jan 21:16:12 - [metric] {"level":99,"nodeid":"48259aeee3107fd4","event":"node.inject.receive","timestamp":1673381772258}

2023-01-10T20:16:12.259870304Z 10 Jan 21:16:12 - [metric] {"level":99,"nodeid":"48259aeee3107fd4","event":"node.inject.send","msgid":"84c6e565f50bb986","timestamp":1673381772259}

2023-01-10T20:16:12.260504077Z 10 Jan 21:16:12 - [metric] {"level":99,"nodeid":"48259aeee3107fd4","event":"node.inject.done","msgid":"84c6e565f50bb986","timestamp":1673381772260}

2023-01-10T20:16:15.162659278Z

```

---

<div class="post-metadata">

**Author:** ![PakkoB](https://avatars.discourse-cdn.com/v4/letter/p/df788c/32.png) [@PakkoB](https://discourse.nodered.org/u/PakkoB)\
**Post date:** [10 January 2023 20:22 UTC](https://discourse.nodered.org/t/nodered-resets-if-trying-to-use-modbus-rtu/73492/6 "2023-01-10T20:22:40Z")

</div>

When reboot festival starts, the only way to stop it is removing the file flows.json, killing the container and recreate it. After that I import the flows again but running with the Elfin EW11a server.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [10 January 2023 21:25 UTC](https://discourse.nodered.org/t/nodered-resets-if-trying-to-use-modbus-rtu/73492/7 "2023-01-10T21:25:12Z")

</div>

You said in the title that node-red resets, but now it seems that you mean the machine reboots. Is that correct? If so then look in /var/log/syslog to see why it reboots.

> [@PakkoB](#):
>
> After that I import the flows again but running with the Elfin EW11a server.

I have no idea what you mean by that.

---

<div class="post-metadata">

**Author:** ![PakkoB](https://avatars.discourse-cdn.com/v4/letter/p/df788c/32.png) [@PakkoB](https://discourse.nodered.org/u/PakkoB)\
**Post date:** [10 January 2023 21:43 UTC](https://discourse.nodered.org/t/nodered-resets-if-trying-to-use-modbus-rtu/73492/8 "2023-01-10T21:43:22Z")

</div>

Sorry, but english is not my first language and it is possible I don´t express clearly.  
No, what resets is nodered. The Raspberry keeps working without problem.  
What I say about importing the flows and using Elfin EW11a is the workaround I´ve found to keep using the flows to monitor the inverter, because using RTU mode resets nodered.  
All the other containers (grafana, influxdb, homeassistant, portainer) run smoothly.  
But if I use mbpoll in mode rtu, it can communicate with the inverter. So the problem is in nodered.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [10 January 2023 21:56 UTC](https://discourse.nodered.org/t/nodered-resets-if-trying-to-use-modbus-rtu/73492/9 "2023-01-10T21:56:53Z")

</div>

> [@PakkoB](#):
>
> what resets is nodered

OK. If you look at the log you will see that it stops in the middle of a line. That means that node-red did not crash, it was killed by something external to it. Have a look in the system log to see if there is anything there.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [11 March 2023 21:57 UTC](https://discourse.nodered.org/t/nodered-resets-if-trying-to-use-modbus-rtu/73492/10 "2023-03-11T21:57:10Z")

</div>

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