# QIoT node-red-contrib-modbus Modbus-Flex-Getter "PortNotOpenError: Port Not Open"

**URL:** https://discourse.nodered.org/t/qiot-node-red-contrib-modbus-modbus-flex-getter-portnotopenerror-port-not-open/20322
**Category:** General
**Created:** [14 January 2020 16:52 UTC](https://discourse.nodered.org/t/qiot-node-red-contrib-modbus-modbus-flex-getter-portnotopenerror-port-not-open/20322 "2020-01-14T16:52:52Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![LTDS](https://avatars.discourse-cdn.com/v4/letter/l/3be4f8/32.png) [@LTDS](https://discourse.nodered.org/u/LTDS)
#### Post date: [14 January 2020 16:52 UTC](https://discourse.nodered.org/t/qiot-node-red-contrib-modbus-modbus-flex-getter-portnotopenerror-port-not-open/20322/1 "2020-01-14T16:52:52Z")

</div>

Hi there !

I'm trying to use the QNAP QIoT Suite to read values on a Modbus probe. This Suite is using NodeRed. I'm using the node-red-contrib-modbus module.

The probe is connected to a RS485 Module witch is itself connected on a RaspberryPi with the 192.168.1.22 IP adress.

There is my configuration :  
Inject \> Function \> Modbus-Flex-Getter \> Modbus Response

> Debug

Setup as following :

```
Inject :
Chain []

Function :
msg.payload = {
'fc': 3,
'unitid': 10,
'address': 164,
'quantity': 1};
return msg;

Modbus-Flex-Getter :
Modbus Client :

```

Nœud "a2c729b5.350318"  
Nom test  
Type modbus-client  
clienttype "serial"  
bufferCommands true  
stateLogEnabled false  
tcpHost "192.168.1.22"  
tcpPort "502"  
tcpType "DEFAULT"  
serialPort "192.168.1.22/dev/ttyUSB0"  
serialType "RTU"  
serialBaudrate "9600"  
serialDatabits "8"  
serialStopbits "2"  
serialParity "none"  
serialConnectionDelay "100"  
unit\_id 10  
commandDelay 1  
clientTimeout 1000  
reconnectOnTimeout false  
reconnectTimeout 2000  
parallelUnitIdsAllowed true

When I trigger the "Inject" node I get these messages :  
14/01/2020 à 15:50:26node: 23caa4eb.b96e1c  
msg : PortNotOpenError  
"PortNotOpenError: Port Not Open"  
14/01/2020 à 15:50:26node: 23caa4eb.b96e1cmsg : string[65]  
"FSM Reset On State {"value":"failed","actions":,"changed":true}"  
14/01/2020 à 15:50:26node: 23caa4eb.b96e1cmsg : string[65]  
"FSM Reset On State {"value":"failed","actions":,"changed":true}"

NodeRed is completely new for me and I don't quite get what is the issue here ! Any help ?

---

<div class="post-metadata">

### Author: ![StrongTown](https://avatars.discourse-cdn.com/v4/letter/s/4bbf92/32.png) [@StrongTown](https://discourse.nodered.org/u/StrongTown)
#### Post date: [8 March 2021 20:22 UTC](https://discourse.nodered.org/t/qiot-node-red-contrib-modbus-modbus-flex-getter-portnotopenerror-port-not-open/20322/2 "2021-03-08T20:22:15Z")

</div>

Hey `LTDS`, sorry you've had no response after more then a year. Did you ever figure out how to resolve this? I know NR but do not know much about modbus. I am trying to read registers in a MidNite Classic 200 solar charger via TCP into NR running on a rPi3B+ and I consistently get the error "port not open" from the `modbus-flex-getter` node of ` node-red-contrib-modbus`. I can read the C200 registers just fine every time with a "local app" (windows) someone created (I don't even tell it the IP address or Unit ID and it works) yet not with this node. I do know you cannot have the local app running when trying to access via NR as the C200 allows only one TCP connection at a time.

I searched this topic as I had hoped to find some insight.
