MQTT Client / Publishing Data to InfluxDB with MQTT Client
In this video of our N3uron Academy, we are going to publish wind turbine analog sensor data for gearbox temperature, shaft bearing temperature, and wind speed using N3uron’s MQTT Client module to an InfluxDB instance. Let’s get started!
[09:29] Configuring MQTT Client
[06:30] MQTT Client Custom Parser
[04:07] MQTT Client Custom Payload
[05:57] Connecting MQTT Client to AWS
[04:46] Connecting MQTT Client to Azure
[05:06] Publishing Data to InfluxDB with MQTT Client
[00:00] Hello everyone! In this video, we are going to publish wind turbine analog sensor data for gearbox temperature, shaft bearing temperature, and wind speed using N3uron’s MQTT Client module to an InfluxDB instance. To follow along, make sure you have an InfluxDB account, along with the Telegraf program installed, which we will use to collect and process MQTT data before storing it in InfluxDB. First, let’s create a new MQTT Client module in N3uron. Navigate to the “Config” tab, select “Modules,” and click on “New Module”. Assign a name such as “MqttClient” and set the Module type to “MqttClient”. Save the configuration. Now, select the newly created MQTT Client module in the Explorer panel and click on the module header menu.
[01:00] Choose “New Connection” and name it “mosquitto”, for example. Since we want to establish a secure connection, we will provide authentication credentials and a certificate. Enter the username and password, and upload the required certificate file. Next, let’s create a new publisher agent within the Mosquitto broker connection. Click on “New Agent” and select “Publisher”. Set the topic to “Turbine_Data” and configure the publishing interval to 5000ms to send data updates every five seconds. Change the “Message Format” serialization option to “InfluxDB,” which ensures that the data structure is compatible with InfluxDB’s time-series format.
[02:03] Provide a measurement name, such as “TurbineMeasurements,” and create a filter to select the tags to be published. Save the configuration. Now that everything is set up, let’s verify that data is flowing correctly. In the N3uron WebUI, navigate to the “Diagnostics” tab and check the “MQTT Client” module logs to confirm successful publishing. Next, let’s move on to configuring InfluxDB to receive MQTT data. Log in to your InfluxDB Cloud account and navigate to the “Telegraf” section. Click on “Create Configuration” and choose the bucket where the data will be stored, in this case, “N3uron”. Next, select “MQTT Consumer” as the input plugin. Configure the MQTT Consumer by specifying the broker URL, setting the topic filter to “Turbine_Data” so that only relevant messages are ingested, entering the username and password, and specifying the path to certificates for a secure connection.
[03:13] Ensure that the data format is set to “Influx” to match the message serialization from the N3uron MQTT Client. Save and apply the configuration. Next, we will set an environmental variable for INFLUX_TOKEN. The example provided by InfluxDB is for Unix-like operating systems using the export command, but in Windows PowerShell, we will use the setx command followed by the environmental variable name, in this case, INFLUX_TOKEN, and then the token string. After setting the environmental variable, we verify its creation. Then open a new terminal to launch the Telegraf agent using the command provided by InfluxDB. After this, navigate to the N3uron bucket, select the correct measurement, and select the tags and fields.
[04:34] As we can see, the data is successfully published from N3uron to InfluxDB. And that’s it! We have successfully configured the N3uron MQTT Client to publish data to InfluxDB. Thanks for watching, and see you in the next video!
N3uron software is an Industrial Edge Platform for IIoT and DataOps that streamlines the flow of data between industrial systems and business applications, either on-premise or in the cloud. N3uron provides an out-of-the-box solution for data standardization, normalization and contextualization, seamless integration with industrial and IT systems, efficient information management, and unparalleled scalability and security. The N3uron platform makes it easier for operations teams to aggregate, manage and analyze industrial data, resulting in enhanced productivity and informed decision-making. Whether you're looking to optimize your operations, reduce downtime or improve product quality, the N3uron platform is the answer.
CONTRIBUTING MEMBER
N3uron is a Contributing Member of the Eclipse Foundation, actively participating in the development of their robust ecosystem. By leveraging EF technologies, we offer innovative products and services that drive our corporate strategy forward. N3uron is Sparkplug Compatible Software.
DLMS® UA MEMBER
N3uron is a member of the DLMS® User Association, the global community that drives standardization in the energy and water industry. Being part of the DLMS UA represents N3uron's commitment to advancing smart metering and energy management solutions.
FOLLOW US
N3uron Connectivity Systems • Paseo de la Castellana, 91, 4º, 1; Madrid, 28046, Spain • +34 911 841 938 • [email protected]
N3uron software is an Industrial Edge Platform for IIoT and DataOps that streamlines the flow of data between industrial systems and business applications, either on-premise or in the cloud. N3uron provides an out-of-the-box solution for data standardization, normalization and contextualization, seamless integration with industrial and IT systems, efficient information management, and unparalleled scalability and security. The N3uron platform makes it easier for operations teams to aggregate, manage and analyze industrial data, resulting in enhanced productivity and informed decision-making. Whether you're looking to optimize your operations, reduce downtime or improve product quality, the N3uron platform is the answer.
CONTRIBUTING MEMBER
N3uron is a Contributing Member of the Eclipse Foundation, actively participating in the development of their robust ecosystem. By leveraging EF technologies, we offer innovative products and services that drive our corporate strategy forward. N3uron is Sparkplug Compatible Software.
CONTRIBUTING MEMBER
N3uron is a Contributing Member of the Eclipse Foundation, actively participating in the development of their robust ecosystem. By leveraging EF technologies, we offer innovative products and services that drive our corporate strategy forward. N3uron is Sparkplug Compatible Software.
FOLLOW US
N3uron Connectivity Systems • Paseo de la Castellana, 91, 4º, 1; Madrid, 28046, Spain • +34 911 841 938 • [email protected]
N3uron software is an Industrial Edge Platform for IIoT and DataOps that streamlines the flow of data between industrial systems and business applications, either on-premise or in the cloud. N3uron provides an out-of-the-box solution for data standardization, normalization and contextualization, seamless integration with industrial and IT systems, efficient information management, and unparalleled scalability and security. The N3uron platform makes it easier for operations teams to aggregate, manage and analyze industrial data, resulting in enhanced productivity and informed decision-making. Whether you're looking to optimize your operations, reduce downtime or improve product quality, the N3uron platform is the answer.
CONTRIBUTING MEMBER
N3uron is a Contributing Member of the Eclipse Foundation, actively participating in the development of their robust ecosystem. By leveraging EF technologies, we offer innovative products and services that drive our corporate strategy forward. N3uron is Sparkplug Compatible Software.
DLMS® UA MEMBER
N3uron is a member of the DLMS® User Association, the global community that drives standardization in the energy and water industry. Being part of the DLMS UA represents N3uron's commitment to advancing smart metering and energy management solutions.
FOLLOW US
N3uron Connectivity Systems • Paseo de la Castellana, 91, 4º, 1; Madrid, 28046, Spain • +34 911 841 938 • [email protected]