ModbusTCP on node-red is it possible for 50 devices?

Hello everyone here already implemented modbus on our Node-Red? I have 50 modbus devices, and I want to get connected on it via Modbus using Node-Red, I have concern in terms of processing and reliability of the system, does Node-Red can accomodate this 50 devices? Assuming every second I gathered atleast 5 modbus data (holding registers). I am running Node-Red on PI.

could you solve it? today I need this solution

Have you tried to add 50 devices? There is nothing stopping you.

have a problem because node-red is running on equipment that has two rs 485 ports, each rs 485 port has 50 temperature measurement devices, and each temperature device has its different ID in this network, so I need to see the possibility of only one on modbus, being able to read all 50 devices on the rs 485 network, and forwarding via MQTT to my server, and on the server I do the dashboards and other things.
example on the server I will be reading the 50 temperatures that each equipment is reporting.
I created the 50 in MODBUS Read-Node but my equipment cannot process so much information so the dashboards consume a lot of processing

Hi, I cant quite understand.

Are you saying you have 1 DEVICE doing both MODBUS and DASHBOARD?

or

Are you saying you want to change to 1 DEVICE doing MODBUS and separate server doing DASHBOARD?

What part do you have a problem with?

MODBUS and separate server using DASHBOARD

You have "MODBUS and separate server using DASHBOARD" ?
-OR-
You want to change to "MODBUS and separate server using DASHBOARD"?


Which is it?
And what is your question / what part of that are you stuck with?

Hi,

Does your device with RS485 port can accomodate 50 devices in daisy chain connections? I believe there is a limitation for RS485 network.

And also, if I we're you, I'd radther use a Modbus serial to ModbusTCP converter, and from there I can now use the ModbusTCP easily.

Regards,
Henjow

I was able to find a solution now I need to read each msg.payload that came out of MODBUS Flex Getter each device that was connected has its ID

[{"id":"53947412.23a0ec","type":"modbus-flex-getter","z":"5e1c3b54.f56b94","name":"Caldeira","showStatusActivities":false,"server":"122cb0c8.19f0bf","x":555.5555801391602,"y":30.000014305114746,"wires":[["6f4e8922.dcf638"],[]]},{"id":"881b523.2da9db","type":"inject","z":"5e1c3b54.f56b94","name":"","topic":"","payload":"true","payloadType":"bool","repeat":"","crontab":"","once":false,"x":84.4444465637207,"y":31.111114501953125,"wires":[["9860bb87.524db8","85990c6a.f6d51","c14b373e.b7e1c8","9dee0853.f477d8","8aaf7946.afad88","b188aefc.65f9b"]]},{"id":"9860bb87.524db8","type":"function","z":"5e1c3b54.f56b94","name":"F/ Pressão Agua 90 ºC","func":"msg.payload = {\n 'value' : msg.payload,\n 'fc' : 3,\n 'unitid' : 2,\n 'address' : 1,\n 'quantity' : 1\n};\n\nreturn msg;","outputs":"1","noerr":0,"x":336.66666412353516,"y":29.999996185302734,"wires":[["53947412.23a0ec"]]},{"id":"66086fee.6c49c","type":"mqtt out","z":"5e1c3b54.f56b94","name":"","topic":"","qos":"","retain":"","x":812.2222747802734,"y":65.55555534362793,"wires":[]},{"id":"6f4e8922.dcf638","type":"debug","z":"5e1c3b54.f56b94","name":"","active":false,"console":"false","complete":"false","x":831.1110763549805,"y":24.44444465637207,"wires":[]},{"id":"85990c6a.f6d51","type":"function","z":"5e1c3b54.f56b94","name":"F/ Temp Agua 90 ºC","func":"msg.payload = {\n 'value' : msg.payload,\n 'fc' : 3,\n 'unitid' : 1,\n 'address' : 1,\n 'quantity' : 1\n};\n\nreturn msg;","outputs":1,"noerr":0,"x":336.6666717529297,"y":65.55554819107056,"wires":[["53947412.23a0ec"]]},{"id":"c14b373e.b7e1c8","type":"function","z":"5e1c3b54.f56b94","name":"F/ Pressão_Caldeira_Santana","func":"msg.payload = {\n 'value' : msg.payload,\n 'fc' : 3,\n 'unitid' : 3,\n 'address' : 1,\n 'quantity' : 1\n};\n\nreturn msg;","outputs":1,"noerr":0,"x":343.33338165283203,"y":101.11110782623291,"wires":[["53947412.23a0ec"]]},{"id":"9dee0853.f477d8","type":"function","z":"5e1c3b54.f56b94","name":"F/ Pressão Caldeira Santa Fé","func":"msg.payload = {\n 'value' : msg.payload,\n 'fc' : 3,\n 'unitid' : 10,\n 'address' : 1,\n 'quantity' : 1\n};\n\nreturn msg;","outputs":1,"noerr":0,"x":343.33338928222656,"y":137.77776336669922,"wires":[["53947412.23a0ec"]]},{"id":"8aaf7946.afad88","type":"function","z":"5e1c3b54.f56b94","name":"F/ Corrente Motor Bomba 1","func":"msg.payload = {\n 'value' : msg.payload,\n 'fc' : 3,\n 'unitid' : 7,\n 'address' : 3,\n 'quantity' : 1\n};\n\nreturn msg;","outputs":1,"noerr":0,"x":339.99999237060547,"y":173.33330726623535,"wires":[["53947412.23a0ec"]]},{"id":"b188aefc.65f9b","type":"function","z":"5e1c3b54.f56b94","name":"F/ Corrente Motor Bomba 2","func":"msg.payload = {\n 'value' : msg.payload,\n 'fc' : 3,\n 'unitid' : 6,\n 'address' : 3,\n 'quantity' : 1\n};\n\nreturn msg;","outputs":1,"noerr":0,"x":338.8888397216797,"y":208.88886642456055,"wires":[["53947412.23a0ec"]]},{"id":"122cb0c8.19f0bf","type":"modbus-client","z":"","name":"Mod-Bus Caldeira E.T.A","clienttype":"simpleser","bufferCommands":true,"stateLogEnabled":false,"tcpHost":"127.0.0.1","tcpPort":"502","tcpType":"DEFAULT","serialPort":"/dev/ttyAP0","serialType":"RTU-BUFFERD","serialBaudrate":"9600","serialDatabits":"8","serialStopbits":"1","serialParity":"none","serialConnectionDelay":"100","unit_id":"","commandDelay":"1","clientTimeout":"2000","reconnectTimeout":"2000"}]

You can use the switch node to separate items out - however, you will need 50 entries.
Before you go down that path what do you want to do with the values? What is the end goal?

PS, i would not recommend triggering modbus in parallel like you are - there will be a point where it drops inputs or simply crashes (I have seen this)

PS,

  1. Take some time out to watch this playlist: Node-RED Essentials. The videos are done by the developers of node-red. They're nice & short and to the point. You will understand a whole lot more in about 1 hour. A small investment for a lot of gain.

  2. Also, read this info "how to get data from a message"...
    Working with messages : Node-RED

:arrow_up: these 2 pieces of information will help you greatly.

Before following this path, what do you want to do with the values? What is the ultimate goal? = I need to get all the numerical values ​​and send them to the mysql server database and a gauge graphs / chart creating a dashboard, if you have a better idea please guide me.

I would suggest you keep the modbus reading device simple & lightweight.

MODBUS device...

  • Sequence the MODBUS reads (to reduce parralel activities)
  • Parse the values into nice objects*
  • Send to MQTT
    --- END ---

SERVER...

  • Subscribe to MQTT values
  • Save in database
  • Build dashboard.

*As for parsing the values the raw INT values into something meaningful for sending over MQTT, I recommend you look at node-red-contrib-buffer-parser

OK thank you

Good afternoon! I am returning with the development of our application with nod-red, I have been watching the videos as you recommend me, on the modbus device I have it was not possible to do the Analysis of the values ​​on legal objects * using the contrib-buffer-parser as it was not possible do the installation on the MODBUS Device, would you have another idea of ​​how to be able to name each variable and then send via mqtt to the server and on the server put a gauge for each variable that was named?
Each variable has its different ID I think it could be used as identification

[{"id":"5e1c3b54.f56b94","type":"tab","label":"Utilidades Caldeira","disabled":false,"info":""},{"id":"53947412.23a0ec","type":"modbus-flex-getter","z":"5e1c3b54.f56b94","name":"Caldeira","showStatusActivities":false,"server":"122cb0c8.19f0bf","x":776.0000228881836,"y":312.00000953674316,"wires":[["e708b69b.97bf08","7e9554f2.18a94c"],["6f4e8922.dcf638"]]},{"id":"881b523.2da9db","type":"inject","z":"5e1c3b54.f56b94","name":"","topic":"","payload":"true","payloadType":"bool","repeat":"","crontab":"","once":false,"x":81.56749725341797,"y":305.0396976470947,"wires":[["9860bb87.524db8","85990c6a.f6d51","c14b373e.b7e1c8","9dee0853.f477d8","8aaf7946.afad88","b188aefc.65f9b","c2b28.d26364d8","edea4e00.1247a","bbee1dd9.b9803","2976c765.216be8","62fa0da.bdbe7f4","dd154c4e.87e8","a8881c9a.211d9","ee528db6.5074d","f7acb64d.61dd28","3c0814e6.480f5c","c7543a3e.1bd948","77a608ab.dd5158","b02ded41.1043","1aac7a72.309fa6","83e4937c.d8212"]]},{"id":"9860bb87.524db8","type":"function","z":"5e1c3b54.f56b94","name":"F/ Pressão Agua 90 ºC","func":"msg.payload = {\n    'value' : msg.payload,\n    'fc' : 3,\n    'unitid' : 1,\n    'address' : 1,\n    'quantity' : 1\n};\n\nreturn msg;","outputs":"1","noerr":0,"x":340,"y":20,"wires":[["53947412.23a0ec"]]},{"id":"6f4e8922.dcf638","type":"debug","z":"5e1c3b54.f56b94","name":"","active":false,"console":"false","complete":"false","x":1068.5514945983887,"y":547.1428241729736,"wires":[]},{"id":"85990c6a.f6d51","type":"function","z":"5e1c3b54.f56b94","name":"F/ Temp Agua 90 ºC","func":"msg.payload = {\n    'value' : msg.payload,\n    'fc' : 3,\n    'unitid' : 2,\n    'address' : 1,\n    'quantity' : 1\n};\n\nreturn msg;","outputs":1,"noerr":0,"x":336.1111831665039,"y":91.2500057220459,"wires":[["53947412.23a0ec"]]},{"id":"c14b373e.b7e1c8","type":"function","z":"5e1c3b54.f56b94","name":"F/ Pressão Caldeira Santana","func":"msg.payload = {\n    'value' : msg.payload,\n    'fc' : 3,\n    'unitid' : 3,\n    'address' : 1,\n    'quantity' : 1\n};\n\nreturn msg;","outputs":1,"noerr":0,"x":324.0278625488281,"y":161.11112117767334,"wires":[["53947412.23a0ec"]]},{"id":"9dee0853.f477d8","type":"function","z":"5e1c3b54.f56b94","name":"F/ Pressão Caldeira Santa Fé","func":"msg.payload = {\n    'value' : msg.payload,\n    'fc' : 3,\n    'unitid' : 10,\n    'address' : 1,\n    'quantity' : 1\n};\n\nreturn msg;","outputs":1,"noerr":0,"x":332.7778625488281,"y":267.7777795791626,"wires":[["53947412.23a0ec"]]},{"id":"8aaf7946.afad88","type":"function","z":"5e1c3b54.f56b94","name":"F/ Corrente Motor Bomba 1","func":"msg.payload = {\n    'value' : msg.payload,\n    'fc' : 3,\n    'unitid' : 7,\n    'address' : 3,\n    'quantity' : 1\n};\n\nreturn msg;","outputs":1,"noerr":0,"x":330.6944885253906,"y":339.5833206176758,"wires":[["53947412.23a0ec"]]},{"id":"b188aefc.65f9b","type":"function","z":"5e1c3b54.f56b94","name":"F/ Corrente Motor Bomba 2","func":"msg.payload = {\n    'value' : msg.payload,\n    'fc' : 3,\n    'unitid' : 6,\n    'address' : 3,\n    'quantity' : 1\n};\n\nreturn msg;","outputs":1,"noerr":0,"x":332.08331298828125,"y":446.3888931274414,"wires":[["53947412.23a0ec"]]},{"id":"c2b28.d26364d8","type":"function","z":"5e1c3b54.f56b94","name":"F/ Set Point Pressão Agua 90 ºC","func":"msg.payload = {\n    'value' : msg.payload,\n    'fc' : 3,\n    'unitid' : 1,\n    'address' : 0,\n    'quantity' : 1\n};\n\nreturn msg;","outputs":1,"noerr":0,"x":335.00000762939453,"y":55.00000190734863,"wires":[["53947412.23a0ec"]]},{"id":"edea4e00.1247a","type":"function","z":"5e1c3b54.f56b94","name":"F/ Set Point Temp Agua 90 ºC","func":"msg.payload = {\n    'value' : msg.payload,\n    'fc' : 3,\n    'unitid' : 2,\n    'address' : 0,\n    'quantity' : 1\n};\nreturn msg;","outputs":1,"noerr":0,"x":333.75000762939453,"y":126.25000190734863,"wires":[["53947412.23a0ec"]]},{"id":"bbee1dd9.b9803","type":"function","z":"5e1c3b54.f56b94","name":"F/ Set Point Pressão Caldeira Santana","func":"msg.payload = {\n    'value' : msg.payload,\n    'fc' : 3,\n    'unitid' : 3,\n    'address' : 0,\n    'quantity' : 1\n};\nreturn msg;","outputs":1,"noerr":0,"x":335,"y":197.50000381469727,"wires":[["53947412.23a0ec"]]},{"id":"2976c765.216be8","type":"function","z":"5e1c3b54.f56b94","name":"F/ Temp Caldeira Santana","func":"msg.payload = {\n    'value' : msg.payload,\n    'fc' : 3,\n    'unitid' : 4,\n    'address' : 0,\n    'quantity' : 1\n};\nreturn msg;","outputs":1,"noerr":0,"x":336.25000762939453,"y":232.50000381469727,"wires":[["53947412.23a0ec"]]},{"id":"1aac7a72.309fa6","type":"function","z":"5e1c3b54.f56b94","name":"F/ Set Point Pressão Caldeira Santa Fé\t","func":"msg.payload = {\n    'value' : msg.payload,\n    'fc' : 3,\n    'unitid' : 10,\n    'address' : 0,\n    'quantity' : 1\n};\nreturn msg;","outputs":1,"noerr":0,"x":337.5,"y":303.75000381469727,"wires":[["53947412.23a0ec"]]},{"id":"62fa0da.bdbe7f4","type":"function","z":"5e1c3b54.f56b94","name":"F/ Status Bomba 1 Agua 90 ºC","func":"msg.payload = {\n    'value' : msg.payload,\n    'fc' : 3,\n    'unitid' : 7,\n    'address' : 6,\n    'quantity' : 1\n};\nreturn msg;","outputs":1,"noerr":0,"x":332.5,"y":376.2500057220459,"wires":[["53947412.23a0ec"]]},{"id":"dd154c4e.87e8","type":"function","z":"5e1c3b54.f56b94","name":"F/ Velocidade Bomba 1","func":"msg.payload = {\n    'value' : msg.payload,\n    'fc' : 3,\n    'unitid' : 7,\n    'address' : 2,\n    'quantity' : 1\n};\nreturn msg;","outputs":1,"noerr":0,"x":335,"y":411.2500057220459,"wires":[["53947412.23a0ec"]]},{"id":"a8881c9a.211d9","type":"function","z":"5e1c3b54.f56b94","name":"F/ Status Bomba 2 Agua 90 ºC","func":"msg.payload = {\n    'value' : msg.payload,\n    'fc' : 3,\n    'unitid' : 6,\n    'address' : 6,\n    'quantity' : 1\n};\nreturn msg;","outputs":1,"noerr":0,"x":333.75,"y":481.25000762939453,"wires":[["53947412.23a0ec"]]},{"id":"ee528db6.5074d","type":"function","z":"5e1c3b54.f56b94","name":"F/ Velocidade Bomba 2","func":"msg.payload = {\n    'value' : msg.payload,\n    'fc' : 3,\n    'unitid' : 6,\n    'address' : 2,\n    'quantity' : 1\n};\nreturn msg;","outputs":1,"noerr":0,"x":333.75000762939453,"y":516.2500076293945,"wires":[["53947412.23a0ec"]]},{"id":"3c0814e6.480f5c","type":"function","z":"5e1c3b54.f56b94","name":"F/ Vazão Inst Caldeira","func":"msg.payload = {\n    'value' : msg.payload,\n    'fc' : 3,\n    'unitid' : 8,\n    'address' : 0,\n    'quantity' : 1\n};\nreturn msg;","outputs":1,"noerr":0,"x":335.00000762939453,"y":550.0000076293945,"wires":[["53947412.23a0ec"]]},{"id":"f7acb64d.61dd28","type":"function","z":"5e1c3b54.f56b94","name":"F/ Vazão Total Caldeira","func":"msg.payload = {\n    'value' : msg.payload,\n    'fc' : 3,\n    'unitid' : 8,\n    'address' : 16,\n    'quantity' : 1\n};\nreturn msg;","outputs":1,"noerr":0,"x":333.75000762939453,"y":583.7500085830688,"wires":[["53947412.23a0ec"]]},{"id":"c7543a3e.1bd948","type":"function","z":"5e1c3b54.f56b94","name":"F/ Vazão Inst Industria","func":"msg.payload = {\n    'value' : msg.payload,\n    'fc' : 3,\n    'unitid' : 9,\n    'address' : 0,\n    'quantity' : 1\n};\nreturn msg;","outputs":1,"noerr":0,"x":336.25,"y":617.5000095367432,"wires":[["53947412.23a0ec"]]},{"id":"77a608ab.dd5158","type":"function","z":"5e1c3b54.f56b94","name":"F/ Vazão Total Industria","func":"msg.payload = {\n    'value' : msg.payload,\n    'fc' : 3,\n    'unitid' : 9,\n    'address' : 16,\n    'quantity' : 1\n};\nreturn msg;","outputs":1,"noerr":0,"x":337.50000762939453,"y":652.5000095367432,"wires":[["53947412.23a0ec"]]},{"id":"b02ded41.1043","type":"function","z":"5e1c3b54.f56b94","name":"F/ Temp Entrada Agua 90ºC","func":"msg.payload = {\n    'value' : msg.payload,\n    'fc' : 3,\n    'unitid' : 15,\n    'address' : 1,\n    'quantity' : 1\n};\nreturn msg;","outputs":1,"noerr":0,"x":340.00000762939453,"y":687.5000095367432,"wires":[["53947412.23a0ec"]]},{"id":"e708b69b.97bf08","type":"mqtt out","z":"5e1c3b54.f56b94","name":"","topic":"MQTT_Caldeira_Out","qos":"2","retain":"","broker":"e52a2dff.81373","x":1374.857292175293,"y":311.57142066955566,"wires":[]},{"id":"7e9554f2.18a94c","type":"debug","z":"5e1c3b54.f56b94","name":"","active":true,"console":"false","complete":"payload","x":1077.1428451538086,"y":90.0000057220459,"wires":[]},{"id":"83e4937c.d8212","type":"function","z":"5e1c3b54.f56b94","name":"F/ Temp Reservatorio de Agua ","func":"msg.payload = {\n    'value' : msg.payload,\n    'fc' : 3,\n    'unitid' : 11,\n    'address' : 0,\n    'quantity' : 1\n};\nreturn msg;","outputs":1,"noerr":0,"x":339,"y":721,"wires":[["53947412.23a0ec"]]},{"id":"122cb0c8.19f0bf","type":"modbus-client","z":"","name":"Mod-Bus Caldeira E.T.A","clienttype":"simpleser","bufferCommands":true,"stateLogEnabled":true,"tcpHost":"127.0.0.1","tcpPort":"502","tcpType":"DEFAULT","serialPort":"/dev/ttyAP0","serialType":"RTU-BUFFERD","serialBaudrate":"9600","serialDatabits":"8","serialStopbits":"1","serialParity":"none","serialConnectionDelay":"100","unit_id":"","commandDelay":1,"clientTimeout":10000,"reconnectTimeout":1000},{"id":"e52a2dff.81373","type":"mqtt-broker","z":"","broker":"10.254.164.16","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"willTopic":"","willQos":"0","willPayload":"","birthTopic":"","birthQos":"0","birthPayload":""}]

What do you mean by this...

... are you not able to install buffer-parser?

  • What device is node-red running on?
  • What version of nodejs?
  • What version of node-red?

1st recommendation ...

  • Dont do parallel requests to modbus if possible. I have seen issues with sending multiple read requests in parallel.
    Wire the requests in series or use a queue to do requests sequentially

2nd recommendation...

  • Group your requests together. (Dont request 1 item at a time)
    e.g. If you want UINT1 Address 0 and Address 1, then read 2 values from Address 0.
    This will 1/2 the amount of Modbus POLLs

Versão Nod-red

image

what would it be like to connect requests in series or use a queue to make requests sequentially? would you have to use the modbus read-node?

Wow. That's about 4y old. I'm surprised the modbus nodes work (unless you're using very old version).

Can you update to v1 or greater?

Can you also answer other questions?

yes, i will be updating

in my case I have to consult 10 devices with different ID and different addresses
example temperature A; Device ID 1 Address 0
Device ID 2
Address 0
Device ID 3
Address 2
Device ID 9
Address 13