Skip to content

Mqtt Bridge

Introduction

The MQTT Bridge Asset Connector is a specialized component within the Coreflux ecosystem, designed to facilitate seamless connectivity between two MQTT brokers, with or without TLS (Transport Layer Security). This asset plays a crucial role in the Coreflux architecture, enabling real-time data exchange and communication across different segments of an IoT infrastructure. It serves as a bridge, ensuring secure and efficient data transfer between brokers, thereby enhancing the platform's overall data management capabilities.

Targeted at system integrators, application developers, and IoT device manufacturers, the MQTT Bridge Asset Connector is an invaluable tool for creating robust, interconnected IoT ecosystems. Its integration into the Coreflux HUB and compatibility with both Linux and Windows operating systems make it a versatile option for users seeking to leverage Coreflux's capabilities in asset management and broker deployment. The main purpose of this connector is to streamline the process of connecting devices and systems, facilitating a smooth data flow within an IoT setup without compromising on security or efficiency.

Features and Benefits

The MQTT Bridge Asset connector is designed to facilitate seamless data exchange and integration within the Coreflux ecosystem. Here are its key features and the benefits they offer to users:

Real-time Data Synchronization: This feature ensures that data across devices and systems is consistently up-to-date. Users benefit from having access to the latest information, which is crucial for making informed decisions and maintaining operational efficiency.

Protocol Conversion: The connector can translate between different communication protocols used by various devices and systems. This simplifies the integration process by allowing disparate devices to communicate effectively, eliminating the need to manually convert data formats.

Flexible Connectivity Options: It supports connections over various network types, including wired, wireless, and cellular networks. This flexibility ensures that devices in different locations or with different connectivity requirements can be integrated into the Coreflux ecosystem without significant infrastructure changes.

Security Features: With built-in encryption and authentication mechanisms, the connector ensures that data exchanged between devices and systems is secure from unauthorized access. This is critical for maintaining the integrity of sensitive information and protecting the network from potential cyber threats.

Scalability: Designed to accommodate the growth of the network, the connector can handle increasing amounts of data and a growing number of devices without a decrease in performance. This feature benefits users by ensuring that the system can evolve with their needs without requiring complete overhauls.

Effortless Deployment: The setup process is streamlined to facilitate quick and easy deployment. Users benefit from reduced implementation times, allowing them to realize the advantages of the connector without significant delays.

The MQTT Bridge Asset connector's ability to facilitate real-time data synchronization enhances operational efficiency by ensuring that decisions are based on the most current information. Protocol conversion and flexible connectivity options simplify the integration process, making it easier to connect a diverse range of devices and systems without extensive customization. Security features protect sensitive data and maintain system integrity, while scalability ensures the long-term viability of the ecosystem as user needs evolve. Finally, effortless deployment minimizes setup time, allowing users to quickly benefit from the connector's capabilities.

Prerequisites

To use the MQTT Bridge Asset connector effectively, the following prerequisites are essential:

Coreflux Central Account: Required for managing and monitoring the MQTT Bridge Asset. Coreflux MQTT Broker: Recommended for optimal compatibility and performance with the MQTT Bridge Asset, though other MQTT brokers can be used. MQTT Client: Software like MQTT Explorer is necessary for communicating with the MQTT broker and testing the MQTT Bridge connection. Coreflux Hub: Acts as a container for running the MQTT Bridge Asset within the Coreflux ecosystem. Software Dependencies: Besides basic MQTT protocol support, the connector might rely on specific libraries or runtime environments related to its deployment or the interaction with other services. Ensure that any such dependencies are addressed. Hardware Requirements: Adequate hardware to support the Coreflux Hub and the MQTT Broker, ensuring smooth operation of the MQTT Bridge Asset. The specific requirements can vary based on the deployment scale and complexity.

Remember, while it's possible to use another MQTT broker, using the Coreflux MQTT Broker is the only way to assure the MQTT Bridge Asset is running.

Asset Installation

Using Default Installation Method

Standard Procedure for Installing the MQTT Bridge Asset Connector

Using Coreflux Hub

Initialization: - Begin by accessing the Coreflux HUB, which acts as the central interface for interacting with the Coreflux ecosystem. If you're new to Coreflux, ensure that it is compatible with your operating system, as it supports both Linux and Windows.

Asset Installation Through UI: - Navigate to https://docs.coreflux.org/getting-started/first-asset/ for a detailed guide on how to get started with the installation of your first asset through the Coreflux Hub. This process involves using the Hub's User Interface (UI) for a seamless installation experience.

Topic Replication and Security Settings: - The MQTT Bridge asset allows for replication from multiple topics by specifying a prefix or wildcard. Security settings for the source and destination brokers can be configured independently, including TLS and authentication options.

Without the Coreflux Hub (Directly Using MQTT Broker)

Connect to Coreflux MQTT Broker: - Use your preferred MQTT client to connect to the Coreflux MQTT Broker. Ensure you have the correct security settings if applicable.

Login: - Send your login credentials to $SYS/Coreflux/Command with the payload -L myname@mydomain.com password.

Check Available Assets: - To view your assets, send -l to the same $SYS/Coreflux/Command topic. Identify coreflux_mqttbridge in the list to confirm availability.

Install Asset: - To install the MQTT Bridge asset, send the payload -I coreflux_mqttbridge to $SYS/Coreflux/Command.

Confirmation: - Upon successful installation, a message will be published to $SYS/Coreflux/Command/Output indicating the version, installation confirmation, and the asset's GUID.

Key Points:

  • Multiple Topic Replication: Enabled by specifying a topic prefix or wildcard in the Topic parameter of the Source configuration.
  • Broker Security Settings: Supports different security configurations for source and destination brokers, allowing independent setup of TLS and authentication.
  • Coreflux Architecture: Comprises the MQTT Broker, Asset Management, Coreflux HUB, and Cloud Coreflux, facilitating seamless and secure IoT device and data management.
  • Commands and Results: Installation and management commands are sent to $SYS/Coreflux/Command, and responses or outputs are received on $SYS/Coreflux/Command/Output.

By following these procedures, whether through the Coreflux HUB or directly via the MQTT Broker, you can effectively install and configure the MQTT Bridge asset connector, leveraging its capabilities for secure and efficient IoT deployments.

Asset Configuration

MQTT Bridge Asset Connector Configuration Parameters

Parameter Description Required Example
ClientID Unique identifier for the MQTT client Yes 1
Address IP address of the MQTT broker Yes 192.168.100.31
Port Port number of the MQTT broker Yes 1883
SubscribeQoS Quality of Service for subscription Yes 0
Username Username for MQTT broker authentication No username
Password Password for MQTT broker authentication No password
EnableTLS Enable TLS/SSL for secure connection Yes false
EnableAuthentication Enable authentication with MQTT broker Yes true
PublishWithRetain Keep the last published message on the topic available to new subscribers Yes false
AutoRestart Automatically restart connection on failure Yes true
PublishQoS Quality of Service for publishing messages Yes 0
Topic MQTT topic to subscribe or publish to Yes Coreflux/1

Example: JSON for Source

{
  "Source": {
    "ClientID": "1",
    "Address": "192.168.100.31",
    "Port": 1883,
    "SubscribeQoS": 0,
    "Username": "",
    "Password": "",
    "EnableTLS": false,
    "EnableAuthentication": true,
    "PublishWithRetain": false,
    "AutoRestart": true,
    "PublishQoS": 0,
    "Topic": "Coreflux/1"
  }
  "Destination": {
    "ClientID": "12",
    "Address": "127.0.0.1",
    "Port": 1883,
    "SubscribeQoS": 0,
    "Username": "",
    "Password": "",
    "EnableTLS": false,
    "EnableAuthentication": true,
    "PublishWithRetain": false,
    "AutoRestart": true,
    "PublishQoS": 0,
    "Topic": "Coreflux/S7Asset/DebugTopic"
  }
}

Saving the Configuration

Prerequisites

Ensure you are logged into the system and have your asset installed prior to attempting configuration settings. If these requirements are not met, please complete these steps first.

Save Configuration

To save your configuration for an asset, use the command format below. Make sure to replace <asset_guid> with your specific asset identifier and <configuration> with your JSON configuration.

Command format:

-assetConfigSave <asset_guid> <configuration>

Example:

Suppose you want to save a configuration for the asset with the GUID 64b569da-7941-4398-9565-e63f3e6c5e04. Your command should look something like this (remember to provide the actual JSON configuration where indicated):

-assetConfigSave 64b569da-7941-4398-9565-e63f3e6c5e04 (provide the json here)

ℹ You can find the asset asset_guid by consulting the $SYS/Coreflux/Assets topic.

Verify Configuration (Optional)

Although optional, it’s considered good practice to verify if the asset configuration was saved correctly. To check the configuration, use the following command, making sure to replace <asset_guid> with your actual asset identifier.

Command format:

-assetConfigLoad <asset_guid>

By following these straightforward steps, you can ensure the MQTT Bridge Asset Connector is accurately configured for your asset management and control requirements. Remember, meticulous attention to details in configuration can significantly influence the connector's functionality.