Unit 1: Registering Devices to EnOS


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

Step 1: Defining Models

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. Follow the below to create two models named Temperature Sensor Model and Air Con Model and define the required features. For details about how to create a model, see Creating a Model.

Temperature Sensor 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: Rule_engine_model
    • Model Name: Temperature Sensor Model
    • Category: None
    • Created From: No
    • Source Model: No
    • Description: Model for temperature sensor


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


    ../../_images/s1_model_temp_sensor.png


  4. From the list of created models, click btn_edit for the temperature sensor 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 feature in the Add Feature window.


Feature Type Name Identifier Point Type Data Type Unit Description
Measurement Points temperature temperature Generic double Temperature: degree Celsius | °C Temperature measurement point


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


../../_images/s1_model_temp_sensor_features.png

Air Con 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: AirCondition
    • Model Name: Air Con Model
    • Category: None
    • Created From: No
    • Source Model: No
    • Description: Model for air-con


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


    ../../_images/s1_model_aircon.png


  4. From the list of created models, click btn_edit for the air-con 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 feature in the Add Feature window.


Feature Type Name Identifier Input Parameter Output Parameter Description
Service ctrlTemperature ctrlTemperature
  • Name: temperature
  • Identifier: ctrlTemperature
  • Data Type: double
  • Name: newTemperature
  • Identifier: newTemperature
  • Data Type: double
Service that controls temperature


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


../../_images/s1_model_aircon_features.png

Step 2: Creating Products

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 two products: Temperature Sensor Product and Air Con Product. It is assumed that the devices of these products send data in JSON format and that the data transmission is not encrypted using the CA certificate.


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

Temperature Sensor Product

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

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

    • Product Name: Temperature Sensor Product
    • Asset Type: Device
    • Model: Temperature Sensor Model
    • Onboarding Method: Only EnOS IoT
    • Certificate-Based Authentication: Disabled
    • Description: Product for temperature sensor


  3. Click OK to save the configuration.


    ../../_images/s1_product_temp_sensor.png

Air Con Product

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

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

    • Product Name: Air Con Product
    • Asset Type: Device
    • Model: Air Con Model
    • Onboarding Method: Only EnOS IoT
    • Certificate-Based Authentication: Disabled
    • Description: Product for air-con


  3. Click OK to save the configuration.


    ../../_images/s1_product_aircon.png

Step 3: Registering Devices

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 two devices, Temperature Sensor and Air Con Device, which belongs to the Temperature Sensor Product and Air Con Product created in the previous step respectively.


For details about device settings, see Registering a Device.

Temperature Sensor

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

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

    • Product: Temperature Sensor Product
    • Device Name: Temperature Sensor
    • Device Key: Optional (it can be generated automatically by the system)
    • Timezone/City: UTC+08:00
    • Use DST: No


  3. Click OK to save the configuration.


    ../../_images/s1_device_temp_sensor.png

Air Con Device

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

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

    • Product: Air Con Product
    • Device Name: Air Con Device
    • Device Key: Optional (it can be generated automatically by the system)
    • Timezone/City: UTC+08:00
    • Use DST: No


  3. Click OK to save the configuration.


    ../../_images/s1_device_aircon.png


After completing the device registration, find the registered device from the device list, and click btn_view 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/s1_device_temp_sensor_properties.png