homebridge-carrier-infinity 1.6.9 → 1.7.0-beta.1
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.
- package/dist/accessory_comfort_activity.d.ts.map +1 -1
- package/dist/accessory_comfort_activity.js +6 -9
- package/dist/accessory_comfort_activity.js.map +1 -1
- package/dist/accessory_oat.d.ts +1 -1
- package/dist/accessory_oat.d.ts.map +1 -1
- package/dist/accessory_oat.js +4 -3
- package/dist/accessory_oat.js.map +1 -1
- package/dist/accessory_thermostat.d.ts.map +1 -1
- package/dist/accessory_thermostat.js +6 -27
- package/dist/accessory_thermostat.js.map +1 -1
- package/dist/api/helpers.d.ts +5 -0
- package/dist/api/helpers.d.ts.map +1 -0
- package/dist/api/helpers.js +31 -0
- package/dist/api/helpers.js.map +1 -0
- package/dist/api/helpers_rxjs.d.ts +3 -0
- package/dist/api/helpers_rxjs.d.ts.map +1 -0
- package/dist/api/helpers_rxjs.js +16 -0
- package/dist/api/helpers_rxjs.js.map +1 -0
- package/dist/api/models.d.ts +78 -56
- package/dist/api/models.d.ts.map +1 -1
- package/dist/api/models.js +352 -356
- package/dist/api/models.js.map +1 -1
- package/dist/api/oauth.js +1 -1
- package/dist/api/oauth.js.map +1 -1
- package/dist/characteristics_ac.d.ts +1 -1
- package/dist/characteristics_ac.d.ts.map +1 -1
- package/dist/characteristics_ac.js +70 -42
- package/dist/characteristics_ac.js.map +1 -1
- package/dist/characteristics_base.d.ts +9 -6
- package/dist/characteristics_base.d.ts.map +1 -1
- package/dist/characteristics_base.js +56 -37
- package/dist/characteristics_base.js.map +1 -1
- package/dist/characteristics_fan.d.ts +6 -6
- package/dist/characteristics_fan.d.ts.map +1 -1
- package/dist/characteristics_fan.js +75 -63
- package/dist/characteristics_fan.js.map +1 -1
- package/dist/characteristics_filter.d.ts +1 -1
- package/dist/characteristics_filter.d.ts.map +1 -1
- package/dist/characteristics_filter.js +5 -8
- package/dist/characteristics_filter.js.map +1 -1
- package/dist/characteristics_humidity.d.ts +2 -5
- package/dist/characteristics_humidity.d.ts.map +1 -1
- package/dist/characteristics_humidity.js +9 -17
- package/dist/characteristics_humidity.js.map +1 -1
- package/dist/platform.d.ts.map +1 -1
- package/dist/platform.js +12 -6
- package/dist/platform.js.map +1 -1
- package/package.json +28 -23
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"characteristics_fan.d.ts","sourceRoot":"","sources":["../src/characteristics_fan.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,+BAA+B,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"characteristics_fan.d.ts","sourceRoot":"","sources":["../src/characteristics_fan.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,+BAA+B,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAsBvF,cAAM,SAAU,SAAQ,+BAA+B;IACrD,KAAK,0DAA8B;IACnC,KAAK,mCA8BH;IAEF,GAAG,UAAiB,mBAAmB,mBA6BrC;CACH;AAED,cAAM,QAAS,SAAQ,+BAA+B;IACpD,KAAK,mEAAuC;IAC5C,KAAK,uCA8BH;CACH;AAED,cAAM,QAAS,SAAQ,+BAA+B;IACpD,KAAK,iEAAqC;IAC1C,KAAK;;;;OAA8C;IACnD,KAAK,iDAAuG;IAE5G,GAAG,UAAiB,mBAAmB,mBAsBrC;CACH;AAED,cAAM,cAAe,SAAQ,+BAA+B;IAC1D,KAAK,kEAAsC;IAC3C,KAAK,mCAIH;IAEF,GAAG,UAAiB,mBAAmB,mBAwBrC;CACH;AAED,qBAAa,UAAW,SAAQ,YAAY;IAC1C,QAAQ,mFAKN;CACH"}
|
|
@@ -4,6 +4,7 @@ exports.FanService = void 0;
|
|
|
4
4
|
const characteristics_base_1 = require("./characteristics_base");
|
|
5
5
|
const helpers_1 = require("./helpers");
|
|
6
6
|
const constants_1 = require("./api/constants");
|
|
7
|
+
const rxjs_1 = require("rxjs");
|
|
7
8
|
/*
|
|
8
9
|
* Controls for system fan.
|
|
9
10
|
*
|
|
@@ -24,42 +25,48 @@ class FanStatus extends characteristics_base_1.ThermostatCharacteristicWrapper {
|
|
|
24
25
|
constructor() {
|
|
25
26
|
super(...arguments);
|
|
26
27
|
this.ctype = this.Characteristic.Active;
|
|
27
|
-
this.
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
//
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
await this.system.status.getZoneFan(this.context.zone) !== constants_1.FAN_MODE.OFF ||
|
|
38
|
-
// zone status api says zone is conditioning
|
|
39
|
-
await this.system.status.getZoneConditioning(this.context.zone) !== constants_1.SYSTEM_MODE.OFF) {
|
|
40
|
-
// but there is an exception to the above... which is the fan status/config
|
|
41
|
-
// can be wrong if the zone is actually closed off.
|
|
42
|
-
if (await this.system.status.getZoneOpen(this.context.zone)) {
|
|
43
|
-
return this.Characteristic.Active.ACTIVE;
|
|
44
|
-
}
|
|
45
|
-
else {
|
|
46
|
-
return this.Characteristic.Active.INACTIVE;
|
|
47
|
-
}
|
|
28
|
+
this.value = (0, rxjs_1.combineLatest)([
|
|
29
|
+
this.system.config.mode,
|
|
30
|
+
this.system.config.getZone(this.context.zone).fan,
|
|
31
|
+
this.system.status.getZone(this.context.zone).blowing,
|
|
32
|
+
this.system.status.getZone(this.context.zone).closed,
|
|
33
|
+
]).pipe((0, rxjs_1.debounceTime)(50), (0, rxjs_1.map)(([c_mode, c_fan, s_blowing, s_closed]) => {
|
|
34
|
+
// First, we do the absolute checks. If the status says blowing, or the system
|
|
35
|
+
// is shut off, we know the state.
|
|
36
|
+
if (s_blowing) {
|
|
37
|
+
return this.Characteristic.Active.ACTIVE;
|
|
48
38
|
}
|
|
49
|
-
else {
|
|
39
|
+
else if (c_mode === constants_1.SYSTEM_MODE.OFF) {
|
|
50
40
|
return this.Characteristic.Active.INACTIVE;
|
|
41
|
+
// Second, we check for the edge case between when a user changes the state
|
|
42
|
+
// and the system picks it up. If the fan is set to on, the fan will be on
|
|
43
|
+
// soon, even though it isn't yet (which we know since blowing was false).
|
|
44
|
+
// This mitigates switch instability.
|
|
45
|
+
// However, we only do this edge case fix if the damper status is not closed,
|
|
46
|
+
// since if the damper reports it is closed, there is a good chance the
|
|
47
|
+
// config may be ignored for one reason or another. (#156)
|
|
51
48
|
}
|
|
52
|
-
|
|
49
|
+
else if (c_fan !== constants_1.FAN_MODE.OFF && !s_closed) {
|
|
50
|
+
return this.Characteristic.Active.ACTIVE;
|
|
51
|
+
}
|
|
52
|
+
// Finally, if we get here the zone is not blowing.
|
|
53
|
+
return this.Characteristic.Active.INACTIVE;
|
|
54
|
+
}), (0, rxjs_1.distinctUntilChanged)());
|
|
53
55
|
this.set = async (value) => {
|
|
54
56
|
// if we are trying to *turn on* fan, and system is off, set to fan only mode
|
|
55
57
|
if (value === this.Characteristic.Active.ACTIVE &&
|
|
56
|
-
await this.system.config.
|
|
58
|
+
await (0, rxjs_1.firstValueFrom)(this.system.config.mode) === constants_1.SYSTEM_MODE.OFF) {
|
|
57
59
|
return await this.system.config.setMode(constants_1.SYSTEM_MODE.FAN_ONLY);
|
|
58
60
|
}
|
|
59
61
|
// if we are trying to turn off fan, turn off fan override (i.e. set fan speed=auto)
|
|
60
62
|
// NOTE: If system is in FAN_ONLY mode, it will remain in FAN ONLY, but with speed=auto.
|
|
61
63
|
if (value === this.Characteristic.Active.INACTIVE) {
|
|
62
|
-
|
|
64
|
+
// Sync current activity settings to manual activity
|
|
65
|
+
await this.system.config.setZoneActivityManualSync(this.context.zone, await (0, rxjs_1.firstValueFrom)(this.system.getZoneActivity(this.context.zone)));
|
|
66
|
+
// Update manual activity fan speed
|
|
67
|
+
await this.system.config.setZoneActivityManualFan(this.context.zone, constants_1.FAN_MODE.OFF);
|
|
68
|
+
// Enable manual activity hold
|
|
69
|
+
await this.system.config.setZoneActivityHold(this.context.zone, constants_1.ACTIVITY.MANUAL, await this.getHoldTime());
|
|
63
70
|
}
|
|
64
71
|
};
|
|
65
72
|
}
|
|
@@ -68,49 +75,52 @@ class FanState extends characteristics_base_1.ThermostatCharacteristicWrapper {
|
|
|
68
75
|
constructor() {
|
|
69
76
|
super(...arguments);
|
|
70
77
|
this.ctype = this.Characteristic.CurrentFanState;
|
|
71
|
-
this.
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
78
|
+
this.value = (0, rxjs_1.combineLatest)([
|
|
79
|
+
this.system.config.mode,
|
|
80
|
+
this.system.config.getZone(this.context.zone).fan,
|
|
81
|
+
this.system.status.getZone(this.context.zone).blowing,
|
|
82
|
+
this.system.status.getZone(this.context.zone).closed,
|
|
83
|
+
]).pipe((0, rxjs_1.debounceTime)(50), (0, rxjs_1.map)(([c_mode, c_fan, s_blowing, s_closed]) => {
|
|
84
|
+
// First, we do the absolute checks. If the status says blowing, or the system
|
|
85
|
+
// is shut off, we know the state.
|
|
86
|
+
if (s_blowing) {
|
|
87
|
+
return this.Characteristic.CurrentFanState.BLOWING_AIR;
|
|
76
88
|
}
|
|
77
|
-
else if (
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
//
|
|
81
|
-
|
|
82
|
-
//
|
|
83
|
-
|
|
84
|
-
//
|
|
85
|
-
//
|
|
86
|
-
if (await this.system.status.getZoneOpen(this.context.zone)) {
|
|
87
|
-
return this.Characteristic.CurrentFanState.BLOWING_AIR;
|
|
88
|
-
}
|
|
89
|
-
else {
|
|
90
|
-
return this.Characteristic.CurrentFanState.IDLE;
|
|
91
|
-
}
|
|
89
|
+
else if (c_mode === constants_1.SYSTEM_MODE.OFF) {
|
|
90
|
+
return this.Characteristic.CurrentFanState.INACTIVE;
|
|
91
|
+
// Second, we check for the edge case between when a user changes the state
|
|
92
|
+
// and the system picks it up. If the fan is set to on, the fan will be on
|
|
93
|
+
// soon, even though it isn't yet (which we know since blowing was false).
|
|
94
|
+
// This mitigates switch instability.
|
|
95
|
+
// However, we only do this edge case fix if the damper status is not closed,
|
|
96
|
+
// since if the damper reports it is closed, there is a good chance the
|
|
97
|
+
// config may be ignored for one reason or another. (#156)
|
|
92
98
|
}
|
|
93
|
-
else {
|
|
94
|
-
return this.Characteristic.CurrentFanState.
|
|
99
|
+
else if (c_fan !== constants_1.FAN_MODE.OFF && !s_closed) {
|
|
100
|
+
return this.Characteristic.CurrentFanState.BLOWING_AIR;
|
|
95
101
|
}
|
|
96
|
-
|
|
102
|
+
// Finally, if we get here the zone is not blowing.
|
|
103
|
+
return this.Characteristic.CurrentFanState.IDLE;
|
|
104
|
+
}), (0, rxjs_1.distinctUntilChanged)());
|
|
97
105
|
}
|
|
98
106
|
}
|
|
99
107
|
class FanSpeed extends characteristics_base_1.ThermostatCharacteristicWrapper {
|
|
100
108
|
constructor() {
|
|
101
109
|
super(...arguments);
|
|
102
110
|
this.ctype = this.Characteristic.RotationSpeed;
|
|
103
|
-
this.props = { minValue: 0, maxValue: 3, minStep: 1 };
|
|
104
|
-
this.
|
|
105
|
-
return (0, helpers_1.convertSystemFan2CharFan)(await this.system.config.getZoneActivityFan(this.context.zone, await this.getActivity()));
|
|
106
|
-
};
|
|
111
|
+
this.props = (0, rxjs_1.of)({ minValue: 0, maxValue: 3, minStep: 1 });
|
|
112
|
+
this.value = this.system.config.getZone(this.context.zone).fan.pipe((0, rxjs_1.map)(data => (0, helpers_1.convertSystemFan2CharFan)(data)));
|
|
107
113
|
this.set = async (value) => {
|
|
108
114
|
// if we are trying to control fan, and system is off, set to fan only mode
|
|
109
|
-
if (await this.system.config.
|
|
115
|
+
if (await (0, rxjs_1.firstValueFrom)(this.system.config.mode) === constants_1.SYSTEM_MODE.OFF) {
|
|
110
116
|
await this.system.config.setMode(constants_1.SYSTEM_MODE.FAN_ONLY);
|
|
111
117
|
}
|
|
112
|
-
//
|
|
113
|
-
|
|
118
|
+
// Sync current activity settings to manual activity
|
|
119
|
+
await this.system.config.setZoneActivityManualSync(this.context.zone, await (0, rxjs_1.firstValueFrom)(this.system.getZoneActivity(this.context.zone)));
|
|
120
|
+
// Update manual activity fan speed
|
|
121
|
+
await this.system.config.setZoneActivityManualFan(this.context.zone, (0, helpers_1.convertCharFan2SystemFan)(value));
|
|
122
|
+
// Enable manual activity hold
|
|
123
|
+
await this.system.config.setZoneActivityHold(this.context.zone, constants_1.ACTIVITY.MANUAL, await this.getHoldTime());
|
|
114
124
|
};
|
|
115
125
|
}
|
|
116
126
|
}
|
|
@@ -118,20 +128,22 @@ class TargetFanState extends characteristics_base_1.ThermostatCharacteristicWrap
|
|
|
118
128
|
constructor() {
|
|
119
129
|
super(...arguments);
|
|
120
130
|
this.ctype = this.Characteristic.TargetFanState;
|
|
121
|
-
this.
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
this.Characteristic.TargetFanState.MANUAL;
|
|
125
|
-
};
|
|
131
|
+
this.value = this.system.config.getZone(this.context.zone).fan.pipe((0, rxjs_1.map)(data => data === constants_1.FAN_MODE.OFF ?
|
|
132
|
+
this.Characteristic.TargetFanState.AUTO :
|
|
133
|
+
this.Characteristic.TargetFanState.MANUAL));
|
|
126
134
|
this.set = async (value) => {
|
|
127
135
|
// if we are trying to control fan, and system is off, set to fan only mode
|
|
128
|
-
if (await this.system.config.
|
|
136
|
+
if (await (0, rxjs_1.firstValueFrom)(this.system.config.mode) === constants_1.SYSTEM_MODE.OFF) {
|
|
129
137
|
await this.system.config.setMode(constants_1.SYSTEM_MODE.FAN_ONLY);
|
|
130
138
|
}
|
|
131
|
-
//
|
|
132
|
-
|
|
139
|
+
// Sync current activity settings to manual activity
|
|
140
|
+
await this.system.config.setZoneActivityManualSync(this.context.zone, await (0, rxjs_1.firstValueFrom)(this.system.getZoneActivity(this.context.zone)));
|
|
141
|
+
// Update manual activity fan speed to switch between auto and manual
|
|
142
|
+
await this.system.config.setZoneActivityManualFan(this.context.zone, value === this.Characteristic.TargetFanState.AUTO ?
|
|
133
143
|
constants_1.FAN_MODE.OFF : // fan off is auto
|
|
134
144
|
constants_1.FAN_MODE.MED);
|
|
145
|
+
// Enable manual activity hold
|
|
146
|
+
await this.system.config.setZoneActivityHold(this.context.zone, constants_1.ACTIVITY.MANUAL, await this.getHoldTime());
|
|
135
147
|
};
|
|
136
148
|
}
|
|
137
149
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"characteristics_fan.js","sourceRoot":"","sources":["../src/characteristics_fan.ts"],"names":[],"mappings":";;;AACA,iEAAuF;AACvF,uCAA+E;AAC/E,+
|
|
1
|
+
{"version":3,"file":"characteristics_fan.js","sourceRoot":"","sources":["../src/characteristics_fan.ts"],"names":[],"mappings":";;;AACA,iEAAuF;AACvF,uCAA+E;AAC/E,+CAAkE;AAClE,+BAAkG;AAElG;;;;;;;;;;;;;;;GAeG;AAEH,MAAM,SAAU,SAAQ,sDAA+B;IAAvD;;QACE,UAAK,GAAG,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC;QACnC,UAAK,GAAG,IAAA,oBAAa,EAAC;YACpB,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI;YACvB,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,GAAG;YACjD,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,OAAO;YACrD,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,MAAM;SACrD,CAAC,CAAC,IAAI,CACL,IAAA,mBAAY,EAAC,EAAE,CAAC,EAChB,IAAA,UAAG,EACD,CAAC,CAAC,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,QAAQ,CAAC,EAAE,EAAE;YACvC,8EAA8E;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AC,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,uBAAW,CAAC,QAAQ,CAAC,CAAC;aACxD;YAED,oDAAoD;YACpD,MAAM,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,yBAAyB,CAChD,IAAI,CAAC,OAAO,CAAC,IAAI,EACjB,MAAM,IAAA,qBAAc,EAAC,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CACrE,CAAC;YACF,qEAAqE;YACrE,MAAM,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,wBAAwB,CAC/C,IAAI,CAAC,OAAO,CAAC,IAAI,EACjB,KAAK,KAAK,IAAI,CAAC,cAAc,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;gBACjD,oBAAQ,CAAC,GAAG,CAAC,CAAC,CAAE,kBAAkB;gBAClC,oBAAQ,CAAC,GAAG,CACf,CAAC;YACF,8BAA8B;YAC9B,MAAM,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,mBAAmB,CAC1C,IAAI,CAAC,OAAO,CAAC,IAAI,EACjB,oBAAQ,CAAC,MAAM,EACf,MAAM,IAAI,CAAC,WAAW,EAAE,CACzB,CAAC;QACJ,CAAC,CAAC;IACJ,CAAC;CAAA;AAED,MAAa,UAAW,SAAQ,mCAAY;IAA5C;;QACE,aAAQ,GAAG;YACT,SAAS;YACT,QAAQ;YACR,QAAQ;YACR,cAAc;SACf,CAAC;IACJ,CAAC;CAAA;AAPD,gCAOC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CharacteristicWrapper, MultiWrapper } from './characteristics_base';
|
|
2
2
|
declare class FilterLife extends CharacteristicWrapper {
|
|
3
3
|
ctype: typeof import("hap-nodejs/dist/lib/definitions").FilterLifeLevel;
|
|
4
|
-
|
|
4
|
+
value: import("rxjs").Observable<number>;
|
|
5
5
|
}
|
|
6
6
|
export declare class FilterService extends MultiWrapper {
|
|
7
7
|
WRAPPERS: (typeof FilterLife)[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"characteristics_filter.d.ts","sourceRoot":"","sources":["../src/characteristics_filter.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"characteristics_filter.d.ts","sourceRoot":"","sources":["../src/characteristics_filter.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAE7E,cAAM,UAAW,SAAQ,qBAAqB;IAC5C,KAAK,mEAAuC;IAC5C,KAAK,oCAA0D;CAChE;AAWD,qBAAa,aAAc,SAAQ,YAAY;IAC7C,QAAQ,wBAGN;CACH"}
|
|
@@ -1,25 +1,22 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.FilterService = void 0;
|
|
4
|
+
const rxjs_1 = require("rxjs");
|
|
4
5
|
const characteristics_base_1 = require("./characteristics_base");
|
|
5
6
|
class FilterLife extends characteristics_base_1.CharacteristicWrapper {
|
|
6
7
|
constructor() {
|
|
7
8
|
super(...arguments);
|
|
8
9
|
this.ctype = this.Characteristic.FilterLifeLevel;
|
|
9
|
-
this.
|
|
10
|
-
return 100 - (await this.system.status.getFilterUsed());
|
|
11
|
-
};
|
|
10
|
+
this.value = this.system.status.filter_used.pipe((0, rxjs_1.map)(x => 100 - x));
|
|
12
11
|
}
|
|
13
12
|
}
|
|
14
13
|
class FilterChange extends characteristics_base_1.CharacteristicWrapper {
|
|
15
14
|
constructor() {
|
|
16
15
|
super(...arguments);
|
|
17
16
|
this.ctype = this.Characteristic.FilterChangeIndication;
|
|
18
|
-
this.
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
this.Characteristic.FilterChangeIndication.FILTER_OK;
|
|
22
|
-
};
|
|
17
|
+
this.value = this.system.status.filter_used.pipe((0, rxjs_1.map)(x => x > 95 ?
|
|
18
|
+
this.Characteristic.FilterChangeIndication.CHANGE_FILTER :
|
|
19
|
+
this.Characteristic.FilterChangeIndication.FILTER_OK));
|
|
23
20
|
}
|
|
24
21
|
}
|
|
25
22
|
class FilterService extends characteristics_base_1.MultiWrapper {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"characteristics_filter.js","sourceRoot":"","sources":["../src/characteristics_filter.ts"],"names":[],"mappings":";;;AAAA,iEAA6E;AAE7E,MAAM,UAAW,SAAQ,4CAAqB;IAA9C;;QACE,UAAK,GAAG,IAAI,CAAC,cAAc,CAAC,eAAe,CAAC;QAC5C,
|
|
1
|
+
{"version":3,"file":"characteristics_filter.js","sourceRoot":"","sources":["../src/characteristics_filter.ts"],"names":[],"mappings":";;;AAAA,+BAA2B;AAC3B,iEAA6E;AAE7E,MAAM,UAAW,SAAQ,4CAAqB;IAA9C;;QACE,UAAK,GAAG,IAAI,CAAC,cAAc,CAAC,eAAe,CAAC;QAC5C,UAAK,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,IAAA,UAAG,EAAC,CAAC,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC;IACjE,CAAC;CAAA;AAED,MAAM,YAAa,SAAQ,4CAAqB;IAAhD;;QACE,UAAK,GAAG,IAAI,CAAC,cAAc,CAAC,sBAAsB,CAAC;QACnD,UAAK,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,IAAA,UAAG,EAC7C,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC;YACX,IAAI,CAAC,cAAc,CAAC,sBAAsB,CAAC,aAAa,CAAC,CAAC;YAC1D,IAAI,CAAC,cAAc,CAAC,sBAAsB,CAAC,SAAS,CACvD,CAAC,CAAC;IACL,CAAC;CAAA;AAED,MAAa,aAAc,SAAQ,mCAAY;IAA/C;;QACE,aAAQ,GAAG;YACT,UAAU;YACV,YAAY;SACb,CAAC;IACJ,CAAC;CAAA;AALD,sCAKC"}
|
|
@@ -1,16 +1,13 @@
|
|
|
1
1
|
import { CharacteristicWrapper, MultiWrapper } from './characteristics_base';
|
|
2
2
|
declare class CurrentRH extends CharacteristicWrapper {
|
|
3
3
|
ctype: typeof import("hap-nodejs/dist/lib/definitions").CurrentRelativeHumidity;
|
|
4
|
-
|
|
5
|
-
}
|
|
6
|
-
declare class TargetDehumidify extends CharacteristicWrapper {
|
|
7
|
-
ctype: typeof import("hap-nodejs/dist/lib/definitions").RelativeHumidityDehumidifierThreshold;
|
|
4
|
+
value: import("rxjs").Observable<number>;
|
|
8
5
|
}
|
|
9
6
|
export declare class ThermostatRHService extends MultiWrapper {
|
|
10
7
|
WRAPPERS: (typeof CurrentRH)[];
|
|
11
8
|
}
|
|
12
9
|
export declare class HumidifierService extends MultiWrapper {
|
|
13
|
-
WRAPPERS: (typeof
|
|
10
|
+
WRAPPERS: (typeof CurrentRH)[];
|
|
14
11
|
}
|
|
15
12
|
export {};
|
|
16
13
|
//# sourceMappingURL=characteristics_humidity.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"characteristics_humidity.d.ts","sourceRoot":"","sources":["../src/characteristics_humidity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAE7E,cAAM,SAAU,SAAQ,qBAAqB;IAC3C,KAAK,2EAA+C;IACpD,
|
|
1
|
+
{"version":3,"file":"characteristics_humidity.d.ts","sourceRoot":"","sources":["../src/characteristics_humidity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAE7E,cAAM,SAAU,SAAQ,qBAAqB;IAC3C,KAAK,2EAA+C;IACpD,KAAK,oCAA0D;CAChE;AAWD,qBAAa,mBAAoB,SAAQ,YAAY;IACnD,QAAQ,uBAEN;CACH;AAED,qBAAa,iBAAkB,SAAQ,YAAY;IACjD,QAAQ,uBAIN;CACH"}
|
|
@@ -6,23 +6,15 @@ class CurrentRH extends characteristics_base_1.CharacteristicWrapper {
|
|
|
6
6
|
constructor() {
|
|
7
7
|
super(...arguments);
|
|
8
8
|
this.ctype = this.Characteristic.CurrentRelativeHumidity;
|
|
9
|
-
this.
|
|
10
|
-
return await this.system.status.getZoneHumidity(this.context.zone);
|
|
11
|
-
};
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
class TargetDehumidify extends characteristics_base_1.CharacteristicWrapper {
|
|
15
|
-
constructor() {
|
|
16
|
-
super(...arguments);
|
|
17
|
-
this.ctype = this.Characteristic.RelativeHumidityDehumidifierThreshold;
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
class TargetHumidify extends characteristics_base_1.CharacteristicWrapper {
|
|
21
|
-
constructor() {
|
|
22
|
-
super(...arguments);
|
|
23
|
-
this.ctype = this.Characteristic.RelativeHumidityHumidifierThreshold;
|
|
9
|
+
this.value = this.system.status.getZone(this.context.zone).humidity;
|
|
24
10
|
}
|
|
25
11
|
}
|
|
12
|
+
// class TargetDehumidify extends CharacteristicWrapper {
|
|
13
|
+
// ctype = this.Characteristic.RelativeHumidityDehumidifierThreshold;
|
|
14
|
+
// }
|
|
15
|
+
// class TargetHumidify extends CharacteristicWrapper {
|
|
16
|
+
// ctype = this.Characteristic.RelativeHumidityHumidifierThreshold;
|
|
17
|
+
// }
|
|
26
18
|
class ThermostatRHService extends characteristics_base_1.MultiWrapper {
|
|
27
19
|
constructor() {
|
|
28
20
|
super(...arguments);
|
|
@@ -37,8 +29,8 @@ class HumidifierService extends characteristics_base_1.MultiWrapper {
|
|
|
37
29
|
super(...arguments);
|
|
38
30
|
this.WRAPPERS = [
|
|
39
31
|
CurrentRH,
|
|
40
|
-
TargetDehumidify,
|
|
41
|
-
TargetHumidify,
|
|
32
|
+
// TargetDehumidify,
|
|
33
|
+
// TargetHumidify,
|
|
42
34
|
];
|
|
43
35
|
}
|
|
44
36
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"characteristics_humidity.js","sourceRoot":"","sources":["../src/characteristics_humidity.ts"],"names":[],"mappings":";;;AAAA,iEAA6E;AAE7E,MAAM,SAAU,SAAQ,4CAAqB;IAA7C;;QACE,UAAK,GAAG,IAAI,CAAC,cAAc,CAAC,uBAAuB,CAAC;QACpD,
|
|
1
|
+
{"version":3,"file":"characteristics_humidity.js","sourceRoot":"","sources":["../src/characteristics_humidity.ts"],"names":[],"mappings":";;;AAAA,iEAA6E;AAE7E,MAAM,SAAU,SAAQ,4CAAqB;IAA7C;;QACE,UAAK,GAAG,IAAI,CAAC,cAAc,CAAC,uBAAuB,CAAC;QACpD,UAAK,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC;IACjE,CAAC;CAAA;AAED,yDAAyD;AACzD,uEAAuE;AACvE,IAAI;AAEJ,uDAAuD;AACvD,qEAAqE;AACrE,IAAI;AAGJ,MAAa,mBAAoB,SAAQ,mCAAY;IAArD;;QACE,aAAQ,GAAG;YACT,SAAS;SACV,CAAC;IACJ,CAAC;CAAA;AAJD,kDAIC;AAED,MAAa,iBAAkB,SAAQ,mCAAY;IAAnD;;QACE,aAAQ,GAAG;YACT,SAAS;YACT,oBAAoB;YACpB,kBAAkB;SACnB,CAAC;IACJ,CAAC;CAAA;AAND,8CAMC"}
|
package/dist/platform.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"platform.d.ts","sourceRoot":"","sources":["../src/platform.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,qBAAqB,EAAE,MAAM,EAAE,iBAAiB,EAAE,cAAc,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAK5H,OAAO,EAEL,WAAW,EACZ,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"platform.d.ts","sourceRoot":"","sources":["../src/platform.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,qBAAqB,EAAE,MAAM,EAAE,iBAAiB,EAAE,cAAc,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAK5H,OAAO,EAEL,WAAW,EACZ,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAGvD,qBAAa,iCAAkC,YAAW,qBAAqB;aAc3D,GAAG,EAAE,MAAM;aACX,MAAM,EAAE,cAAc;aACtB,GAAG,EAAE,GAAG;IAf1B,SAAgB,OAAO,EAAE,OAAO,OAAO,CAAwB;IAC/D,SAAgB,cAAc,EAAE,OAAO,cAAc,CAA+B;IAGpF,SAAgB,oBAAoB,EAAE,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAM;IAE7E,SAAgB,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAM;IAGzD,eAAe,EAAE,kBAAkB,CAAC;IACpC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAAM;gBAG/B,GAAG,EAAE,MAAM,EACX,MAAM,EAAE,cAAc,EACtB,GAAG,EAAE,GAAG;IA2B1B,kBAAkB,CAAC,SAAS,EAAE,iBAAiB,GAAG,IAAI;IAIhD,eAAe,IAAI,OAAO,CAAC,IAAI,CAAC;CAyEvC"}
|
package/dist/platform.js
CHANGED
|
@@ -8,6 +8,7 @@ const models_1 = require("./api/models");
|
|
|
8
8
|
const accessory_envsensor_1 = require("./accessory_envsensor");
|
|
9
9
|
const accessory_comfort_activity_1 = require("./accessory_comfort_activity");
|
|
10
10
|
const rest_client_1 = require("./api/rest_client");
|
|
11
|
+
const rxjs_1 = require("rxjs");
|
|
11
12
|
class CarrierInfinityHomebridgePlatform {
|
|
12
13
|
constructor(log, config, api) {
|
|
13
14
|
this.log = log;
|
|
@@ -30,6 +31,7 @@ class CarrierInfinityHomebridgePlatform {
|
|
|
30
31
|
this.api.on('didFinishLaunching', () => {
|
|
31
32
|
this.discoverSystems().then().catch(error => {
|
|
32
33
|
this.log.error('Could not discover devices: ' + error.message);
|
|
34
|
+
this.log.debug(error);
|
|
33
35
|
});
|
|
34
36
|
});
|
|
35
37
|
// Periodically ping the carrier api to keep it in sync with the thermostat.
|
|
@@ -44,10 +46,12 @@ class CarrierInfinityHomebridgePlatform {
|
|
|
44
46
|
this.restored_accessories[accessory.UUID] = accessory;
|
|
45
47
|
}
|
|
46
48
|
async discoverSystems() {
|
|
47
|
-
const
|
|
49
|
+
const locations = await new models_1.LocationsModel(this.infinity_client);
|
|
50
|
+
const systems = await (0, rxjs_1.firstValueFrom)(locations.system_serials);
|
|
48
51
|
for (const serialNumber of systems) {
|
|
49
52
|
// Create system api object, and save for later reference
|
|
50
|
-
const system = new models_1.SystemModel(this.infinity_client, serialNumber);
|
|
53
|
+
const system = await new models_1.SystemModel(this.infinity_client, serialNumber);
|
|
54
|
+
// TODO make sure we can fetch all api calls, and timeout if not.
|
|
51
55
|
this.systems[serialNumber] = system;
|
|
52
56
|
// Add system based accessories
|
|
53
57
|
const context_system = { serialNumber: system.serialNumber };
|
|
@@ -57,14 +61,16 @@ class CarrierInfinityHomebridgePlatform {
|
|
|
57
61
|
new accessory_oat_1.OutdoorTemperatureAccessory(this, { ...context_system, name: 'Outdoor Temperature' });
|
|
58
62
|
}
|
|
59
63
|
// Add system+zone based accessories
|
|
60
|
-
const zones = await system.profile.
|
|
64
|
+
const zones = await (0, rxjs_1.firstValueFrom)(system.profile.zone_ids);
|
|
61
65
|
for (const zone of zones) { // 'of' makes sure we go through zone ids, not index
|
|
66
|
+
const zone_name = await (0, rxjs_1.firstValueFrom)(system.config.getZone(zone).name);
|
|
62
67
|
const context_zone = { ...context_system, zone: zone };
|
|
63
68
|
system.log.debug(`Discovered zone ${context_zone.zone}`);
|
|
64
69
|
// -> Zone Accessory: Thermostat
|
|
65
70
|
new accessory_thermostat_1.ThermostatAccessory(this, {
|
|
66
71
|
...context_zone,
|
|
67
|
-
name: `${
|
|
72
|
+
name: `${zone_name} Thermostat`,
|
|
73
|
+
zone_name: zone_name,
|
|
68
74
|
holdBehavior: this.config['holdBehavior'],
|
|
69
75
|
holdArgument: this.config['holdArgument'],
|
|
70
76
|
});
|
|
@@ -72,14 +78,14 @@ class CarrierInfinityHomebridgePlatform {
|
|
|
72
78
|
if (this.config['showIndoorHumiditySensors']) {
|
|
73
79
|
new accessory_envsensor_1.EnvSensorAccessory(this, {
|
|
74
80
|
...context_zone,
|
|
75
|
-
name: `${
|
|
81
|
+
name: `${zone_name} Environmental Sensor`,
|
|
76
82
|
});
|
|
77
83
|
}
|
|
78
84
|
// -> Zone Accessory: Activity Select Switches
|
|
79
85
|
if (this.config['showZoneComfortActivityControls']) {
|
|
80
86
|
new accessory_comfort_activity_1.ComfortActivityAccessory(this, {
|
|
81
87
|
...context_zone,
|
|
82
|
-
name: `${
|
|
88
|
+
name: `${zone_name} Comfort Activity`,
|
|
83
89
|
holdBehavior: this.config['holdBehavior'],
|
|
84
90
|
holdArgument: this.config['holdArgument'],
|
|
85
91
|
});
|
package/dist/platform.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"platform.js","sourceRoot":"","sources":["../src/platform.ts"],"names":[],"mappings":";;;AAEA,yCAAwD;AACxD,iEAA6D;AAC7D,mDAA8D;AAC9D,yCAGsB;AACtB,+DAA2D;AAE3D,6EAAwE;AACxE,mDAAuD;
|
|
1
|
+
{"version":3,"file":"platform.js","sourceRoot":"","sources":["../src/platform.ts"],"names":[],"mappings":";;;AAEA,yCAAwD;AACxD,iEAA6D;AAC7D,mDAA8D;AAC9D,yCAGsB;AACtB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EAAE;YAC1C,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,CAAC,EAAE;gBACzB,MAAM,SAAS,GAAG,IAAI,CAAC,oBAAoB,CAAC,EAAE,CAAC,CAAC;gBAChD,4BAA4B;gBAC5B,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,SAAS,CAAC,OAAO,CAAC,YAAY,MAAM,SAAS,CAAC,OAAO,CAAC,IAAI,mBAAmB,CAAC,CAAC;gBACjG,IAAI,CAAC,GAAG,CAAC,6BAA6B,CAAC,sBAAW,EAAE,wBAAa,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC;gBAChF,OAAO,IAAI,CAAC,oBAAoB,CAAC,EAAE,CAAC,CAAC;aACtC;SACF;IACH,CAAC;CACF;AAxHD,8EAwHC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"displayName": "Homebridge Carrier Infinity",
|
|
3
3
|
"name": "homebridge-carrier-infinity",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.7.0-beta.1",
|
|
5
5
|
"description": "Standalone homebridge plugin for Carrier Infinity / Bryant Evolution / ICP Brands Ion thermostats.",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": {
|
|
@@ -48,36 +48,37 @@
|
|
|
48
48
|
"infinitive"
|
|
49
49
|
],
|
|
50
50
|
"dependencies": {
|
|
51
|
-
"async-mutex": "^0.3.
|
|
51
|
+
"async-mutex": "^0.3.2",
|
|
52
52
|
"axios": "^0.27.2",
|
|
53
53
|
"oauth-signature": "^1.5.0",
|
|
54
54
|
"object-hash": "^3.0.0",
|
|
55
|
-
"
|
|
55
|
+
"rxjs": "^7.8.0",
|
|
56
|
+
"typescript-memoize": "^1.1.1",
|
|
56
57
|
"xml2js": "^0.4.23"
|
|
57
58
|
},
|
|
58
59
|
"devDependencies": {
|
|
59
|
-
"@commitlint/cli": "^17.
|
|
60
|
-
"@commitlint/config-conventional": "^17.
|
|
61
|
-
"@commitlint/cz-commitlint": "^17.
|
|
60
|
+
"@commitlint/cli": "^17.4.4",
|
|
61
|
+
"@commitlint/config-conventional": "^17.4.4",
|
|
62
|
+
"@commitlint/cz-commitlint": "^17.4.4",
|
|
62
63
|
"@semantic-release/git": "^10.0.1",
|
|
63
|
-
"@types/jest": "^
|
|
64
|
-
"@types/node": "^18.
|
|
65
|
-
"@types/object-hash": "^
|
|
66
|
-
"@types/xml2js": "^0.4.
|
|
67
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
|
68
|
-
"@typescript-eslint/parser": "^5.
|
|
69
|
-
"commitizen": "^4.
|
|
70
|
-
"eslint": "^8.
|
|
71
|
-
"eslint-plugin-spellcheck": "^0.0.
|
|
72
|
-
"homebridge": "^1.
|
|
73
|
-
"jest": "^
|
|
64
|
+
"@types/jest": "^29.4.0",
|
|
65
|
+
"@types/node": "^18.14.6",
|
|
66
|
+
"@types/object-hash": "^3.0.0",
|
|
67
|
+
"@types/xml2js": "^0.4.11",
|
|
68
|
+
"@typescript-eslint/eslint-plugin": "^5.54.0",
|
|
69
|
+
"@typescript-eslint/parser": "^5.54.0",
|
|
70
|
+
"commitizen": "^4.3.0",
|
|
71
|
+
"eslint": "^8.35.0",
|
|
72
|
+
"eslint-plugin-spellcheck": "^0.0.20",
|
|
73
|
+
"homebridge": "^1.6.0",
|
|
74
|
+
"jest": "^29.4.0",
|
|
74
75
|
"json-to-ts": "^1.7.0",
|
|
75
|
-
"nodemon": "^2.0.
|
|
76
|
-
"rimraf": "^3.0
|
|
77
|
-
"semantic-release": "^
|
|
78
|
-
"ts-jest": "^
|
|
79
|
-
"ts-node": "^10.
|
|
80
|
-
"typescript": "^4.
|
|
76
|
+
"nodemon": "^2.0.21",
|
|
77
|
+
"rimraf": "^4.3.0",
|
|
78
|
+
"semantic-release": "^20.1.1",
|
|
79
|
+
"ts-jest": "^29.0.5",
|
|
80
|
+
"ts-node": "^10.9.1",
|
|
81
|
+
"typescript": "^4.9.5"
|
|
81
82
|
},
|
|
82
83
|
"config": {
|
|
83
84
|
"commitizen": {
|
|
@@ -89,6 +90,10 @@
|
|
|
89
90
|
{
|
|
90
91
|
"name": "master",
|
|
91
92
|
"channel": "next"
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"name": "beta",
|
|
96
|
+
"prerelease": true
|
|
92
97
|
}
|
|
93
98
|
],
|
|
94
99
|
"plugins": [
|