Unit 1: Registering Devices on EnOS Management Console


Before connecting devices to EnOS, you need to register the devices on EnOS Management Console, which includes defining the device model, creating a product, registering the devices, and creating an asset tree for the devices.


This tutorial uses a battery device as an example to show how to register a smart device that connects directly to EnOS Cloud.

Step 1: Defining a Model

A model is the abstraction of the features of an object that is connected to the Device Connectivity & Management. In EnOS, the device model defines the features of a device, including its attributes, measurement points, services, and events. For more information about models, see Device Modeling.


This step assumes that there is no existing device model to be reused on EnOS. Take the following steps to create a model named battery and define the required features. For details about how to create a model, see Creating a Model.

  1. In EnOS Management Console, click Models from the left navigation menu.

  2. Click New Model, and enter the following in the New Model window.

    • Identifier: battery

    • Model Name: battery

    • Category: None

    • Created From: No

    • Source Model: No

    • Description: Model for battery

  3. Click OK to save the basic information of the model.


    ../../_images/create_model1.png


  4. From the list of created models, click btn_edit for the battery model you created, and click the Feature Definition tab at the Model Details screen.

  5. Click Edit > Add > Create Custom Feature and create the following features in the Add Feature window.

    • Create an attribute

      Feature Type

      Name

      Identifier

      Data Type

      String Length

      Description

      Attributes

      brand

      brand

      string

      64 Chars

      Brand information of the device


    • Create a measurement point

      Feature Type

      Name

      Identifier

      Point Type

      Data Type

      Unit

      Description

      Measurement Points

      temperature

      temperature

      AI

      double

      Temperature: degree Celsius | °C

      Point to ingest the device temperature data


    • Create a service

      Feature Type

      Name

      Identifier

      Description

      Service

      start_charging

      start_charging

      Service that controls the charging status of the device


      • Input/output parameters

      Parameter Type

      Name

      Identifier

      Data Type

      Input

      result

      result

      Int

      Output

      point1

      point1

      Int


  6. Click the Publish button to save the features you have added above.


    ../../_images/model_features.png

Step 2: Creating a Product

A product is a collection of devices with the same features. Using the device model as a base, a product further defines the communication specifications for the device.


In this step, create a product called Battery_Product. It is assumed that a device of this product model sends data in JSON format and that the data transmission is not encrypted using the CA certificate.

  1. In EnOS Management Console, select Device Management > Products.

  2. Click New Product, and enter the following in the New Product window.

    • Product Name: Battery_Product

    • Asset Type: Device

    • Model: battery

    • Onboarding Method: Only EnOS IoT

    • Certificate-Based Authentication: Disabled

    • Description: Computer Battery

  3. Click OK to save the configuration.

    ../../_images/create_product2.png


For details about the configuration of a product, see Creating a Device Collection (Product).

Step 3: Registering a Device

A device is the instance of a product. It is created from a product so that it inherits not only the basic features of the model, but also the communication features of the product (for example, the device key-secret pair and device certificate used for secure communication).


In this step, create a device named battery1, which belongs to the Battery_Product created in the previous step.

  1. In EnOS Management Console, select Device Management > Device Assets.

  2. Click New Device, and enter the following in the New Device window.

    • Product: Battery_Product

    • Device Name: battery1

    • Device Key: Optional (it can be generated automatically by the system)

    • Timezone/City: UTC+08:00

    • Use DST: No

    • brand: Enter the brand information of the battery (an attribute defined for the model)

  3. Click OK to save the configuration.

    ../../_images/register_device2.png


For details about device settings, see Registering a Device.


After you complete the device registration, find the registered device from the device list, and click btn_view in the Operations column to open the Device Details page. You can get the device triple values (Product Key, Device Key, and Device Secret) from there, which will be used to connect the device to EnOS.


../../_images/device_properties.png

Next Unit

Connecting the Device to EnOS Cloud