NDU Gateway

Integrate legacy and third-party systems with NDU platform using IoT Gateway.

NDU Gateway Features

This guide explains how to use RPC API on NDU Gateway.

For the purpose of this tutorial, you need:

  1. Locally installed instance of NDU platform (In case you are new with NDU use this ‘how to install’ documentation).
  2. Installed and configured NDU Gateway.

Gateway RPC methods

To send RPC requests to the gateway the one should use RPC Debug Terminal from Control widgets bundle.
NDU Gateway has several RPC methods, which called from WEB UI, available by default.
The list of OOTB methods will be extended within upcoming releases.

gateway_ping RPC method

gateway_ping RPC method is used to check connection to the gateway and RPC processing status. Every command with prefix “gateway_” will be interpreted as a command to general gateway service and not as an RPC request to the connector or device. Command:

1
gateway_ping

The response is:

1
2
3
4
{
  "code": 200,
  "resp": "pong"
}

Gateway RPC ping method

gateway_devices RPC method

gateway_devices RPC method is used to list devices connected through the gateway with info about the type of connector used. This method returns object in “resp” with key-value parameters, where: key — is a device name value — identifies the connector

Command:

1
gateway_devices

Returns object like:

1
2
3
4
5
6
{
  "code": 200,
  "resp": {
    "Device Number One": "OPC-UA Connector"
  }
}

Gateway RPC devices method

gateway_restart RPC method

gateway_restart RPC method is used to schedule restart action, e.g. bash gateway_restart 60 set up the restart of the gateway service in 60 seconds. This method uses seconds as measuring unit.

Note: The response will be returned after adding the task to the gateway scheduler.

Command:

1
gateway_restart 60

The response is:

1
{"success": true}

Gateway RPC restart method

gateway_reboot RPC method

gateway_reboot RPC method is used to schedule rebooting of the gateway device (hardware?), e. g. bash gateway_reboot 60 set up the reboot of the gateway device in one minute. Take into account: this method available if you start the gateway service as a python module instead of daemon approach and the user that is running the gateway has reboot permissions. Command:

1
gateway_reboot 60

The response is:

1
{"success": true}

Notate: The response will be returned after adding the task to the gateway scheduler.

Gateway RPC reboot method