Template Management

Template Management

Overview

When you develop and deploy IoT solutions or apps, you most likely use complex architectures. We strongly recommend breaking up configurations into separate templates to simplify the deployment. This can make configuration replicable and troubleshooting easier.

A template is a standalone file that goes over a set of resources. You can also reuse templates through different deployments – creating consistency across complex implementations.

At IoTConnect, we offer a template – a pre-defined structure – to help you manage and organize all aspects of your device and data management. A template is helpful for the configurations you plan to reuse or for more complex architectures.

The template structure simplifies the process of device provisioning and data flow by assigning rules, capturing attributes and allocating commands. Our template feature will enable you to:
  • Create and maintain records of your devices
  • Establish device properties in the form of attributes that define the data captured by those devices
  • Assign commands so the devices can perform their desired functions with ease
  • Designate rules for each device

For example, for web developers, site templates offer an ideal solution for streamlining the website-building process. A site template contains all the pieces needed to build a website, including layout, navigation, sample content and more. Plus, you can customize each site with components and interactions that meet your specific needs.

Overall, site templates are helpful for web developers to get the job done quickly and efficiently. Likewise, for IoT solution developers, this template structure is beneficial for managing devices.

Let us start with the template.

Create a template

To create a template for your organization:
  1. From the left navigation, mouseover the Devices module. In the middle and toward the down, select Templates.
  2. Along the top and toward the right, select Create Template.
  3. Enter data in the following fields:

(Screen: Create Template)

    • Template Code: Enter a unique code for the template. Once entered, you cannot change.
    • Template Name: Enter a unique name for the template.
    • Authentication Type: We offer two types of authentications.
      • CA-Signed Certificate: A third-party organization approves it.
      • Self-Signed Certificate: A user approves.
    • Device Message Version: Select the device message version. The platform displays the data type while editing a template based on a device message version.
  1. Click Save to create a template.

Required fields have a red asterisk on the upper-right side of every field name.

Once a template is saved, the window opens the fields to fill.

(Screen: Template Properties)

A template in IoTConnect offers four features to set values – Properties. Attributes. Shadow. Commands. Consider setting values in all.

Properties

(Screen: Properties)

    • Description: Enter a short description of the template.
    • Data Frequency (in seconds): Defines the frequency of device-to-cloud messages sent from a device. This works with SDKs provided by IoTConnect. 15 seconds is the default minimum data frequency. If you would like to reduce the default data frequency below 15 seconds, we recommend you create a support ticket under enable feature section. We can then set your default desired data frequency. Without it you can enter data frequency between 15 and 999.
    • Click Save to save properties.

Required fields have a red asterisk on the upper-right side of every field name.

Attributes

Attributes are device properties that you want a template’s devices to measure. It can be anything from temperature, humidity, luminosity, wattage, to CO2 concentration.

(Screen: Attributes)

    • Local Name: Enter the unique local name for the attributes.
    • Data Type: Type of data you can ask your device for reporting to IoTConnect. IoTConnect supports the following data types.
Bit (0/1) Datetime Latlong String
Boolean Deciman Long Time
Date Integer Object
    • Description: Enter an explanation for the attributes.
    • Color Code: IoTConnect will use this color while plotting data on a chart or map.
    • Unit: Define the unit of an attribute.
    • Click Save to store attributes.

Required fields have a red asterisk on the upper-right side of every field name.

Shadow

Device configuration from back-end services is fundamental to most IoT platform’s device management systems.

With Shadow, you can easily sync the state information between a device and IoTConnect. Shadows enable devices, apps, and other cloud services to connect and disconnect without losing a device’s state.

Shadow includes two main components: property and key. Property is set by the back-end application but will never be sent to the device. A key is attached to the device for authentication purposes. It will never be sent to the cloud. Desired properties are set by the back-end application and read by a device, while reported properties are set by a device and read by a back-end application.

(Screen: Shadow)

    • Property: The value set by a back-end application and read by a device.
    • Key: The value set by a device and read by a back-end application.
    • Data Type: Type of data you can ask your device for reporting to IoTConnect.
    • Default Value: Specify the desired device state to update while the device is connected or not connected to AWS IoT Core.
    • Click Save to save the shadow.

Required fields have a red asterisk on the upper-right side of every field name.

Commands

Commands instruct a device to take action. In devices, commands include a name and parameter value. The device’s firmware takes the required action based on the command.

Command name: Temperature
Parameter value: 10 ⁰C

(Screen: Commands)

    • Command Name: Enter the unique command name.
    • Command: Enter the command that you want to give.
    • Make the radio buttons ON if:
      • You want a command to require the parameter value.
      • You want a device to receive the receipt during its execution.
      • The command is an OTA command.
      • Click Save to see it in device properties.

Required fields have a red asterisk on the upper-right side of every field name.

Note: Once you save properties, attributes, shadow, or a command, you will see them in a list on the right.

Template List

To view the template list:
  1. From the left navigation, mouseover the Devices module. Click Device. In the middle and toward the down, select Templates.
  2. The template list shows a template name, authentication type, message version, attribute, shadow, command, device, rule and actions.

(Screen: Template List)

    • Actions: Edit or delete a template.

Edit a template

To edit a template:
  1. Click on the Edit Template icon from the actions lane.
  2. It will show you the different fields to edit in a basic template and template features.

(Screen: Edit Template)

  1. To edit a basic template, click Edit. Here, you can only edit the template name.
  2. To edit template features,
    • In Attributes, click Attribute name from the right side.
    • In Shadow, click Property from the right side.
    • In Commands, click a Command Name from the right side to allow you to edit on the left.
    • In Properties, you can directly edit the description and data frequency.
    • Click Save or Update to save the revised changes.

Required fields have a red asterisk on the upper-right side of every field name.

Delete a template

To delete a template:
  1. Select the Delete Template icon from the actions lane.
  2. It will present the dialogue box titled ‘Delete’.

(Screen: Delete Template)

  1. Click Ok to delete a template.