These instructions assume you have downloaded FairCom EDGE HUB and installed it on the same machine as the application. See Download and Installation. They also assume you have followed the directions elsewhere in this document to configure your environment.
Enabling the MQTT (Message Queuing Telemetry Transport) Plug-in
For security reasons, plug-ins are not enabled by default.
The MQTT plug-in is enabled by adding the following information to the server configuration in the file named ctsrvr.cfg in the server/config folder:
The plug-in is loaded at server startup and starts listening for MQTT messages and starts sending messages in response to previously cached data and new data collected by the HUB.
MQTT Plug-in Configuration
The MQTT plug-in is configured using the cthttpd.json file in the \server\config\ folder. This file is in JSON format. It contains all the HTTP configuration settings. The MQTT settings are controlled by the properties starting with mqtt_.
If you want to run the HTTP server but you do not want to run MQTT, set mqtt_enabled to false.
You can change the TCP/IP port on which MQTT is listening by setting "mqtt_listening_port" to another port number, such as 2020.
If you want to use the FairCom EDGE to broker MQTT messages but you do not want to cache data from those messages, set "mqtt_persistence_enabled" to false.
You can turn on MQTT logging by setting "mqtt_log_enabled" to true.
Definitions of additional MQTT configuration parameters:
Advanced SSL Certificate Options
The ssl_certificate keyword in the config/cthttpd.json web server plug-in configuration supports the fccert.pem, which is a self-signed certificate we supplied. To use your own certificate, use the following keywords to config/cthttpd.json: