WebThingsIO / zigbee-adapter

Zigbee adapter add-on for WebThings Gateway
Mozilla Public License 2.0
46 stars 29 forks source link

Ubisys Zigbee dimmer D1 support #218

Closed Duncankn closed 4 years ago

Duncankn commented 4 years ago

Hi!

I have some Zigbee dimmers from ubisys (Universal Dimmer D1) which supports lighting control and power metering. I would like to use it with Mozilla IoT gateway. However, the dimmers were treated as smart plug/ multiple level switch/ onoff switch/ energy meter but without light. moreover, it also cannot be controlled and read the correct power consumption. So, could you advice me how to make the gateway recognize the correct device type and the correct power information? Thanks a lot!

The Gateway hardware:

There is also the logs related to the gateway.

2020-06-08 13:37:33.893 INFO : zigbee-adapter: zb-001fee00000019ac-undefined property: level profileId: 0104 endpoint: 1 clusterId: 0008 readRsp value: 0.4% (1) 2020-06-08 13:37:33.943 ERROR : zigbee-adapter: Response: readRsp got status: unsupAttribute (134) node: zb-001fee00000019ac-undefined cluster: haElectricalMeasurement (2820) attr: acPowerMultiplier (1540) 2020-06-08 13:37:33.944 INFO : zigbee-adapter: zb-001fee00000019ac-undefined property: _powerMul profileId: 0104 endpoint: 4 clusterId: 0b04 readRsp value: 1 2020-06-08 13:37:34.012 ERROR : zigbee-adapter: Response: readRsp got status: unsupAttribute (134) node: zb-001fee00000019ac-undefined cluster: haElectricalMeasurement (2820) attr: acPowerDivisor (1541) 2020-06-08 13:37:34.013 INFO : zigbee-adapter: zb-001fee00000019ac-undefined property: _powerDiv profileId: 0104 endpoint: 4 clusterId: 0b04 readRsp value: 1 2020-06-08 13:37:34.016 INFO : zigbee-adapter: Sending Bind Req (0x0021) 2020-06-08 13:37:34.207 ERROR : zigbee-adapter: Response: configReportRsp got status: unreportableAttribute (140) node: zb-001fee00000019ac-undefined cluster: haElectricalMeasurement (2820) attr: activePower (1291) 2020-06-08 13:37:34.209 ERROR : zigbee-adapter: 001fee00000019ac configReport failed - setting fireAndForget to true 2020-06-08 13:37:34.263 INFO : zigbee-adapter: zb-001fee00000019ac-undefined property: instantaneousPower profileId: 0104 endpoint: 4 clusterId: 0b04 readRsp value: 0 2020-06-08 13:37:34.313 ERROR : zigbee-adapter: Response: readRsp got status: unsupAttribute (134) node: zb-001fee00000019ac-undefined cluster: haElectricalMeasurement (2820) attr: acCurrentMultiplier (1538) 2020-06-08 13:37:34.315 INFO : zigbee-adapter: zb-001fee00000019ac-undefined property: _currentMul profileId: 0104 endpoint: 4 clusterId: 0b04 readRsp value: 1 2020-06-08 13:37:34.362 ERROR : zigbee-adapter: Response: readRsp got status: unsupAttribute (134) node: zb-001fee00000019ac-undefined cluster: haElectricalMeasurement (2820) attr: acCurrentDivisor (1539) 2020-06-08 13:37:34.364 INFO : zigbee-adapter: zb-001fee00000019ac-undefined property: _currentDiv profileId: 0104 endpoint: 4 clusterId: 0b04 readRsp value: 1 2020-06-08 13:37:34.426 ERROR : zigbee-adapter: Response: configReportRsp got status: unreportableAttribute (140) node: zb-001fee00000019ac-undefined cluster: haElectricalMeasurement (2820) attr: rmsCurrent (1288) 2020-06-08 13:37:34.428 ERROR : zigbee-adapter: 001fee00000019ac configReport failed - setting fireAndForget to true 2020-06-08 13:37:34.470 INFO : zigbee-adapter: zb-001fee00000019ac-undefined property: current profileId: 0104 endpoint: 4 clusterId: 0b04 readRsp value: 4 2020-06-08 13:37:34.523 ERROR : zigbee-adapter: Response: configReportRsp got status: unreportableAttribute (140) node: zb-001fee00000019ac-undefined cluster: haElectricalMeasurement (2820) attr: acFrequency (768) 2020-06-08 13:37:34.525 ERROR : zigbee-adapter: 001fee00000019ac configReport failed - setting fireAndForget to true 2020-06-08 13:37:34.566 INFO : zigbee-adapter: zb-001fee00000019ac-undefined property: frequency profileId: 0104 endpoint: 4 clusterId: 0b04 readRsp value: 49622 2020-06-08 13:37:34.620 ERROR : zigbee-adapter: Response: readRsp got status: unsupAttribute (134) node: zb-001fee00000019ac-undefined cluster: haElectricalMeasurement (2820) attr: acVoltageMultiplier (1536) 2020-06-08 13:37:34.622 INFO : zigbee-adapter: zb-001fee00000019ac-undefined property: _voltageMul profileId: 0104 endpoint: 4 clusterId: 0b04 readRsp value: 1 2020-06-08 13:37:34.674 ERROR : zigbee-adapter: Response: readRsp got status: unsupAttribute (134) node: zb-001fee00000019ac-undefined cluster: haElectricalMeasurement (2820) attr: acVoltageDivisor (1537) 2020-06-08 13:37:34.679 INFO : zigbee-adapter: zb-001fee00000019ac-undefined property: _voltageDiv profileId: 0104 endpoint: 4 clusterId: 0b04 readRsp value: 1 2020-06-08 13:37:34.728 ERROR : zigbee-adapter: Response: configReportRsp got status: unreportableAttribute (140) node: zb-001fee00000019ac-undefined cluster: haElectricalMeasurement (2820) attr: rmsVoltage (1285) 2020-06-08 13:37:34.730 ERROR : zigbee-adapter: 001fee00000019ac configReport failed - setting fireAndForget to true 2020-06-08 13:37:34.779 INFO : zigbee-adapter: zb-001fee00000019ac-undefined property: voltage profileId: 0104 endpoint: 4 clusterId: 0b04 readRsp value: 225 2020-06-08 13:37:35.106 INFO : zigbee-adapter: zb-001fee00000019ac-undefined property: level profileId: 0104 endpoint: 1 clusterId: 0008 report value: 0.4% (1) 2020-06-08 13:37:40.956 INFO : getValue for property level for: zb-001fee00000019ac-undefined returning 0.3937007874015748 2020-06-08 13:37:40.958 INFO : getValue for property instantaneousPower for: zb-001fee00000019ac-undefined returning 0 2020-06-08 13:37:40.959 INFO : getValue for property current for: zb-001fee00000019ac-undefined returning 4 2020-06-08 13:37:40.960 INFO : getValue for property frequency for: zb-001fee00000019ac-undefined returning 49622 2020-06-08 13:37:40.961 INFO : getValue for property voltage for: zb-001fee00000019ac-undefined returning 225 2020-06-08 13:37:40.965 INFO : Successfully created new thing zb-001fee00000019ac-undefined

There is the print screen of the device: image

Duncankn commented 4 years ago

Hi there,

As I found that the Zigbee adapter have no lighting devices with power metering feature, it cannot recognize it is a lighting device and set it as a haElectricalSmartPlug. Therefore, the on endpoint was set to Endpoint 4 which is haElectricalEndpoint. To make the adapter recognize the dimmer, I have defined a lighting device with SeMetering and It works fine after running it. There is the code I have modified. https://github.com/Duncankn/zigbee-adapter/blob/master/zb-classifier.js

I don't know if I found the root causes, could you check this if it can be merged to your master?

mrstegeman commented 4 years ago

Merged: e861ea5948ef429bde2626156de7c561de661801