How to troubleshoot "time out" issue?
See original GitHub issueFirst of all, thank you for making this collection of nodes available! Although I’m a newcomer to Modbus, I can see that it is a well thought out and flexible collection of tools, with decent documentation. Nice! But I’m afraid I’m having a little trouble getting even the most basic set-up to work, and I’m unable to figure out why - or indeed even what exactly is going wrong 😃 At first I had trouble getting any communication at all to appear on the serial port (UART connected to a Pi2); I tried adding my “nodered” user to the “dialout” group, which is most likely necessary in order to grant it access to /dev/ttyAMA0
where the port is located, but that didn’t help. Then I looked a bit closer at the Node-RED log output and saw that I had an error on start-up: [warn] [serialport] Error: Module did not self-register
, and after a bit of searching I did a re-install of the node-red-node-serialport
with --unsafe-perm
. Immediately I could see traffic starting to go out, and the “Rx” LED on the single RTU currently connected started blinking. “Great” I thought, “so it’s working now”, but alas I am not getting any response back. I have enabled debug by putting
Environment="NODE_RED_OPTIONS=-v"
Environment="DEBUG=modbus-serial,node_red_contrib_modbus"
in /lib/systemd/system/nodered.service
and doing systemctl daemon-reload
followed by systemctl restart nodered
, and I can now see these debug messages in the syslog:
Sep 2 22:33:50 system Node-RED[3946]: Sat, 02 Sep 2017 21:33:50 GMT modbus-serial { action: 'send serial rtu buffered',
Sep 2 22:33:50 system Node-RED[3946]: data: <Buffer 01 01 00 f6 00 01 1d f8>,
Sep 2 22:33:50 system Node-RED[3946]: unitid: 1,
Sep 2 22:33:50 system Node-RED[3946]: functionCode: 1 }
Sep 2 22:33:51 system Node-RED[3946]: Sat, 02 Sep 2017 21:33:51 GMT modbus-serial {}
Sep 2 22:33:51 system Node-RED[3946]: Sat, 02 Sep 2017 21:33:51 GMT modbus-serial Timed out
The RTU in question is a Novus DigiRail 4C four channel counter, and it has a button “RCom” which when pressed sets the address and serial port parameters to known values (address 246, baud rate 1200, parity even, 1 stop bit) for one minute - I have used the same values in the configuration node (baud rate, parity, stop bit) and in the JSON I pass to the one modbus-flex-getter
node I’ve put into my flow (full JSON is {“fc”:1,“address”:246,“quantity”:1}). I press the “RCom” button before triggering the read, after which I can see its “Rx” LED blink briefly, but then … nothing. Where do I go from here?
Issue Analytics
- State:
- Created 6 years ago
- Comments:7 (4 by maintainers)
Top GitHub Comments
Ah. Sorry, forgot to keep this updated - it seems the issue has to do with my RS-485 interface, a Monarco Hat, and the 4.9 Linux kernel. The Monarco devs are looking into it. And yes, this issue should probably be closed - many thanks for your help though!
if there is more - please reopen - did Node@6 fix it?