@homebridge-plugins/homebridge-smarthq 0.4.0-beta.6 → 0.4.0-beta.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/dist/devices/OpalIceMaker/Managers/OpalMonitorManager.d.ts +5 -0
  3. package/dist/devices/OpalIceMaker/Managers/OpalMonitorManager.d.ts.map +1 -1
  4. package/dist/devices/OpalIceMaker/Managers/OpalMonitorManager.js +69 -17
  5. package/dist/devices/OpalIceMaker/Managers/OpalMonitorManager.js.map +1 -1
  6. package/dist/devices/OpalIceMaker/index.js +1 -0
  7. package/dist/devices/OpalIceMaker/index.js.map +1 -1
  8. package/dist/devices/airConditioner.d.ts +54 -0
  9. package/dist/devices/airConditioner.d.ts.map +1 -0
  10. package/dist/devices/airConditioner.js +575 -0
  11. package/dist/devices/airConditioner.js.map +1 -0
  12. package/dist/platform.d.ts +2 -1
  13. package/dist/platform.d.ts.map +1 -1
  14. package/dist/platform.js +56 -4
  15. package/dist/platform.js.map +1 -1
  16. package/dist/settings.d.ts +15 -0
  17. package/dist/settings.d.ts.map +1 -1
  18. package/dist/settings.js +8 -0
  19. package/dist/settings.js.map +1 -1
  20. package/docs/assets/dmt/dmt-component-data.js +1 -1
  21. package/docs/assets/dmt/dmt-search.cmp +0 -0
  22. package/docs/classes/SmartHQPlatform.html +8 -8
  23. package/docs/functions/default.html +1 -1
  24. package/docs/interfaces/DeviceOptions.html +2 -2
  25. package/docs/interfaces/SmartHQPlatformConfig.html +2 -2
  26. package/docs/interfaces/SmartHqContext.html +2 -2
  27. package/docs/interfaces/SmartHqERDResponse.html +8 -0
  28. package/docs/interfaces/credentials.html +2 -2
  29. package/docs/interfaces/devicesConfig.html +2 -2
  30. package/docs/interfaces/options.html +2 -2
  31. package/docs/modules.html +1 -1
  32. package/docs/variables/API_URL.html +1 -1
  33. package/docs/variables/ERD_CODES.html +1 -1
  34. package/docs/variables/ERD_TYPES.html +1 -1
  35. package/docs/variables/KEEPALIVE_TIMEOUT.html +1 -1
  36. package/docs/variables/LOGIN_URL.html +1 -1
  37. package/docs/variables/OAUTH2_CLIENT_ID.html +1 -1
  38. package/docs/variables/OAUTH2_CLIENT_SECRET.html +1 -1
  39. package/docs/variables/OAUTH2_REDIRECT_URI.html +1 -1
  40. package/docs/variables/PLATFORM_NAME.html +1 -1
  41. package/docs/variables/PLUGIN_NAME.html +1 -1
  42. package/docs/variables/SECURE_URL.html +1 -1
  43. package/eslint.config.js +6 -2
  44. package/package.json +25 -24
package/CHANGELOG.md CHANGED
@@ -2,6 +2,21 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. This project uses [Semantic Versioning](https://semver.org/)
4
4
 
5
+ ## [0.4.0](https://github.com/homebridge-plugins/homebridge-smarthq/releases/tag/v0.4.0) (2025-06-26)
6
+
7
+ ### What's Changes
8
+
9
+ - Add air conditioner support [#34](https://github.com/homebridge-plugins/homebridge-smarthq/pull/34), Thanks [@nicholasodonnell](https://github.com/nicholasodonnell)
10
+ - Opal Monitoring Services Improvements [#26](https://github.com/homebridge-plugins/homebridge-smarthq/pull/26), Thanks [@jamesh48](https://github.com/jamesh48)
11
+ - Opal Scheduling Manager [#25](https://github.com/homebridge-plugins/homebridge-smarthq/pull/25), Thanks [@jamesh48](https://github.com/jamesh48)
12
+ - Fast Follower- Remove Unnecessary info logs [#24](https://github.com/homebridge-plugins/homebridge-smarthq/pull/24), Thanks [@jamesh48](https://github.com/jamesh48)
13
+ - Opal Ice Maker- Labels, Sorting, Auto Shutoff Feature, Descale Notification [#23](https://github.com/homebridge-plugins/homebridge-smarthq/pull/23), Thanks [@jamesh48](https://github.com/jamesh48)
14
+ - Favor deviceOptions over options for options that are specific to devices. [#21](https://github.com/homebridge-plugins/homebridge-smarthq/pull/21), Thanks [@jamesh48](https://github.com/jamesh48)
15
+ - Opal Ice Maker Production/Progress Feature [#20](https://github.com/homebridge-plugins/homebridge-smarthq/pull/20), Thanks [@jamesh48](https://github.com/jamesh48)
16
+ - Housekeeping and updated dependencies.
17
+
18
+ **Full Changelog**: https://github.com/homebridge-plugins/homebridge-smarthq/compare/v0.3.0...v0.4.0
19
+
5
20
  ## [0.3.0](https://github.com/homebridge-plugins/homebridge-smarthq/releases/tag/v0.3.0) (2025-03-04)
6
21
 
7
22
  # *No New Releases During Lent*
@@ -8,11 +8,16 @@ export declare class OpalMonitorManager extends OpalDeviceBase {
8
8
  readonly device: SmartHqContext['device'] & devicesConfig;
9
9
  private servicesSubscription;
10
10
  private schedulerSubscription;
11
+ private statusSubscription;
11
12
  opalIceMaker: SmartHQIceMaker;
12
13
  constructor(opalIceMaker: SmartHQIceMaker, platform: SmartHQPlatform, accessory: PlatformAccessory<SmartHqContext>, device: SmartHqContext['device'] & devicesConfig);
14
+ private getTimeUntilNextMinute;
15
+ private createMinuteAlignedTimer;
13
16
  startServicesMonitoring(): void;
17
+ startStatusMonitoring(): void;
14
18
  startSchedulerMonitoring(): void;
15
19
  stopSchedulerMonitoring(): void;
20
+ stopStatusMonitoring(): void;
16
21
  stopServicesMonitoring(): void;
17
22
  }
18
23
  //# sourceMappingURL=OpalMonitorManager.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"OpalMonitorManager.d.ts","sourceRoot":"","sources":["../../../../src/devices/OpalIceMaker/Managers/OpalMonitorManager.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA;AAGnD,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAChD,OAAO,KAAK,EAAE,eAAe,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,OAAO,CAAA;AAI3E,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AAGxD,qBAAa,kBAAmB,SAAQ,cAAc;IAOlD,QAAQ,CAAC,QAAQ,EAAE,eAAe;IAC3B,SAAS,EAAE,iBAAiB,CAAC,cAAc,CAAC;IACnD,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,QAAQ,CAAC,GAAG,aAAa;IAM3D,OAAO,CAAC,sBAAsB;IAO9B,OAAO,CAAC,wBAAwB;IAWhC,uBAAuB,IAAI,IAAI;IA8B/B,qBAAqB,IAAI,IAAI;IAmB7B,wBAAwB,IAAI,IAAI;IAoBhC,uBAAuB,IAAI,IAAI;IAQ/B,oBAAoB,IAAI,IAAI;IAS5B,sBAAsB,IAAI,IAAI;CAO/B"}
@@ -1,4 +1,5 @@
1
- import { interval, skipWhile } from 'rxjs';
1
+ import { timer, concat, of } from 'rxjs';
2
+ import { switchMap, skipWhile } from 'rxjs';
2
3
  import { OpalDeviceBase } from '../OpalDeviceBase.js';
3
4
  export class OpalMonitorManager extends OpalDeviceBase {
4
5
  platform;
@@ -6,6 +7,7 @@ export class OpalMonitorManager extends OpalDeviceBase {
6
7
  device;
7
8
  servicesSubscription = null;
8
9
  schedulerSubscription = null;
10
+ statusSubscription = null;
9
11
  opalIceMaker;
10
12
  constructor(opalIceMaker, platform, accessory, device) {
11
13
  super(platform, accessory, device);
@@ -14,31 +16,74 @@ export class OpalMonitorManager extends OpalDeviceBase {
14
16
  this.device = device;
15
17
  this.opalIceMaker = opalIceMaker;
16
18
  }
19
+ getTimeUntilNextMinute() {
20
+ const now = new Date();
21
+ const remaining = (60 - now.getSeconds()) * 1000 - now.getMilliseconds();
22
+ return remaining > 0 ? remaining : 0;
23
+ }
24
+ // Create a timer that aligns with the minute boundary and executes immediately at alignment
25
+ createMinuteAlignedTimer(intervalMs) {
26
+ return timer(this.getTimeUntilNextMinute()).pipe(
27
+ // Start with an immediate emission, then continue with regular interval
28
+ switchMap(() => concat(of(0), // Emit 0 immediately when the timer reaches alignment
29
+ timer(intervalMs, intervalMs))));
30
+ }
17
31
  // Start the monitoring
18
32
  startServicesMonitoring() {
19
33
  // Stop any existing subscription first
20
34
  this.stopServicesMonitoring();
21
- this.stopSchedulerMonitoring();
22
- this.servicesSubscription = interval((this.device.refreshRate || 30) * 1000)
23
- .pipe(skipWhile(() => !this.opalIceMaker.progressManager && !this.platform.config.options?.homekitControllerNotificationsSecret))
24
- .subscribe(async () => {
25
- await this.opalIceMaker.statusManager.getOpalCurrentStatus();
26
- await this.opalIceMaker.filterMaintenanceManager.getFilterMaintenanceStatus();
27
- await this.opalIceMaker.descaleManager.getDescaleStatus();
28
- if (this.opalIceMaker.progressManager?.hasService()) {
29
- const currentProductionValue = await this.opalIceMaker.progressManager.processProductionProgress();
30
- this.opalIceMaker.powerManager.turnOffOnProductionLimitSurpassed(currentProductionValue);
31
- }
32
- });
33
- this.platform.debugLog(`Started ice maker monitoring at ${this.device.refreshRate}s intervals`);
35
+ const refreshRate = (this.platform.config.options?.refreshRate || 30) * 1000;
36
+ this.servicesSubscription =
37
+ this.createMinuteAlignedTimer(refreshRate)
38
+ .pipe(skipWhile(() => !this.opalIceMaker.progressManager && !this.platform.config.options?.homekitControllerNotificationsSecret))
39
+ .subscribe(async () => {
40
+ try {
41
+ this.platform.debugLog('Running opal services monitoring tasks');
42
+ // These Notifications only alert in Homekit Controller
43
+ await this.opalIceMaker.filterMaintenanceManager.getFilterMaintenanceStatus();
44
+ await this.opalIceMaker.descaleManager.getDescaleStatus();
45
+ if (this.opalIceMaker.progressManager?.hasService()) {
46
+ const currentProductionValue = await this.opalIceMaker.progressManager.processProductionProgress();
47
+ this.opalIceMaker.powerManager.turnOffOnProductionLimitSurpassed(currentProductionValue);
48
+ }
49
+ }
50
+ catch (error) {
51
+ this.platform.errorLog(`Error in service monitoring: ${error}`);
52
+ }
53
+ });
54
+ this.platform.debugLog(`Opal services monitor starting in ${this.getTimeUntilNextMinute() / 1000} seconds, Interval: ${refreshRate / 1000} seconds`);
55
+ }
56
+ startStatusMonitoring() {
57
+ this.stopStatusMonitoring();
58
+ const refreshRate = (this.platform.config.options?.refreshRate || 30) * 1000;
59
+ this.statusSubscription =
60
+ this.createMinuteAlignedTimer(refreshRate)
61
+ .subscribe(async () => {
62
+ try {
63
+ this.platform.debugLog('Running opal status monitoring tasks');
64
+ await this.opalIceMaker.statusManager.getOpalCurrentStatus();
65
+ }
66
+ catch (error) {
67
+ this.platform.errorLog(`Error in status monitoring: ${error}`);
68
+ }
69
+ });
70
+ this.platform.debugLog(`Opal status monitor starting in ${this.getTimeUntilNextMinute() / 1000} seconds, Interval: ${refreshRate / 1000} seconds`);
34
71
  }
35
72
  startSchedulerMonitoring() {
36
- this.schedulerSubscription = interval(this.opalIceMaker.schedulingManager.schedulerInterval)
73
+ this.stopSchedulerMonitoring();
74
+ const schedulingInterval = this.opalIceMaker.schedulingManager.schedulerInterval;
75
+ this.schedulerSubscription = this.createMinuteAlignedTimer(schedulingInterval)
37
76
  .pipe(skipWhile(() => !this.platform.config.deviceOptions?.opal?.oplIceProductionSchedule))
38
77
  .subscribe(() => {
39
- this.opalIceMaker.schedulingManager.initializeIfIceMakerOnSchedule();
78
+ try {
79
+ this.platform.debugLog('Running opal scheduler monitoring tasks');
80
+ this.opalIceMaker.schedulingManager.initializeIfIceMakerOnSchedule();
81
+ }
82
+ catch (error) {
83
+ this.platform.errorLog(`Error in scheduler monitoring: ${error}`);
84
+ }
40
85
  });
41
- this.platform.debugLog(`Started ice maker monitoring at 60s intervals`);
86
+ this.platform.debugLog(`Opal scheduling monitor starting in ${this.getTimeUntilNextMinute() / 1000} seconds, Interval: ${schedulingInterval / 1000} seconds`);
42
87
  }
43
88
  stopSchedulerMonitoring() {
44
89
  if (this.schedulerSubscription) {
@@ -47,6 +92,13 @@ export class OpalMonitorManager extends OpalDeviceBase {
47
92
  this.platform.debugLog('Stopped Schedule Monitoring');
48
93
  }
49
94
  }
95
+ stopStatusMonitoring() {
96
+ if (this.statusSubscription) {
97
+ this.statusSubscription.unsubscribe();
98
+ this.statusSubscription = null;
99
+ this.platform.debugLog('Stopped Status Monitoring');
100
+ }
101
+ }
50
102
  // Stop the monitoring
51
103
  stopServicesMonitoring() {
52
104
  if (this.servicesSubscription) {
@@ -1 +1 @@
1
- {"version":3,"file":"OpalMonitorManager.js","source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C,oBAAoB,GAAG,IAAI,CAAA;YAChC,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,8BAA8B,CAAC,CAAA;QACxD,CAAC;IACH,CAAC;CACF"}
@@ -31,6 +31,7 @@ export class SmartHQIceMaker extends deviceBase {
31
31
  this.metadataManager = new OpalMetadataSvcManager(this, platform, accessory, device);
32
32
  this.monitorManager.startServicesMonitoring();
33
33
  this.monitorManager.startSchedulerMonitoring();
34
+ this.monitorManager.startStatusMonitoring();
34
35
  }
35
36
  shutdown() {
36
37
  // Clean up subscriptions
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/devices/OpalIceMaker/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAA;AAEpD,OAAO,EACL,sBAAsB,EACtB,mBAAmB,EACnB,kBAAkB,EAClB,sBAAsB,EACtB,+BAA+B,EAC/B,wBAAwB,EACxB,qBAAqB,EACrB,qBAAqB,EACtB,MAAM,yBAAyB,CAAA;AAChC,OAAO,EAAE,oBAAoB,EAAE,MAAM,wCAAwC,CAAA;AAG7E,MAAM,OAAO,eAAgB,SAAQ,UAAU;IAYlC;IAEA;IAbJ,YAAY,CAAqB;IAChC,iBAAiB,CAA0B;IAC5C,aAAa,CAAsB;IAClC,cAAc,CAAoB;IACnC,eAAe,CAAyB;IACvC,eAAe,CAAwB;IACxC,wBAAwB,CAAiC;IACzD,cAAc,CAAuB;IACrC,iBAAiB,CAAuB;IAE/C,YACW,QAAyB,EAClC,SAA4C,EACnC,MAAgD;QAEzD,KAAK,CAAC,QAAQ,EAAE,SAAS,EAAE,MAAM,CAAC,CAAA;QAJzB,aAAQ,GAAR,QAAQ,CAAiB;QAEzB,WAAM,GAAN,MAAM,CAA0C;QAIzD,IAAI,CAAC,QAAQ,CAAC,eAAe,CAAC,2BAA2B,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC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SAAS,EACT,MAAM,CACP,CAAA;QACD,IAAI,CAAC,iBAAiB,GAAG,IAAI,wBAAwB,CAAC,QAAQ,EAAE,SAAS,EAAE,MAAM,CAAC,CAAA;QAClF,IAAI,CAAC,aAAa,GAAG,IAAI,oBAAoB,CAAC,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,CAAC,CAAA;QAChF,wBAAwB;QAExB,IAAI,CAAC,iBAAiB,GAAG,IAAI,qBAAqB,CAAC,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,CAAC,CAAA;QAErF,IAAI,CAAC,cAAc,GAAG,IAAI,kBAAkB,CAC1C,IAAI,EACJ,QAAQ,EACR,SAAS,EACT,MAAM,CACP,CAAA;QAED,IAAI,CAAC,eAAe,GAAG,IAAI,sBAAsB,CAAC,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,CAAC,CAAA;QAEpF,IAAI,CAAC,cAAc,CAAC,uBAAuB,EAAE,CAAA;QAC7C,IAAI,CAAC,cAAc,CAAC,wBAAwB,EAAE,CAAA;QAC9C,IAAI,CAAC,cAAc,CAAC,qBAAqB,EAAE,CAAA;IAC7C,CAAC;IAED,QAAQ;QACN,yBAAyB;QACzB,IAAI,CAAC,cAAc,CAAC,sBAAsB,EAAE,CAAA;QAC5C,IAAI,CAAC,cAAc,CAAC,uBAAuB,EAAE,CAAA;IAC/C,CAAC;CACF"}
@@ -0,0 +1,54 @@
1
+ import type { CharacteristicValue, PlatformAccessory } from 'homebridge';
2
+ import type { SmartHQPlatform } from '../platform.js';
3
+ import type { devicesConfig, SmartHqContext } from '../settings.js';
4
+ import { deviceBase } from './device.js';
5
+ declare enum OperationMode {
6
+ COOL = "00",
7
+ FAN_ONLY = "01",
8
+ ENERGY_SAVER = "02",
9
+ DRY = "04"
10
+ }
11
+ export declare class SmartHQAirConditioner extends deviceBase {
12
+ protected readonly platform: SmartHQPlatform;
13
+ protected readonly accessory: PlatformAccessory<SmartHqContext>;
14
+ protected readonly device: SmartHqContext['device'] & devicesConfig;
15
+ private readonly HEATER_COOLER_SVC_NAME;
16
+ private readonly heaterCoolerSvc;
17
+ private readonly MODE_SWITCH_SVC_PREFIX;
18
+ private readonly modeSwitchSvc;
19
+ constructor(platform: SmartHQPlatform, accessory: PlatformAccessory<SmartHqContext>, device: SmartHqContext['device'] & devicesConfig);
20
+ private getErdValue;
21
+ private setErdValue;
22
+ private getPowerState;
23
+ private setPowerState;
24
+ private getAmbientTemperature;
25
+ private getTemperature;
26
+ private setTemperature;
27
+ private getTemperatureDisplayUnits;
28
+ private setTemperatureDisplayUnits;
29
+ private getOperationMode;
30
+ private setOperationMode;
31
+ private getFanSetting;
32
+ private setFanSetting;
33
+ private getFilterStatus;
34
+ handleGetActive(): Promise<CharacteristicValue>;
35
+ handleSetActive(value: CharacteristicValue): Promise<void>;
36
+ handleGetCurrentHeaterCoolerState(): Promise<number>;
37
+ handleGetTargetHeaterCoolerState(): Promise<CharacteristicValue>;
38
+ handleSetTargetHeaterCoolerState(_value: CharacteristicValue): Promise<void>;
39
+ handleGetCurrentTemperature(): Promise<number>;
40
+ handleGetCoolingThresholdTemperature(): Promise<number>;
41
+ handleSetCoolingThresholdTemperature(value: CharacteristicValue): Promise<void>;
42
+ handleGetRotationSpeed(): Promise<CharacteristicValue>;
43
+ handleSetRotationSpeed(value: CharacteristicValue): Promise<void>;
44
+ handleGetTemperatureDisplayUnits(): Promise<CharacteristicValue>;
45
+ handleSetTemperatureDisplayUnits(value: CharacteristicValue): Promise<void>;
46
+ handleGetFilterChangeIndication(): Promise<CharacteristicValue>;
47
+ handleGetOperationMode(mode: OperationMode): Promise<CharacteristicValue>;
48
+ handleSetOperationMode(mode: OperationMode, value: CharacteristicValue): Promise<void>;
49
+ refreshState(): Promise<void>;
50
+ private fahrenheitToCelsius;
51
+ private celsiusToFahrenheit;
52
+ }
53
+ export {};
54
+ //# sourceMappingURL=airConditioner.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"air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