How to Connect a Gateway Device?

How to Connect a Gateway Device?

A gateway is a device that collects data from connected sensors and communicates it to the Zoho IoT application. It typically cannot gather parameter data on its own but functions as an intermediary, relaying sensor data to the application.

Prerequisite

Connecting a Gateway device with the Zoho IoT application

Connecting a gateway to the Zoho IoT application involves two steps. First, you need to add a device instance in the Zoho IoT application to represent the gateway device. Once added, the device instance will generate a set of connection credentials. These credentials must then be configured in the physical gateway to establish a connection with the Zoho IoT application.

Adding a Gateway Device in the application

There are two ways to add a gateway device in the Zoho IoT application.
  1. Add Using Product Gallery (Devices)
  2. Add by Defining Your Own Device Product
When adding the device instance, make sure to:
  • Select the appropriate communication protocol: MQTT or HTTPS in the Device Connectivity field. A device instance can communicate with only one of these protocols.
  • Choose the correct Device Application. The gateway can either run the Zoho IoT Edge Agent or the default device application provided by the manufacturer. Selecting Zoho IoT Edge Agent enables remote Modbus configuration capabilities

Adding a Gateway Device Using Product Galley 

In this option, the required gateway device product is already available in the device gallery. You can simply import it and create a gateway device instance based on it.

To add a gateway device instance,
  1. Access the End Application.



  2. Select Devices > Devices in the left navigation pane.



  3. Click Add Device.



  4. Select Add Using Product Gallery (Devices) and click Proceed.



  5. In the device gallery, browse, filter, or search for your device.



  6. Click the required device product. For this example, TRB 245 is selected.



  7. On the device product information page, click Import and Proceed.



  8. In the Add Device form, provide the required information in the relevant fields.
    Example:
    Model Type: Create New Model (This toggle appears only if a device model already exists)
    Model Name: Gateway
    Name: MyTRB245
    Device Connectivity: MQTT
    Device Application : Edge Agent
    Authentication Type: Security Token with TLS



    Notes
    Learn more about each field.
  9. Click Proceed. A new gateway device will be added.


Based on the device application selected while adding the gateway device instance, the Onboarding Assistant will guide you through the next steps specific to that application. Proceed as follows:

Adding a Gateway Device using the By Defining your own device product option

If your gateway device is not listed in the device gallery, you can add it by defining your own device product. This option allows you to create a custom device product similar to the ones in the gallery and then create device instances based on it.

For this illustration, we’ll add a device product named EM 8000, which is a gateway device capable of communicating over HTTPS or MQTT.

To add a gateway device by defining your own device product
  1. Access the End Application.



  2. Select Devices > Devices in the left navigation pane.



  3. Click Add Device.



  4. Select Add by Defining Your Device Product and click Proceed.



  5. In the Product Details section, provide information about the device product.
    Example:
    Name: EM 8000
    Device Type: Gateway
    Peripheral Protocols: MQTT, HTTPS
    Device Application: Custom



    Notes
    Learn more about each field.
    NotesNotes:
    Before filling in the details, it is highly recommended to read the Understanding Device Product document.
    This step defines a device product, not a device instance
    For Modbus devices, Peripheral Sensor must be selected as the device type.
  6. Click Add. The device product will now be created.



  7. Since a gateway device does not measure any parameters by itself, there is no need to add any datapoint, So, click Proceed.



  8. In the new device form, provide the required details.
    Example:
    Model Type: Create New Model (This toggle appears only if a device model already exists)
    Model Name: Energy Meter
    Name: My EM8000

    Device Connectivity: MQTT
    Device Application : Custom Application
    Authentication Type: Security Token with TLS



    Notes
    Learn more about each field.
  9. Click Add. A new gateway device will be added to your application.



Based on the device application selected while adding the gateway device instance, the Onboarding Assistant will guide you through the next steps specific to that application. Proceed as follows:

If Edge Agent was selected:

  1. Click View device to open the device information page.



  2. In the Onboarding Assistant tab, select Got an IoT device and click Proceed.


If your modbus device is already added in the application, associate it to this gateway by clicking Manage > Assign > Select the required peripheral device > Next > Confirm > Close the Connected peripheral form.







Once the peripheral device is associated, its data sent by the gateway will be stored in the corresponding datapoints, provided that the edge key in the payload matches the connected peripheral device.



If you haven’t added the peripheral device yet, click
Add Device and follow the guide to add a Modbus peripheral device.
You can proceed to the next step only after associating at least one connected peripheral device. Once this is done, click Proceed.

On the Connect page, you will find the following details:
  • Broker URL
  • Broker port
  • Client ID / Device ID
  • Username
  • Password / Authentication token


Click Download Complete Registration Details to download the listed credentials. Then, follow this guide to use them in Edge Lite installed on your gateway to establish a connection.

If Manufacturer Define or Custom Application was Selected:

  1. The Device Registered Successfully dialog box will appear.
  2. Click Download complete registration details, if you need a local copy of the listed information.



  3. Click Ok.



  4. In the Onboarding Assistant page, select Got an IoT device and click Proceed.
  5. In the Prerequisite page, you can associate the required peripheral device, assets and locations of this gateway by clicking Manage > Assign > Select the required instance > Next > Confirm > Close the Connected peripheral form.
  6. Once done or if not required, click Proceed.


On the Connect page, you will find the following details
  • Broker URL
  • Broker port
  • Client ID / Device ID
  • Username
  • Password / Authentication token


Use these credentials in the Gateway device application to establish the connection.