Skip to content

InHand IG Series Setup

This document outlines connecting an InHand Networks IoT Edge Gateway

Prerequisites

This tutorial focuses on the connection of the gateway to Exosite. For general setup, network connections, connecting to InHand's Device manager, and collecting tags/registers, refer to InHand's documentation. It is also assumed that you have an ExoSense account.

Initial Exosite setup (once)

To connect an InHand Gateway to Exosite, first add the InHand Networks IoT Connector to your Murano business.

InHand Setup (For each gateway added)

Pre-Provision Gateway

From the "Home" tab in Murano, scroll down to the "IoT Connectors" section and select your InHand IoT Connector, taking you to the device page. On the device page, click the orange "+ New Device(s)" button in the top right corner.

Once you have created the device, select it from the device list. From here, click the orange "ACTIONS" button in the top right corner.

From the drop-down menu, select "Manually Set Device Credentials".

A token will automatically be generated and will populate the token field of the "Set device credentials (token)" popup. Copy this token and paste it into a text file for later use - you will not be able to view this token again in Murano. If you lose this token, you can clear the device credentials and generate a new one.

Enable Cloud Connection

First, in the InHand Gateway cloud connection needs to be enabled. To enable the Cloud Service, navigate to "Edge Computing" -> "Device Supervisor" -> "Cloud" and enable the service

Configure MQTT Connection

Second, we will configure the MQTT connection to Exosite's Murano platform.

The following settings should be applied:

Type: MQTT

Server Address: Your URL to your IoT Connection in the form of <product_id>.m2.exosite.io

Client ID: Your Device ID that you pre-provisioned

Username: Your Device ID that you pre-provisioned

Password: Your Device's password/token

Port: 8883 (not 1883)

TLS Encryption: Enabled

rootCA: Upload -> DigiCertGlobalRootCA.pem

Configure MQTT Topic to send data

Lastly, we need to send the data in accordance with Exosite's Industrial IoT Schema

Create a new topic to publish data to. Call it data_in and set the topic to $resource/data_in

Once created, select the pencil icon to edit the configuration of the topic. Configure the topic as follows:

Note

If you have groups in the device monitor added besides the default group, you may want to add them here as well.

Below is the code so you can copy/paste:

# Enter your python code.
import json
from common.Logger import logger
from quickfaas.remotebus import publish


def main(message):
    logger.debug(message)
    data_in = {}
    for measure in message["measures"]:
        if (measure["timestamp"] != 0):
            data_in[measure["name"]] = measure["value"]
#        data_in[measure["name"]+"full"] = json.dumps(measure)

    if data_in:
        publish(__topic__, json.dumps(data_in), __qos__)

Setting config_io in Murano (For each gateway added)

Channel configuration overview

Now that we have created an IoT connector, added a device, and configured the InHand cloud connection to Murano, we must define the channel configuration for each device. The channel configuration uses JSON format and is stored in the config_io resource in the IoT Connector. The channel configuration will depend on the specific types of data the device is transmitting. A channel configuration overview can be found here. The full specification for the channel configuration and for data types / units can be found here: Exosite Industrial IoT Schema Repository.

Manually setting config_io

To avoid formatting issues, we recommend creating your config_io JSON string in a text editor and copy/pasting it into the Murano UI. To manually set the config_io for your InHand device, navigate to the InHand IoT Connector in Murano. From the device list, select the device for which you would like to set the config_io. You will see a list of resources for this device. Click the pencil icon in the "config_io" row.

Paste your config_io JSON string into the text field and click "Set".

Conclusion

At this point, we have created an InHand IoT Connector, added at least one device, configured the InHand cloud connection to Murano, and set our device's config_io resource. You are now ready to claim the device in your ExoSense instance.