Using Node-RED with ControlCom Connect

Node-RED is a browser-based, flow-driven editor for wiring devices and services together. This guide walks through connecting a Node-RED flow to ControlCom Connect over MQTT-TLS: create a Device, download the certificates, configure the MQTT out node, and send a test payload.

Overview

The integration uses MQTT over TLS. The platform issues a per-Device certificate bundle (device certificate, public key, private key, Amazon Root CA 1 2048). Node-RED's built-in MQTT out node connects to the platform's broker using those certificates and publishes payloads that the platform routes into the Device's Variables.

Prerequisites

Create a Device

  1. Go to https://console.controlcomtech.com/ and log in.
  2. Navigate to Administration → Devices.
  3. Click [New Device].
  4. Select Generic Device.
  5. Enter a name and description.
  6. Click Create.
ControlCom Connect Device List Page
Device list page in ControlCom Connect
Creating a new device in ControlCom Connect
Creating a new device in ControlCom Connect

Add a Variable

The Device needs at least one Variable to receive data. For this walkthrough, create a temperature Variable:

  1. Open the Variables section of the newly created Device.
  2. Click Add Variable.
  3. Fill in:
    • Variable Nametemperature
    • Description — Temperature readings from the device
    • Topic Property Pathtemperature (must match the key used in the MQTT payload)
    • TypeNumber
    • Unit°
  4. Click Add Variable.
Adding a temperature variable in ControlCom Connect
Adding a temperature variable in ControlCom Connect

Download Certificates

After Device creation, the platform displays the certificate bundle:

  1. Download the device certificate, public key, private key, and Amazon Root CA 1 2048.
  2. Tick "I agree that I've downloaded the files above".
  3. Click Continue.

Store these files securely — you cannot re-download them later.

Saving device certificates in ControlCom Connect
Downloading security certificates for your device

Connection Details

The next screen shows the MQTT connection parameters. Copy them somewhere safe — you'll plug them into the Node-RED MQTT broker config.

  • Endpoint — the MQTT broker URL.
  • Client ID — the Device's unique identifier.
  • Topic — the topic to publish and subscribe to.
MQTT connection details for ControlCom Connect
MQTT connection details for your device

Build the Node-RED Flow

Configure the MQTT broker

  1. In Node-RED, drag an MQTT out node onto the canvas.
  2. Double-click the node. Click the pencil icon next to Server to add a new broker.
  3. In the broker config:
    • Server — the endpoint from the connection details.
    • Port8883 for secure MQTT.
    • Tick Use TLS.
    • Click the pencil icon next to TLS Configuration to add a TLS config.
  4. In the TLS config:
    • Upload the device certificate (*certificate.pem.crt).
    • Upload the private key (*private.pem.key).
    • Upload the CA certificate (AmazonRootCA1.pem).
    • Click Add.
  5. Back in the broker config:
    • Set Client ID to the value from the connection details.
    • Tick Use clean session.
    • Click Add.
  6. In the MQTT out node:
    • Set Topic to the value from the connection details.
    • Click Done.
Adding a new MQTT server in Node-RED
Adding a new MQTT server in Node-RED
Configuring TLS for MQTT in Node-RED
Configuring TLS security for MQTT connection
Configuring MQTT out node in Node-RED
Configuring the MQTT out node in Node-RED

Send a test payload

  1. Drag an Inject node onto the canvas; wire it to the MQTT out node.
  2. Double-click the Inject node.
  3. Delete the .topic property — the topic is already set on the MQTT out node.
  4. Set the payload type to JSON and enter:
{
    "dataArray": [
        {
            "key": "temperature",
            "value": 24.5
        }
    ]
}
  1. Click Done, then click Deploy.
  2. Click the small button on the left side of the Inject node to send the payload.
Configuring Inject node with JSON payload in Node-RED
Configuring the Inject node with temperature data payload

The platform routes the temperature key to the matching Variable on the Device. Check the Device detail page to confirm the value 24.5 arrived.

For more information on payload formats and data transmission, see the Sending Data documentation.

Once configured, your Node-RED flow will be able to securely connect to the ControlCom Connect platform and send data.

Best Practices

This section will be developed soon with best practices for using Node-RED with ControlCom Connect.

Was this page helpful?