Arduino tutorial: Node-RED Dashboard and Arduino Web Server

How to display the data from your Arduino web server in a Dashboard from Node-RED with industrial automation
January 3, 2022 by
Arduino tutorial: Node-RED Dashboard and Arduino Web Server
Boot & Work Corp. S.L., Fernandez Queralt Martinez

Introduction

In the previous post >  we saw how to create an Arduino Web Server in order to read the data from the analog input pins to the browser with Arduino automation.

In this post, we are going to display that data in a Node-RED Dashboard to make it more readable and attractive for the user with an industrial PLC Arduino.

Requirements

Node-RED

Node-RED is a programming tool for wiring together hardware devices, APIs and online services in new and interesting ways.

It provides a browser-based editor that makes it easy to wire together flows using the wide range of nodes in the palette that can be deployed to its runtime in a single click. 

Now, we are going to do the following in order to run Node-RED on our laptop to be able to read data from our Arduino Programmable Logic Controller with Ethernet:

1. Install git.

2. Install Node.js, npm and Node-RED.

3. Setup Node-RED to autostart on boot.

Install Git

You may need to run the command below to ensure npm is able to fetch and build any binary modules it needs to install:

sudo apt install build-essential git curl

Install Node.js, npm and Node-RED

Install Node.js, npm and Node-RED by using this script that also is used to upgrade an existing install when a new release is available.

bash <(curl -sL https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered)

Autostart on boot

Run the following command if you want Node-RED to run when the open source PLC is turned on, or re-booted.

sudo systemctl enable nodered.service
sudo systemctl start nodered.service

Know more at: Node-RED's website >

Node-RED Dashboard Nodes

Make sure that you can access Node-RED locally. Open the browser and type:

http://localhost:1880/

If so, you have to download the Node-RED Dashboard nodes to be able to make a Node-RED Dashboard easily.

So, you can download them in two ways:

1. Either going to the Node-RED menu > Click on Manage Palette > Install > Type: node-red-dashboard > Install.

2. Or going to the directory /home/$USER/.node-red:

cd /home/$USER/.node-red

and installing the set of dashboard nodes for Node-RED.

npm install node-red-dashboard


These are the nodes that you should see 

Nodes - Node-RED Dashboard Nodes - Tutorial: Node-RED Dashboard and Arduino Web Server

Get input data from the server

In the previous blog post, we learned how to make an Arduino Web Server and check the data to the browser with raw numbers. 

But, what if the input values were better displayed in a GUI Node-RED dashboard?

In order to achieve that, we are going to send a GET request to the server to get the data from the Arduino PLC.

Then, we will split the information of every input, and we will divide it to see the inputs values.

Get input data from server - Tutorial: Node-RED Dashboard and Arduino Web Server

Flows.json

1. Add an inject node, and make the request every 1 second.

2. Connect it to an HTTP request node:

Method: GET
URL: http://10.10.10.30 (<- IP from Arduino based PLC or server)
Payload: Ignore
Return: a UTF-8 string

3. Add a split node with the parameters by default.

4. Add a switch node:

Property: msg.parts.index
== 0
== 1
== 2
== 3
== 4
== 5

5. Add six change nodes, connect them to the outputs from the switch node and do the same in all of them:

set msg.payload to (expression) $number($trim(payload))


6. Connect six gauge nodes, one for each output, and configure them:
Group: Configure a group and tab.
Size: Set a size, like 4x3
Type: Gauge
Label: from I0.7 to input I0.12 in our case
Value format: {{value}}
Range: min 0 max 1024 
And change the colors if you want


Go to the Dashboard menu on the right > hover on your tab and group > Click on layout > And display the widgets as you want.

Finally, go to the Dashboard, and see your data graphically:

http://localhost:1880/ui


[{"id":"ed63f7fadb48e2f7","type":"tab","label":"Industrial Shields","disabled":false,"info":""},{"id":"c9d8f02d.c9424","type":"ui_base","theme":{"name":"theme-light","lightTheme":{"default":"#0094CE","baseColor":"#0094CE","baseFont":"-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif","edited":true,"reset":false},"darkTheme":{"default":"#097479","baseColor":"#097479","baseFont":"-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif","edited":false},"customTheme":{"name":"Untitled Theme 1","default":"#4B7930","baseColor":"#4B7930","baseFont":"-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif"},"themeState":{"base-color":{"default":"#0094CE","value":"#0094CE","edited":false},"page-titlebar-backgroundColor":{"value":"#0094CE","edited":false},"page-backgroundColor":{"value":"#fafafa","edited":false},"page-sidebar-backgroundColor":{"value":"#ffffff","edited":false},"group-textColor":{"value":"#1bbfff","edited":false},"group-borderColor":{"value":"#ffffff","edited":false},"group-backgroundColor":{"value":"#ffffff","edited":false},"widget-textColor":{"value":"#111111","edited":false},"widget-backgroundColor":{"value":"#0094ce","edited":false},"widget-borderColor":{"value":"#ffffff","edited":false},"base-font":{"value":"-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif"}},"angularTheme":{"primary":"indigo","accents":"blue","warn":"red","background":"grey","palette":"light"}},"site":{"name":"Node-RED Dashboard","hideToolbar":"false","allowSwipe":"false","lockMenu":"false","allowTempTheme":"true","dateFormat":"DD/MM/YYYY","sizes":{"sx":60,"sy":60,"gx":6,"gy":6,"cx":6,"cy":6,"px":0,"py":0}}},{"id":"94e80e20.ee556","type":"ui_group","name":"Analog Inputs","tab":"","order":1,"disp":true,"width":"14","collapse":false,"className":""},{"id":"7db45a2e2009a112","type":"ui_group","name":"","tab":"61205cbe86e76b7a","order":1,"disp":true,"width":"14","collapse":false,"className":""},{"id":"a8a589c2bd8096fe","type":"ui_group","name":"","tab":"","order":1,"disp":true,"width":"14","collapse":false},{"id":"650178a94412516d","type":"ui_spacer","name":"spacer","group":"a8a589c2bd8096fe","order":2,"width":1,"height":1},{"id":"41520cc5c5debd27","type":"ui_spacer","name":"spacer","group":"a8a589c2bd8096fe","order":3,"width":1,"height":1},{"id":"d7384f9539eeb32f","type":"ui_spacer","name":"spacer","group":"a8a589c2bd8096fe","order":4,"width":1,"height":1},{"id":"ec214d0fcde739b3","type":"ui_spacer","name":"spacer","group":"a8a589c2bd8096fe","order":5,"width":1,"height":1},{"id":"8fda7675a3803028","type":"ui_spacer","name":"spacer","group":"a8a589c2bd8096fe","order":6,"width":1,"height":1},{"id":"ec92b79e411cce41","type":"ui_spacer","name":"spacer","group":"a8a589c2bd8096fe","order":7,"width":1,"height":1},{"id":"c1fdf85f7492cf0e","type":"ui_spacer","name":"spacer","group":"a8a589c2bd8096fe","order":8,"width":1,"height":1},{"id":"1f6695fb88e9a91b","type":"ui_spacer","name":"spacer","group":"a8a589c2bd8096fe","order":9,"width":1,"height":1},{"id":"fd86c3aceccb7a6f","type":"ui_group","name":"","tab":"","order":1,"disp":true,"width":14,"collapse":false},{"id":"e0bf4de3ab727c40","type":"ui_group","name":"","tab":"","order":1,"disp":true,"width":"14","collapse":false},{"id":"ce5f724377fd4a08","type":"ui_spacer","name":"spacer","group":"e0bf4de3ab727c40","order":8,"width":1,"height":1},{"id":"1621c08cda4a0daf","type":"ui_spacer","name":"spacer","group":"e0bf4de3ab727c40","order":12,"width":9,"height":1},{"id":"19420fd10c7c0b12","type":"ui_spacer","name":"spacer","group":"e0bf4de3ab727c40","order":19,"width":1,"height":1},{"id":"9a921db25413d077","type":"ui_spacer","name":"spacer","group":"fd86c3aceccb7a6f","order":5,"width":5,"height":1},{"id":"53a3c745b8cf7b46","type":"ui_spacer","name":"spacer","group":"fd86c3aceccb7a6f","order":9,"width":9,"height":1},{"id":"177c9bb488d91cd0","type":"ui_spacer","name":"spacer","group":"fd86c3aceccb7a6f","order":10,"width":9,"height":1},{"id":"4dcc45e902f01973","type":"ui_spacer","name":"spacer","group":"fd86c3aceccb7a6f","order":11,"width":9,"height":1},{"id":"d3c8b1a85b1a2695","type":"ui_spacer","name":"spacer","group":"fd86c3aceccb7a6f","order":16,"width":5,"height":1},{"id":"48e48dc621386c3a","type":"ui_spacer","name":"spacer","group":"fd86c3aceccb7a6f","order":18,"width":2,"height":1},{"id":"6c2eaf3a7ff65cc7","type":"ui_spacer","name":"spacer","group":"fd86c3aceccb7a6f","order":20,"width":1,"height":1},{"id":"69fef2625bcae797","type":"ui_group","name":"","tab":"","order":1,"disp":true,"width":14,"collapse":false},{"id":"f0995cba9faef49a","type":"ui_spacer","name":"spacer","group":"69fef2625bcae797","order":1,"width":6,"height":1},{"id":"8386499ed3985872","type":"ui_spacer","name":"spacer","group":"69fef2625bcae797","order":3,"width":6,"height":1},{"id":"88bfa93404bbb9e8","type":"ui_spacer","name":"spacer","group":"69fef2625bcae797","order":4,"width":2,"height":1},{"id":"8f993c0b0d1ca2c6","type":"ui_spacer","name":"spacer","group":"69fef2625bcae797","order":6,"width":2,"height":1},{"id":"31ac08fa29411053","type":"ui_spacer","name":"spacer","group":"69fef2625bcae797","order":7,"width":2,"height":1},{"id":"a085d999fd2f1543","type":"ui_spacer","name":"spacer","group":"69fef2625bcae797","order":8,"width":2,"height":1},{"id":"93875745799a1a7e","type":"ui_spacer","name":"spacer","group":"69fef2625bcae797","order":9,"width":2,"height":1},{"id":"09b81d9cd3b8a5e3","type":"ui_spacer","name":"spacer","group":"69fef2625bcae797","order":11,"width":2,"height":1},{"id":"fae59351e2c107e1","type":"ui_spacer","name":"spacer","group":"69fef2625bcae797","order":13,"width":2,"height":1},{"id":"16da015529de983e","type":"ui_spacer","name":"spacer","group":"69fef2625bcae797","order":15,"width":2,"height":1},{"id":"68d11f4888371f42","type":"ui_spacer","name":"spacer","group":"78426f95.8f95a","order":2,"width":1,"height":1},{"id":"c952f3843803ca3a","type":"ui_spacer","name":"spacer","group":"78426f95.8f95a","order":4,"width":2,"height":1},{"id":"d94fc37ef13fd5b5","type":"ui_spacer","name":"spacer","group":"78426f95.8f95a","order":6,"width":2,"height":1},{"id":"de6860d7e763ee1f","type":"ui_spacer","name":"spacer","group":"78426f95.8f95a","order":7,"width":2,"height":1},{"id":"b7dea1e1539fd361","type":"ui_spacer","name":"spacer","group":"78426f95.8f95a","order":8,"width":2,"height":1},{"id":"8a992f492da0c389","type":"ui_spacer","name":"spacer","group":"78426f95.8f95a","order":9,"width":2,"height":1},{"id":"59f579f16c8a79f0","type":"ui_spacer","name":"spacer","group":"78426f95.8f95a","order":10,"width":3,"height":1},{"id":"3c6760b2deeb8edc","type":"ui_spacer","name":"spacer","group":"78426f95.8f95a","order":12,"width":3,"height":1},{"id":"4304b47b5a38c1d3","type":"ui_spacer","name":"spacer","group":"78426f95.8f95a","order":13,"width":3,"height":1},{"id":"e7c76c6618406bfb","type":"ui_spacer","name":"spacer","group":"78426f95.8f95a","order":14,"width":3,"height":1},{"id":"1c73f99f95804e0c","type":"ui_spacer","name":"spacer","group":"78426f95.8f95a","order":15,"width":3,"height":1},{"id":"66cf106ea464b138","type":"ui_spacer","name":"spacer","group":"78426f95.8f95a","order":17,"width":3,"height":1},{"id":"f59e5331527d622c","type":"ui_spacer","name":"spacer","group":"78426f95.8f95a","order":18,"width":3,"height":1},{"id":"bd4188df3fba1217","type":"ui_spacer","name":"spacer","group":"78426f95.8f95a","order":19,"width":3,"height":1},{"id":"11149ae50462e712","type":"ui_group","name":"","tab":"","order":1,"disp":true,"width":"14","collapse":false},{"id":"d9eb35dfa1f56a6b","type":"ui_group","name":"","tab":"","order":1,"disp":true,"width":"14","collapse":false},{"id":"e68a8468aae12d7c","type":"ui_spacer","name":"spacer","group":"d9eb35dfa1f56a6b","order":2,"width":1,"height":1},{"id":"86350b8b09d87fc9","type":"ui_spacer","name":"spacer","group":"d9eb35dfa1f56a6b","order":3,"width":1,"height":1},{"id":"e695b989c88ca386","type":"ui_spacer","name":"spacer","group":"d9eb35dfa1f56a6b","order":4,"width":1,"height":1},{"id":"97b648f2295e61bf","type":"ui_spacer","name":"spacer","group":"d9eb35dfa1f56a6b","order":5,"width":1,"height":1},{"id":"48dff9f6e1890e7f","type":"ui_spacer","name":"spacer","group":"d9eb35dfa1f56a6b","order":6,"width":1,"height":1},{"id":"7db9106c3436c688","type":"ui_spacer","name":"spacer","group":"d9eb35dfa1f56a6b","order":7,"width":1,"height":1},{"id":"e2843b82cd077bd1","type":"ui_spacer","name":"spacer","group":"d9eb35dfa1f56a6b","order":8,"width":1,"height":1},{"id":"d00a0ea86f5dceb1","type":"ui_spacer","name":"spacer","group":"d9eb35dfa1f56a6b","order":9,"width":1,"height":1},{"id":"2c09e91cbc8e6e0f","type":"ui_group","name":"","tab":"","order":1,"disp":true,"width":14,"collapse":false},{"id":"c8cc23f922acf265","type":"ui_spacer","name":"spacer","group":"11149ae50462e712","order":7,"width":2,"height":1},{"id":"a60cdc5ae81ae940","type":"ui_spacer","name":"spacer","group":"11149ae50462e712","order":10,"width":1,"height":1},{"id":"1b7909ebb1ddaa8d","type":"ui_spacer","name":"spacer","group":"11149ae50462e712","order":12,"width":10,"height":1},{"id":"8f421b5598559b4b","type":"ui_spacer","name":"spacer","group":"11149ae50462e712","order":17,"width":1,"height":1},{"id":"ffbac30177906f95","type":"ui_spacer","name":"spacer","group":"11149ae50462e712","order":20,"width":1,"height":1},{"id":"905445bab20ca6db","type":"ui_group","name":"","tab":"","order":1,"disp":true,"width":"14","collapse":false},{"id":"d10c444b39eb2f1f","type":"ui_spacer","name":"spacer","group":"905445bab20ca6db","order":8,"width":1,"height":1},{"id":"c323326f7958830e","type":"ui_spacer","name":"spacer","group":"905445bab20ca6db","order":12,"width":9,"height":1},{"id":"4db3c8fac1af8b3e","type":"ui_spacer","name":"spacer","group":"905445bab20ca6db","order":19,"width":1,"height":1},{"id":"bf1952147b6b4ea5","type":"ui_spacer","name":"spacer","group":"2c09e91cbc8e6e0f","order":5,"width":5,"height":1},{"id":"0b2d7897709f6e5f","type":"ui_spacer","name":"spacer","group":"2c09e91cbc8e6e0f","order":9,"width":9,"height":1},{"id":"e22f5e922f6c9f71","type":"ui_spacer","name":"spacer","group":"2c09e91cbc8e6e0f","order":10,"width":9,"height":1},{"id":"588a23943d3785a2","type":"ui_spacer","name":"spacer","group":"2c09e91cbc8e6e0f","order":11,"width":9,"height":1},{"id":"321320e5a14098d7","type":"ui_spacer","name":"spacer","group":"2c09e91cbc8e6e0f","order":16,"width":5,"height":1},{"id":"a879bd0827b8f99e","type":"ui_spacer","name":"spacer","group":"2c09e91cbc8e6e0f","order":18,"width":2,"height":1},{"id":"33a76b8f9cf543bf","type":"ui_spacer","name":"spacer","group":"2c09e91cbc8e6e0f","order":20,"width":1,"height":1},{"id":"56f34e37a79c3d01","type":"ui_group","name":"","tab":"","order":1,"disp":true,"width":14,"collapse":false},{"id":"c73d7f014bfbe104","type":"ui_spacer","name":"spacer","group":"56f34e37a79c3d01","order":1,"width":6,"height":1},{"id":"b08448fdb52e2ca0","type":"ui_spacer","name":"spacer","group":"56f34e37a79c3d01","order":3,"width":6,"height":1},{"id":"29c5f2c2fcf37c02","type":"ui_spacer","name":"spacer","group":"56f34e37a79c3d01","order":4,"width":2,"height":1},{"id":"ceb8599438dad1cb","type":"ui_spacer","name":"spacer","group":"56f34e37a79c3d01","order":6,"width":2,"height":1},{"id":"3632ea435e54f9e5","type":"ui_spacer","name":"spacer","group":"56f34e37a79c3d01","order":7,"width":2,"height":1},{"id":"8150aa1bd8c37da2","type":"ui_spacer","name":"spacer","group":"56f34e37a79c3d01","order":8,"width":2,"height":1},{"id":"5c24e785e608aef0","type":"ui_spacer","name":"spacer","group":"56f34e37a79c3d01","order":9,"width":2,"height":1},{"id":"c41052ac2d6a9c02","type":"ui_spacer","name":"spacer","group":"56f34e37a79c3d01","order":11,"width":2,"height":1},{"id":"c0053c1b8fa16dcf","type":"ui_spacer","name":"spacer","group":"56f34e37a79c3d01","order":13,"width":2,"height":1},{"id":"4f967c426be1f3f4","type":"ui_spacer","name":"spacer","group":"56f34e37a79c3d01","order":15,"width":2,"height":1},{"id":"8e220e53f80e628c","type":"ui_spacer","name":"spacer","group":"78426f95.8f95a","order":2,"width":1,"height":1},{"id":"aad739631a5e8311","type":"ui_spacer","name":"spacer","group":"78426f95.8f95a","order":4,"width":2,"height":1},{"id":"b10241278cdf1b51","type":"ui_spacer","name":"spacer","group":"78426f95.8f95a","order":6,"width":2,"height":1},{"id":"e3068a6262e6d1ae","type":"ui_spacer","name":"spacer","group":"78426f95.8f95a","order":7,"width":2,"height":1},{"id":"4083fd49a7615e0c","type":"ui_spacer","name":"spacer","group":"78426f95.8f95a","order":8,"width":2,"height":1},{"id":"177012bcd681394b","type":"ui_spacer","name":"spacer","group":"78426f95.8f95a","order":9,"width":2,"height":1},{"id":"9817a7eb2bf22936","type":"ui_spacer","name":"spacer","group":"78426f95.8f95a","order":10,"width":3,"height":1},{"id":"9d51b7e1584b160b","type":"ui_spacer","name":"spacer","group":"78426f95.8f95a","order":12,"width":3,"height":1},{"id":"dd4489451a804064","type":"ui_spacer","name":"spacer","group":"78426f95.8f95a","order":13,"width":3,"height":1},{"id":"85100227f6f53f95","type":"ui_spacer","name":"spacer","group":"78426f95.8f95a","order":14,"width":3,"height":1},{"id":"2bea5b80189667a7","type":"ui_spacer","name":"spacer","group":"78426f95.8f95a","order":15,"width":3,"height":1},{"id":"9ad14fb540fa76b1","type":"ui_spacer","name":"spacer","group":"78426f95.8f95a","order":17,"width":3,"height":1},{"id":"935c7b5a3a899429","type":"ui_spacer","name":"spacer","group":"78426f95.8f95a","order":18,"width":3,"height":1},{"id":"c6aa85ea767fdbe5","type":"ui_spacer","name":"spacer","group":"78426f95.8f95a","order":19,"width":3,"height":1},{"id":"61205cbe86e76b7a","type":"ui_tab","name":"Industrial Shields","icon":"dashboard","disabled":false,"hidden":false},{"id":"ba772d42e664cd90","type":"ui_spacer","z":"ed63f7fadb48e2f7","name":"spacer","group":"7db45a2e2009a112","order":1,"width":1,"height":1},{"id":"c0735f1ee76f3748","type":"ui_spacer","z":"ed63f7fadb48e2f7","name":"spacer","group":"7db45a2e2009a112","order":5,"width":1,"height":1},{"id":"aee142501bcd83e3","type":"ui_spacer","z":"ed63f7fadb48e2f7","name":"spacer","group":"7db45a2e2009a112","order":6,"width":1,"height":1},{"id":"bb5ac2563e92535c","type":"ui_spacer","z":"ed63f7fadb48e2f7","name":"spacer","group":"7db45a2e2009a112","order":7,"width":1,"height":1},{"id":"9a8898e980f59840","type":"ui_spacer","z":"ed63f7fadb48e2f7","name":"spacer","group":"7db45a2e2009a112","order":8,"width":1,"height":1},{"id":"0f787dad2bf96808","type":"ui_spacer","z":"ed63f7fadb48e2f7","name":"spacer","group":"7db45a2e2009a112","order":9,"width":1,"height":1},{"id":"23f5663a77200ae4","type":"ui_spacer","z":"ed63f7fadb48e2f7","name":"spacer","group":"7db45a2e2009a112","order":10,"width":1,"height":1},{"id":"9ca625a1245efd1a","type":"ui_spacer","z":"ed63f7fadb48e2f7","name":"spacer","group":"7db45a2e2009a112","order":14,"width":1,"height":1},{"id":"541a2bc4a02a9cef","type":"ui_spacer","z":"ed63f7fadb48e2f7","name":"spacer","group":"7db45a2e2009a112","order":15,"width":1,"height":1},{"id":"13902e93ea7bc112","type":"ui_spacer","z":"ed63f7fadb48e2f7","name":"spacer","group":"7db45a2e2009a112","order":16,"width":1,"height":1},{"id":"ea7ce3b4be6ff258","type":"ui_spacer","z":"ed63f7fadb48e2f7","name":"spacer","group":"7db45a2e2009a112","order":17,"width":1,"height":1},{"id":"01656dbe4d841765","type":"ui_spacer","z":"ed63f7fadb48e2f7","name":"spacer","group":"7db45a2e2009a112","order":18,"width":1,"height":1},{"id":"7fe60e9738612ca8","type":"http request","z":"ed63f7fadb48e2f7","name":"","method":"GET","ret":"txt","paytoqs":"ignore","url":"http://10.10.10.30","tls":"","persist":false,"proxy":"","authType":"","x":450,"y":180,"wires":[["a6e424fbcc272a74"]]},{"id":"3fbc45d21eb1acf9","type":"inject","z":"ed63f7fadb48e2f7","name":"Make request every 1 second","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"1","crontab":"","once":true,"onceDelay":0.1,"topic":"","payloadType":"date","x":230,"y":180,"wires":[["7fe60e9738612ca8"]]},{"id":"a6e424fbcc272a74","type":"split","z":"ed63f7fadb48e2f7","name":"","splt":"\\n","spltType":"str","arraySplt":"1","arraySpltType":"len","stream":false,"addname":"","x":590,"y":180,"wires":[["5e115c65fefe747b"]]},{"id":"5e115c65fefe747b","type":"switch","z":"ed63f7fadb48e2f7","name":"switch parts","property":"parts.index","propertyType":"msg","rules":[{"t":"eq","v":"0","vt":"num"},{"t":"eq","v":"1","vt":"num"},{"t":"eq","v":"2","vt":"num"},{"t":"eq","v":"3","vt":"num"},{"t":"eq","v":"4","vt":"num"},{"t":"eq","v":"5","vt":"str"}],"checkall":"true","repair":false,"outputs":6,"x":730,"y":180,"wires":[["614d419359294ac9"],["4999f00b14dcec08"],["74b4c6705b660f4c"],["21f305ac14e8f2b1"],["473885451ef29861"],["7afdf96b3e18654e"]]},{"id":"614d419359294ac9","type":"change","z":"ed63f7fadb48e2f7","name":"from string to number","rules":[{"t":"set","p":"payload","pt":"msg","to":"$number($trim(payload))","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":980,"y":80,"wires":[["02e7cc7d9727f150"]]},{"id":"4999f00b14dcec08","type":"change","z":"ed63f7fadb48e2f7","name":"from string to number","rules":[{"t":"set","p":"payload","pt":"msg","to":"$number($trim(payload))","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":980,"y":120,"wires":[["3dd038cd1d681cb6"]]},{"id":"74b4c6705b660f4c","type":"change","z":"ed63f7fadb48e2f7","name":"from string to number","rules":[{"t":"set","p":"payload","pt":"msg","to":"$number($trim(payload))","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":980,"y":160,"wires":[["871f31d13f55a322"]]},{"id":"21f305ac14e8f2b1","type":"change","z":"ed63f7fadb48e2f7","name":"from string to number","rules":[{"t":"set","p":"payload","pt":"msg","to":"$number($trim(payload))","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":980,"y":200,"wires":[["9053e7b943fbcf37"]]},{"id":"473885451ef29861","type":"change","z":"ed63f7fadb48e2f7","name":"from string to number","rules":[{"t":"set","p":"payload","pt":"msg","to":"$number($trim(payload))","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":980,"y":240,"wires":[["0a64d39a890b89af"]]},{"id":"7afdf96b3e18654e","type":"change","z":"ed63f7fadb48e2f7","name":"from string to number","rules":[{"t":"set","p":"payload","pt":"msg","to":"$number($trim(payload))","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":980,"y":280,"wires":[["dcaa01d15253ebc9"]]},{"id":"dcaa01d15253ebc9","type":"ui_gauge","z":"ed63f7fadb48e2f7","name":"","group":"7db45a2e2009a112","order":13,"width":4,"height":3,"gtype":"gage","title":"I0.12","label":"","format":"{{value}}","min":0,"max":"1024","colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","className":"twelve","x":1170,"y":280,"wires":[]},{"id":"0a64d39a890b89af","type":"ui_gauge","z":"ed63f7fadb48e2f7","name":"","group":"7db45a2e2009a112","order":12,"width":4,"height":3,"gtype":"gage","title":"I0.11","label":"","format":"{{value}}","min":0,"max":"1024","colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","className":"eleven","x":1170,"y":240,"wires":[]},{"id":"9053e7b943fbcf37","type":"ui_gauge","z":"ed63f7fadb48e2f7","name":"","group":"7db45a2e2009a112","order":11,"width":4,"height":3,"gtype":"gage","title":"I0.10","label":"","format":"{{value}}","min":0,"max":"1024","colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","className":"ten","x":1170,"y":200,"wires":[]},{"id":"871f31d13f55a322","type":"ui_gauge","z":"ed63f7fadb48e2f7","name":"","group":"7db45a2e2009a112","order":4,"width":4,"height":3,"gtype":"gage","title":"I0.9","label":"","format":"{{value}}","min":0,"max":"1024","colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","className":"nine","x":1170,"y":160,"wires":[]},{"id":"3dd038cd1d681cb6","type":"ui_gauge","z":"ed63f7fadb48e2f7","name":"","group":"7db45a2e2009a112","order":3,"width":4,"height":3,"gtype":"gage","title":"I0.8","label":"","format":"{{value}}","min":0,"max":"1024","colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","className":"eight","x":1170,"y":120,"wires":[]},{"id":"02e7cc7d9727f150","type":"ui_gauge","z":"ed63f7fadb48e2f7","name":"","group":"7db45a2e2009a112","order":2,"width":4,"height":3,"gtype":"gage","title":"I0.7","label":"","format":"{{value}}","min":0,"max":"1024","colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","className":"seven","x":1170,"y":80,"wires":[]},{"id":"19c2de8d44a5c0ec","type":"comment","z":"ed63f7fadb48e2f7","name":"Data from M-Duino 21+ PLC","info":"","x":200,"y":80,"wires":[]}]
Industrial Shields Node-RED Dashboard - Tutorial: Node-RED Dashboard and Arduino Web Server

​Search in our Blog

Arduino tutorial: Node-RED Dashboard and Arduino Web Server
Boot & Work Corp. S.L., Fernandez Queralt Martinez January 3, 2022
Share this post

Looking for your ideal Programmable Logic Controller?

Take a look at this product comparison with other industrial controllers Arduino-based. 

We are comparing inputs, outputs, communications and other features with the ones of the relevant brands.


Industrial PLC comparison >>>