Skip to content

Commit

Permalink
The SA-003 always sends attributeReports to the broadcast endpoint. (#…
Browse files Browse the repository at this point in the history
…943)

* Debounce SA-003-Zigbee on zclTransactionSequenceNumber. Koenkk/zigbee2mqtt#2565

* Update fromZigbee.js

* The SA-003 always sends attributeReports to the broadcast endpoint.
We shouldn't send a default response in this case, but Z-Stack doesn't tell us, so we just always set disableDefaultResponse for SA-003 attributeReports.

* Update fromZigbee.js

* Update fromZigbee.js

Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
  • Loading branch information
chriskemp and Koenkk committed Jan 27, 2020
1 parent 396f9be commit d4153dd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions converters/fromZigbee.js
Original file line number Diff line number Diff line change
Expand Up @@ -2388,6 +2388,10 @@ const converters = {
const last = store[msg.device.ieeeAddr];
const current = msg.meta.zclTransactionSequenceNumber;

if (msg.type === 'attributeReport') {
msg.meta.frameControl.disableDefaultResponse = true;
}

if (last !== current && msg.data.hasOwnProperty('onOff')) {
store[msg.device.ieeeAddr] = current;
return {state: msg.data['onOff'] === 1 ? 'ON' : 'OFF'};
Expand Down

0 comments on commit d4153dd

Please sign in to comment.