# Modbus Kostal pio 7.0 problem

**URL:** <https://discourse.nodered.org/t/modbus-kostal-pio-7-0-problem/94409>\
**Category:** General\
**Tags:** modbus\
**Created:** [6 January 2025 19:04 UTC](https://discourse.nodered.org/t/modbus-kostal-pio-7-0-problem/94409 "2025-01-06T19:04:58Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![RienPutmans](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/rienputmans/32/106344_2.png) [@RienPutmans](https://discourse.nodered.org/u/RienPutmans)\
**Post date:** [6 January 2025 19:04 UTC](https://discourse.nodered.org/t/modbus-kostal-pio-7-0-problem/94409/1 "2025-01-06T19:04:59Z")

</div>

I have a modul from ABB ILPH RS232-485 / Ethernet module to read a old PV-converter from Kostal. The type 7.0 don't have TCP/ip and only modbus-rtu.  
The configuration 9600 bps is the default baudrate, even parity is used and there is one stop bit.  
The adress is 4  
So I want to read with the code bellow but it isn't work.  
Have someone a sulution

[  
{  
"id": "bfdd49cd1e73e611",  
"type": "inject",  
"z": "15b82a934ddc1472",  
"name": "Inject",  
"props": [  
{  
"p": "payload"  
},  
{  
"p": "topic",  
"vt": "str"  
}  
],  
"repeat": "",  
"crontab": "",  
"once": true,  
"onceDelay": "5",  
"topic": "SMA25000TL-30",  
"payload": "",  
"payloadType": "date",  
"x": 110,  
"y": 960,  
"wires": [  
[  
"da54883a5083fa64"  
]  
]  
},  
{  
"id": "da54883a5083fa64",  
"type": "modbus-getter",  
"z": "15b82a934ddc1472",  
"name": "DC1 - AC",  
"showStatusActivities": true,  
"showErrors": true,  
"showWarnings": true,  
"logIOActivities": false,  
"unitid": "255",  
"dataType": "HoldingRegister",  
"adr": "30000",  
"quantity": "5",  
"server": "dd344a256284af8a",  
"useIOFile": false,  
"ioFile": "",  
"useIOForPayload": false,  
"emptyMsgOnFail": true,  
"keepMsgProperties": true,  
"delayOnStart": true,  
"startDelayTime": "60",  
"x": 240,  
"y": 960,  
"wires": [  
[  
"78790f650acc318e",  
"2af2bc9d067e14a6"  
],  
  
]  
},  
{  
"id": "78790f650acc318e",  
"type": "function",  
"z": "15b82a934ddc1472",  
"name": "extract buffer data",  
"func": "let DCCurrent1 = msg.payload[1] / 1000; // 30769\nlet DCVoltage1 = msg.payload[3] / 100; // 30771\nlet DCPower1 = msg.payload[5]; // 30773\nlet PowerTot = msg.payload[7]; // 30775\nlet PowerL1 = msg.payload[9]; // 30777\n\nlet GridVoltagePhase1= 0;\nif (msg.payload[15] !== 65535) {\n GridVoltagePhase1 = msg.payload[15] / 100; // 30783\n\tflow.set('VoltageSMA\_L1', GridVoltagePhase1)\n}\n\nlet GridVoltagePhase2= 0;\nif (msg.payload[17] !== 65535) {\n GridVoltagePhase2 = msg.payload[17] / 100; // 30785\n\tflow.set('VoltageSMA\_L2', GridVoltagePhase2)\n}\n\nlet GridVoltagePhase3= 0;\nif (msg.payload[19] !== 65535) {\n GridVoltagePhase3 = msg.payload[19] / 100; // 30787\n\tflow.set('VoltageSMA\_L3', GridVoltagePhase3)\n}\n\nlet GridCurrent = 0;\nif (msg.payload[27] !== 65535) {\n GridCurrent = msg.payload[27] / 1000; // 30795\n}\n\nlet GridFrequency = 0;\nif (msg.payload[35] !== 65535) {\n GridFrequency = msg.payload[35] / 100; // 30803\n}\n\nlet \_msg = {\n payload: \n};\n\n\_msg.payload=\n {\n\t\t\tdc\_current1: DCCurrent1,\n\t\t\tdc\_voltage1: DCVoltage1,\n\t\t\tdc\_power1: DCPower1, \n\t\t\tac\_power\_tot: PowerTot,\n\t\t\tac\_power1: PowerL1,\n\t\t\tac\_voltage1: GridVoltagePhase1,\n\t\t\tac\_voltage2: GridVoltagePhase2,\n\t\t\tac\_voltage3: GridVoltagePhase3,\n\t\t\tac\_current1: GridCurrent,\n\t\t\tac\_frequency: GridFrequency\n\t}\n\n\nreturn \_msg;",  
"outputs": 1,  
"timeout": "",  
"noerr": 0,  
"initialize": "",  
"finalize": "",  
"libs": ,  
"x": 470,  
"y": 960,  
"wires": [  
[  
"983fa3cb48b01d09",  
"4fd3ed8f87c689bf"  
]  
]  
},  
{  
"id": "983fa3cb48b01d09",  
"type": "join",  
"z": "15b82a934ddc1472",  
"name": "",  
"mode": "custom",  
"build": "merged",  
"property": "payload",  
"propertyType": "msg",  
"key": "topic",  
"joiner": "\n",  
"joinerType": "str",  
"accumulate": false,  
"timeout": "5",  
"count": "",  
"reduceRight": false,  
"reduceExp": "",  
"reduceInit": "",  
"reduceInitType": "",  
"reduceFixup": "",  
"x": 690,  
"y": 960,  
"wires": [  
[  
"854d5f4d8afdcd02"  
]  
]  
},  
{  
"id": "854d5f4d8afdcd02",  
"type": "json",  
"z": "15b82a934ddc1472",  
"name": "",  
"property": "payload",  
"action": "str",  
"pretty": false,  
"x": 830,  
"y": 960,  
"wires": [  
[  
"815c6d0d01991880"  
]  
]  
},  
{  
"id": "815c6d0d01991880",  
"type": "function",  
"z": "15b82a934ddc1472",  
"name": "Filter",  
"func": "inputjson = JSON.parse(msg.payload);\n\nvar \_fields = {};\nfor(var item in inputjson){\n \_fields[item] = inputjson[item];\n}\n\nmsg.payload = [\n {\n measurement: "energy",\n fields: \_fields,\n timestamp: new Date(),\n tags:{\n\t\t device: "SMA\_25000TL-30",\n\t\t },\n },\n];\nreturn msg;\n\n",  
"outputs": 1,  
"timeout": "",  
"noerr": 0,  
"initialize": "",  
"finalize": "",  
"libs": ,  
"x": 730,  
"y": 1020,  
"wires": [  
[  
"cd6923678fb5b094"  
]  
]  
},  
{  
"id": "dd344a256284af8a",  
"type": "modbus-client",  
"name": "Piko inverter",  
"clienttype": "tcp",  
"bufferCommands": true,  
"stateLogEnabled": true,  
"queueLogEnabled": false,  
"failureLogEnabled": false,  
"tcpHost": "192.168.1.29",  
"tcpPort": "502",  
"tcpType": "TCP-RTU-BUFFERED",  
"serialPort": "/dev/ttyUSB",  
"serialType": "RTU-BUFFERD",  
"serialBaudrate": "9600",  
"serialDatabits": "8",  
"serialStopbits": "1",  
"serialParity": "none",  
"serialConnectionDelay": "100",  
"serialAsciiResponseStartDelimiter": "",  
"unit\_id": "255",  
"commandDelay": 100,  
"clientTimeout": 2000,  
"reconnectOnTimeout": true,  
"reconnectTimeout": 2000,  
"parallelUnitIdsAllowed": true,  
"showErrors": false,  
"showWarnings": true,  
"showLogs": true  
}  
]

---

<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:** [7 March 2025 19:05 UTC](https://discourse.nodered.org/t/modbus-kostal-pio-7-0-problem/94409/2 "2025-03-07T19:05:33Z")

</div>

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