From bcd2c8d7857489b54efe3ed853d90010e88b3103 Mon Sep 17 00:00:00 2001 From: asgothian <45667167+asgothian@users.noreply.github.com> Date: Sun, 20 Oct 2024 17:05:02 +0200 Subject: [PATCH] Update main.js --- main.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/main.js b/main.js index f4d19fec..9de75281 100644 --- a/main.js +++ b/main.js @@ -467,8 +467,15 @@ class Zigbee extends utils.Adapter { const devId = device.ieeeAddr.substr(2); const meta = {device}; - if (this.stController.checkDebugDevice(devId)) - this.log.warn(`ELEVATED: Zigbee Event of Type ${type} from device ${safeJsonStringify(device.ieeeAddr)}, incoming event: ${safeJsonStringify(message)}`); + if (this.stController.checkDebugDevice(devId)) { + const shortMessage = {}; + for(var propertyName in message) { + if (propertyName == 'object' || propertyName == 'meta') continue; + shortMessage[propertyName] = message[propertyName]; + } + + this.log.warn(`ELEVATED: Zigbee Event of Type ${type} from device ${safeJsonStringify(device.ieeeAddr)}, incoming event: ${safeJsonStringify(shortMessage)}`); + } // this assigment give possibility to use iobroker logger in code of the converters, via meta.logger meta.logger = this.log;