homebridge-dummy 1.3.2 → 1.4.0-alpha.0
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/CHANGELOG.md +12 -3
- package/README.md +74 -24
- package/config.schema.json +258 -44
- package/dist/accessory/base.d.ts +28 -8
- package/dist/accessory/base.js +53 -37
- package/dist/accessory/base.js.map +1 -1
- package/dist/accessory/group.d.ts +9 -1
- package/dist/accessory/group.js +14 -9
- package/dist/accessory/group.js.map +1 -1
- package/dist/accessory/helpers.d.ts +3 -5
- package/dist/accessory/helpers.js +12 -12
- package/dist/accessory/helpers.js.map +1 -1
- package/dist/accessory/lock.d.ts +6 -6
- package/dist/accessory/lock.js +14 -8
- package/dist/accessory/lock.js.map +1 -1
- package/dist/accessory/onoff/lightbulb.d.ts +9 -4
- package/dist/accessory/onoff/lightbulb.js +31 -4
- package/dist/accessory/onoff/lightbulb.js.map +1 -1
- package/dist/accessory/onoff/onoff.d.ts +8 -8
- package/dist/accessory/onoff/onoff.js +25 -13
- package/dist/accessory/onoff/onoff.js.map +1 -1
- package/dist/accessory/position/garage.d.ts +3 -4
- package/dist/accessory/position/garage.js +3 -3
- package/dist/accessory/position/garage.js.map +1 -1
- package/dist/accessory/position/position.d.ts +6 -6
- package/dist/accessory/position/position.js +14 -8
- package/dist/accessory/position/position.js.map +1 -1
- package/dist/accessory/sensor.d.ts +4 -5
- package/dist/accessory/sensor.js +14 -15
- package/dist/accessory/sensor.js.map +1 -1
- package/dist/accessory/thermostat.d.ts +5 -6
- package/dist/accessory/thermostat.js +25 -19
- package/dist/accessory/thermostat.js.map +1 -1
- package/dist/homebridge/platform.d.ts +3 -2
- package/dist/homebridge/platform.js +31 -12
- package/dist/homebridge/platform.js.map +1 -1
- package/dist/homebridge-ui/public/index.html +1 -1
- package/dist/homebridge-ui/public/ui.js +1 -1
- package/dist/i18n/de.d.ts +35 -0
- package/dist/i18n/en.d.ts +35 -0
- package/dist/i18n/en.js +43 -8
- package/dist/i18n/en.js.map +1 -1
- package/dist/i18n/es.d.ts +35 -0
- package/dist/i18n/i18n.d.ts +35 -0
- package/dist/i18n/ru.d.ts +35 -0
- package/dist/i18n/template.d.ts +35 -0
- package/dist/model/conditions.d.ts +17 -0
- package/dist/model/conditions.js +150 -0
- package/dist/model/conditions.js.map +1 -0
- package/dist/model/enums.d.ts +19 -4
- package/dist/model/enums.js +41 -12
- package/dist/model/enums.js.map +1 -1
- package/dist/model/types.d.ts +18 -3
- package/dist/model/webhook.js +23 -19
- package/dist/model/webhook.js.map +1 -1
- package/dist/timeout/fader.d.ts +9 -0
- package/dist/timeout/fader.js +33 -0
- package/dist/timeout/fader.js.map +1 -0
- package/dist/timeout/limiter.d.ts +2 -2
- package/dist/timeout/limiter.js +8 -8
- package/dist/timeout/limiter.js.map +1 -1
- package/dist/timeout/schedule.d.ts +3 -3
- package/dist/timeout/schedule.js +18 -18
- package/dist/timeout/schedule.js.map +1 -1
- package/dist/timeout/timeout.d.ts +6 -4
- package/dist/timeout/timeout.js +12 -7
- package/dist/timeout/timeout.js.map +1 -1
- package/dist/timeout/timer.d.ts +3 -4
- package/dist/timeout/timer.js +8 -9
- package/dist/timeout/timer.js.map +1 -1
- package/dist/tools/configMigration.js +2 -2
- package/dist/tools/configMigration.js.map +1 -1
- package/dist/tools/logWatcher.d.ts +13 -0
- package/dist/tools/logWatcher.js +52 -0
- package/dist/tools/logWatcher.js.map +1 -0
- package/dist/tools/primitive.d.ts +3 -0
- package/dist/tools/primitive.js +24 -0
- package/dist/tools/primitive.js.map +1 -0
- package/package.json +13 -3
package/dist/i18n/i18n.d.ts
CHANGED
|
@@ -19,6 +19,20 @@ declare const translations: {
|
|
|
19
19
|
error: string;
|
|
20
20
|
executed: string;
|
|
21
21
|
};
|
|
22
|
+
conditions: {
|
|
23
|
+
andMultipleLogs: string;
|
|
24
|
+
currentResult: string;
|
|
25
|
+
evaluatingConditions: string;
|
|
26
|
+
satisfied: string;
|
|
27
|
+
notSatisfied: string;
|
|
28
|
+
patternAndConditions: string;
|
|
29
|
+
patternMatch: string;
|
|
30
|
+
selfReference: string;
|
|
31
|
+
statesEqual: string;
|
|
32
|
+
statesNotEqual: string;
|
|
33
|
+
stateUnknown: string;
|
|
34
|
+
statesUnrelated: string;
|
|
35
|
+
};
|
|
22
36
|
lightbulb: {
|
|
23
37
|
brightness: string;
|
|
24
38
|
stateOn: string;
|
|
@@ -38,7 +52,12 @@ declare const translations: {
|
|
|
38
52
|
secured: string;
|
|
39
53
|
unsecured: string;
|
|
40
54
|
};
|
|
55
|
+
logWatcher: {
|
|
56
|
+
error: string;
|
|
57
|
+
missingFile: string;
|
|
58
|
+
};
|
|
41
59
|
onOff: {
|
|
60
|
+
badDefault: string;
|
|
42
61
|
stateOff: string;
|
|
43
62
|
stateOn: string;
|
|
44
63
|
};
|
|
@@ -81,6 +100,8 @@ declare const translations: {
|
|
|
81
100
|
description: {
|
|
82
101
|
commands: string;
|
|
83
102
|
cron: string;
|
|
103
|
+
conditions: string;
|
|
104
|
+
fadeOut: string;
|
|
84
105
|
limiter: string;
|
|
85
106
|
random: string;
|
|
86
107
|
schedule: string;
|
|
@@ -88,6 +109,7 @@ declare const translations: {
|
|
|
88
109
|
timerControlled: string;
|
|
89
110
|
};
|
|
90
111
|
enumNames: {
|
|
112
|
+
accessory: string;
|
|
91
113
|
auto: string;
|
|
92
114
|
carbonDioxideSensor: string;
|
|
93
115
|
carbonMonoxideSensor: string;
|
|
@@ -110,13 +132,17 @@ declare const translations: {
|
|
|
110
132
|
leakSensor: string;
|
|
111
133
|
lightbulb: string;
|
|
112
134
|
lockMechanism: string;
|
|
135
|
+
log: string;
|
|
113
136
|
minutely: string;
|
|
114
137
|
month: string;
|
|
115
138
|
monthly: string;
|
|
139
|
+
none: string;
|
|
116
140
|
occupancySensor: string;
|
|
117
141
|
off: string;
|
|
118
142
|
on: string;
|
|
119
143
|
open: string;
|
|
144
|
+
operatorAnd: string;
|
|
145
|
+
operatorOr: string;
|
|
120
146
|
outlet: string;
|
|
121
147
|
milliseconds: string;
|
|
122
148
|
minutes: string;
|
|
@@ -150,6 +176,7 @@ declare const translations: {
|
|
|
150
176
|
yes: string;
|
|
151
177
|
title: {
|
|
152
178
|
accessory: string;
|
|
179
|
+
accessoryState: string;
|
|
153
180
|
commandClose: string;
|
|
154
181
|
commandOff: string;
|
|
155
182
|
commandOn: string;
|
|
@@ -158,6 +185,8 @@ declare const translations: {
|
|
|
158
185
|
commands: string;
|
|
159
186
|
commandTemperature: string;
|
|
160
187
|
commandUnlock: string;
|
|
188
|
+
condition: string;
|
|
189
|
+
conditions: string;
|
|
161
190
|
cron: string;
|
|
162
191
|
cronCustom: string;
|
|
163
192
|
defaultBrightness: string;
|
|
@@ -167,17 +196,23 @@ declare const translations: {
|
|
|
167
196
|
delay: string;
|
|
168
197
|
disableLogging: string;
|
|
169
198
|
enableWebook: string;
|
|
199
|
+
fadeOut: string;
|
|
170
200
|
groupName: string;
|
|
171
201
|
interval: string;
|
|
172
202
|
limit: string;
|
|
173
203
|
limiter: string;
|
|
204
|
+
minimumTemperature: string;
|
|
205
|
+
maximumTemperature: string;
|
|
174
206
|
name: string;
|
|
207
|
+
operator: string;
|
|
208
|
+
pattern: string;
|
|
175
209
|
period: string;
|
|
176
210
|
preset: string;
|
|
177
211
|
random: string;
|
|
178
212
|
resetOnRestart: string;
|
|
179
213
|
schedule: string;
|
|
180
214
|
sensor: string;
|
|
215
|
+
temperatureUnits: string;
|
|
181
216
|
timer: string;
|
|
182
217
|
timerControlled: string;
|
|
183
218
|
type: string;
|
package/dist/i18n/ru.d.ts
CHANGED
|
@@ -8,6 +8,20 @@ declare const ru: {
|
|
|
8
8
|
error: string;
|
|
9
9
|
executed: string;
|
|
10
10
|
};
|
|
11
|
+
conditions: {
|
|
12
|
+
andMultipleLogs: string;
|
|
13
|
+
currentResult: string;
|
|
14
|
+
evaluatingConditions: string;
|
|
15
|
+
satisfied: string;
|
|
16
|
+
notSatisfied: string;
|
|
17
|
+
patternAndConditions: string;
|
|
18
|
+
patternMatch: string;
|
|
19
|
+
selfReference: string;
|
|
20
|
+
statesEqual: string;
|
|
21
|
+
statesNotEqual: string;
|
|
22
|
+
stateUnknown: string;
|
|
23
|
+
statesUnrelated: string;
|
|
24
|
+
};
|
|
11
25
|
lightbulb: {
|
|
12
26
|
brightness: string;
|
|
13
27
|
stateOn: string;
|
|
@@ -27,7 +41,12 @@ declare const ru: {
|
|
|
27
41
|
secured: string;
|
|
28
42
|
unsecured: string;
|
|
29
43
|
};
|
|
44
|
+
logWatcher: {
|
|
45
|
+
error: string;
|
|
46
|
+
missingFile: string;
|
|
47
|
+
};
|
|
30
48
|
onOff: {
|
|
49
|
+
badDefault: string;
|
|
31
50
|
stateOff: string;
|
|
32
51
|
stateOn: string;
|
|
33
52
|
};
|
|
@@ -70,6 +89,8 @@ declare const ru: {
|
|
|
70
89
|
description: {
|
|
71
90
|
commands: string;
|
|
72
91
|
cron: string;
|
|
92
|
+
conditions: string;
|
|
93
|
+
fadeOut: string;
|
|
73
94
|
limiter: string;
|
|
74
95
|
random: string;
|
|
75
96
|
schedule: string;
|
|
@@ -77,6 +98,7 @@ declare const ru: {
|
|
|
77
98
|
timerControlled: string;
|
|
78
99
|
};
|
|
79
100
|
enumNames: {
|
|
101
|
+
accessory: string;
|
|
80
102
|
auto: string;
|
|
81
103
|
carbonDioxideSensor: string;
|
|
82
104
|
carbonMonoxideSensor: string;
|
|
@@ -99,13 +121,17 @@ declare const ru: {
|
|
|
99
121
|
leakSensor: string;
|
|
100
122
|
lightbulb: string;
|
|
101
123
|
lockMechanism: string;
|
|
124
|
+
log: string;
|
|
102
125
|
minutely: string;
|
|
103
126
|
month: string;
|
|
104
127
|
monthly: string;
|
|
128
|
+
none: string;
|
|
105
129
|
occupancySensor: string;
|
|
106
130
|
off: string;
|
|
107
131
|
on: string;
|
|
108
132
|
open: string;
|
|
133
|
+
operatorAnd: string;
|
|
134
|
+
operatorOr: string;
|
|
109
135
|
outlet: string;
|
|
110
136
|
milliseconds: string;
|
|
111
137
|
minutes: string;
|
|
@@ -139,6 +165,7 @@ declare const ru: {
|
|
|
139
165
|
yes: string;
|
|
140
166
|
title: {
|
|
141
167
|
accessory: string;
|
|
168
|
+
accessoryState: string;
|
|
142
169
|
commandClose: string;
|
|
143
170
|
commandOff: string;
|
|
144
171
|
commandOn: string;
|
|
@@ -147,6 +174,8 @@ declare const ru: {
|
|
|
147
174
|
commands: string;
|
|
148
175
|
commandTemperature: string;
|
|
149
176
|
commandUnlock: string;
|
|
177
|
+
condition: string;
|
|
178
|
+
conditions: string;
|
|
150
179
|
cron: string;
|
|
151
180
|
cronCustom: string;
|
|
152
181
|
defaultBrightness: string;
|
|
@@ -156,17 +185,23 @@ declare const ru: {
|
|
|
156
185
|
delay: string;
|
|
157
186
|
disableLogging: string;
|
|
158
187
|
enableWebook: string;
|
|
188
|
+
fadeOut: string;
|
|
159
189
|
groupName: string;
|
|
160
190
|
interval: string;
|
|
161
191
|
limit: string;
|
|
162
192
|
limiter: string;
|
|
193
|
+
minimumTemperature: string;
|
|
194
|
+
maximumTemperature: string;
|
|
163
195
|
name: string;
|
|
196
|
+
operator: string;
|
|
197
|
+
pattern: string;
|
|
164
198
|
period: string;
|
|
165
199
|
preset: string;
|
|
166
200
|
random: string;
|
|
167
201
|
resetOnRestart: string;
|
|
168
202
|
schedule: string;
|
|
169
203
|
sensor: string;
|
|
204
|
+
temperatureUnits: string;
|
|
170
205
|
timer: string;
|
|
171
206
|
timerControlled: string;
|
|
172
207
|
type: string;
|
package/dist/i18n/template.d.ts
CHANGED
|
@@ -8,6 +8,20 @@ declare const REPLACE_THIS_WITH_ISO_CODE: {
|
|
|
8
8
|
error: string;
|
|
9
9
|
executed: string;
|
|
10
10
|
};
|
|
11
|
+
conditions: {
|
|
12
|
+
andMultipleLogs: string;
|
|
13
|
+
currentResult: string;
|
|
14
|
+
evaluatingConditions: string;
|
|
15
|
+
satisfied: string;
|
|
16
|
+
notSatisfied: string;
|
|
17
|
+
patternAndConditions: string;
|
|
18
|
+
patternMatch: string;
|
|
19
|
+
selfReference: string;
|
|
20
|
+
statesEqual: string;
|
|
21
|
+
statesNotEqual: string;
|
|
22
|
+
stateUnknown: string;
|
|
23
|
+
statesUnrelated: string;
|
|
24
|
+
};
|
|
11
25
|
lightbulb: {
|
|
12
26
|
brightness: string;
|
|
13
27
|
stateOn: string;
|
|
@@ -27,7 +41,12 @@ declare const REPLACE_THIS_WITH_ISO_CODE: {
|
|
|
27
41
|
secured: string;
|
|
28
42
|
unsecured: string;
|
|
29
43
|
};
|
|
44
|
+
logWatcher: {
|
|
45
|
+
error: string;
|
|
46
|
+
missingFile: string;
|
|
47
|
+
};
|
|
30
48
|
onOff: {
|
|
49
|
+
badDefault: string;
|
|
31
50
|
stateOff: string;
|
|
32
51
|
stateOn: string;
|
|
33
52
|
};
|
|
@@ -70,6 +89,8 @@ declare const REPLACE_THIS_WITH_ISO_CODE: {
|
|
|
70
89
|
description: {
|
|
71
90
|
commands: string;
|
|
72
91
|
cron: string;
|
|
92
|
+
conditions: string;
|
|
93
|
+
fadeOut: string;
|
|
73
94
|
limiter: string;
|
|
74
95
|
random: string;
|
|
75
96
|
schedule: string;
|
|
@@ -77,6 +98,7 @@ declare const REPLACE_THIS_WITH_ISO_CODE: {
|
|
|
77
98
|
timerControlled: string;
|
|
78
99
|
};
|
|
79
100
|
enumNames: {
|
|
101
|
+
accessory: string;
|
|
80
102
|
auto: string;
|
|
81
103
|
carbonDioxideSensor: string;
|
|
82
104
|
carbonMonoxideSensor: string;
|
|
@@ -99,13 +121,17 @@ declare const REPLACE_THIS_WITH_ISO_CODE: {
|
|
|
99
121
|
leakSensor: string;
|
|
100
122
|
lightbulb: string;
|
|
101
123
|
lockMechanism: string;
|
|
124
|
+
log: string;
|
|
102
125
|
minutely: string;
|
|
103
126
|
month: string;
|
|
104
127
|
monthly: string;
|
|
128
|
+
none: string;
|
|
105
129
|
occupancySensor: string;
|
|
106
130
|
off: string;
|
|
107
131
|
on: string;
|
|
108
132
|
open: string;
|
|
133
|
+
operatorAnd: string;
|
|
134
|
+
operatorOr: string;
|
|
109
135
|
outlet: string;
|
|
110
136
|
milliseconds: string;
|
|
111
137
|
minutes: string;
|
|
@@ -139,6 +165,7 @@ declare const REPLACE_THIS_WITH_ISO_CODE: {
|
|
|
139
165
|
yes: string;
|
|
140
166
|
title: {
|
|
141
167
|
accessory: string;
|
|
168
|
+
accessoryState: string;
|
|
142
169
|
commandClose: string;
|
|
143
170
|
commandOff: string;
|
|
144
171
|
commandOn: string;
|
|
@@ -147,6 +174,8 @@ declare const REPLACE_THIS_WITH_ISO_CODE: {
|
|
|
147
174
|
commands: string;
|
|
148
175
|
commandTemperature: string;
|
|
149
176
|
commandUnlock: string;
|
|
177
|
+
condition: string;
|
|
178
|
+
conditions: string;
|
|
150
179
|
cron: string;
|
|
151
180
|
cronCustom: string;
|
|
152
181
|
defaultBrightness: string;
|
|
@@ -156,17 +185,23 @@ declare const REPLACE_THIS_WITH_ISO_CODE: {
|
|
|
156
185
|
delay: string;
|
|
157
186
|
disableLogging: string;
|
|
158
187
|
enableWebook: string;
|
|
188
|
+
fadeOut: string;
|
|
159
189
|
groupName: string;
|
|
160
190
|
interval: string;
|
|
161
191
|
limit: string;
|
|
162
192
|
limiter: string;
|
|
193
|
+
minimumTemperature: string;
|
|
194
|
+
maximumTemperature: string;
|
|
163
195
|
name: string;
|
|
196
|
+
operator: string;
|
|
197
|
+
pattern: string;
|
|
164
198
|
period: string;
|
|
165
199
|
preset: string;
|
|
166
200
|
random: string;
|
|
167
201
|
resetOnRestart: string;
|
|
168
202
|
schedule: string;
|
|
169
203
|
sensor: string;
|
|
204
|
+
temperatureUnits: string;
|
|
170
205
|
timer: string;
|
|
171
206
|
timerControlled: string;
|
|
172
207
|
type: string;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { AccessoryState } from './enums.js';
|
|
2
|
+
import { ConditionsConfig } from './types.js';
|
|
3
|
+
import { Log } from '../tools/log.js';
|
|
4
|
+
export declare class ConditionManager {
|
|
5
|
+
private readonly log;
|
|
6
|
+
private readonly targets;
|
|
7
|
+
private readonly triggersToTargets;
|
|
8
|
+
private readonly triggerStates;
|
|
9
|
+
private readonly logWatcher;
|
|
10
|
+
constructor(log: Log, storagePath: string);
|
|
11
|
+
teardown(): void;
|
|
12
|
+
register(name: string, identifier: string, conditions: ConditionsConfig | undefined, trigger: () => Promise<void>, reset: (() => Promise<void>) | undefined, disableLogging: boolean): void;
|
|
13
|
+
onStateChange(triggerId: string, state: AccessoryState): Promise<void>;
|
|
14
|
+
private onPatternMatch;
|
|
15
|
+
private evaluateConditions;
|
|
16
|
+
private compareStates;
|
|
17
|
+
}
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
import { ConditionOperator, getStateType, OperandType } from './enums.js';
|
|
2
|
+
import { strings } from '../i18n/i18n.js';
|
|
3
|
+
import { LogWatcher } from '../tools/logWatcher.js';
|
|
4
|
+
import { assert } from '../tools/validation.js';
|
|
5
|
+
export class ConditionManager {
|
|
6
|
+
log;
|
|
7
|
+
targets = new Map();
|
|
8
|
+
triggersToTargets = new Map();
|
|
9
|
+
triggerStates = new Map();
|
|
10
|
+
logWatcher;
|
|
11
|
+
constructor(log, storagePath) {
|
|
12
|
+
this.log = log;
|
|
13
|
+
this.logWatcher = new LogWatcher(log, storagePath);
|
|
14
|
+
}
|
|
15
|
+
teardown() {
|
|
16
|
+
this.logWatcher.teardown();
|
|
17
|
+
}
|
|
18
|
+
register(name, identifier, conditions, trigger, reset, disableLogging) {
|
|
19
|
+
if (conditions === undefined) {
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
if (!assert(this.log, name, conditions, 'operator', 'operands')) {
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
let logTypeCount = 0;
|
|
26
|
+
let valid = true;
|
|
27
|
+
for (const operand of conditions.operands) {
|
|
28
|
+
valid = valid && assert(this.log, name, operand, 'type');
|
|
29
|
+
switch (operand.type) {
|
|
30
|
+
case OperandType.ACCESSORY:
|
|
31
|
+
valid = valid && assert(this.log, name, operand, 'accessoryId', 'accessoryState');
|
|
32
|
+
break;
|
|
33
|
+
case OperandType.LOG:
|
|
34
|
+
logTypeCount++;
|
|
35
|
+
valid = valid && assert(this.log, name, operand, 'pattern');
|
|
36
|
+
break;
|
|
37
|
+
}
|
|
38
|
+
if (operand.accessoryId === identifier) {
|
|
39
|
+
this.log.error(strings.conditions.selfReference, name);
|
|
40
|
+
valid = false;
|
|
41
|
+
break;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
if (logTypeCount > 1 && conditions.operator === ConditionOperator.AND) {
|
|
45
|
+
this.log.error(strings.conditions.andMultipleLogs, name);
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
if (!valid) {
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
const target = { name, identifier, conditions, trigger, reset, disableLogging };
|
|
52
|
+
this.targets.set(identifier, target);
|
|
53
|
+
for (const operand of conditions.operands) {
|
|
54
|
+
switch (operand.type) {
|
|
55
|
+
case OperandType.ACCESSORY: {
|
|
56
|
+
const targetList = this.triggersToTargets.get(operand.accessoryId) ?? [];
|
|
57
|
+
targetList.push(identifier);
|
|
58
|
+
this.triggersToTargets.set(operand.accessoryId, targetList);
|
|
59
|
+
break;
|
|
60
|
+
}
|
|
61
|
+
case OperandType.LOG:
|
|
62
|
+
this.logWatcher.registerPattern(operand.pattern, () => this.onPatternMatch(target));
|
|
63
|
+
break;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
async onStateChange(triggerId, state) {
|
|
68
|
+
const targetIds = this.triggersToTargets.get(triggerId);
|
|
69
|
+
if (!targetIds) {
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
this.triggerStates.set(triggerId, state);
|
|
73
|
+
for (const targetId of targetIds) {
|
|
74
|
+
const target = this.targets.get(targetId);
|
|
75
|
+
if (!target) {
|
|
76
|
+
throw new Error('Unable to find target associated with the supplied trigger');
|
|
77
|
+
}
|
|
78
|
+
this.log.ifVerbose(strings.conditions.evaluatingConditions, target.name);
|
|
79
|
+
if (this.evaluateConditions(target.conditions, false)) {
|
|
80
|
+
if (!target.disableLogging) {
|
|
81
|
+
this.log.always(strings.conditions.satisfied, target.name);
|
|
82
|
+
}
|
|
83
|
+
await target.trigger();
|
|
84
|
+
}
|
|
85
|
+
else {
|
|
86
|
+
this.log.ifVerbose(strings.conditions.notSatisfied, target.name);
|
|
87
|
+
await target.reset?.();
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
onPatternMatch(target) {
|
|
92
|
+
if (target.conditions.operands.length === 1 || target.conditions.operator === ConditionOperator.OR) {
|
|
93
|
+
this.log.ifVerbose(strings.conditions.patternMatch, target.name);
|
|
94
|
+
target.trigger();
|
|
95
|
+
return;
|
|
96
|
+
}
|
|
97
|
+
this.log.ifVerbose(strings.conditions.patternAndConditions, target.name);
|
|
98
|
+
if (!this.evaluateConditions(target.conditions, true)) {
|
|
99
|
+
this.log.ifVerbose(strings.conditions.notSatisfied, target.name);
|
|
100
|
+
return;
|
|
101
|
+
}
|
|
102
|
+
if (!target.disableLogging) {
|
|
103
|
+
this.log.always(strings.conditions.satisfied, target.name);
|
|
104
|
+
}
|
|
105
|
+
target.trigger();
|
|
106
|
+
}
|
|
107
|
+
evaluateConditions(conditions, ignoreLogType) {
|
|
108
|
+
let result;
|
|
109
|
+
for (const operand of conditions.operands) {
|
|
110
|
+
if (operand.type === OperandType.LOG) {
|
|
111
|
+
if (ignoreLogType || conditions.operator === ConditionOperator.OR) {
|
|
112
|
+
continue;
|
|
113
|
+
}
|
|
114
|
+
result = false;
|
|
115
|
+
break;
|
|
116
|
+
}
|
|
117
|
+
const currentState = this.triggerStates.get(operand.accessoryId);
|
|
118
|
+
if (!currentState) {
|
|
119
|
+
this.log.ifVerbose(strings.conditions.stateUnknown, `'${operand.accessoryId}'`);
|
|
120
|
+
result = false;
|
|
121
|
+
break;
|
|
122
|
+
}
|
|
123
|
+
const operandResult = this.compareStates(currentState, operand.accessoryState);
|
|
124
|
+
switch (conditions.operator) {
|
|
125
|
+
case ConditionOperator.AND:
|
|
126
|
+
result = result === undefined ? operandResult : result && operandResult;
|
|
127
|
+
break;
|
|
128
|
+
case ConditionOperator.OR:
|
|
129
|
+
result = result === undefined ? operandResult : result || operandResult;
|
|
130
|
+
break;
|
|
131
|
+
}
|
|
132
|
+
this.log.ifVerbose(strings.conditions.currentResult, `'${String(result)}'`);
|
|
133
|
+
}
|
|
134
|
+
return result ?? true;
|
|
135
|
+
}
|
|
136
|
+
compareStates(current, desired) {
|
|
137
|
+
if (current === desired) {
|
|
138
|
+
this.log.ifVerbose(strings.conditions.statesEqual, `'${current}'`);
|
|
139
|
+
return true;
|
|
140
|
+
}
|
|
141
|
+
const stateType = getStateType(current);
|
|
142
|
+
if (stateType && !Object.values(stateType).includes(desired)) {
|
|
143
|
+
this.log.error(strings.conditions.statesUnrelated, `'${current}'`, `'${desired}'`);
|
|
144
|
+
return false;
|
|
145
|
+
}
|
|
146
|
+
this.log.ifVerbose(strings.conditions.statesNotEqual, `'${current}'`, `'${desired}'`);
|
|
147
|
+
return false;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
//# sourceMappingURL=conditions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"conditions.js","sourceRoot":"","sources":["../../src/model/conditions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,iBAAiB,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAG1F,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAG1C,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAWhD,MAAM,OAAO,gBAAgB;IASE;IAPZ,OAAO,GAAG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,OAAO,CAAC,CAAC;QACxC,IAAI,SAAS,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC;YAC7D,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,eAAe,EAAE,IAAI,OAAO,GAAG,EAAE,IAAI,OAAO,GAAG,CAAC,CAAC;YACnF,OAAO,KAAK,CAAC;QACf,CAAC;QAED,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC,OAAO,CAAC,UAAU,CAAC,cAAc,EAAE,IAAI,OAAO,GAAG,EAAE,IAAI,OAAO,GAAG,CAAC,CAAC;QACtF,OAAO,KAAK,CAAC;IACf,CAAC;CACF"}
|
package/dist/model/enums.d.ts
CHANGED
|
@@ -28,16 +28,31 @@ export declare enum SensorCharacteristic {
|
|
|
28
28
|
OccupancyDetected = "OccupancyDetected",
|
|
29
29
|
SmokeDetected = "SmokeDetected"
|
|
30
30
|
}
|
|
31
|
-
export declare enum
|
|
31
|
+
export declare enum ConditionOperator {
|
|
32
|
+
AND = "and",
|
|
33
|
+
OR = "or"
|
|
34
|
+
}
|
|
35
|
+
export declare enum OperandType {
|
|
36
|
+
ACCESSORY = "ACCESSORY",
|
|
37
|
+
LOG = "LOG"
|
|
38
|
+
}
|
|
39
|
+
export declare enum OnState {
|
|
40
|
+
ON = "on",
|
|
41
|
+
OFF = "off"
|
|
42
|
+
}
|
|
43
|
+
export declare function isValidOnState(input?: OnState): boolean;
|
|
44
|
+
export declare enum LockState {
|
|
32
45
|
LOCKED = "locked",
|
|
33
46
|
UNLOCKED = "unlocked"
|
|
34
47
|
}
|
|
35
|
-
export declare function isValidLockState(input?:
|
|
36
|
-
export declare enum
|
|
48
|
+
export declare function isValidLockState(input?: LockState): boolean;
|
|
49
|
+
export declare enum Position {
|
|
37
50
|
OPEN = "open",
|
|
38
51
|
CLOSED = "closed"
|
|
39
52
|
}
|
|
40
|
-
export declare function isValidPosition(input?:
|
|
53
|
+
export declare function isValidPosition(input?: Position): boolean;
|
|
54
|
+
export type AccessoryState = OnState | Position | LockState;
|
|
55
|
+
export declare function getStateType(input: AccessoryState): typeof OnState | typeof LockState | typeof Position | undefined;
|
|
41
56
|
export declare enum DefaultThermostatState {
|
|
42
57
|
AUTO = "auto",
|
|
43
58
|
COOL = "cool",
|
package/dist/model/enums.js
CHANGED
|
@@ -33,21 +33,50 @@ export var SensorCharacteristic;
|
|
|
33
33
|
SensorCharacteristic["OccupancyDetected"] = "OccupancyDetected";
|
|
34
34
|
SensorCharacteristic["SmokeDetected"] = "SmokeDetected";
|
|
35
35
|
})(SensorCharacteristic || (SensorCharacteristic = {}));
|
|
36
|
-
export var
|
|
37
|
-
(function (
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
})(
|
|
36
|
+
export var ConditionOperator;
|
|
37
|
+
(function (ConditionOperator) {
|
|
38
|
+
ConditionOperator["AND"] = "and";
|
|
39
|
+
ConditionOperator["OR"] = "or";
|
|
40
|
+
})(ConditionOperator || (ConditionOperator = {}));
|
|
41
|
+
export var OperandType;
|
|
42
|
+
(function (OperandType) {
|
|
43
|
+
OperandType["ACCESSORY"] = "ACCESSORY";
|
|
44
|
+
OperandType["LOG"] = "LOG";
|
|
45
|
+
})(OperandType || (OperandType = {}));
|
|
46
|
+
export var OnState;
|
|
47
|
+
(function (OnState) {
|
|
48
|
+
OnState["ON"] = "on";
|
|
49
|
+
OnState["OFF"] = "off";
|
|
50
|
+
})(OnState || (OnState = {}));
|
|
51
|
+
export function isValidOnState(input) {
|
|
52
|
+
return input === undefined || Object.values(OnState).includes(input);
|
|
53
|
+
}
|
|
54
|
+
export var LockState;
|
|
55
|
+
(function (LockState) {
|
|
56
|
+
LockState["LOCKED"] = "locked";
|
|
57
|
+
LockState["UNLOCKED"] = "unlocked";
|
|
58
|
+
})(LockState || (LockState = {}));
|
|
41
59
|
export function isValidLockState(input) {
|
|
42
|
-
return input === undefined || Object.values(
|
|
60
|
+
return input === undefined || Object.values(LockState).includes(input);
|
|
43
61
|
}
|
|
44
|
-
export var
|
|
45
|
-
(function (
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
})(
|
|
62
|
+
export var Position;
|
|
63
|
+
(function (Position) {
|
|
64
|
+
Position["OPEN"] = "open";
|
|
65
|
+
Position["CLOSED"] = "closed";
|
|
66
|
+
})(Position || (Position = {}));
|
|
49
67
|
export function isValidPosition(input) {
|
|
50
|
-
return input === undefined || Object.values(
|
|
68
|
+
return input === undefined || Object.values(Position).includes(input);
|
|
69
|
+
}
|
|
70
|
+
export function getStateType(input) {
|
|
71
|
+
if (isValidOnState(input)) {
|
|
72
|
+
return OnState;
|
|
73
|
+
}
|
|
74
|
+
if (isValidPosition(input)) {
|
|
75
|
+
return Position;
|
|
76
|
+
}
|
|
77
|
+
if (isValidLockState(input)) {
|
|
78
|
+
return LockState;
|
|
79
|
+
}
|
|
51
80
|
}
|
|
52
81
|
export var DefaultThermostatState;
|
|
53
82
|
(function (DefaultThermostatState) {
|
package/dist/model/enums.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"enums.js","sourceRoot":"","sources":["../../src/model/enums.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,aAUX;AAVD,WAAY,aAAa;IACvB,8BAAa,CAAA;IACb,sDAAqC,CAAA;IACrC,wCAAuB,CAAA;IACvB,gDAA+B,CAAA;IAC/B,kCAAiB,CAAA;IACjB,kCAAiB,CAAA;IACjB,0CAAyB,CAAA;IACzB,kCAAiB,CAAA;IACjB,kDAAiC,CAAA;AACnC,CAAC,EAVW,aAAa,KAAb,aAAa,QAUxB;AAED,MAAM,CAAN,IAAY,UAQX;AARD,WAAY,UAAU;IACpB,yDAA2C,CAAA;IAC3C,2DAA6C,CAAA;IAC7C,6CAA+B,CAAA;IAC/B,uCAAyB,CAAA;IACzB,2CAA6B,CAAA;IAC7B,iDAAmC,CAAA;IACnC,yCAA2B,CAAA;A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