diff --git a/CHANGELOG.md b/CHANGELOG.md index 3559ffbc..0a2e2e9d 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [Unreleased] +### Fixed + - Reduced default logging of blind positions #702 + ## [4.4.16 - 2023-07-10] ### Fixed - Fix for wrong command being sent or no command sent in certain circumstances #669 (Thanks @seidnerj) diff --git a/accessories/windowCovering.js b/accessories/windowCovering.js index 5abfc0d7..1ba40fd3 100755 --- a/accessories/windowCovering.js +++ b/accessories/windowCovering.js @@ -64,7 +64,7 @@ class WindowCoveringAccessory extends BroadlinkRMAccessory { const closeCompletely = await this.checkOpenOrCloseCompletely(); if (closeCompletely) {return;} - log(`${name} setTargetPosition: (set new position)`); + if (logLevel <= 1) {log(`${name} setTargetPosition: (set new position)`)}; // Determine if we're opening or closing let difference = state.targetPosition - state.currentPosition; @@ -126,8 +126,8 @@ class WindowCoveringAccessory extends BroadlinkRMAccessory { const totalTime = Math.abs(difference / 100 * fullOpenCloseTime); - log(`${name} setTargetPosition: position change ${state.currentPosition}% -> ${state.targetPosition}% (${positionStateDescription})`); - log(`${name} setTargetPosition: ${+totalTime.toFixed(2)}s ((${Math.abs(difference)} / 100) * ${fullOpenCloseTime}) until auto-stop`); + if (logLevel <= 1) {log(`${name} setTargetPosition: position change ${state.currentPosition}% -> ${state.targetPosition}% (${positionStateDescription})`)}; + if (logLevel <= 1) {log(`${name} setTargetPosition: ${+totalTime.toFixed(2)}s ((${Math.abs(difference)} / 100) * ${fullOpenCloseTime}) until auto-stop`)}; await this.performSend(hexData); @@ -162,7 +162,7 @@ class WindowCoveringAccessory extends BroadlinkRMAccessory { const { sendStopAt0, sendStopAt100 } = config; const { stop } = data; - log(`${name} setTargetPosition: (stop window covering)`); + if (logLevel <= 2) {log(`${name} setTargetPosition: (stop window covering)`)}; // Reset the state and timers this.reset(); @@ -250,7 +250,7 @@ class WindowCoveringAccessory extends BroadlinkRMAccessory { const currentValue = this.getUpToDatePosition(state) serviceManager.setCharacteristic(Characteristic.CurrentPosition, currentValue); - log(`${name} setTargetPosition: updated position to ${currentValue} (${positionStateDescription})`); + if (logLevel <= 2) {log(`${name} setTargetPosition: updated position to ${currentValue} (${positionStateDescription})`)}; } // Let's go again diff --git a/package.json b/package.json index 87faa153..aa244cce 100755 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "homebridge-broadlink-rm-pro", "displayName": "Homebridge Broadlink RM Pro", - "version": "4.4.16", + "version": "4.4.17-beta.0", "description": "Broadlink RM plugin (including the mini and pro) for homebridge with AC Pro and TV features", "license": "ISC", "scripts": {