IBM Streams 4.2.1

Creating a device management configuration for IBM Watson IoT Platform

A device management configuration is a type of application configuration object that enables IBM® Streams to securely connect to your IBM Watson™ IoT device management service.

Before you begin

To connect to the IBM Watson IoT device management service, you must have your org, auth-key, and auth-token credentials. This information will be securely stored in the device management configuration, which is stored in the ZooKeeper server.

You can create the device management configuration at either the IBM Streams domain or instance level. Before you create the device management configuration, consider the domains and instances that your users have access to and ensure that your device management configuration is created at the correct level.

About this task

You can create a device management configuration from either the IBM Streams Console or from the interactive streamtool interface.

If you use IBM Watson IoT Platform as the message hub or device management service between Apache Edgent and IBM Streams, the device management configuration must have the following properties:
streams-type=streams-devicemanager
streams-devicemanager=streams-watsoniot
org=my_registered_IoT_org-id
auth-key=my_authorization_key_for_my_org-id
auth-token=my_auth_token_for_my_org-id
where:
streams-type
To create a device management configuration, you must set the value of this property to streams-devicemanager.
streams-devicemanager
To use IBM Watson IoT as the device management service, you must set the value of this property to streams-watsoniot.
org
This property indicates the organization name used to access the IBM Watson IoT device management service.
auth-key
This property indicates the authorization key of the specified organization name used to access the IBM Watson IoT device management service.
auth-token
This property indicates the authorization token of the specified organization name used to access the IBM Watson IoT device management service.

You can optionally specify these properties in a file to make it easier to create the device management configuration, especially if you plan to use the interactive streamtool interface.

Procedure

To create a device management configuration:

  1. To use the interactive streamtool interface to create the device management configuration, run the mkappconfig command:
    mkappconfig [-d,--domain-id did] [-i,--instance-id instance]
      [--description description] [--property name=value] ... 
    [--propfile property-file] [-U,--User user]
    [-h,--help] [--trace level] 
    [-v,--verbose level] config-name

    Replace the config-name variable with the name that you want to use for the device management configuration.

    You can specify the properties for the device management configuration by:
    • Pulling the values from a properties file by specifying the --propfile option.
    • Specifying each name-value pair individually by specifying the --property option for each property
    Tip: If you specify a value for both the --propfile option and the --property option, the values that are specified in the --property option override any values that are specified for the same property in the file that is specified by the --propfile option.
    If you specify each property manually from the interactive streamtool interface, your command might look something like this:
    mkappconfig --property streams-type=streams-devicemanager
    --property streams-devicemanager=streams-watsoniot --property org=IBM 
    --property auth-key=myauthorizationkey
    --property auth-token=myauthorizationtoken 
    My-Watson-IoT-devices
  2. To use the IBM Streams Console to create the device manager configuration:
    1. From the Management Dashboard, go to the Manage Apache Edgent Applications and Devices page.
    2. If you want to create the device management configuration on a specific instance rather than at the domain level, select the instance from the Scope field.
    3. Click Add Configuration.
    4. Specify the name and description for the device management configuration.
    5. Add the device management configuration properties in one of the following ways:
      • Manually specify the property names and values by entering them in the Name and Value fields and then clicking Add to table
      • Import the property names and values from a properties file by completing the following steps:
        1. Click Upload a properties file or select a streams device manager starter configuration.
        2. Select Import properties from a file and click Browse
        3. Select the file from your local file system and click Open.
        4. Click Upload properties
      • Populate the table with the required fields and then specify the values manually by completing the following steps:
        1. Click Upload a properties file or select a streams device manager starter configuration.
        2. Select Select a streams device manager type and then select IBM Watson IOT (Internet of Things).
        3. Click Upload properties.
        4. Double click on the entry in the Value column that you want to edit.
    6. Click Save Device Mgr Config.