Configure Interpreters

Use the management console of your Oracle Internet of Things Cloud Service instance to create an interpreter.

Create an interpreter for each type of payload. The connector selects an interpreter by matching its data with the selection criteria that you provide. To create an interpreter from the management console:
  1. Open the Oracle Internet of Things Cloud Service management console.
  2. Click Menu Menu icon.
  3. Click Devices, and then click Interpreters.
  4. On the Interpreters page, click Create New Interpreter Create New Interpreter.
  5. Enter values in the Name and Description fields.
  6. In the Selection Criteria field, select an attribute and map it to a pattern or value. The connector uses the selection criteria to select the interpreter.
  7. Select the Device Model, and click Add Grammar.
    1. Do one of the following: For a JSON payload, enter the payload data in Sample Data and click Validate. The interpreted values are listed. For a binary payload, enter the payload in Sample Data, enter the binary grammar in Grammar, and click Validate. The interpreted values are listed.
    2. From the Map list box, select an attribute of the device model.
    3. From the adjacent combo box, select Property, ATTRIBUTE, and then the field of one of the interpreted values. Values can also be combined or manipulated using the Formula menu.
    4. To select another attribute, click Add. Repeat steps c and d to map the attributes of the device model that you need in the device message.
  8. If the selected Device Model contains alert or custom data format definitions, you may define additional criteria and mapping for them. In such a case a section titled Alerts and Custom Data appears.
    1. For each additional alert or custom data message you would like to define, from the drop-down, select the format similar to that in the device model. You may add additional entries by clicking icon.
    2. In Click here to insert criteria, use the editor to enter the criteria formula that will be evaluated to generate the data message or alert.
    3. Click the Map Fields button to enter attribute mapping as was done previously with the Device Model grammar.
  9. In the Device Metadata section, Select a field from the list box and map it to an attribute. Click Add, and repeat the step for all the fields that you wish to map. These fields appear as metadata in the device record when the device is registered in Oracle Internet of Things Cloud Service.
  10. Click Save.
  11. When you receive a message Saved successfully, then click Back.
    On the Interpreters page, your interpreter is listed and its Device Model is displayed.
    • To modify any of the fields of your interpreter, click Edit Edit.
    • To remove the interpreter, click Delete Delete.

Configure Interpreters at Runtime

You can create an interpreter at runtime after the connector receives data from an unknown device.

When a connector is configured to a provider's network, it can receive data from all the devices in that network. Complete the following steps to configure an interpreter at runtime only when a connector receives data from an unknown device. This interpreter will help in registering and activating the device, and then saving the device message in Oracle Internet of Things Cloud Service. Ensure that the required device model is already added to Oracle Internet of Things Cloud Service.
  1. Open the Oracle Internet of Things Cloud Service management console.
  2. Click Menu Menu icon.
  3. Click Devices, and then click Connectors.
  4. On the Connectors page, identify a connector whose State is STARTED and then click connectors_messageALERTalert .
  5. On the Notifications page, review the Content column, and identify the notification record that is received from an unknown device type. Click the Notification Accepticon.
  6. On the Device page, click Create Interpreter.
  7. To complete the configuration, follow Step 5 through Step 10 of Configure Interpreters.