Merge pull request #9758 from s-hadinger/zigbee_remove_0x0000_2

Zigbee remove unwanted 0x0000
This commit is contained in:
s-hadinger 2020-11-06 22:06:27 +01:00 committed by GitHub
commit bf2788a6fd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 3 deletions

View File

@ -1470,8 +1470,10 @@ void Z_IncomingMessage(class ZCLFrame &zcl_received) {
// log the packet details
zcl_received.log();
Z_Device & device = zigbee_devices.getShortAddr(srcaddr);
if (srcaddr != localShortAddr) {
// create the device entry if it does not exist and if it's not the local device
Z_Device & device = (srcaddr != localShortAddr) ? zigbee_devices.getShortAddr(srcaddr) :
device_unk;
if (device.valid()) {
device.setLQI(linkquality != 0xFF ? linkquality : 0xFE); // EFR32 has a different scale for LQI
device.setLastSeenNow();
}
@ -1522,7 +1524,9 @@ void Z_IncomingMessage(class ZCLFrame &zcl_received) {
// since we just receveived data from the device, it is reachable
zigbee_devices.resetTimersForDevice(srcaddr, 0 /* groupaddr */, Z_CAT_REACHABILITY); // remove any reachability timer already there
device.setReachable(true); // mark device as reachable
if (device.valid()) {
device.setReachable(true); // mark device as reachable
}
if (defer_attributes) {
// Prepare for publish