ModBus TCP Read 32-bit registers

Hi Iridiu, a quick tip that can help a lot on troubleshooting. Give each node a meaningful name. By doing that it will be possible to associate the error message in the debug panel with the node that generated the message. Also adding a debug node (also named) will be helpful.

For instance:

I suggest you to troubleshoot each troubled modbus reading in separate. It will give you some work but at the end of the day it may be worthwhile. One possible way to do that is by breaking the wiring from the modbus nodes to their functions, leaving only one active (the one that you want to troubleshoot).

I am pretty sure that the readings are ok. It is just a matter of using the right bytes and doing the right manipulation and formatting. Let me give you an example. The temperature manipulation is straightforward (once you use the correct bytes). If the value read is 480 then you all you have to do is to display this value divided by 10 (can be done easily in the ui_gauge node).

1 Like

Hi Iridiu,

I see an issue. You have to connect the function nodes always to the second output of the modbus nodes. For instance, the function node below needs to be rewired to the other output of the modbus node.

2 Likes

Hi @Andrei, following your indications I've managed to make the nodes work correctly, thank you very much!

Hi Iridiu, thanks to @PKGeorgiev that provided the solution in fact.

it was a nice use case to practice using the modbus node. A final remark: see that it is still necessary some extra data manipulation to get the correct IP address.

1 Like

Yes, I'm looking for a solution to get correct IP data

Perhaps you could use below function as a starting point. You have a pair of numbers in the registers 139 and 140. Each one of them will convert to a pair of numbers that form the IP address.

For instance:
register 139 = 32322
register 140 = 35626

Will result in :
01111110 01000010 = 126.66
10001011 00101010 = 139.42

[{"id":"363fd71.fbd6f28","type":"tab","label":"Flow 16","disabled":false,"info":""},{"id":"24df2b6d.4b87e4","type":"inject","z":"363fd71.fbd6f28","name":"","topic":"","payload":"35626","payloadType":"num","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":270,"y":140,"wires":[["4d7bf.17df8842"]]},{"id":"4d7bf.17df8842","type":"function","z":"363fd71.fbd6f28","name":"Converttoip","func":"function converttoip(r){\nlet br = r.toString(2);\nlet a = parseInt(br.slice(0,-8),2);\nlet b = parseInt(br.slice(-8),2);\nreturn `${a}.${b}`\n}\n\nmsg.payload = converttoip(msg.payload);\nreturn msg;","outputs":1,"noerr":0,"x":440,"y":140,"wires":[["c21be26f.88ae8"]]},{"id":"c21be26f.88ae8","type":"debug","z":"363fd71.fbd6f28","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":610,"y":140,"wires":[]}]

This is my network diagram:

Dashboard

So my current WAN IP address is 192.168.0.106, mobile network is a backup network, and this is data received fom modbus-read-node
F%C4%83r%C4%83%20titlu2

Good, in such case below (patched) code should work.

I did it based on your feedback and therefore this time the function node has to be connected in the first output of the modbus node.

[{"id":"9221b509.4f3348","type":"function","z":"363fd71.fbd6f28","name":"Read and convert to IP","func":"function converttoip(r){\nlet br = r.toString(2);\nlet padding = \"0\".repeat(16-br.length);\nbr = padding+br;\nlet a = parseInt(br.slice(0,-8),2);\nlet b = parseInt(br.slice(-8),2);\nreturn `${a}.${b}`\n}\n\n\n// Create new Buffer based on array bytes\nlet value1 = msg.payload.responseBuffer.data[0]\nlet value2 = msg.payload.responseBuffer.data[1]\n\n\nmsg.payload = converttoip(value1) + \".\"+converttoip(value2);\n\nreturn msg;","outputs":1,"noerr":0,"x":480,"y":320,"wires":[["3d1f5c79.3600a4"]]},{"id":"3d1f5c79.3600a4","type":"debug","z":"363fd71.fbd6f28","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":730,"y":320,"wires":[]}]

Hi @Andrei, I have tried the function, but with no succes, but with the knowledge I have accumulated so far, I have succeeded in displaying the IP address, so to get the WAN IP address from the received response, the values of both registers must be readed from buffer into 8-bit segments, so I translated each individual segment

// Create new Buffer based on array bytes
const buf = Buffer.from(msg.payload.buffer);
const value1 = buf.readUInt8(0);
const value2 = buf.readUInt8(1);
const value3 = buf.readUInt8(2);
const value4 = buf.readUInt8(3);
msg.payload = [value1, value2, value3, value4];

return msg;

Hi @iridiu,

Well done! The solution you found is simple and effective. I really appreciate as now I could learn from you exactly how the buffer structure works for the Modbus node. Thank you very much.

2 Likes

I'm curious why the first output of modbus-read node returns an array of 16bit numbers given that most of the post operations (i.e. converting to numbers, IP addresses etc.) are byte oriented i.e. the raw byte buffer is used the most? What would be the use case for Output1?

1 Like

Hello guys, I was reading this topic and I saw that you were talking about converting a 16-bit variable to 32 .. I have a problem, I need to turn a 16-bit variable into 64-bit .. I need together the parts of a vector of 4 positions and contact this information for me to arrive at my actual information. Could you help me?

Can you explain in detail what you mean by that? Give an example of what you have and what you want to end up with. Remember this thread is about reading 32 bit modbus registers.

@eduardotodero I usually create a new Uint16Array with the 16-bit values and then create a Float64Array with the Uint16Array's buffer:

var ui16a = new Uint16Array([1,2,3,4]); // your 16-bit integers here
var fl64a = new Float64Array(ui16a.buffer);
console.log(fl64a[0]);

Or, if you need more flexibility, get familiar with DataView, specifically you would end up using: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView/getFloat64

Edit: missed if you were talking about 64-bit integers or floating-point numbers -- in any case, you can use typed arrays: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Typed_arrays to do what you want. You may want to create a Int64Array, for example. With these, you can convert an entire block of a certain type in one shot.

2 Likes

I am using a Siemens PAC 2200 device that reads information from the mains such as voltage, current, etc. The manual for this device tells you the registers sent by MODBUS, some of them Float type and some Double type. Float-type ones I can read quietly. But the Double type I can not. Following are some images to better exemplify.

nodered PAC2200 The nod-red image I get an array of 4 values, and I need to turn this value into real information, as you can see in the other figure.

Does @thatcadguy's idea work?

As far as I can see from an internal document the PAC2200 power meter features the same registers for Modbus as the PAC3200. Because there were and are still problems with supporting 64bit floatsn many data acquisition packages they created an new set of 32 bit floats for the Energy values. I don't have a PAC2200 on hand to verify this but in the PAC3200 the attached registers are used. A simple test should allow to verify if they are present in the PAC2200 in case you want to avoid the 64bit conversion .
Capture

Dear iridiu,

we are also using the teltonika rut955 and i have to cellect data from the router.
I saw you did a great job with node-red an i want to ask you if you could share/post your final flow on this platform. I think some people would be very happy about that!

THX!
Christian

Hi c.hinterdorfer,

This is a working flow for Teltonika RUT240 wich is very similar to RUT955, and is a starting point.
To read GPS data from RUT955 was very hard... And I had an AVL parser/decoder in Node-Red, but now you can read that info with Modbus TCP :slight_smile:
I'm sure you can adapt this flow for RUT955.

[{"id":"81879cd5.08b26","type":"function","z":"fca65c59.c8674","name":"Current SIM card","func":"// Create new Buffer based on array bytes\nconst buf = Buffer.from(msg.payload.buffer);\n\n// Convert bytes to string\nconst value = buf.toString('ascii');\n    \n// Save the value\nmsg.payload = value;\n\nreturn msg;","outputs":1,"noerr":0,"x":550,"y":206,"wires":[["1eb738c8.26c067"]]},{"id":"6fd38a1f.6f58c4","type":"function","z":"fca65c59.c8674","name":"System uptime","func":"// Create new Buffer based on array bytes\nconst buf = Buffer.from(msg.payload.buffer);\n\n// Represent these bytes as 32-bit unsigned int\nconst value = buf.readInt32BE();\n\n// save the value\nmsg.payload = value;\nreturn msg;","outputs":1,"noerr":0,"x":540,"y":86,"wires":[["ac5bbac5.d986b8"]]},{"id":"56672571.1021ec","type":"function","z":"fca65c59.c8674","name":"GSM signal strength (dBm)","func":"// Create new Buffer based on array bytes\nconst buf = Buffer.from(msg.payload.buffer);\n\n// Represent these bytes as 32-bit unsigned int\nconst value = buf.readInt32BE();\n\n// save the value\nmsg.payload = value;\n\nreturn msg;","outputs":1,"noerr":0,"x":580,"y":126,"wires":[["f579b6c1.a96f98"]]},{"id":"c3d1adf5.066af","type":"function","z":"fca65c59.c8674","name":"GSM operator name","func":"// Create new Buffer based on array bytes\nconst buf = Buffer.from(msg.payload.buffer);\n\n// Convert bytes to string\nconst value = buf.toString('ascii');\n    \n// Save the value\nmsg.payload = value;\n\nreturn msg;","outputs":1,"noerr":0,"x":560,"y":166,"wires":[["886c0b7d.ffaa38"]]},{"id":"f579b6c1.a96f98","type":"ui_gauge","z":"fca65c59.c8674","name":"","group":"334e1001.37fb2","order":0,"width":0,"height":0,"gtype":"gage","title":"Signal strength","label":"dBm","format":"{{value}}","min":"-100","max":"0","colors":["#ff0000","#ffff00","#00ff00"],"seg1":"-90","seg2":"-70","x":1080,"y":126,"wires":[]},{"id":"886c0b7d.ffaa38","type":"ui_text","z":"fca65c59.c8674","group":"334e1001.37fb2","order":0,"width":0,"height":0,"name":"","label":"Operator GSM","format":"{{msg.payload}}","layout":"row-spread","x":1080,"y":166,"wires":[]},{"id":"1eb738c8.26c067","type":"ui_text","z":"fca65c59.c8674","group":"334e1001.37fb2","order":0,"width":0,"height":0,"name":"","label":"Current SIM card","format":"{{msg.payload}}","layout":"row-spread","x":1070,"y":206,"wires":[]},{"id":"105c5b0d.fdeb55","type":"function","z":"fca65c59.c8674","name":"Network registration","func":"// Create new Buffer based on array bytes\nconst buf = Buffer.from(msg.payload.buffer);\n\n// Convert bytes to string\nconst value = buf.toString('ascii');\n    \n// Save the value\nmsg.payload = value;\n\nreturn msg;","outputs":1,"noerr":0,"x":560,"y":246,"wires":[["992e192f.f1cd08"]]},{"id":"992e192f.f1cd08","type":"ui_text","z":"fca65c59.c8674","group":"334e1001.37fb2","order":0,"width":0,"height":0,"name":"","label":"Registration","format":"{{msg.payload}}","layout":"row-spread","x":1090,"y":246,"wires":[]},{"id":"d83b34a2.ba28f8","type":"function","z":"fca65c59.c8674","name":"Network type","func":"// Create new Buffer based on array bytes\nconst buf = Buffer.from(msg.payload.buffer);\n\n// Convert bytes to string\nconst value = buf.toString('ascii');\n    \n// Save the value\nmsg.payload = value;\n\nreturn msg;","outputs":1,"noerr":0,"x":530,"y":286,"wires":[["6470684b.665a88"]]},{"id":"6470684b.665a88","type":"ui_text","z":"fca65c59.c8674","group":"334e1001.37fb2","order":0,"width":0,"height":0,"name":"","label":"Network type","format":"{{msg.payload}}","layout":"row-spread","x":1090,"y":286,"wires":[]},{"id":"783cad89.772204","type":"function","z":"fca65c59.c8674","name":"System temperature in 0.1 degrees Celcius","func":"// Create new Buffer based on array bytes\nconst buf = Buffer.from(msg.payload.buffer);\n\n// Represent these bytes as 32-bit unsigned int\nconst value = buf.readInt32BE();\n\n// save the value\nmsg.payload = value/10;\n\nreturn msg;","outputs":1,"noerr":0,"x":630,"y":326,"wires":[["63b5ab00.8f0c54"]]},{"id":"63b5ab00.8f0c54","type":"ui_gauge","z":"fca65c59.c8674","name":"","group":"9eeaabd2.5bcc98","order":1,"width":0,"height":0,"gtype":"gage","title":"Temp","label":"°C","format":"{{value}}","min":0,"max":"100","colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","x":1110,"y":326,"wires":[]},{"id":"a3b31b70.d07098","type":"function","z":"fca65c59.c8674","name":"System hostname","func":"// Create new Buffer based on array bytes\nconst buf = Buffer.from(msg.payload.buffer);\n\n// Convert bytes to string\nconst value = buf.toString(\"ascii\");\n\n\n// Save the value\nmsg.payload = value;\n\nreturn msg;","outputs":1,"noerr":0,"x":550,"y":366,"wires":[["5230319f.5ef13"]]},{"id":"4a006b14.c374f4","type":"function","z":"fca65c59.c8674","name":"Router serial number","func":"// Create new Buffer based on array bytes\nconst buf = Buffer.from(msg.payload.buffer);\n\n// Convert bytes to string\nconst value = buf.toString('ascii');\n    \n// Save the value\nmsg.payload = value;\n\nreturn msg;","outputs":1,"noerr":0,"x":560,"y":406,"wires":[["2798e42e.6d785c"]]},{"id":"55aa0978.dc7198","type":"function","z":"fca65c59.c8674","name":"Router MAC address","func":"// Create new Buffer based on array bytes\nconst buf = Buffer.from(msg.payload.buffer);\n\n// Convert bytes to string\nconst value = buf.toString('ascii');\n    \n// Save the value\n//msg.payload = value;\nmsg.payload = value.match(/.{2}/g).join(':').slice(0, 17);\n\nreturn msg;","outputs":1,"noerr":0,"x":560,"y":446,"wires":[["b688b183.874d1"]]},{"id":"61dcf0fd.8b5db","type":"function","z":"fca65c59.c8674","name":"Router name","func":"// Create new Buffer based on array bytes\nconst buf = Buffer.from(msg.payload.buffer);\n\n// Convert bytes to string\nconst value = buf.toString('ascii');\n    \n// Save the value\nmsg.payload = value;\n\nreturn msg;","outputs":1,"noerr":0,"x":530,"y":486,"wires":[["4c2b2bbb.2a4234"]]},{"id":"508e84ca.a0404c","type":"ui_text","z":"fca65c59.c8674","group":"9eeaabd2.5bcc98","order":2,"width":0,"height":0,"name":"","label":"Hostname","format":"{{msg.payload}}","layout":"row-spread","x":1090,"y":366,"wires":[]},{"id":"2798e42e.6d785c","type":"ui_text","z":"fca65c59.c8674","group":"9eeaabd2.5bcc98","order":3,"width":0,"height":0,"name":"","label":"Serial number","format":"{{msg.payload}}","layout":"row-spread","x":1080,"y":406,"wires":[]},{"id":"b688b183.874d1","type":"ui_text","z":"fca65c59.c8674","group":"9eeaabd2.5bcc98","order":4,"width":0,"height":0,"name":"","label":"Mac address","format":"{{msg.payload}}","layout":"row-spread","x":1090,"y":446,"wires":[]},{"id":"4c2b2bbb.2a4234","type":"ui_text","z":"fca65c59.c8674","group":"9eeaabd2.5bcc98","order":5,"width":0,"height":0,"name":"","label":"Router name","format":"{{msg.payload}}","layout":"row-spread","x":1090,"y":486,"wires":[]},{"id":"a0f4c0b5.0d5ad","type":"ui_text","z":"fca65c59.c8674","group":"9eeaabd2.5bcc98","order":6,"width":0,"height":0,"name":"","label":"WAN IP","format":"{{value}}","layout":"row-spread","x":1100,"y":526,"wires":[]},{"id":"d941066b.63f538","type":"function","z":"fca65c59.c8674","name":"Converttoip","func":"// Create new Buffer based on array bytes\nconst buf = Buffer.from(msg.payload.buffer);\nconst value1 = buf.readUInt8(0);\nconst value2 = buf.readUInt8(1);\nconst value3 = buf.readUInt8(2);\nconst value4 = buf.readUInt8(3);\n\nmsg.payload = value1 + \".\" + value2 + \".\" +value3 + \".\" +value4;\nglobal.set(\"WAN_IP\", msg.payload);\n//msg.payload = [value1, value2, value3, value4];\n\nreturn msg;","outputs":1,"noerr":0,"x":530,"y":526,"wires":[["a0f4c0b5.0d5ad"]]},{"id":"17d82add.c3c9a5","type":"ui_text","z":"fca65c59.c8674","group":"9eeaabd2.5bcc98","order":9,"width":0,"height":0,"name":"","label":"Uptime","format":"{{msg.payload | date:\"dd  HH:mm:ss\"}}","layout":"row-spread","x":1100,"y":86,"wires":[]},{"id":"ac5bbac5.d986b8","type":"function","z":"fca65c59.c8674","name":"Uptime DD:HH:MM:SS","func":"var seconds = parseInt(msg.payload, 10);\n\nvar days = Math.floor(seconds / (3600*24));\nseconds  -= days*3600*24;\nvar hrs   = Math.floor(seconds / 3600);\nseconds  -= hrs*3600;\nvar mnts = Math.floor(seconds / 60);\nseconds  -= mnts*60;\nresult = (days+\" D, \"+hrs+\" H, \"+mnts+\" M, \"+seconds+\" S\");\n msg.payload=result;\n return msg;","outputs":1,"noerr":0,"x":800,"y":80,"wires":[["17d82add.c3c9a5"]]},{"id":"5230319f.5ef13","type":"function","z":"fca65c59.c8674","name":"Global Set","func":"global.set(\"HOOSUnit\", msg.payload.replace(/\\W+/g,\"\"));\nreturn msg;","outputs":1,"noerr":0,"x":810,"y":366,"wires":[["508e84ca.a0404c"]]},{"id":"7ac992f2.d1aafc","type":"ui_text","z":"fca65c59.c8674","group":"2ef27044.98bde","order":1,"width":0,"height":0,"name":"","label":"Received today","format":"{{value | number:2}} MB","layout":"row-spread","x":1080,"y":680,"wires":[]},{"id":"801123c9.52d64","type":"function","z":"fca65c59.c8674","name":"Received today","func":"// Create new Buffer based on array bytes\nconst buf = Buffer.from(msg.payload.buffer);\n\n// Represent these bytes as 32-bit unsigned int\nconst value = buf.readInt32BE();\n\n// save the value\nmsg.payload = value * 1000 / 1000000;\n\nreturn msg;","outputs":1,"noerr":0,"x":540,"y":680,"wires":[["7ac992f2.d1aafc"]]},{"id":"4c373021.b1cc3","type":"comment","z":"fca65c59.c8674","name":"Mobile data","info":"All received/sent data usage values are returned in kibibytes (KiB), which is an ISQ standard accepted by most major standard organizations. \n1 kibibyte (KiB) = 210 bytes = 1024 bytes \n1 mebibyte (MiB) = 210 kibibytes (KiB) = 220 bytes = 1 048 576 bytes","x":170,"y":620,"wires":[]},{"id":"4a2681b5.47657","type":"ui_text","z":"fca65c59.c8674","group":"2ef27044.98bde","order":2,"width":0,"height":0,"name":"","label":"Sent today","format":"{{value | number:2}} MB","layout":"row-spread","x":1070,"y":720,"wires":[]},{"id":"b81bc57c.5cd418","type":"function","z":"fca65c59.c8674","name":"Mobile data sent today","func":"// Create new Buffer based on array bytes\nconst buf = Buffer.from(msg.payload.buffer);\n\n// Represent these bytes as 32-bit unsigned int\nconst value = buf.readInt32BE();\n\n// save the value\nmsg.payload = value * 1024 / 1048576;\n\nreturn msg;","outputs":1,"noerr":0,"x":560,"y":720,"wires":[["4a2681b5.47657"]]},{"id":"232b378e.936748","type":"ui_text","z":"fca65c59.c8674","group":"2ef27044.98bde","order":4,"width":0,"height":0,"name":"","label":"Received this week","format":"{{value | number:2}} MB","layout":"row-spread","x":1090,"y":760,"wires":[]},{"id":"7e133402.29d83c","type":"function","z":"fca65c59.c8674","name":"Mobile data received this week","func":"// Create new Buffer based on array bytes\nconst buf = Buffer.from(msg.payload.buffer);\n\n// Represent these bytes as 32-bit unsigned int\nconst value = buf.readInt32BE();\n\n// save the value\nmsg.payload = value * 1024 / 1048576;\n\nreturn msg;","outputs":1,"noerr":0,"x":590,"y":760,"wires":[["232b378e.936748"]]},{"id":"b4abb5ba.71d828","type":"ui_text","z":"fca65c59.c8674","group":"2ef27044.98bde","order":5,"width":0,"height":0,"name":"","label":"Sent this week","format":"{{value | number:2}} MB","layout":"row-spread","x":1080,"y":800,"wires":[]},{"id":"cb095ed0.47934","type":"function","z":"fca65c59.c8674","name":"Mobile data sent this week","func":"// Create new Buffer based on array bytes\nconst buf = Buffer.from(msg.payload.buffer);\n\n// Represent these bytes as 32-bit unsigned int\nconst value = buf.readInt32BE();\n\n// save the value\nmsg.payload = value * 1024 / 1048576;\n\nreturn msg;","outputs":1,"noerr":0,"x":580,"y":800,"wires":[["b4abb5ba.71d828"]]},{"id":"2aba9fae.8e21","type":"ui_text","z":"fca65c59.c8674","group":"2ef27044.98bde","order":7,"width":0,"height":0,"name":"","label":"Received this month","format":"{{value | number:2}} MB","layout":"row-spread","x":1100,"y":840,"wires":[]},{"id":"69e18ce8.ffbcd4","type":"function","z":"fca65c59.c8674","name":"Mobile data received this month","func":"// Create new Buffer based on array bytes\nconst buf = Buffer.from(msg.payload.buffer);\n\n// Represent these bytes as 32-bit unsigned int\nconst value = buf.readInt32BE();\n\n// save the value\nmsg.payload = value * 1024 / 1048576;\n\nreturn msg;","outputs":1,"noerr":0,"x":590,"y":840,"wires":[["2aba9fae.8e21"]]},{"id":"15df397c.2219c7","type":"ui_text","z":"fca65c59.c8674","group":"2ef27044.98bde","order":8,"width":0,"height":0,"name":"","label":"Sent this month","format":"{{value | number:2}} MB","layout":"row-spread","x":1080,"y":880,"wires":[]},{"id":"a5f2bbd.406cc48","type":"function","z":"fca65c59.c8674","name":"Mobile data sent this month","func":"// Create new Buffer based on array bytes\nconst buf = Buffer.from(msg.payload.buffer);\n\n// Represent these bytes as 32-bit unsigned int\nconst value = buf.readInt32BE();\n\n// save the value\nmsg.payload = value * 1024 / 1048576;\n\nreturn msg;","outputs":1,"noerr":0,"x":580,"y":880,"wires":[["15df397c.2219c7"]]},{"id":"cab23fc4.7d451","type":"modbus-read","z":"fca65c59.c8674","name":"System uptime","topic":"","showStatusActivities":false,"logIOActivities":false,"showErrors":false,"unitid":"","dataType":"HoldingRegister","adr":"1","quantity":"2","rate":"1","rateUnit":"s","delayOnStart":false,"startDelayTime":"","server":"4bf39c08.be3624","useIOFile":false,"ioFile":"","useIOForPayload":false,"x":200,"y":80,"wires":[[],["6fd38a1f.6f58c4"]]},{"id":"b1df2865.d96108","type":"modbus-read","z":"fca65c59.c8674","name":"GSM signal strength (dBm)","topic":"","showStatusActivities":false,"logIOActivities":false,"showErrors":false,"unitid":"","dataType":"HoldingRegister","adr":"3","quantity":"2","rate":"1","rateUnit":"s","delayOnStart":false,"startDelayTime":"","server":"4bf39c08.be3624","useIOFile":false,"ioFile":"","useIOForPayload":false,"x":230,"y":120,"wires":[[],["56672571.1021ec"]]},{"id":"5f409a48.fc2044","type":"modbus-read","z":"fca65c59.c8674","name":"System temperature in 0.1 degrees Celcius","topic":"","showStatusActivities":false,"logIOActivities":false,"showErrors":false,"unitid":"","dataType":"HoldingRegister","adr":"5","quantity":"2","rate":"1","rateUnit":"s","delayOnStart":false,"startDelayTime":"","server":"4bf39c08.be3624","useIOFile":false,"ioFile":"","useIOForPayload":false,"x":280,"y":321,"wires":[[],["783cad89.772204"]]},{"id":"794a5b30.31f254","type":"modbus-read","z":"fca65c59.c8674","name":"System hostname","topic":"","showStatusActivities":false,"logIOActivities":false,"showErrors":false,"unitid":"","dataType":"HoldingRegister","adr":"7","quantity":"16","rate":"1","rateUnit":"s","delayOnStart":false,"startDelayTime":"","server":"4bf39c08.be3624","useIOFile":false,"ioFile":"","useIOForPayload":false,"x":210,"y":360,"wires":[[],["a3b31b70.d07098"]]},{"id":"27756803.d7ff88","type":"modbus-read","z":"fca65c59.c8674","name":"GSM operator name","topic":"","showStatusActivities":false,"logIOActivities":false,"showErrors":false,"unitid":"","dataType":"HoldingRegister","adr":"23","quantity":"16","rate":"1","rateUnit":"s","delayOnStart":false,"startDelayTime":"","server":"4bf39c08.be3624","useIOFile":false,"ioFile":"","useIOForPayload":false,"x":210,"y":160,"wires":[[],["c3d1adf5.066af"]]},{"id":"b14c1bdf.34c3a8","type":"modbus-read","z":"fca65c59.c8674","name":"Router serial number","topic":"","showStatusActivities":false,"logIOActivities":false,"showErrors":false,"unitid":"","dataType":"HoldingRegister","adr":"39","quantity":"16","rate":"1","rateUnit":"m","delayOnStart":false,"startDelayTime":"","server":"4bf39c08.be3624","useIOFile":false,"ioFile":"","useIOForPayload":false,"x":220,"y":400,"wires":[[],["4a006b14.c374f4"]]},{"id":"a97fd3a.52f3a3","type":"modbus-read","z":"fca65c59.c8674","name":"Router MAC address","topic":"","showStatusActivities":false,"logIOActivities":false,"showErrors":false,"unitid":"","dataType":"HoldingRegister","adr":"55","quantity":"16","rate":"1","rateUnit":"m","delayOnStart":false,"startDelayTime":"","server":"4bf39c08.be3624","useIOFile":false,"ioFile":"","useIOForPayload":false,"x":220,"y":440,"wires":[[],["55aa0978.dc7198"]]},{"id":"ec6504af.911a38","type":"modbus-read","z":"fca65c59.c8674","name":"Router name","topic":"","showStatusActivities":false,"logIOActivities":false,"showErrors":false,"unitid":"","dataType":"HoldingRegister","adr":"71","quantity":"16","rate":"30","rateUnit":"s","delayOnStart":false,"startDelayTime":"","server":"4bf39c08.be3624","useIOFile":false,"ioFile":"","useIOForPayload":false,"x":190,"y":482,"wires":[[],["61dcf0fd.8b5db"]]},{"id":"70ba652d.21258c","type":"modbus-read","z":"fca65c59.c8674","name":"Current SIM card","topic":"","showStatusActivities":false,"logIOActivities":false,"showErrors":false,"unitid":"","dataType":"HoldingRegister","adr":"87","quantity":"16","rate":"10","rateUnit":"s","delayOnStart":false,"startDelayTime":"","server":"4bf39c08.be3624","useIOFile":false,"ioFile":"","useIOForPayload":false,"x":200,"y":200,"wires":[[],["81879cd5.08b26"]]},{"id":"132d0f20.d114c1","type":"modbus-read","z":"fca65c59.c8674","name":"Network registration","topic":"","showStatusActivities":false,"logIOActivities":false,"showErrors":false,"unitid":"","dataType":"HoldingRegister","adr":"103","quantity":"16","rate":"5","rateUnit":"s","delayOnStart":false,"startDelayTime":"","server":"4bf39c08.be3624","useIOFile":false,"ioFile":"","useIOForPayload":false,"x":210,"y":240,"wires":[[],["105c5b0d.fdeb55"]]},{"id":"65aa8a0d.15f954","type":"modbus-read","z":"fca65c59.c8674","name":"Network type","topic":"","showStatusActivities":false,"logIOActivities":false,"showErrors":false,"unitid":"","dataType":"HoldingRegister","adr":"119","quantity":"16","rate":"5","rateUnit":"s","delayOnStart":false,"startDelayTime":"","server":"4bf39c08.be3624","useIOFile":false,"ioFile":"","useIOForPayload":false,"x":190,"y":280,"wires":[[],["d83b34a2.ba28f8"]]},{"id":"58750c5e.8cef14","type":"modbus-read","z":"fca65c59.c8674","name":"Current WAN IP address","topic":"","showStatusActivities":false,"logIOActivities":false,"showErrors":false,"unitid":"","dataType":"HoldingRegister","adr":"139","quantity":"2","rate":"5","rateUnit":"s","delayOnStart":false,"startDelayTime":"","server":"4bf39c08.be3624","useIOFile":false,"ioFile":"","useIOForPayload":false,"x":230,"y":520,"wires":[[],["d941066b.63f538"]]},{"id":"dc593c4d.27873","type":"modbus-read","z":"fca65c59.c8674","name":"Mobile data received today","topic":"","showStatusActivities":false,"logIOActivities":false,"showErrors":false,"unitid":"","dataType":"HoldingRegister","adr":"135","quantity":"2","rate":"5","rateUnit":"s","delayOnStart":false,"startDelayTime":"","server":"4bf39c08.be3624","useIOFile":false,"ioFile":"","useIOForPayload":false,"x":230,"y":680,"wires":[[],["801123c9.52d64"]]},{"id":"5debc960.4ffd78","type":"modbus-read","z":"fca65c59.c8674","name":"Mobile data sent today","topic":"","showStatusActivities":false,"logIOActivities":false,"showErrors":false,"unitid":"","dataType":"HoldingRegister","adr":"137","quantity":"2","rate":"5","rateUnit":"s","delayOnStart":false,"startDelayTime":"","server":"4bf39c08.be3624","useIOFile":false,"ioFile":"","useIOForPayload":false,"x":220,"y":720,"wires":[[],["b81bc57c.5cd418"]]},{"id":"17abf496.10073b","type":"modbus-read","z":"fca65c59.c8674","name":"Mobile data received this week","topic":"","showStatusActivities":false,"logIOActivities":false,"showErrors":false,"unitid":"","dataType":"HoldingRegister","adr":"141","quantity":"2","rate":"5","rateUnit":"s","delayOnStart":false,"startDelayTime":"","server":"4bf39c08.be3624","useIOFile":false,"ioFile":"","useIOForPayload":false,"x":250,"y":760,"wires":[[],["7e133402.29d83c"]]},{"id":"376fd292.629c5e","type":"modbus-read","z":"fca65c59.c8674","name":"Mobile data sent this week","topic":"","showStatusActivities":false,"logIOActivities":false,"showErrors":false,"unitid":"","dataType":"HoldingRegister","adr":"143","quantity":"2","rate":"5","rateUnit":"s","delayOnStart":false,"startDelayTime":"","server":"4bf39c08.be3624","useIOFile":false,"ioFile":"","useIOForPayload":false,"x":230,"y":800,"wires":[[],["cb095ed0.47934"]]},{"id":"c1a51d06.3abac","type":"modbus-read","z":"fca65c59.c8674","name":"Mobile data received this month","topic":"","showStatusActivities":false,"logIOActivities":false,"showErrors":false,"unitid":"","dataType":"HoldingRegister","adr":"145","quantity":"2","rate":"5","rateUnit":"s","delayOnStart":false,"startDelayTime":"","server":"4bf39c08.be3624","useIOFile":false,"ioFile":"","useIOForPayload":false,"x":250,"y":840,"wires":[[],["69e18ce8.ffbcd4"]]},{"id":"2505e075.e6f5","type":"modbus-read","z":"fca65c59.c8674","name":"Mobile data sent this month","topic":"","showStatusActivities":false,"logIOActivities":false,"showErrors":false,"unitid":"","dataType":"HoldingRegister","adr":"147","quantity":"2","rate":"5","rateUnit":"s","delayOnStart":false,"startDelayTime":"","server":"4bf39c08.be3624","useIOFile":false,"ioFile":"","useIOForPayload":false,"x":240,"y":880,"wires":[[],["a5f2bbd.406cc48"]]},{"id":"334e1001.37fb2","type":"ui_group","z":"","name":"GSM network","tab":"566d2cfc.c12004","order":1,"disp":true,"width":"6","collapse":false},{"id":"9eeaabd2.5bcc98","type":"ui_group","z":"","name":"Router","tab":"566d2cfc.c12004","order":2,"disp":true,"width":"6","collapse":false},{"id":"2ef27044.98bde","type":"ui_group","z":"","name":"Data usage","tab":"566d2cfc.c12004","order":3,"disp":true,"width":"6","collapse":false},{"id":"4bf39c08.be3624","type":"modbus-client","z":"","name":"Router","clienttype":"tcp","bufferCommands":true,"stateLogEnabled":false,"tcpHost":"192.168.1.1","tcpPort":"502","tcpType":"DEFAULT","serialPort":"/dev/ttyUSB","serialType":"RTU-BUFFERD","serialBaudrate":"9600","serialDatabits":"8","serialStopbits":"1","serialParity":"none","serialConnectionDelay":"100","unit_id":"1","commandDelay":"1","clientTimeout":"1000","reconnectTimeout":"2000"},{"id":"566d2cfc.c12004","type":"ui_tab","z":"","name":"Router","icon":"router","order":5,"disabled":false,"hidden":false}]
1 Like

Hi iridiu,

Thanks a lot for your help!!!

Regards!