FLIR GW65 Vibration Sensors

The foglamp-south-gw65 plugin provides a mechanism to connect the FLIR vibration sensors, via the GW65 gateway to FogLAMP. The plugin allows the GW65 to be used to connect sets of the SV87 vibration sensors. Raw vibration data is then collected from the sensors and may be process by one or more of the filters that offer vibration analysis.

The connection between the sensors and the plugin, via the GW65 gateway as established using the FLIR mobile application, before starting this process however you must install and configure the foglamp-south-gw65 plugin. The plugin may be installed either by the user interface or by using the package manager of your Linux system to install it manually from a package.

You must also have an MQTT broker configured and running on your network. This should be configured to allow MQTTS and also have a username and password for the FLIR gateway to use.

Creating the GW65 South Service

Using the normal procedure for creating a new south service in FogLAMP,

  • Select the South item from the menu on the left hand side of the screen

  • Click on the Add + link on the top left of the South service screen

  • In the list of available plugins choose the gw65 entry, if it is not in the list click on the available plugins link and install it.

  • Enter a name for your service and click on Next

  • The configuration page will appear

    gw65_1
    • Asset Name: The asset name to use as a fallback asset. This is normally unused.
    • MQTT Broker: The address of the MQTT broker that will be used to communicate with the GW65 gateway.
  • Enter the address of your MQTT broker, if you running the broker on the same machine as FogLAMP then you may use the default of 127.0.0.1.

  • Click on Next

  • Enable the service and click on Done

You may now proceed to configure the GW65 using the FLIR mobile application.

  • Open the FLIR application and select the LOCAL SERVER option.

    app_1
  • Click on the Add Server link

    app_2
    • Server IP: This is the IP address of your MQTT server. If you used the default 127.0.0.1 address in the south service then this should be the external address of your FogLAMP machine and not that address/
    • User name: The user name you configured in your MQTT server.
    • Password: The password assigned to the above user.
    • Port: Leave this as the default value 8883
  • Click on Continue

    app_3
  • Click on the name of the discovered gateway and follow the steps to setup a connection to the WiFi network

  • You will see the details of your GW65 gateway

    app_4
  • Click on Continue and follow the instructions to add your sensors

Installing an MQTT Broker

You may use any compatible MQTT broker with the plugin and FLIR GW65 gateway, during testing the Mosquitto MQTT broker was used, a package exists that allows this to be installed and configured for use with gateway, this package is called foglamp-mqtt-broker.

To use the package simply use your package manager to install the package, for example on a apt based system such as Ubuntu

apt install foglamp-mqtt-broker

This will

  • Install the mosquitto MQTT service
  • Configure it with a certificate
  • Add a user with the username foglamp
  • Start it listening on port 8883 for MQTTS

Alternatively you can manually configure the Mosquitto MQTT browser by using the following steps

  • Edit the configuration file /etc/mosquitto/mosquitto.conf and adding the following lines

    # Start of MQTTS support
    listener 8883
    cafile /etc/mosquitto/certs/ca.crt
    certfile /etc/mosquitto/certs/client.crt
    keyfile /etc/mosquitto/certs/client.key
    
    password_file /etc/mosquitto/passwordfile
    # End of MQTTS support
    
  • Create a password file by running the command

    touch /etc/mosquitto/passwordfile
    
  • Create the foglamp user

    mosquitto_passwd -b /etc/mosquitto/passwordfile foglamp 123456
    
  • Generate the required certificates

    mkdir /etc/mosquitto/certs
    cd /etc/mosquitto/certs
    openssl req -new -x509 -days 365 -extensions v3_ca -keyout ca.key -out ca.crt -subj "/C=RO/ST=Home/L=Home/O=Dianomic/OU=FogLAMP/CN=dianomic.com" -passout pass:foglamp
    openssl genrsa -out client.key 2048
    openssl req -new -out client.csr -key client.key -subj "/C=RO/ST=H/L=Home/O=MQTT Broker/OU=MQTT Broker/CN=mqtt-broker.local"
    openssl x509 -req -in client.csr -CA ca.crt -CAkey ca.key -CAcreateserial -out client.crt -days 365 pass:foglamp
    openssl rsa -in client.key -out client.key
    
  • Set permissions for Mosquitto MQTT

    chown -R mosquitto:/etc/mosquitto
    chmod 700 /etc/mosquitto/certs
    
  • Then restart your MQTT broker

    systemctl restart mosquitto