Prerequisite Task

Before implementing the GPB/MQTT interface, some background infrastructure must be installed and configured.
Note: Installation steps are provided for CentOS-6 and Ubuntu users. If you have different platform requirements, refer to the Mosquitto website for other installation guides: https://www.mosquitto.org
  1. Use a Unix-compatible operating system (for example: DebianWheezy, DebianJessie, CentOS 6.6, Mac OSX 10.10, Mac OSX 10.11)
  2. Download and install a compatible JDK version 1.8 (OpenJDK8, OracleJDK (Java SE 8u161/8u162)). You can also use JDK8.
    If you are using a Linux OS, use OpenJDK 8 and download it from http://openjdk.java.net/install/. If you are working on Mac OS or Windows, refer to the Oracle website for downloading the latest JDK 8 http://www.oracle.com/technetwork/java/javase/overview/index.html.
  3. Download and install Gradle version 2.9.x from https://gradle.org/releases/.
  4. Download and install Mosquitto 1.4.x MQTT broker, MQTT client, and requisite client libraries from http://mosquitto.org/download/.
  5. If you are running CentOS-6, follow these steps:
    1. Run the following command:
      $ cd /etc/yum/yum.repos.d
    2. Add the following content into filehome-oojah-mqtt.repo.
      [home_oojah_mqtt]
      name=mqtt (CentOS_CentOS-6) type=rpm-md
      baseurl=http://download.opensuse.org/repositories/home:/oojah:/mqtt/ CentOS_CentOS-6/
      gpgcheck=1 gpgkey=http://download.opensuse.org/repositories/home:/oojah:/mqtt/C entOS_CentOS-6//repodata/repomd.xml.key
      enabled=1
      
    3. Run the following command:
      $ sudo yum update
    4. Run the following command:
      $ sudo yum install mosquitto mosquitto-clients
  6. If you are running Ubuntu, install Mosquitto MQTT broker with the following commands:
    $sudo apt-add-repository ppa:mosquitto-dev/mosquitto-ppa
    $sudo apt-get update
    $sudo apt-get install mosquitto mosquitto-clients
    
  7. Open the firewall to ports 1883 and 8883.
  8. Start the mosquitto broker on an instance which can be reached from the instance where the sample client is executed.
  9. Configure the controller with the Mosquitto IP address and port to transfer SCI data.
    Refer to the SmartZone technical documentation to achieve this.
  10. Enable SCI in the MQTT broker.