Product Documentation

FairCom Edge IoT Database

Previous Topic

Next Topic

Tutorial for the ThingWorx MQTT Extension

This tutorial demonstrates the basics of using the FairCom Edge ThingWorx Extension. This extension uses MQTT (Message Queuing Telemetry Transport) to connect to the ThingWorx platform.

Note: The FairCom Edge ThingWorx Extension has been deprecated in favor of the ThingWorx AlwaysOn Plug-in.

FairCom Edge also provides a ThingWorx plug-in using the AlwaysOn protocol, as described inThingWorx AlwaysOn Plug-in. The AlwaysOn connector provides enhanced integration with ThingWorx.

This section explains how to install FairCom Edge on the ThingWorx platform. ThingWorx allows enterprise-scale applications to be modeled by dragging and dropping "things."

FairCom Edge requires creation and configuration of a FairCom Edge "thing" in ThingWorx. Please refer to the ThingWorx website and the FairCom Edge Thing download in the ThingWorx Marketplace for more information.

You will need to install and start the FairCom Edge HUB, as described in Download and Installation.

To install the FairCom Edge MQTT extension to ThingWorx, follow these steps:

  1. From a web browser, launch ThingWorx.
  2. Log into ThingWorx as an administrator.
  3. Go to Import/Export > Import.
  4. Click Choose File and select (located in c-treeEDGE.<platform>\sdk\Thingworx)
  5. Click Import.

    Note: If an "Import Successful" message does not display, contact your ThingWorx System Administrator.

  6. Click Yes to refresh Composer after importing the final extension.
  7. Confirm that the Extension has been imported properly. Check the Application Log for potential problems.


Create a new "thing" and select CtreeEdgeMQTTThingTemplate as a Thing Template.

Once the FairCom Edge Database "thing" is created, it must be configured to connect to a FairCom Edge Database instance.

  • Within the ThingWorx Composer, open up the FairCom Edge Database "thing"
  • Navigate to the Configuration section
  • Under the connection settings, enter valid information for each of the connection parameters

Click the Add button to set the first property to be persisted on the Edge and enter the following information:

  • "Thing" to have property persisted on the Edge.
  • Property name to be persisted on the Edge.
  • MQTT Topic mapped to the property.
  • JSON tag used to send/get the property value.
  • Number of threads used on the FairCom Edge for persistence. This number should be increased only in case the volume of data is expected to be high.
  • Database where the persistent table will be created/maintained. Enter:
  • Table name for the persistence data.
  • If FairCom Edge should automatically add a timestamp to the persisted information.

Configure the MQTT System Topic. It must match the one subscribed to by the FairCom Edge. Enter the following information:

  • ServerName for the MQTT broker.
  • ServerPort for the MQTT Port number.
  • UserName for authentication.
  • UserPassword for authentication.
  • UseSLL in case the MQTT connection should be SSL.
  • SystemTopic the FairCom Edge is subscribing to.

Save the "thing."