From 0e9931af6ca9903be0af03037379860f899b0d55 Mon Sep 17 00:00:00 2001 From: Koen Kanters Date: Mon, 24 Jun 2019 20:25:37 +0200 Subject: [PATCH] Improve bind logging. https://github.com/Koenkk/zigbee2mqtt/issues/1662 --- lib/extension/deviceBind.js | 6 +++--- lib/zigbee.js | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/extension/deviceBind.js b/lib/extension/deviceBind.js index 20de4e397..946461979 100644 --- a/lib/extension/deviceBind.js +++ b/lib/extension/deviceBind.js @@ -96,18 +96,18 @@ class DeviceBind { // Bind clusters.forEach((cluster) => { - logger.debug(`${topic.type}ing cluster '${cluster}' from ${sourceEntity.ID}' to '${targetEntity.ID}'`); + logger.debug(`${topic.type}ing cluster '${cluster}' from '${sourceEntity.ID}' (${source.epId}) to '${targetEntity.ID}'`); this.zigbee[topic.type](source, cluster, target, (error) => { if (error) { logger.error( - `Failed to ${topic.type} cluster '${cluster}' from ${sourceEntity.ID}' to ` + + `Failed to ${topic.type} cluster '${cluster}' from '${sourceEntity.ID}' to ` + `'${targetEntity.ID}' (${error})` ); } else { logger.info( `Successfully ${topic.type === 'bind' ? 'bound' : 'unbound'} cluster '${cluster}' from ` + - `${sourceEntity.ID}' to '${targetEntity.ID}'` + `'${sourceEntity.ID}' to '${targetEntity.ID}'` ); this.mqtt.log( diff --git a/lib/zigbee.js b/lib/zigbee.js index 771ac3e56..2d25f3a69 100644 --- a/lib/zigbee.js +++ b/lib/zigbee.js @@ -451,7 +451,7 @@ class Zigbee { this.queue.push(entityID, (queueCallback) => { logger.info( `Zigbee publish to ${entityType} '${friendlyName}', ${cid} - ${cmd} - ` + - `${JSON.stringify(zclData)} - ${JSON.stringify(cfg)} - ${ep}` + `${JSON.stringify(zclData)} - ${JSON.stringify(cfg)} - ${entity.epId}` ); const callback_ = (error, rsp) => {