Skip to content

Smart Device Control

This article introduces the method of accessing the edge computing platform based on a custom protocol from terminal devices and interacting with the cloud. Using a scenario of controlling a light switch with gestures as an example, the overall implementation process is explained.

Preparation

Creating Terminal Devices

  1. Deploy the LED light driver mapper to the edge node, the deployment process can be found in Creating Workloads

  2. Go to the edge unit details page, select the left menu Edge Resources -> Terminal Devices, and click the Create Device button on the top right of the terminal device list.

  3. Fill in the basic information.

    Note

    The access protocol must be consistent with the protocol name defined in the mapper.

  4. Fill in the device configuration, add device twin properties and tags.

    • The property value is the expected value of the device.
    • The access method must be consistent with the key-value data defined in the mapper.
  5. Fill in the device access configuration.

    The access parameters for the platform to connect to the device. In this scenario, the device access path is /dev/ttyACM0, with a baud rate of 9600.

  6. Information confirmation, verify that the configured information is correct, click Confirm to complete the device creation.

Verify Running Effect

  1. In the device list, click on the device name to enter the device details page and view the reported status values of the device.

  2. Edit the device twin properties, modify the expected value of the device, and see the change in the LED light status.

Comments