Developing a device service


Developing a custom device service is essential in specific scenarios where the existing open-source device services might not fully meet the specific requirements of a particular device or IoT ecosystem.

To develop a device service

  1. Refer to the user documentation image-2024-2-23_15-11-30.pngfor guidance about developing custom device services.
  2. Understand the EdgeX device service architecture, interfaces, and coding conventions outlined in the documentation.
  3. Use the SDKs, libraries, and sample code to encourage the development of your custom device service; customize the service logic to handle device-specific functionalities, data formats, and communication protocols.
  4. Test your custom device service in a controlled environment to make sure it communicates with your devices and adheres to standards.
  5. Package your custom device service for deployment in the BMC Helix Edge environment.
    The device service must connect to the device instance to collect the data. The connectivity details depend on the protocol to enable the device UI to support protocol-specific inputs.
  6. Add the following configuration to the device service:

    [Hedge]
    [[Hedge.Protocols]]
    ProtocolName = "<protocol name>"
    ProtocolProperties = "<comma separated list of custom protocol properties for your service>"

     Example: 

    [Hedge]
    [[Hedge.Protocols]]
    ProtocolName = "http"
    ProtocolProperties = "DomainName, Port"
  7. Update the device service source code to read the above configuration.  

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*