View as Markdown

Bring Your Own Device

Bring Your Own Device is the path for hardware and software you already have: custom firmware, a script on a Raspberry Pi, an application that already holds the readings you want to see in ControlCom Connect. You register a Generic device, download its credentials, and publish data to it over MQTT or HTTP.

Overview

ControlCom Connect has two ways to get data in. The Edge Solution puts a ControlCom Edge Server next to your equipment and reads industrial protocols such as Modbus for you. Bring Your Own Device skips the Edge Server: your own code connects to the platform directly and publishes the values it has.

The steps are short. Create a Generic device in the platform, define a Variable for each value the device will report, then send data with the MQTT broker details or the HTTP API. Node-RED is one convenient client for the sending part, but any MQTT library or HTTP client works.

Prerequisites

You need a ControlCom Connect account with an Organization you can add devices to. If you do not have one, create it at console.controlcomtech.com.

The device or application you are connecting needs outbound network access to the platform: port 8883 for MQTT over TLS, or HTTPS for the API. Nothing needs to be reachable from the outside.

Creating a Device

  1. Log in at console.controlcomtech.com.
  2. Open Devices under System in the sidebar and click New Device.
  3. Choose Generic.
  4. Enter a name and description, then click Create.

The platform provisions the device and opens Download Certificates & Secrets. Save the device certificate, the private key and the Amazon root certificate: the private key is generated once and cannot be downloaded again. Tick the acknowledgement checkbox and click Continue to see the device's MQTT connection details (endpoint, client ID and topic). Copy those as well.

If you lose the files, the device's Certificates tab lets you generate a new certificate. The Device Administration page describes the device types, the creation flow and certificate rotation in full.

Defining Variables

A Variable is where a published value lands. Each key your device sends needs a matching Variable on the device, and the Variable's Topic Property must equal that key. If your payload carries temperature, create a Variable with Topic Property temperature and type Number. Values for keys without a Variable are ignored.

Variables are created on the device's Variables tab. The Variables page walks through the dialog, the data types and the Store Data setting that controls whether history is kept.

Sending Data

With the device and its Variables in place, publish data using whichever method fits your device.

MQTT uses the certificates and connection details from the previous step. Connect to the endpoint on port 8883 with TLS, authenticate with the device certificate and private key, and publish JSON to the device's topic. A minimal payload looks like this:

{
  "timestamp": 1647359121000,
  "dataArray": [
    { "key": "temperature", "value": 24.5 }
  ]
}

HTTP posts the same payload shape to the platform API and authenticates with an API key instead of certificates, which suits applications that do not keep a persistent connection.

Once the first message arrives, the Variable's current value updates on the device's Variables tab. That is the quickest way to confirm the connection works.

Using Node-RED

This step is optional. If you would rather not write MQTT code, Node-RED's built-in MQTT out node can publish to the platform using the certificate bundle. The Node-RED guide covers configuring the broker with TLS, entering the client ID and topic, and sending a test payload.

Next Steps

Your device is now part of the Connect and Collect stages. To see its values on a screen, create a dashboard in the Visualize stage, or open the Variable in Platform Explorer to query its history in the Analyze stage.

Was this page helpful?