Skip to content

Smart Device Control

This page introduces the method of accessing the edge computing platform based on a custom protocol from end 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

Create End 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 -> End Devices , and click the Create Device button on the top right of the end device list.

    click button

  3. Fill in the basic information.

    fill info

    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.

    fill info

  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.

    access config

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

Verify Effect

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

    device details

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

Comments