Skip to content

Commit

Permalink
report event for all eps
Browse files Browse the repository at this point in the history
  • Loading branch information
splitice committed Sep 28, 2023
1 parent 08524d2 commit b907519
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/Af.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,9 @@ class Af extends EventEmitter {
if(zclDebug.enabled){
zclDebug(`0x${msg.srcaddr.toString(16)}:${msg.srcendpoint}->0x00:${msg.dstendpoint} (${zclData.seqNum}) ${msg.clusterid} ${frameType === 0 ? 'foundation' : 'functional'}(${zclData.cmdId}) ${JSON.stringify(zclData.payload)}`);
}

if (frameType === 0 && zclData.cmdId === 'report')
this.emit('ind:reported', { ep: remoteEp, cId: msg.clusterid, attrs: zclData.payload });

let zApp = targetEp.zive
if(zApp){
Expand All @@ -139,9 +142,6 @@ class Af extends EventEmitter {
if (zclData.cmdId === 'statusChangeNotification' && frameType === 1 && zclData.payload) {
this.emit('ind:statusChange', { ep: remoteEp, cId: msg.clusterid, zclData: zclData, msg });
}

if (frameType === 0 && zclData.cmdId === 'report')
this.emit('ind:reported', { ep: remoteEp, cId: msg.clusterid, attrs: zclData.payload });

const evt = {zclData, msg}
this.emit('ZCL:incomingMsg', evt);
Expand Down

0 comments on commit b907519

Please sign in to comment.