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",
"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
}
]