This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

HA1.2.2a 的DEVICE ID赋值到哪里?

Other Parts Discussed in Thread: Z-STACK

 大家好,

我准备做一个光感Sensor,请问它的DEVICE ID“”ZCL_HA_DEVICEID_LIGHT_SENSOR“”应该赋值到什么地方去,做出来的设备就能被识别为光感Sensor呢?或者怎样设置才能让做出来的新设备被识别为一个标准HA的光感Sensor呢?谢谢了

  • 您可以定义在zcl_ha.h内

    https://github.com/dynamicy/z-stack/blob/master/Sample%20Example/Projects/zstack/HomeAutomation/Source/zcl_ha.h

    // HVAC Device IDs
    #define ZCL_HA_DEVICEID_HEATING_COOLING_UNIT                    0x0300
    #define ZCL_HA_DEVICEID_THERMOSTAT                              0x0301
    #define ZCL_HA_DEVICEID_TEMPERATURE_SENSOR                      0x0302
    #define ZCL_HA_DEVICEID_PUMP                                    0x0303
    #define ZCL_HA_DEVICEID_PUMP_CONTROLLER                         0x0304
    #define ZCL_HA_DEVICEID_PRESSURE_SENSOR                         0x0305
    #define ZCL_HA_DEVICEID_FLOW_SENSOR                             0x0306
    
  • 在endpoint的descriptor里面,在应用层的文件中可以看到。