How to implement a edge driver for bridge device in lan?

It depends on the information they can provide, here’s the capabilities supported reference. For example, if a device detects motion and temperature, you should create a device profile that uses the capabilities:

#Device profile

name: motionSensorDevice
components:
  - id: main
    capabilities:
      - id: motionSensor
        version: 1
      - id: temperatureMeasurement
        version: 1
    categories:
      - name: MotionSensor

If you want to show certain properties that don’t match with any stock capability, you can create custom ones.

It is necessary that there’s a device profile with the device configuration (capabilities, metadata, preferences) in the driver’s package.
Then, you can make a request to get the devices connected to the Hub and create their instance using the pre-existing profiles.
If it’s useful, you can change the profile assigned to a device using the function try_update_metadata.

You can take a look at this awesome project created by another Community member:

1 Like