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 to connect to the ThingWorx platform.

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

The FairCom EDGE database 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 database, as described in Download and Installation.

To install the FairCom EDGE database 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 ctreeEdgeThingworxExtension.zip. (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.

Configuration

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:
    ctreeSQL
  • 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."

TOCIndex