From d147a4819a9f2cc00e0b8a361d50fe3445752553 Mon Sep 17 00:00:00 2001 From: Julian Greensmith Date: Mon, 19 Dec 2022 20:07:58 +1100 Subject: [PATCH 1/9] Update zone detection logic --- package.json | 2 +- src/queApi.ts | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index db61acb..f8612a8 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "private": false, "displayName": "Homebridge Actron Que", "name": "homebridge-actron-que", - "version": "1.2.6", + "version": "1.2.7-beta.0", "description": "Homebridge plugin for controlling Actron Que controller systems", "license": "Apache-2.0", "repository": { diff --git a/src/queApi.ts b/src/queApi.ts index 7716526..4eaf570 100644 --- a/src/queApi.ts +++ b/src/queApi.ts @@ -365,10 +365,9 @@ export default class QueApi { loopIndex++; const sensorId = Object.keys(zone['Sensors'])[0]; - // Skip the zone entries that aren't populated with a remote sensor, these seem to all have 'MASTER_CONTROLLER' as the - // 'NV_Kind'. This works for my system, you may want to check the response data here if you have zone - // detection issues on your system - if (zone['Sensors'][sensorId]['NV_Kind'] === 'MASTER_CONTROLLER') { + // Have updated the logic from version 1.2.7 to check field NV_Exists to determine if zone is populated as have found an example + // where the master controller is also the zone controller. Validated this logic should work across four different sample systems. + if (!zone['NV_Exists']) { continue; } From 3f729868cac55cf4d7a474c5f5139d13028d458c Mon Sep 17 00:00:00 2001 From: Julian Greensmith Date: Thu, 2 Feb 2023 00:48:17 +1100 Subject: [PATCH 2/9] Manage battery level for master controller as zone --- package.json | 2 +- src/queApi.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index f8612a8..92b7228 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "private": false, "displayName": "Homebridge Actron Que", "name": "homebridge-actron-que", - "version": "1.2.7-beta.0", + "version": "1.2.7-beta.1", "description": "Homebridge plugin for controlling Actron Que controller systems", "license": "Apache-2.0", "repository": { diff --git a/src/queApi.ts b/src/queApi.ts index 4eaf570..8a0409c 100644 --- a/src/queApi.ts +++ b/src/queApi.ts @@ -387,7 +387,7 @@ export default class QueApi { minCoolSetPoint: zone['MinCoolSetpoint'], currentHeatingSetTemp: zone['TemperatureSetpoint_Heat_oC'], currentCoolingSetTemp: zone['TemperatureSetpoint_Cool_oC'], - zoneSensorBattery: zone['Sensors'][sensorId]['Battery_pc'], + zoneSensorBattery: zone['Sensors'][sensorId]['Battery_pc'] === undefined ? 100 : zone['Sensors'][sensorId]['Battery_pc'], currentHumidity: zone['LiveHumidity_pc'] === undefined ? 'notSupported' : zone['LiveHumidity_pc'], }; zoneCurrentStatus.push(zoneData); From d6f42eb0b81ad06bccdeca1bc76d7fb7cf732460 Mon Sep 17 00:00:00 2001 From: Julian Greensmith Date: Wed, 15 Mar 2023 16:19:02 +1100 Subject: [PATCH 3/9] Fixing zone push master for cooling settings --- package.json | 2 +- src/zoneControllerAccessory.ts | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 92b7228..a21a858 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "private": false, "displayName": "Homebridge Actron Que", "name": "homebridge-actron-que", - "version": "1.2.7-beta.1", + "version": "1.2.7-beta.2", "description": "Homebridge plugin for controlling Actron Que controller systems", "license": "Apache-2.0", "repository": { diff --git a/src/zoneControllerAccessory.ts b/src/zoneControllerAccessory.ts index 35dfaea..c7bc58c 100644 --- a/src/zoneControllerAccessory.ts +++ b/src/zoneControllerAccessory.ts @@ -251,18 +251,24 @@ export class ZoneControllerAccessory { async setCoolingThresholdTemperature(value: CharacteristicValue) { this.checkHvacComms(); if (this.platform.hvacInstance.zonesPushMaster === true) { + this.platform.log.debug('zones push master is set to True'); if (value > this.zone.maxCoolSetPoint) { - await this.platform.hvacInstance.setCoolTemp(value as number + 2); + await this.platform.hvacInstance.setCoolTemp(value as number); + this.platform.log.debug(`Value is greater than max cool set point of ${this.zone.maxCoolSetPoint}, SETTING MASTER TO -> `, value); await this.platform.hvacInstance.getStatus(); } else if (value < this.zone.minCoolSetPoint) { - await this.platform.hvacInstance.setCoolTemp(value as number); + await this.platform.hvacInstance.setCoolTemp(value as number - 2); + this.platform.log.debug(`Value is less than min cool set point of ${this.zone.maxCoolSetPoint}, SETTING MASTER TO -> `, value); await this.platform.hvacInstance.getStatus(); } } if (value > this.zone.maxCoolSetPoint) { value = this.zone.maxCoolSetPoint; + this.platform.log.debug(`Value is greater than max cool set point of ${this.zone.maxCoolSetPoint}, CHANGING TO -> `, value); } else if (value < this.zone.minCoolSetPoint) { value = this.zone.minCoolSetPoint; + this.platform.log.debug(`Value is greater than max cool set point of ${this.zone.maxCoolSetPoint}, CHANGING TO -> `, value); + } await this.zone.setCoolTemp(value as number); this.platform.log.debug(`Set Zone ${this.zone.zoneName} Target Cooling Temperature -> `, value); From 1085b2267b6b61155e1e391bfb068a95c5f74740 Mon Sep 17 00:00:00 2001 From: Julian Greensmith Date: Wed, 15 Mar 2023 16:26:43 +1100 Subject: [PATCH 4/9] update cooling set logic --- src/zoneControllerAccessory.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/zoneControllerAccessory.ts b/src/zoneControllerAccessory.ts index c7bc58c..5c9aea1 100644 --- a/src/zoneControllerAccessory.ts +++ b/src/zoneControllerAccessory.ts @@ -253,11 +253,11 @@ export class ZoneControllerAccessory { if (this.platform.hvacInstance.zonesPushMaster === true) { this.platform.log.debug('zones push master is set to True'); if (value > this.zone.maxCoolSetPoint) { - await this.platform.hvacInstance.setCoolTemp(value as number); + await this.platform.hvacInstance.setCoolTemp(value as number + 2); this.platform.log.debug(`Value is greater than max cool set point of ${this.zone.maxCoolSetPoint}, SETTING MASTER TO -> `, value); await this.platform.hvacInstance.getStatus(); } else if (value < this.zone.minCoolSetPoint) { - await this.platform.hvacInstance.setCoolTemp(value as number - 2); + await this.platform.hvacInstance.setCoolTemp(value as number); this.platform.log.debug(`Value is less than min cool set point of ${this.zone.maxCoolSetPoint}, SETTING MASTER TO -> `, value); await this.platform.hvacInstance.getStatus(); } From 144e893ec3921b62a63929e9b83954defbd678c4 Mon Sep 17 00:00:00 2001 From: Julian Greensmith Date: Wed, 15 Mar 2023 16:27:23 +1100 Subject: [PATCH 5/9] push beta version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a21a858..b2e3bf7 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "private": false, "displayName": "Homebridge Actron Que", "name": "homebridge-actron-que", - "version": "1.2.7-beta.2", + "version": "1.2.7-beta.3", "description": "Homebridge plugin for controlling Actron Que controller systems", "license": "Apache-2.0", "repository": { From 760123e3d7d8d552ede75f1fa444a043f16a2625 Mon Sep 17 00:00:00 2001 From: Julian Greensmith Date: Wed, 15 Mar 2023 16:48:39 +1100 Subject: [PATCH 6/9] correcting cooling set temp thresholds --- package.json | 2 +- src/zoneControllerAccessory.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index b2e3bf7..f92959b 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "private": false, "displayName": "Homebridge Actron Que", "name": "homebridge-actron-que", - "version": "1.2.7-beta.3", + "version": "1.2.7-beta.4", "description": "Homebridge plugin for controlling Actron Que controller systems", "license": "Apache-2.0", "repository": { diff --git a/src/zoneControllerAccessory.ts b/src/zoneControllerAccessory.ts index 5c9aea1..5eb7db2 100644 --- a/src/zoneControllerAccessory.ts +++ b/src/zoneControllerAccessory.ts @@ -253,7 +253,7 @@ export class ZoneControllerAccessory { if (this.platform.hvacInstance.zonesPushMaster === true) { this.platform.log.debug('zones push master is set to True'); if (value > this.zone.maxCoolSetPoint) { - await this.platform.hvacInstance.setCoolTemp(value as number + 2); + await this.platform.hvacInstance.setCoolTemp(value as number - 2); this.platform.log.debug(`Value is greater than max cool set point of ${this.zone.maxCoolSetPoint}, SETTING MASTER TO -> `, value); await this.platform.hvacInstance.getStatus(); } else if (value < this.zone.minCoolSetPoint) { From aeaeecf9dd773efc081bc082980e54776a6f4dfb Mon Sep 17 00:00:00 2001 From: Julian Greensmith Date: Wed, 15 Mar 2023 16:54:04 +1100 Subject: [PATCH 7/9] fix debug messages --- package.json | 2 +- src/zoneControllerAccessory.ts | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index f92959b..f405f74 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "private": false, "displayName": "Homebridge Actron Que", "name": "homebridge-actron-que", - "version": "1.2.7-beta.4", + "version": "1.2.7-beta.5", "description": "Homebridge plugin for controlling Actron Que controller systems", "license": "Apache-2.0", "repository": { diff --git a/src/zoneControllerAccessory.ts b/src/zoneControllerAccessory.ts index 5eb7db2..a0f88f1 100644 --- a/src/zoneControllerAccessory.ts +++ b/src/zoneControllerAccessory.ts @@ -254,11 +254,11 @@ export class ZoneControllerAccessory { this.platform.log.debug('zones push master is set to True'); if (value > this.zone.maxCoolSetPoint) { await this.platform.hvacInstance.setCoolTemp(value as number - 2); - this.platform.log.debug(`Value is greater than max cool set point of ${this.zone.maxCoolSetPoint}, SETTING MASTER TO -> `, value); + this.platform.log.debug(`Value is greater than MAX cool set point of ${this.zone.maxCoolSetPoint}, SETTING MASTER TO -> `, value); await this.platform.hvacInstance.getStatus(); } else if (value < this.zone.minCoolSetPoint) { await this.platform.hvacInstance.setCoolTemp(value as number); - this.platform.log.debug(`Value is less than min cool set point of ${this.zone.maxCoolSetPoint}, SETTING MASTER TO -> `, value); + this.platform.log.debug(`Value is less than MIN cool set point of ${this.zone.minCoolSetPoint}, SETTING MASTER TO -> `, value); await this.platform.hvacInstance.getStatus(); } } @@ -267,7 +267,7 @@ export class ZoneControllerAccessory { this.platform.log.debug(`Value is greater than max cool set point of ${this.zone.maxCoolSetPoint}, CHANGING TO -> `, value); } else if (value < this.zone.minCoolSetPoint) { value = this.zone.minCoolSetPoint; - this.platform.log.debug(`Value is greater than max cool set point of ${this.zone.maxCoolSetPoint}, CHANGING TO -> `, value); + this.platform.log.debug(`Value is less than MIN cool set point of ${this.zone.minCoolSetPoint}, CHANGING TO -> `, value); } await this.zone.setCoolTemp(value as number); From 837038412db22481d344d7f5200641e33e87c9ec Mon Sep 17 00:00:00 2001 From: Julian Greensmith Date: Mon, 20 Mar 2023 16:44:16 +1100 Subject: [PATCH 8/9] fix zone push master temp logic --- package.json | 2 +- src/masterControllerAccessory.ts | 2 +- src/zoneControllerAccessory.ts | 29 +++++++++++++++-------------- 3 files changed, 17 insertions(+), 16 deletions(-) diff --git a/package.json b/package.json index f405f74..e50a1af 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "private": false, "displayName": "Homebridge Actron Que", "name": "homebridge-actron-que", - "version": "1.2.7-beta.5", + "version": "1.2.7-beta.6", "description": "Homebridge plugin for controlling Actron Que controller systems", "license": "Apache-2.0", "repository": { diff --git a/src/masterControllerAccessory.ts b/src/masterControllerAccessory.ts index 4022362..70eda25 100644 --- a/src/masterControllerAccessory.ts +++ b/src/masterControllerAccessory.ts @@ -2,7 +2,7 @@ import { Service, PlatformAccessory, CharacteristicValue, HAPStatus } from 'home import { ClimateMode, CompressorMode, FanMode, PowerState } from './types'; import { ActronQuePlatform } from './platform'; -// This class represents the master controller, a separate class is used for representing zones (or will be once i write it) +// This class represents the master controller, a separate class is used for representing zones export class MasterControllerAccessory { private hvacService: Service; private humidityService: Service; diff --git a/src/zoneControllerAccessory.ts b/src/zoneControllerAccessory.ts index a0f88f1..66b403d 100644 --- a/src/zoneControllerAccessory.ts +++ b/src/zoneControllerAccessory.ts @@ -3,7 +3,7 @@ import { ClimateMode, CompressorMode } from './types'; import { ActronQuePlatform } from './platform'; import { HvacZone } from './hvacZone'; -// This class represents the master controller, a separate class is used for representing zones (or will be once i write it) +// This class represents the zone controller export class ZoneControllerAccessory { private hvacService: Service; // some versions of the zone sensor do not support humidity @@ -232,11 +232,12 @@ export class ZoneControllerAccessory { await this.platform.hvacInstance.setHeatTemp(value as number + 2); await this.platform.hvacInstance.getStatus(); } - } - if (value > this.zone.maxHeatSetPoint) { - value = this.zone.maxHeatSetPoint; - } else if (value < this.zone.minHeatSetPoint) { - value = this.zone.minHeatSetPoint; + } else { + if (value > this.zone.maxHeatSetPoint) { + value = this.zone.maxHeatSetPoint; + } else if (value < this.zone.minHeatSetPoint) { + value = this.zone.minHeatSetPoint; + } } await this.zone.setHeatTemp(value as number); this.platform.log.debug(`Set Zone ${this.zone.zoneName} Target Heating Temperature -> `, value); @@ -261,14 +262,14 @@ export class ZoneControllerAccessory { this.platform.log.debug(`Value is less than MIN cool set point of ${this.zone.minCoolSetPoint}, SETTING MASTER TO -> `, value); await this.platform.hvacInstance.getStatus(); } - } - if (value > this.zone.maxCoolSetPoint) { - value = this.zone.maxCoolSetPoint; - this.platform.log.debug(`Value is greater than max cool set point of ${this.zone.maxCoolSetPoint}, CHANGING TO -> `, value); - } else if (value < this.zone.minCoolSetPoint) { - value = this.zone.minCoolSetPoint; - this.platform.log.debug(`Value is less than MIN cool set point of ${this.zone.minCoolSetPoint}, CHANGING TO -> `, value); - + } else { + if (value > this.zone.maxCoolSetPoint) { + value = this.zone.maxCoolSetPoint; + this.platform.log.debug(`Value is greater than max cool set point of ${this.zone.maxCoolSetPoint}, CHANGING TO -> `, value); + } else if (value < this.zone.minCoolSetPoint) { + value = this.zone.minCoolSetPoint; + this.platform.log.debug(`Value is less than MIN cool set point of ${this.zone.minCoolSetPoint}, CHANGING TO -> `, value); + } } await this.zone.setCoolTemp(value as number); this.platform.log.debug(`Set Zone ${this.zone.zoneName} Target Cooling Temperature -> `, value); From ae2bc22a42570e92cbedf6906e8d26a5f6d6afcb Mon Sep 17 00:00:00 2001 From: Julian Greensmith Date: Tue, 21 Mar 2023 22:03:00 +1100 Subject: [PATCH 9/9] Update readme and version number --- README.md | 4 ++++ package.json | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index d1675ac..1f3290a 100644 --- a/README.md +++ b/README.md @@ -26,6 +26,10 @@ This is an 'almost' feature complete implementation of the Que platform in HomeK - Report battery level on zone sensors and get low battery alerts in the home app - Support for homebridge config UI +Fixes/Improvements in version 1.2.7 + - Allow master controller to also operate as a zone controller + - Resolved issue with logic controlling "Zones Push Master" temp adjustments which was causing setting to fail on first attempt + Fixes/Improvements in version 1.2.4 - Improved support for variations in API data returned for differing models of Que systems - Added option to override the default heating/cooling threshold temperatures via plugin configuration diff --git a/package.json b/package.json index e50a1af..7d5cb4d 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "private": false, "displayName": "Homebridge Actron Que", "name": "homebridge-actron-que", - "version": "1.2.7-beta.6", + "version": "1.2.7", "description": "Homebridge plugin for controlling Actron Que controller systems", "license": "Apache-2.0", "repository": {