From d4153dd26b714b21087707355600a7a208cee7cf Mon Sep 17 00:00:00 2001 From: Chris Kemp Date: Mon, 27 Jan 2020 20:44:27 +0000 Subject: [PATCH] The SA-003 always sends attributeReports to the broadcast endpoint. (#943) * Debounce SA-003-Zigbee on zclTransactionSequenceNumber. https://github.com/Koenkk/zigbee2mqtt/issues/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 --- converters/fromZigbee.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/converters/fromZigbee.js b/converters/fromZigbee.js index 096441b2f3319..c854d06c51c55 100644 --- a/converters/fromZigbee.js +++ b/converters/fromZigbee.js @@ -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'};