Support to get the modbus connections running ( rpi4+Moxa NP5110+heat pump)

Hello everyone.
I'm new to the forum and thank you in advance for your help and patience.

I would like to log some data from my heat pump.
Therefore I am trying to get the modbus connections running from my heat pump (waterkotte WPCU.C control, firmware C01.04.00) with an Moxa NP5110 to the RPI4.

The error log shows timed out statement but I am not able to figure ou t the route cause... reached the google search limits :slight_smile:

Please have a look on the settings and the flow .. to find the problem. Grateful for any help.

flow:


        "id": "b30d382e0e58daa2",
        "type": "tab",
        "label": "Flow 2",
        "disabled": false,
        "info": "",
        "env": []
    },
    {
        "id": "f5019c7636823803",
        "type": "inject",
        "z": "b30d382e0e58daa2",
        "name": "",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": true,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "",
        "payloadType": "date",
        "x": 110,
        "y": 280,
        "wires": [
            [
                "b0b177e512d8a1c0"
            ]
        ]
    },
    {
        "id": "b0b177e512d8a1c0",
        "type": "function",
        "z": "b30d382e0e58daa2",
        "name": "function 1",
        "func": "msg.payload = { \n    'fc': 4,\n    'unitid': 1,\n    'address': 433,\n    'quantity': 1\n};\n return msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 220,
        "y": 360,
        "wires": [
            [
                "f507c8b29d8ea302"
            ]
        ]
    },
    {
        "id": "815ab9cf7062e8dc",
        "type": "modbus-response",
        "z": "b30d382e0e58daa2",
        "name": "",
        "registerShowMax": 20,
        "x": 630,
        "y": 320,
        "wires": []
    },
    {
        "id": "3e6c578198c4a030",
        "type": "debug",
        "z": "b30d382e0e58daa2",
        "name": "debug 2",
        "active": false,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 580,
        "y": 260,
        "wires": []
    },
    {
        "id": "f507c8b29d8ea302",
        "type": "modbus-flex-getter",
        "z": "b30d382e0e58daa2",
        "name": "",
        "showStatusActivities": true,
        "showErrors": true,
        "logIOActivities": false,
        "server": "b910dbd8ba3e7f5e",
        "useIOFile": false,
        "ioFile": "",
        "useIOForPayload": false,
        "emptyMsgOnFail": false,
        "keepMsgProperties": false,
        "x": 400,
        "y": 280,
        "wires": [
            [],
            [
                "3e6c578198c4a030",
                "815ab9cf7062e8dc"
            ]
        ]
    },
    {
        "id": "b910dbd8ba3e7f5e",
        "type": "modbus-client",
        "name": "RS232-TCP-MOXA-NP5110",
        "clienttype": "tcp",
        "bufferCommands": false,
        "stateLogEnabled": false,
        "queueLogEnabled": false,
        "failureLogEnabled": true,
        "tcpHost": "192.168.100.18",
        "tcpPort": "4001",
        "tcpType": "DEFAULT",
        "serialPort": "/dev/ttyUSB0",
        "serialType": "RTU",
        "serialBaudrate": "9600",
        "serialDatabits": "8",
        "serialStopbits": "1",
        "serialParity": "none",
        "serialConnectionDelay": "0",
        "serialAsciiResponseStartDelimiter": "0x3A",
        "unit_id": "1",
        "commandDelay": "50",
        "clientTimeout": "1000",
        "reconnectOnTimeout": true,
        "reconnectTimeout": "2000",
        "parallelUnitIdsAllowed": true
    }
]

Setting Moxa NP5110

Node Red debug log


pi@raspberrypi:~ $ DEBUG=contribModbus:write*,contribModbus:core:client,modbus-serial node-red -v
6 Nov 15:55:30 - [info]

Welcome to Node-RED
===================

6 Nov 15:55:30 - [info] Node-RED version: v3.0.2
6 Nov 15:55:30 - [info] Node.js  version: v16.18.0
6 Nov 15:55:30 - [info] Linux 5.15.74-v8+ arm64 LE
6 Nov 15:55:31 - [info] Loading palette nodes
6 Nov 15:55:34 - [info] Settings file  : /home/pi/.node-red/settings.js
6 Nov 15:55:34 - [info] Context store  : 'default' [module=memory]
6 Nov 15:55:34 - [info] User directory : /home/pi/.node-red
6 Nov 15:55:34 - [warn] Projects disabled : editorTheme.projects.enabled=false
6 Nov 15:55:34 - [info] Flows file     : /home/pi/.node-red/flows.json
6 Nov 15:55:34 - [warn] Encrypted credentials not found
6 Nov 15:55:34 - [info] Server now running at http://127.0.0.1:1880/
6 Nov 15:55:34 - [info] Starting flows
  contribModbus:core:client Client -> initialized  +0ms
6 Nov 15:55:34 - [warn] [modbus-client:RS232-TCP-MOXA-NP5110] Client -> fsm init state after new  TCP@192.168.100.18:4001 default Unit-Id: 1
6 Nov 15:55:34 - [warn] [modbus-client:RS232-TCP-MOXA-NP5110] Client -> first fsm init in 500 ms  TCP@192.168.100.18:4001 default Unit-Id: 1
6 Nov 15:55:34 - [info] Started flows
  contribModbus:core:client Client -> TCP port  TCP@192.168.100.18:4001 default Unit-Id: 1 +513ms
  modbus-serial TCP port: signal connect +0ms
6 Nov 15:55:35 - [warn] [modbus-client:RS232-TCP-MOXA-NP5110] Client -> fsm connected after state init Get More About It By Logging  TCP@192.168.100.18:4001 default Unit-Id: 1
debug3: send packet: type 98
  modbus-serial {
  modbus-serial   action: 'send tcp port',
  modbus-serial   data: <Buffer 01 04 01 b1 00 01 60 11>,
  modbus-serial   buffer: <Buffer 00 01 00 00 00 06 01 04 01 b1 00 01>,
  modbus-serial   unitid: 1,
  modbus-serial   functionCode: 4,
  modbus-serial   transactionsId: 1
  modbus-serial } +30s
  modbus-serial modbusErrorHandling:Timed out +0ms
6 Nov 15:56:06 - [warn] [modbus-client:RS232-TCP-MOXA-NP5110] Client -> fsm failed state after connected Get More About It By Logging  TCP@192.168.100.18:4001 default Unit-Id: 1
6 Nov 15:56:06 - [warn] [modbus-flex-getter:f507c8b29d8ea302] Modbus Failure On State connected Get More About It By Logging
6 Nov 15:56:06 - [warn] [modbus-client:RS232-TCP-MOXA-NP5110] Client -> fsm broken state after failed Get More About It By Logging  TCP@192.168.100.18:4001 default Unit-Id: 1
6 Nov 15:56:06 - [warn] [modbus-client:RS232-TCP-MOXA-NP5110] Client -> fsm reconnect state after broken Get More About It By Logging  TCP@192.168.100.18:4001 default Unit-Id: 1
6 Nov 15:56:06 - [error] [modbus-flex-getter:f507c8b29d8ea302] Error: Timed out
    at /home/pi/.node-red/node_modules/node-red-contrib-modbus/modbus/maps/core/core/modbus-client-core.js:80:21
6 Nov 15:56:08 - [warn] [modbus-client:RS232-TCP-MOXA-NP5110] Client -> fsm init state after reconnecting  TCP@192.168.100.18:4001 default Unit-Id: 1
6 Nov 15:56:08 - [warn] [modbus-client:RS232-TCP-MOXA-NP5110] Client -> fsm init in 2000 ms  TCP@192.168.100.18:4001 default Unit-Id: 1
  contribModbus:core:client Client -> connection close sent  TCP@192.168.100.18:4001 default Unit-Id: 1 +36s
  contribModbus:core:client Client -> TCP port  TCP@192.168.100.18:4001 default Unit-Id: 1 +0ms
  modbus-serial TCP port: signal connect +5s
6 Nov 15:56:10 - [warn] [modbus-client:RS232-TCP-MOXA-NP5110] Client -> fsm connected after state init Get More About It By Logging  TCP@192.168.100.18:4001 default Unit-Id: 1
  modbus-serial TCP port: signal close: false +3ms
  contribModbus:core:client Client -> connection closed  TCP@192.168.100.18:4001 default Unit-Id: 1 +9ms
debug3: send packet: type 98
  modbus-serial {
  modbus-serial   action: 'send tcp port',
  modbus-serial   data: <Buffer 01 04 01 b1 00 01 60 11>,
  modbus-serial   buffer: <Buffer 00 01 00 00 00 06 01 04 01 b1 00 01>,
  modbus-serial   unitid: 1,
  modbus-serial   functionCode: 4,
  modbus-serial   transactionsId: 1
  modbus-serial } +11s
  modbus-serial modbusErrorHandling:Timed out +16s
6 Nov 15:56:23 - [warn] [modbus-client:RS232-TCP-MOXA-NP5110] Client -> fsm failed state after connected Get More About It By Logging  TCP@192.168.100.18:4001 default Unit-Id: 1
6 Nov 15:56:23 - [warn] [modbus-flex-getter:f507c8b29d8ea302] Modbus Failure On State connected Get More About It By Logging
6 Nov 15:56:23 - [warn] [modbus-client:RS232-TCP-MOXA-NP5110] Client -> fsm broken state after failed Get More About It By Logging  TCP@192.168.100.18:4001 default Unit-Id: 1
6 Nov 15:56:23 - [warn] [modbus-client:RS232-TCP-MOXA-NP5110] Client -> fsm reconnect state after broken Get More About It By Logging  TCP@192.168.100.18:4001 default Unit-Id: 1
6 Nov 15:56:23 - [error] [modbus-flex-getter:f507c8b29d8ea302] Error: Timed out
    at /home/pi/.node-red/node_modules/node-red-contrib-modbus/modbus/maps/core/core/modbus-client-core.js:80:21
6 Nov 15:56:25 - [warn] [modbus-client:RS232-TCP-MOXA-NP5110] Client -> fsm init state after reconnecting  TCP@192.168.100.18:4001 default Unit-Id: 1
6 Nov 15:56:25 - [warn] [modbus-client:RS232-TCP-MOXA-NP5110] Client -> fsm init in 2000 ms  TCP@192.168.100.18:4001 default Unit-Id: 1
  contribModbus:core:client Client -> connection close sent  TCP@192.168.100.18:4001 default Unit-Id: 1 +16s
  contribModbus:core:client Client -> TCP port  TCP@192.168.100.18:4001 default Unit-Id: 1 +1ms
  modbus-serial TCP port: signal connect +5s
6 Nov 15:56:27 - [warn] [modbus-client:RS232-TCP-MOXA-NP5110] Client -> fsm connected after state init Get More About It By Logging  TCP@192.168.100.18:4001 default Unit-Id: 1
  modbus-serial TCP port: signal close: false +5ms
  contribModbus:core:client Client -> connection closed  TCP@192.168.100.18:4001 default Unit-Id: 1 +10ms
  modbus-serial {
  modbus-serial   action: 'send tcp port',
  modbus-serial   data: <Buffer 01 04 01 b1 00 01 60 11>,
  modbus-serial   buffer: <Buffer 00 01 00 00 00 06 01 04 01 b1 00 01>,
  modbus-serial   unitid: 1,
  modbus-serial   functionCode: 4,
  modbus-serial   transactionsId: 1
  modbus-serial } +13m
  modbus-serial modbusErrorHandling:Timed out +13m
6 Nov 16:09:24 - [warn] [modbus-client:RS232-TCP-MOXA-NP5110] Client -> fsm failed state after connected Get More About It By Logging  TCP@192.168.100.18:4001 default Unit-Id: 1
6 Nov 16:09:24 - [warn] [modbus-flex-getter:f507c8b29d8ea302] Modbus Failure On State connected Get More About It By Logging
6 Nov 16:09:24 - [warn] [modbus-client:RS232-TCP-MOXA-NP5110] Client -> fsm broken state after failed Get More About It By Logging  TCP@192.168.100.18:4001 default Unit-Id: 1
6 Nov 16:09:24 - [warn] [modbus-client:RS232-TCP-MOXA-NP5110] Client -> fsm reconnect state after broken Get More About It By Logging  TCP@192.168.100.18:4001 default Unit-Id: 1
6 Nov 16:09:24 - [error] [modbus-flex-getter:f507c8b29d8ea302] Error: Timed out
    at /home/pi/.node-red/node_modules/node-red-contrib-modbus/modbus/maps/core/core/modbus-client-core.js:80:21
6 Nov 16:09:26 - [warn] [modbus-client:RS232-TCP-MOXA-NP5110] Client -> fsm init state after reconnecting  TCP@192.168.100.18:4001 default Unit-Id: 1
6 Nov 16:09:26 - [warn] [modbus-client:RS232-TCP-MOXA-NP5110] Client -> fsm init in 2000 ms  TCP@192.168.100.18:4001 default Unit-Id: 1
  contribModbus:core:client Client -> connection close sent  TCP@192.168.100.18:4001 default Unit-Id: 1 +13m
  contribModbus:core:client Client -> TCP port  TCP@192.168.100.18:4001 default Unit-Id: 1 +1ms
  modbus-serial TCP port: signal connect +5s
6 Nov 16:09:28 - [warn] [modbus-client:RS232-TCP-MOXA-NP5110] Client -> fsm connected after state init Get More About It By Logging  TCP@192.168.100.18:4001 default Unit-Id: 1
  modbus-serial TCP port: signal close: false +3ms
  contribModbus:core:client Client -> connection closed  TCP@192.168.100.18:4001 default Unit-Id: 1 +14ms

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