bitpool / edge-modbus

Set of Node-RED modules to support reading Modbus devices
MIT License
4 stars 3 forks source link

Issue with repeated reading of Modbus TCP device #3

Open HarvUK opened 11 months ago

HarvUK commented 11 months ago

Thanks for an awesome module, just having a slight problem with getting it running consistently.

Device Details: Can you please provide the make and model of the Modbus equipment you are using? This will help in understanding any specific quirks or proprietary behaviours. Herz Biomatic 199 biomass boiler, connected via Modbus TCP

Current Configuration: What is your current configuration in Node-RED for communicating with this equipment? Please include any relevant flow details or settings.

image

Error Logs/Outputs: Are there any specific error messages or unusual outputs you receive when attempting to communicate with the equipment? If possible, please share the logs or screenshots.

I set the inject to repeat every 5 minutes initially, then updated the frequency to as low as 30 seconds, but still get the same error - the second request after a deploy works then all subsequent fail as below:-

image

**Turning on debug in the reader gives this log:-

the sequence here is deploy at 9:22:38 Inject at 9:22:34 Inject again at 9:22:55**

15/12/2023, 09:22:38node: Herz
msg : string[57]
"Modbus [TCP@192.168.10.11:502 default Unit-Id: 1] stopped"
15/12/2023, 09:22:38node: Herz
msg : string[84]
"Modbus [TCP@192.168.10.11:502 default Unit-Id: 1] stopped state without reconnecting"
15/12/2023, 09:22:38node: Herz
msg : string[72]
"Modbus [TCP@192.168.10.11:502 default Unit-Id: 1] stop fsm on close Herz"
15/12/2023, 09:22:38node: Herz
msg : string[57]
"Modbus [TCP@192.168.10.11:502 default Unit-Id: 1] stopped"
15/12/2023, 09:22:38node: Herz
msg : string[65]
"Modbus [TCP@192.168.10.11:502 default Unit-Id: 1] close node Herz"
15/12/2023, 09:22:38node: Herz
msg : string[76]
"Modbus [TCP@192.168.10.11:502 default Unit-Id: 1] connection was closed Herz"
15/12/2023, 09:22:38node: Herz
msg : string[13]
"Modbus [] new"
15/12/2023, 09:22:38node: Herz
msg : string[21]
"Modbus [] initialized"
15/12/2023, 09:22:38node: Herz
msg : string[13]
"Modbus [] new"
15/12/2023, 09:22:38node: Herz
msg : string[14]
"Modbus [] init"
15/12/2023, 09:22:38node: Herz
msg : string[34]
"Modbus [] fsm init state after new"
15/12/2023, 09:22:38node: Herz
msg : string[74]
"Modbus [TCP@192.168.10.11:502 default Unit-Id: 1] first fsm init in 500 ms"
15/12/2023, 09:22:39node: Herz
msg : string[58]
"Modbus [TCP@192.168.10.11:502 default Unit-Id: 1] TCP port"
15/12/2023, 09:22:39node: Herz
msg : string[59]
"Modbus [TCP@192.168.10.11:502 default Unit-Id: 1] connected"
15/12/2023, 09:22:39node: Herz
msg : string[80]
"Modbus [TCP@192.168.10.11:502 default Unit-Id: 1] fsm connected after state init"
**15/12/2023, 09:22:44node: Herz**
msg : string[58]
"Modbus [TCP@192.168.10.11:502 default Unit-Id: 1] queueing"
15/12/2023, 09:22:44node: Herz
msg : string[57]
"Modbus [TCP@192.168.10.11:502 default Unit-Id: 1] sending"
15/12/2023, 09:22:44node: Herz
msg : string[57]
"Modbus [TCP@192.168.10.11:502 default Unit-Id: 1] sending"
15/12/2023, 09:22:44node: Herz
msg : string[57]
"Modbus [TCP@192.168.10.11:502 default Unit-Id: 1] sending"
15/12/2023, 09:22:44node: Herz
msg : string[57]
"Modbus [TCP@192.168.10.11:502 default Unit-Id: 1] sending"
15/12/2023, 09:22:44node: Herz
msg : string[57]
"Modbus [TCP@192.168.10.11:502 default Unit-Id: 1] sending"
15/12/2023, 09:22:44node: Herz
msg : string[59]
"Modbus [TCP@192.168.10.11:502 default Unit-Id: 1] activated"
15/12/2023, 09:22:44node: Herz
msg : string[58]
"Modbus [TCP@192.168.10.11:502 default Unit-Id: 1] queueing"
15/12/2023, 09:22:44node: Herz
msg : string[57]
"Modbus [TCP@192.168.10.11:502 default Unit-Id: 1] sending"
15/12/2023, 09:22:44node: Herz
msg : string[59]
"Modbus [TCP@192.168.10.11:502 default Unit-Id: 1] activated"
15/12/2023, 09:22:44node: Herz
msg : string[58]
"Modbus [TCP@192.168.10.11:502 default Unit-Id: 1] queueing"
15/12/2023, 09:22:44node: Herz
msg : string[57]
"Modbus [TCP@192.168.10.11:502 default Unit-Id: 1] sending"
15/12/2023, 09:22:44node: Herz
msg : string[59]
"Modbus [TCP@192.168.10.11:502 default Unit-Id: 1] activated"
15/12/2023, 09:22:44node: Herz
msg : string[58]
"Modbus [TCP@192.168.10.11:502 default Unit-Id: 1] queueing"
15/12/2023, 09:22:44node: Herz
msg : string[57]
"Modbus [TCP@192.168.10.11:502 default Unit-Id: 1] sending"
15/12/2023, 09:22:44node: Herz
msg : string[59]
"Modbus [TCP@192.168.10.11:502 default Unit-Id: 1] activated"
15/12/2023, 09:22:44node: Herz
msg : string[58]
"Modbus [TCP@192.168.10.11:502 default Unit-Id: 1] queueing"
15/12/2023, 09:22:44node: Herz
msg : string[57]
"Modbus [TCP@192.168.10.11:502 default Unit-Id: 1] sending"
15/12/2023, 09:22:44node: Herz
msg : string[57]
"Modbus [TCP@192.168.10.11:502 default Unit-Id: 1] sending"
15/12/2023, 09:22:44node: Herz
msg : string[59]
"Modbus [TCP@192.168.10.11:502 default Unit-Id: 1] activated"
15/12/2023, 09:22:46node: debug 1
HERZ/BUFFER_MIDDLE : msg.payload : Object
{ HERZ/BOILER_POWER: 85, HERZ/O2_ACTUAL: 8.3, HERZ/BUFFER_TOP: 75.2, HERZ/BUFFER_BOTTOM: 64.7, HERZ/BUFFER_MIDDLE: 74.9 }
**15/12/2023, 09:22:55node: Herz**
msg : string[58]
"Modbus [TCP@192.168.10.11:502 default Unit-Id: 1] queueing"
15/12/2023, 09:22:55node: Herz
msg : string[57]
"Modbus [TCP@192.168.10.11:502 default Unit-Id: 1] sending"
15/12/2023, 09:22:55node: Herz
msg : string[57]
"Modbus [TCP@192.168.10.11:502 default Unit-Id: 1] sending"
15/12/2023, 09:22:55node: Herz
msg : string[57]
"Modbus [TCP@192.168.10.11:502 default Unit-Id: 1] sending"
15/12/2023, 09:22:55node: Herz
msg : string[57]
"Modbus [TCP@192.168.10.11:502 default Unit-Id: 1] sending"
15/12/2023, 09:22:55node: Herz
msg : string[57]
"Modbus [TCP@192.168.10.11:502 default Unit-Id: 1] sending"
15/12/2023, 09:22:55node: Herz
msg : string[56]
"Modbus [TCP@192.168.10.11:502 default Unit-Id: 1] failed"
15/12/2023, 09:22:55node: Herz
msg : string[80]
"Modbus [TCP@192.168.10.11:502 default Unit-Id: 1] fsm failed state after sending"
15/12/2023, 09:22:55node: Modbus Con
msg : string[31]
"Modbus Failure On State sending"
15/12/2023, 09:22:55node: Herz
msg : string[56]
"Modbus [TCP@192.168.10.11:502 default Unit-Id: 1] broken"
15/12/2023, 09:22:55node: Herz
msg : string[79]
"Modbus [TCP@192.168.10.11:502 default Unit-Id: 1] fsm broken state after failed"
15/12/2023, 09:22:55node: Herz
msg : string[62]
"Modbus [TCP@192.168.10.11:502 default Unit-Id: 1] reconnecting"
15/12/2023, 09:22:55node: Herz
msg : string[82]
"Modbus [TCP@192.168.10.11:502 default Unit-Id: 1] fsm reconnect state after broken"
15/12/2023, 09:22:55node: Modbus Con
msg : error
"Error: Port Not Open"
15/12/2023, 09:22:55node: Herz
msg : string[62]
"Modbus [TCP@192.168.10.11:502 default Unit-Id: 1] reconnecting"
15/12/2023, 09:22:55node: Herz
msg : string[62]
"Modbus [TCP@192.168.10.11:502 default Unit-Id: 1] reconnecting"
15/12/2023, 09:22:57node: Herz
msg : string[54]
"Modbus [TCP@192.168.10.11:502 default Unit-Id: 1] init"
15/12/2023, 09:22:57node: Herz
msg : string[83]
"Modbus [TCP@192.168.10.11:502 default Unit-Id: 1] fsm init state after reconnecting"
15/12/2023, 09:22:57node: Herz
msg : string[69]
"Modbus [TCP@192.168.10.11:502 default Unit-Id: 1] fsm init in 2000 ms"
15/12/2023, 09:22:59node: Herz
msg : string[71]
"Modbus [TCP@192.168.10.11:502 default Unit-Id: 1] connection close sent"
15/12/2023, 09:22:59node: Herz
msg : string[58]
"Modbus [TCP@192.168.10.11:502 default Unit-Id: 1] TCP port"
15/12/2023, 09:22:59node: Herz
msg : string[59]
"Modbus [TCP@192.168.10.11:502 default Unit-Id: 1] connected"
15/12/2023, 09:22:59node: Herz
msg : string[80]
"Modbus [TCP@192.168.10.11:502 default Unit-Id: 1] fsm connected after state init"

Network Environment: Could you describe your network setup? This includes any routers, converters, or other devices between your Node-RED instance and the Modbus equipment.

No converters, connected via network switch, other applications eg (RMMS) read the device fine, VNC to boiler also working.

bitpool-dev commented 11 months ago

Hi @HarvUK

Thanks for submitting this bug report, I'm not aware of this specific issue occurring before, but we'll take a closer look and get back to you shortly.

bitpool-dev commented 9 months ago

Hi @HarvUK Apologies for the delay, when you get the opportunity, the recent update has a work around that hopefully gets your device communicating a bit more reliably. We were able to replicate a similar issue in the office that the fix resolves, will be interested to see if it is the same issue you are facing.