I'm trying to establish a communication between Node-Red and a SMA Sunny Tripower Inverter using Modbus TCP/IP. I'm using the node-red-contrib-modbus to establish Modbus communication. I think I was able to configure the Read Modbus node correctly and I'm getting no errors in the communication. However, this node keeps on reconnecting a lot (I tried playing with the polling rate, but I get the same behavior regardless of the value - I tried 1 second and 20 seconds). And I think because of this, Node-Red is not able to read all the parameters that I need. I'm trying to read 20 parameters, but I only get values for 4 parameters. I have one Read Modbus node for every parameter (I'm not reading in bulk). For every parameter, I have to read 2 addresses.
I already verified the Modbus map of the inverter and it's right. I used a Modbus Master Simulator to verify if the inverter could communicate correctly via Modbus and it was successful, so I think the error is in Node-Red.
Could anyone offer any insight in this matter?
I used the Node-Red in debug mode to see if I could find anything in the messages being sent that could explain the problem. When I did that, I noticed that, although I still get the reconnecting message in the Modbus Read node, I was able to get values for all the nodes (all twenty parameters). But when I run Node-Red in the normal mode, I can only read values for 4 parameters. So I can't use the debug mode to figure out what's wrong because in the debug mode it runs ok.
Does anyone have any insight?
That sounds as if it might be timing. I believe you said the flow asks for the parameters one at a time and have tried various timings between them. Have you put a debug node in and set the interval to a large value such as 5 seconds and checked that it is actually asking for them one at a time and not trying to get them too fast?