# Modbus Failure On State sending Get More About It By Logging

**URL:** https://discourse.nodered.org/t/modbus-failure-on-state-sending-get-more-about-it-by-logging/84536
**Category:** General
**Created:** [14 January 2024 17:16 UTC](https://discourse.nodered.org/t/modbus-failure-on-state-sending-get-more-about-it-by-logging/84536 "2024-01-14T17:16:31Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Martin12](https://avatars.discourse-cdn.com/v4/letter/m/e47c2d/32.png) [@Martin12](https://discourse.nodered.org/u/Martin12)
#### Post date: [14 January 2024 17:16 UTC](https://discourse.nodered.org/t/modbus-failure-on-state-sending-get-more-about-it-by-logging/84536/1 "2024-01-14T17:16:31Z")

</div>

I am using a USB to RS485 converter (Waveshare) on my Raspberry Pi 4 to query two power meter (SDM630) via Modbus RTU using the Modbus-Flex-Getter. Everything works fine and stable without any errors over days as long as I don't touch the Flow (and especially the Flex-Getter-Node).

However if I am changing anything in the Flex-Getter-Node or in the Flow which sometimes causes the Flex-Getter-Node to do a reconnect, I get the following error messages:  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/e/e/ee357c85c47481c5538a9bb9dcfc579d4d0638b1.png)

The only thing I can do to get the Modbus communication working again is to restart Node-Red. It's not a big deal as it works perfectly fine if I don't touch the Flow, it's a somewhat annoying behavior regardless and I don't know where to start to debug this.

Here are my settings:

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/3/a/3a18a8ce4060271beffb45db9e8ab141ef11bc9f.png)  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/2/2/225d8a391bce3a8cc6f10f1f15a694167a3cc614.png)  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/2/2/2237e8808a8ea65b62479785d74ea0cbc8ab1aaa.png)

Raspberry Pi 4  
Debian GNU/Linux 11 (bullseye)  
Linux: 6.1.21-v8+

Node-Red: 3.1.3  
node-red-contrib-modbus: 5.27.2  
NodeJs: v20.11.0

---

<div class="post-metadata">

### Author: ![UnborN](https://avatars.discourse-cdn.com/v4/letter/u/4491bb/32.png) [@UnborN](https://discourse.nodered.org/u/UnborN)
#### Post date: [14 January 2024 18:23 UTC](https://discourse.nodered.org/t/modbus-failure-on-state-sending-get-more-about-it-by-logging/84536/2 "2024-01-14T18:23:05Z")

</div>

> [@Martin12](#):
>
> NodeJs: v20.11.0

Nodejs version 20 is not listed as tested / compatible with the Modbus nodes and some issue was reported on Github page ([source](https://github.com/BiancoRoyal/node-red-contrib-modbus/issues/416#issuecomment-1774043374))

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/b/1/b1c9d595b59318119d09831326bcba119e1d95ff.png)

try downgrading to Node version **18**

* * *

If you want to further test before downgrading nodejs .. try to stop Node-red and run it with command  
`DEBUG=contribModbus*,modbus-serial node-red -v`

this will give you a more detailed log in the terminal, of each of the Modbus nodes actions ([source](https://github.com/BiancoRoyal/node-red-contrib-modbus#debug))

---

<div class="post-metadata">

### Author: ![Martin12](https://avatars.discourse-cdn.com/v4/letter/m/e47c2d/32.png) [@Martin12](https://discourse.nodered.org/u/Martin12)
#### Post date: [14 January 2024 18:49 UTC](https://discourse.nodered.org/t/modbus-failure-on-state-sending-get-more-about-it-by-logging/84536/3 "2024-01-14T18:49:52Z")

</div>

Downgrading to NodeJS 18 did the trick! Now the Flex-Getter-Node is reconnecting properly without having to restart Node-Red first! Thanks a lot! 🙂

---

<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: [28 January 2024 18:50 UTC](https://discourse.nodered.org/t/modbus-failure-on-state-sending-get-more-about-it-by-logging/84536/4 "2024-01-28T18:50:44Z")

</div>

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