IoT Hub Method

A IoT Hub Method receives a method call from the Azure and executes a trigger.

Defining a IoT Hub Method event trigger

To define a IoT Hub Method event trigger, follow these steps:

  1. From the Workbench left pane, expand the node where you want to define the IoT Hub Method event trigger.
  2. Click Projects.
    The Projects tab appears with all the projects in the node.
  3. Right-click on a specific project and then click New > Use Canvas Editor.
    Alternatively, click New button at the bottom of the Projects window when a specific project tab has already been selected.
  4. The new Trigger window appears.
    Name the trigger. The trigger name can be up to 64 characters and include letters, numbers, and the underscore character. Spaces are allowed.
  5. From the Event tab, click Trigger Event Type drop-down, expand the Azure category, and then select IoT Hub Method.

The Event tab becomes active with parameters that accommodate the IoT Hub Method.

Parameter Description
Method Name The name of Method received that causes this trigger to execute.
Method Arguments Template A template defining the event variables to be expected for the method request. Specifies the event variables that will hold the method arguments from Azure using JSON. For more on defining the input variables, see Defining the input variables.
Method Output Type You will be able to set the Method output type to either JSON or String.
When set to String the response to Azure should be placed in the Method Response event variable. When set to JSON, you will define all event variables that will be sent to Azure. The variables will be sent in a JSON format.
Method Output Template Specifies the Method Output template. A template defining the event variables that will be used for the JSON Method Response.