From c73a6c138d61a1aa13ccaeb38f236636ace6abfe Mon Sep 17 00:00:00 2001 From: Stanislaw Wozniak Date: Sat, 19 Jun 2021 10:05:08 +0100 Subject: [PATCH] Reduce logging around events --- package.json | 2 +- src/HikVisionNVR.ts | 11 ++++------- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index bba1105..7941f65 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@evops/homebridge-hikvision", - "version": "1.0.16", + "version": "1.0.17", "main": "dist/index.js", "license": "MIT", "repository": { diff --git a/src/HikVisionNVR.ts b/src/HikVisionNVR.ts index 9f3a77e..60df57b 100644 --- a/src/HikVisionNVR.ts +++ b/src/HikVisionNVR.ts @@ -108,7 +108,7 @@ export class HikVisionNVR { private processHikVisionEvent(event: any) { switch (event.EventNotificationAlert.eventType) { case "videoloss": - this.log.info("videoloss, nothing to do..."); + this.log.debug("videoloss, nothing to do..."); break; case "fielddetection": case "linedetection": @@ -122,14 +122,12 @@ export class HikVisionNVR { (camera) => camera.accessory.context.channelId === channelId ); if (!camera) { - return this.log.info("Could not find camera for event", event); + return this.log.warn("Could not find camera for event", event); } this.log.info( - "Motion detected on camera, triggering motion", - camera.displayName, - motionDetected, - camera.motionDetected + "Motion detected on camera, triggering motion for ", + camera.displayName ); if (motionDetected !== camera.motionDetected) { @@ -137,7 +135,6 @@ export class HikVisionNVR { const motionService = camera.getService( this.homebridgeApi.hap.Service.MotionSensor ); - this.log.info(motionService, camera, camera.accessory); motionService?.setCharacteristic( this.homebridgeApi.hap.Characteristic.MotionDetected, motionDetected