Publishing Data via MQTT with vNode: A Step-by-Step Guide

Created by Jose Fabian Solano, Modified on Tue, 22 Jul at 9:11 PM by Jose Fabian Solano

Guide: Publishing Data to MQTT Using vNode (English)


✅ Requirements

Make sure you have the following before starting:

  • vNode installed and running

  • Access to an MQTT broker (local or cloud)

  • A real or simulated tag to publish

  • Broker details:

    • IP address or hostname

    • Port (1883 or 8883)

    • Username/password (if required)

    • Certificates (for TLS, if applicable)

    • Topic structure you want to use


✅ Step 1: Create the MQTT Client Module

  1. Go to the Config section in the vNode interface.

  2. In the Explorer panel, expand Modules.

  3. Right-click and select New Module.

  4. Name the module (e.g., mqtt).

  5. In Module Type, select mqttclient.


✅ Step 2: Configure MQTT Connection

  1. After creation, the module will appear under Modules in the Explorer.

  2. Click on it and fill in the required fields:

    • MQTT Version: 3.x or 5

    • Broker Type: Custom (for Mosquitto or generic brokers)

    • Authentication Type: None if credentials aren't required

    • Protocol: mqtt or mqtts

    • Broker URL: use 127.0.0.1 or localhost for Mosquitto

    • Port: typically 1883




? Mosquitto is available at: https://mosquitto.org/download/


✅ Step 3: Add a Publisher Agent

  1. In the module, go to the Agents section.

  2. Add a new agent of type Publisher.

  3. Configure the following:

    • Trigger Type: Events

    • Interval (ms): 1000 or as required

    • Topic: e.g. Plant/Temperature or any topic you need

    • Message Format:

      • Use JSON to send vNode's default format

      • Use Custom if you want to define a specific JSON structure



✅ Step 4: Select tags to publish

  1. In the Tag Filter, select the tags to be published.

  2. Only those tags will be sent to the broker.


⚠️ Event-based publishing means only values that change will be transmitted within the defined interval.


✅ Result

Once deployed, vNode will begin publishing data to the broker under the configured topics, ready for any MQTT subscriber to receive.

✅ Communication Test

To verify that vNode is publishing correctly to the MQTT broker, you can use a client tool such as MQTT Explorer.

? Download it from the official website:
? https://mqtt-explorer.com

This tool lets you view topics, live data, and message structure in real time, helping you confirm that your vNode instance is communicating properly.


Created by JF

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article