II. InfluxDB & Node-RED & MQTT Tutorial: Sending data to InfluxDB
Store data from Node-RED to InfluxDB with a Raspberry PLC
23 septiembre, 2021 por
II. InfluxDB & Node-RED & MQTT Tutorial: Sending data to InfluxDB
Boot & Work Corp. S.L., Fernandez Queralt Martinez

INTRODUCTION

As InfluxDB is an open-source time series database (TSDB), it is designed so that it is easy to store and access information. A good database is crucial to any company or organisation. This is because the database stores all the pertinent details about what the company wants to store, like salaries, transactional records or any valuable information.

In this blog, we will continue this blog  Go >>> and we will learn how to send data to the database, only installing an InfluxDB node on Node-RED.

RELATED LINKS


How to install
Mosquitto

Read >>>


How to connect Raspberry PLC to WiFi

Read >>>


Raspberry PLC configurable

See >>>


MQTT & Raspberry PLC & Node-RED

Read >>>


How to find your perfect industrial PLC

Read >>>


Raspberry Pi based Panel PC products

See >>>


Node-red-contrib-influxdb

Now, we are going to  open Node-RED >>>  and install node-red-contrib-influxdb nodes from InfluxDB.

1. So, go to the Menu > Manage Palette > Install > Type: node-red-contrib-influxdb and click on Install.

2. Then, go to the nodes sections, filter your search by influx, and drop an Influx out node to the flow.

3. Then configure your Influx out node with a server, organisation, bucket and measurement. We did it like this:

[{"id":"0e17644c4b3628b4","type":"influxdb out","z":"b716fdc48724e610","influxdb":"bc4ab5cb2a050021","name":"","measurement":"test","precision":"","retentionPolicy":"","database":"","retentionPolicyV18Flux":"","org":"Industrial Shields","bucket":"test","x":340,"y":100,"wires":[]},{"id":"bc4ab5cb2a050021","type":"influxdb","hostname":"127.0.0.1","port":"8086","protocol":"http","database":"test","name":"test","usetls":true,"tls":"d50d0c9f.31e858","influxdbVersion":"2.0","url":"http://localhost:8086","rejectUnauthorized":false,"credentials":{}},{"id":"d50d0c9f.31e858","type":"tls-config","name":"","cert":"","key":"","ca":"","certname":"","keyname":"","caname":"","servername":"","verifyservercert":false}]

Note: In order to import this json file, go to Node-RED > Menu > Import > Paste this JSON file, and click on Import.

4. Finally, add an inject node with a number to run this example.

Odoo • Image and Text

Get data from InfluxDB

Now, deploy your application and click on the button from the inject node to send the data to the database.

So, let's see what we got in the database now!

Odoo • Image and Text

As you can see, we have stored the information in InfluxDB! But, what if the information would not come from an inject node, but from MQTT data?

Want to learn how?

Continue >>>

II. InfluxDB & Node-RED & MQTT Tutorial: Sending data to InfluxDB
Boot & Work Corp. S.L., Fernandez Queralt Martinez
23 septiembre, 2021
Compartir
Archivar

¿Buscas tu controlador lógico programable ideal?

Echa un vistazo a esta comparativa de producto de varios controladores industriales basados en Arduino.

Comparamos entradas, salidas, comunicaciones y otras especificaciones con las de los equipos de otras marcas destacadas.


Comparación PLC industrial>>>

¿Quieres más información?

¡Rellena el formulario!

¡Cuéntame más!