Sensors Monitoring – Nodered Configuration

At this point we set nodered to read the messages on Mosquitto and insert the data into InfluxDB and MySql.

Below the json file to be imported into nodered

Nodered Json

This flow is functional to the explanation of the functioning of the architecture as a whole; the flow must be optimized by programming nodered so as to automatically generate the information of the nodes from which the data arrives without resorting to different nodes for each sensor.

To execute the import proceed as follows, after accessing nodered


and after clicking on the menu on the right, choose to import the json from the clipboard

importFlowsAt the next screen, choose to import the json file into a new flow

flowOnce imported, set the credentials to access MySql and InfluxDB, selecting Configuration nodes from the menu on the right and setting the user account and password

configureNodesThe connections to the dbs and mosquitto are shown

configureNodesDBBelow is the MySql setting, accessed by clicking the mouse twice on ESPMYSQL

MySqlSettingUpdate button updates the node.

To make the flows operational click on Deploy


Now, with nodered we take the contents of the various mqtt topics and insert them into MySql and InfluxDB.

In the next article we display these data in Grafana.