mirror of
https://github.com/Koenkk/zigbee2mqtt.git
synced 2024-11-16 18:39:09 -07:00
Add extra is pingable logging. #775
This commit is contained in:
parent
61942f8411
commit
4aa5877797
@ -30,15 +30,21 @@ class DeviceAvailability {
|
||||
}
|
||||
|
||||
isPingable(device) {
|
||||
logger.debug(`Checking if ${device.ieeeAddr} is pingable`);
|
||||
|
||||
if (this.blacklist.includes(device.ieeeAddr)) {
|
||||
logger.debug(`${device.ieeeAddr} is not pingable because of blacklist`);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (pingableDevices.find((d) => d.zigbeeModel.includes(device.modelId))) {
|
||||
logger.debug(`${device.ieeeAddr} is pingable because in pingable devices`);
|
||||
return true;
|
||||
}
|
||||
|
||||
return utils.isRouter(device) && !utils.isBatteryPowered(device);
|
||||
const result = utils.isRouter(device) && !utils.isBatteryPowered(device);
|
||||
logger.debug(`${device.ieeeAddr} is pingable (${result}) not router or battery powered`);
|
||||
return result;
|
||||
}
|
||||
|
||||
getAllPingableDevices() {
|
||||
|
Loading…
Reference in New Issue
Block a user