# Node-red-contrib-modbustcp

**URL:** <https://discourse.nodered.org/t/node-red-contrib-modbustcp/10315>\
**Category:** Hardware\
**Created:** [18 April 2019 02:51 UTC](https://discourse.nodered.org/t/node-red-contrib-modbustcp/10315 "2019-04-18T02:51:04Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![RickW](https://avatars.discourse-cdn.com/v4/letter/r/aca169/32.png) [@RickW](https://discourse.nodered.org/u/RickW)\
**Post date:** [18 April 2019 02:51 UTC](https://discourse.nodered.org/t/node-red-contrib-modbustcp/10315/1 "2019-04-18T02:51:04Z")

</div>

When I "Deploy" my Node-RED flow the modbustcp-read nodes don't reconnect.  
They show "Initiating...." and then after about 2 minutes they show "Disconnected" but they never reconnect.

I am using a King Pigeon M230T 4 Analog input module.  
[http://www.gprs-m2m.com/EnproductShow.asp?ID=257#.XLfdu8BfhFQ](http://www.gprs-m2m.com/EnproductShow.asp?ID=257#.XLfdu8BfhFQ)  
The hardware device continues to show the "Link" lamp active.

If I reboot the PC it all starts up nicely.  
If I node-red-stop, then node-red-start, it all starts up nicely.  
If I disconnect then reconnect power to my hardware device while the modbustcp-read nodes show "Disconnected", it starts reading in about 3 seconds

If I disconnect then reconnect power to my hardware while the modbustcp-read nodes show "Initiating..." the status will eventually change to show "Disconnected" but never starts reading.

I have the Modbus reconnect time set to 3 seconds, but changing this doesn't seem to affect the fault sequence.

I have found that having different Poll Rates for read nodes causes another reason for the system not to reconnect.

Why does stop then start (and reboot) work, where "Deploy" doesn't?  
Why does the "Initiating..." status stop it from reconnecting?  
Why when "Initiating..." does it take so long to decide it is "Disconnected" but then still not reconnect?

This situation makes working on even a simple flow very tedious.

Any thoughts please?  
Thank you

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [18 April 2019 05:32 UTC](https://discourse.nodered.org/t/node-red-contrib-modbustcp/10315/2 "2019-04-18T05:32:27Z")

</div>

the problem most likely lies with how the author has written the node and how he handles disconnections. This is some good info you have provided however you should post it as an issue on the GitHub repository for him to see and action.  
That way (assuming the project is active and the author considers it to be a real problem & fixes it), everyone benefits. Win win.

You could always clone the project, make some fixes and do a pull request for the author? Again, win win

---

<div class="post-metadata">

**Author:** ![KarolisL](https://avatars.discourse-cdn.com/v4/letter/k/a4c791/32.png) [@KarolisL](https://discourse.nodered.org/u/KarolisL)\
**Post date:** [18 April 2019 17:44 UTC](https://discourse.nodered.org/t/node-red-contrib-modbustcp/10315/3 "2019-04-18T17:44:21Z")

</div>

Hello,

I had similar situation with modbus rtu modules. The connection was PC-\>MOXA modbus tcp/ip - RTU -\>Device.

It was acting similar to what you were describing. In my case problem was with serial settings: parity and stop bits.

Do you have other ways to check if your King Pigeon M230T 4 Analog input module replies to modbus messages? For me [http://www.plcsimulator.org/](http://www.plcsimulator.org/) was first tool before finding node-red

---

<div class="post-metadata">

**Author:** ![born2dive](https://avatars.discourse-cdn.com/v4/letter/b/96bed5/32.png) [@born2dive](https://discourse.nodered.org/u/born2dive)\
**Post date:** [25 August 2019 15:03 UTC](https://discourse.nodered.org/t/node-red-contrib-modbustcp/10315/4 "2019-08-25T15:03:09Z")

</div>

Hello,  
I try to connect my king pigeon S266 cellular device, do you have any information that could help me?  
Thanks.  
Regards

---

<div class="post-metadata">

**Author:** ![RickW](https://avatars.discourse-cdn.com/v4/letter/r/aca169/32.png) [@RickW](https://discourse.nodered.org/u/RickW)\
**Post date:** [2 September 2019 02:59 UTC](https://discourse.nodered.org/t/node-red-contrib-modbustcp/10315/5 "2019-09-02T02:59:27Z")

</div>

Hello  
I have not tried to connect a King Pigeon S266 to Node-Red.  
I have looked up the device manual and it indicates that it is a "Reserved Function". I am not sure what that means.  
It also says to look at the S264 manual got the GPRS protocol.
