homebridge-melcloud-control 4.2.3-beta.6 → 4.2.3-beta.61
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/config.schema.json +433 -25
- package/homebridge-ui/public/index.html +85 -15
- package/homebridge-ui/server.js +2 -1
- package/index.js +6 -5
- package/package.json +2 -2
- package/src/constants.js +48 -5
- package/src/deviceata.js +273 -155
- package/src/deviceatw.js +125 -119
- package/src/deviceerv.js +41 -42
- package/src/melcloud.js +27 -362
- package/src/melcloudata.js +35 -21
- package/src/melcloudatw.js +38 -29
- package/src/melclouderv.js +29 -22
- package/src/melcloudhome.js +403 -0
package/src/deviceatw.js
CHANGED
|
@@ -43,6 +43,7 @@ class DeviceAtw extends EventEmitter {
|
|
|
43
43
|
this.holidayModeSupport = device.holidayModeSupport || false;
|
|
44
44
|
this.presets = this.accountType === 'melcloud' ? (device.presets || []).filter(preset => (preset.displayType ?? 0) > 0 && preset.id !== '0') : [];
|
|
45
45
|
this.schedules = this.accountType === 'melcloudhome' ? (device.schedules || []).filter(schedule => (schedule.displayType ?? 0) > 0 && schedule.id !== '0') : [];
|
|
46
|
+
this.scenes = this.accountType === 'melcloudhome' ? (device.scenes || []).filter(scene => (scene.displayType ?? 0) > 0 && scene.id !== '0') : [];
|
|
46
47
|
this.buttons = (device.buttonsSensors || []).filter(button => (button.displayType ?? 0) > 0);
|
|
47
48
|
this.deviceId = device.id;
|
|
48
49
|
this.deviceName = device.name;
|
|
@@ -172,93 +173,93 @@ class DeviceAtw extends EventEmitter {
|
|
|
172
173
|
async setOverExternalIntegration(integration, deviceData, key, value) {
|
|
173
174
|
try {
|
|
174
175
|
let set = false
|
|
175
|
-
let
|
|
176
|
+
let flag = null;
|
|
176
177
|
switch (key) {
|
|
177
178
|
case 'Power':
|
|
178
179
|
deviceData.Device[key] = value;
|
|
179
|
-
|
|
180
|
+
flag = HeatPump.EffectiveFlags.Power;
|
|
180
181
|
break;
|
|
181
182
|
case 'OperationMode':
|
|
182
183
|
deviceData.Device[key] = value;
|
|
183
|
-
|
|
184
|
+
flag = HeatPump.EffectiveFlags.OperationMode;
|
|
184
185
|
break;
|
|
185
186
|
case 'OperationModeZone1':
|
|
186
187
|
deviceData.Device[key] = value;
|
|
187
|
-
|
|
188
|
+
flag = HeatPump.EffectiveFlags.OperationModeZone1;
|
|
188
189
|
break;
|
|
189
190
|
case 'OperationModeZone2':
|
|
190
191
|
deviceData.Device[key] = value;
|
|
191
|
-
|
|
192
|
+
flag = HeatPump.EffectiveFlags.OperationModeZone2;
|
|
192
193
|
break;
|
|
193
194
|
case 'SetTemperatureZone1':
|
|
194
195
|
deviceData.Device[key] = value;
|
|
195
|
-
|
|
196
|
+
flag = HeatPump.EffectiveFlags.SetTemperatureZone2;
|
|
196
197
|
break;
|
|
197
198
|
case 'SetTemperatureZone2':
|
|
198
199
|
deviceData.Device[key] = value;
|
|
199
|
-
|
|
200
|
+
flag = HeatPump.EffectiveFlags.SetTemperatureZone2;
|
|
200
201
|
break;
|
|
201
202
|
case 'SetHeatFlowTemperatureZone1':
|
|
202
203
|
deviceData.Device[key] = value;
|
|
203
|
-
|
|
204
|
+
flag = HeatPump.EffectiveFlags.SetHeatFlowTemperatureZone1;
|
|
204
205
|
break;
|
|
205
206
|
case 'SetHeatFlowTemperatureZone2':
|
|
206
207
|
deviceData.Device[key] = value;
|
|
207
|
-
|
|
208
|
+
flag = HeatPump.EffectiveFlags.SetHeatFlowTemperatureZone2;
|
|
208
209
|
break;
|
|
209
210
|
case 'SetCoolFlowTemperatureZone1':
|
|
210
211
|
deviceData.Device[key] = value;
|
|
211
|
-
|
|
212
|
+
flag = HeatPump.EffectiveFlags.SetCoolFlowTemperatureZone1;
|
|
212
213
|
break;
|
|
213
214
|
case 'SetCoolFlowTemperatureZone2':
|
|
214
215
|
deviceData.Device[key] = value;
|
|
215
|
-
|
|
216
|
+
flag = HeatPump.EffectiveFlags.SetCoolFlowTemperatureZone2;
|
|
216
217
|
break;
|
|
217
218
|
case 'SetTankWaterTemperature':
|
|
218
219
|
deviceData.Device[key] = value;
|
|
219
|
-
|
|
220
|
+
flag = HeatPump.EffectiveFlags.SetTankWaterTemperature;
|
|
220
221
|
break;
|
|
221
222
|
case 'ForcedHotWaterMode':
|
|
222
223
|
deviceData.Device[key] = value;
|
|
223
|
-
|
|
224
|
+
flag = HeatPump.EffectiveFlags.ForcedHotWaterMode;
|
|
224
225
|
break;
|
|
225
226
|
case 'EcoHotWater':
|
|
226
227
|
deviceData.Device[key] = value;
|
|
227
|
-
|
|
228
|
+
flag = HeatPump.EffectiveFlags.EcoHotWater;
|
|
228
229
|
break;
|
|
229
230
|
case 'ProhibitZone1':
|
|
230
231
|
if (this.accountType === 'melcloudhome') return;
|
|
231
232
|
|
|
232
233
|
deviceData.Device[key] = value;
|
|
233
|
-
|
|
234
|
+
flag = HeatPump.EffectiveFlags.ProhibitZone1;
|
|
234
235
|
break;
|
|
235
236
|
case 'ProhibitZone2':
|
|
236
237
|
if (this.accountType === 'melcloudhome') return;
|
|
237
238
|
|
|
238
239
|
deviceData.Device[key] = value;
|
|
239
|
-
|
|
240
|
+
flag = HeatPump.EffectiveFlags.ProhibitZone2;
|
|
240
241
|
break;
|
|
241
242
|
case 'ProhibitHotWater':
|
|
242
243
|
if (this.accountType === 'melcloudhome') return;
|
|
243
244
|
|
|
244
245
|
deviceData.Device[key] = value;
|
|
245
|
-
|
|
246
|
+
flag = HeatPump.EffectiveFlags.ProhibitHotWater;
|
|
246
247
|
break;
|
|
247
248
|
case 'ScheduleEnabled':
|
|
248
249
|
if (this.accountType === 'melcloud') return;
|
|
249
250
|
|
|
250
251
|
deviceData.Device[key].Enabled = value;
|
|
251
|
-
|
|
252
|
+
flag = 'schedule';
|
|
252
253
|
break;
|
|
253
254
|
case 'HolidayMode':
|
|
254
255
|
if (this.accountType === 'melcloud') {
|
|
255
256
|
deviceData.Device[key] = value;
|
|
256
|
-
|
|
257
|
+
flag = HeatPump.EffectiveFlags.HolidayMode;
|
|
257
258
|
}
|
|
258
259
|
|
|
259
260
|
if (this.accountType === 'melcloudhome') {
|
|
260
261
|
deviceData.Device[key].Enabled = value;
|
|
261
|
-
|
|
262
|
+
flag = 'holidaymode';
|
|
262
263
|
}
|
|
263
264
|
break;
|
|
264
265
|
default:
|
|
@@ -266,7 +267,7 @@ class DeviceAtw extends EventEmitter {
|
|
|
266
267
|
break;
|
|
267
268
|
};
|
|
268
269
|
|
|
269
|
-
set = await this.melCloudAtw.send(this.accountType, this.displayType, deviceData,
|
|
270
|
+
set = await this.melCloudAtw.send(this.accountType, this.displayType, deviceData, flag);
|
|
270
271
|
return set;
|
|
271
272
|
} catch (error) {
|
|
272
273
|
throw new Error(`${integration} set key: ${key}, value: ${value}, error: ${error.message ?? error}`);
|
|
@@ -340,14 +341,12 @@ class DeviceAtw extends EventEmitter {
|
|
|
340
341
|
return state;
|
|
341
342
|
})
|
|
342
343
|
.onSet(async (state) => {
|
|
343
|
-
if (!!state === this.accessory.power) return;
|
|
344
|
-
|
|
345
344
|
try {
|
|
346
345
|
switch (i) {
|
|
347
346
|
case 0: //Heat Pump
|
|
348
347
|
deviceData.Device.Power = state ? true : false;
|
|
349
348
|
await this.melCloudAtw.send(this.accountType, this.displayType, deviceData, HeatPump.EffectiveFlags.Power);
|
|
350
|
-
if (this.logInfo) this.emit('info', `${zoneName}, Set power: ${state ? '
|
|
349
|
+
if (this.logInfo) this.emit('info', `${zoneName}, Set power: ${state ? 'On' : 'Off'}`);
|
|
351
350
|
break;
|
|
352
351
|
};
|
|
353
352
|
} catch (error) {
|
|
@@ -372,23 +371,23 @@ class DeviceAtw extends EventEmitter {
|
|
|
372
371
|
.onSet(async (value) => {
|
|
373
372
|
try {
|
|
374
373
|
let operationModeText = '';
|
|
375
|
-
let
|
|
374
|
+
let flag = null;
|
|
376
375
|
switch (i) {
|
|
377
376
|
case caseHeatPump: //Heat Pump - ON, HEAT, COOL
|
|
378
377
|
switch (value) {
|
|
379
378
|
case caseHeatPump: //AUTO
|
|
380
379
|
deviceData.Device.Power = true;
|
|
381
|
-
|
|
380
|
+
flag = HeatPump.EffectiveFlags.Power;
|
|
382
381
|
break;
|
|
383
382
|
case 1: //HEAT
|
|
384
383
|
deviceData.Device.Power = true;
|
|
385
384
|
deviceData.Device.UnitStatus = 0;
|
|
386
|
-
|
|
385
|
+
flag = HeatPump.EffectiveFlags.Power + HeatPump.EffectiveFlags.OperationMode;
|
|
387
386
|
break;
|
|
388
387
|
case 2: //COOL
|
|
389
388
|
deviceData.Device.Power = true;
|
|
390
389
|
deviceData.Device.UnitStatus = 1;
|
|
391
|
-
|
|
390
|
+
flag = HeatPump.EffectiveFlags.Power + HeatPump.EffectiveFlags.OperationMode;
|
|
392
391
|
break;
|
|
393
392
|
};
|
|
394
393
|
operationModeText = [HeatPump.SystemMapEnumToString[0], HeatPump.SystemMapEnumToString[deviceData.Device.UnitStatus]][this.accessory.power];
|
|
@@ -397,15 +396,15 @@ class DeviceAtw extends EventEmitter {
|
|
|
397
396
|
switch (value) {
|
|
398
397
|
case 0: //AUTO - HEAT CURVE
|
|
399
398
|
deviceData.Device.OperationModeZone1 = 2;
|
|
400
|
-
|
|
399
|
+
flag = HeatPump.EffectiveFlags.OperationModeZone1;
|
|
401
400
|
break;
|
|
402
401
|
case 1: //HEAT - HEAT THERMOSTAT / COOL THERMOSTAT
|
|
403
402
|
deviceData.Device.OperationModeZone1 = [0, 3][this.unitStatus];
|
|
404
|
-
|
|
403
|
+
flag = HeatPump.EffectiveFlags.OperationModeZone1;
|
|
405
404
|
break;
|
|
406
405
|
case 2: //COOL - HEAT FLOW / COOL FLOW
|
|
407
406
|
deviceData.Device.OperationModeZone1 = [1, 4][this.unitStatus];
|
|
408
|
-
|
|
407
|
+
flag = HeatPump.EffectiveFlags.OperationModeZone1;
|
|
409
408
|
break;
|
|
410
409
|
};
|
|
411
410
|
operationModeText = HeatPump.ZoneOperation[deviceData.Device.OperationModeZone1];
|
|
@@ -414,15 +413,15 @@ class DeviceAtw extends EventEmitter {
|
|
|
414
413
|
switch (value) {
|
|
415
414
|
case 0: //AUTO
|
|
416
415
|
deviceData.Device.ForcedHotWaterMode = false;
|
|
417
|
-
|
|
416
|
+
flag = HeatPump.EffectiveFlags.ForcedHotWaterMode;
|
|
418
417
|
break;
|
|
419
418
|
case 1: //HEAT
|
|
420
419
|
deviceData.Device.ForcedHotWaterMode = true;
|
|
421
|
-
|
|
420
|
+
flag = HeatPump.EffectiveFlags.ForcedHotWaterMode;
|
|
422
421
|
break;
|
|
423
422
|
case 2: //COOL
|
|
424
423
|
deviceData.Device.ForcedHotWaterMode = false;
|
|
425
|
-
|
|
424
|
+
flag = HeatPump.EffectiveFlags.ForcedHotWaterMode;
|
|
426
425
|
break
|
|
427
426
|
};
|
|
428
427
|
operationModeText = deviceData.Device.OperationMode === 1 ? HeatPump.ForceDhwMapEnumToString[1] : HeatPump.ForceDhwMapEnumToString[deviceData.Device.ForcedHotWaterMode ? 1 : 0];
|
|
@@ -431,22 +430,22 @@ class DeviceAtw extends EventEmitter {
|
|
|
431
430
|
switch (value) {
|
|
432
431
|
case 0: //AUTO
|
|
433
432
|
deviceData.Device.OperationModeZone2 = 2;
|
|
434
|
-
|
|
433
|
+
flag = HeatPump.EffectiveFlags.OperationModeZone2;
|
|
435
434
|
break;
|
|
436
435
|
case 1: //HEAT - HEAT THERMOSTAT / COOL THERMOSTAT
|
|
437
436
|
deviceData.Device.OperationModeZone2 = [0, 3][this.unitStatus];
|
|
438
|
-
|
|
437
|
+
flag = HeatPump.EffectiveFlags.OperationModeZone2;
|
|
439
438
|
break;
|
|
440
439
|
case 2: //COOL - HEAT FLOW / COOL FLOW
|
|
441
440
|
deviceData.Device.OperationModeZone2 = [1, 4][this.unitStatus];
|
|
442
|
-
|
|
441
|
+
flag = HeatPump.EffectiveFlags.OperationModeZone2;
|
|
443
442
|
break;
|
|
444
443
|
};
|
|
445
444
|
operationModeText = HeatPump.ZoneOperationMapEnumToString[deviceData.Device.OperationModeZone2];
|
|
446
445
|
break;
|
|
447
446
|
};
|
|
448
447
|
|
|
449
|
-
await this.melCloudAtw.send(this.accountType, this.displayType, deviceData,
|
|
448
|
+
await this.melCloudAtw.send(this.accountType, this.displayType, deviceData, flag);
|
|
450
449
|
if (this.logInfo) this.emit('info', `${zoneName}, Set operation mode: ${operationModeText}`);
|
|
451
450
|
} catch (error) {
|
|
452
451
|
if (this.logWarn) this.emit('warn', `${zoneName}, Set operation mode error: ${error}`);
|
|
@@ -476,51 +475,51 @@ class DeviceAtw extends EventEmitter {
|
|
|
476
475
|
})
|
|
477
476
|
.onSet(async (value) => {
|
|
478
477
|
try {
|
|
479
|
-
let
|
|
478
|
+
let flag = null;
|
|
480
479
|
switch (i) {
|
|
481
480
|
case caseHeatPump: //Heat Pump
|
|
482
481
|
//deviceData.Device.SetTemperatureZone1 = value;
|
|
483
|
-
//
|
|
482
|
+
//flag = CONSTANTS.HeatPump.EffectiveFlags.SetTemperatureZone1;
|
|
484
483
|
break;
|
|
485
484
|
case caseZone1: //Zone 1
|
|
486
485
|
switch (zone.operationMode) {
|
|
487
486
|
case 1: //HEAT FLOW
|
|
488
487
|
deviceData.Device.SetHeatFlowTemperatureZone1 = value;
|
|
489
|
-
|
|
488
|
+
flag = HeatPump.EffectiveFlags.SetHeatFlowTemperatureZone1;
|
|
490
489
|
break;
|
|
491
490
|
case 4: //COOL FLOW
|
|
492
491
|
deviceData.Device.SetCoolFlowTemperatureZone1 = value;
|
|
493
|
-
|
|
492
|
+
flag = HeatPump.EffectiveFlags.SetCoolFlowTemperatureZone1;
|
|
494
493
|
break;
|
|
495
494
|
default:
|
|
496
495
|
deviceData.Device.SetTemperatureZone1 = value;
|
|
497
|
-
|
|
496
|
+
flag = HeatPump.EffectiveFlags.SetTemperatureZone1;
|
|
498
497
|
break
|
|
499
498
|
};
|
|
500
499
|
break;
|
|
501
500
|
case caseHotWater: //Hot Water
|
|
502
501
|
deviceData.Device.SetTankWaterTemperature = value;
|
|
503
|
-
|
|
502
|
+
flag = HeatPump.EffectiveFlags.SetTankWaterTemperature;
|
|
504
503
|
break;
|
|
505
504
|
case caseZone2: //Zone 2
|
|
506
505
|
switch (zone.operationMode) {
|
|
507
506
|
case 1: //HEAT FLOW
|
|
508
507
|
deviceData.Device.SetHeatFlowTemperatureZone2 = value;
|
|
509
|
-
|
|
508
|
+
flag = HeatPump.EffectiveFlags.SetHeatFlowTemperatureZone2;
|
|
510
509
|
break;
|
|
511
510
|
case 4: //COOL FLOW
|
|
512
511
|
deviceData.Device.SetCoolFlowTemperatureZone2 = value;
|
|
513
|
-
|
|
512
|
+
flag = HeatPump.EffectiveFlags.SetCoolFlowTemperatureZone2;
|
|
514
513
|
break;
|
|
515
514
|
default:
|
|
516
515
|
deviceData.Device.SetTemperatureZone2 = value;
|
|
517
|
-
|
|
516
|
+
flag = HeatPump.EffectiveFlags.SetTemperatureZone2;
|
|
518
517
|
break
|
|
519
518
|
};
|
|
520
519
|
break;
|
|
521
520
|
};
|
|
522
521
|
|
|
523
|
-
if (i > 0) await this.melCloudAtw.send(this.accountType, this.displayType, deviceData,
|
|
522
|
+
if (i > 0) await this.melCloudAtw.send(this.accountType, this.displayType, deviceData, flag);
|
|
524
523
|
if (this.logInfo && i !== 0) this.emit('info', `${zoneName}, Set cooling threshold temperature: ${value}${this.accessory.temperatureUnit}`);
|
|
525
524
|
} catch (error) {
|
|
526
525
|
if (this.logWarn) this.emit('warn', `${zoneName}, Set cooling threshold temperature error: ${error}`);
|
|
@@ -541,51 +540,51 @@ class DeviceAtw extends EventEmitter {
|
|
|
541
540
|
})
|
|
542
541
|
.onSet(async (value) => {
|
|
543
542
|
try {
|
|
544
|
-
let
|
|
543
|
+
let flag = null;
|
|
545
544
|
switch (i) {
|
|
546
545
|
case caseHeatPump: //Heat Pump
|
|
547
546
|
//deviceData.Device.SetTemperatureZone1 = value;
|
|
548
|
-
//
|
|
547
|
+
//flag = CONSTANTS.HeatPump.EffectiveFlags.SetTemperatureZone1;
|
|
549
548
|
break;
|
|
550
549
|
case caseZone1: //Zone 1
|
|
551
550
|
switch (zone.operationMode) {
|
|
552
551
|
case 1: //HEAT FLOW
|
|
553
552
|
deviceData.Device.SetHeatFlowTemperatureZone1 = value;
|
|
554
|
-
|
|
553
|
+
flag = HeatPump.EffectiveFlags.SetHeatFlowTemperatureZone1;
|
|
555
554
|
break;
|
|
556
555
|
case 4: //COOL FLOW
|
|
557
556
|
deviceData.Device.SetCoolFlowTemperatureZone1 = value;
|
|
558
|
-
|
|
557
|
+
flag = HeatPump.EffectiveFlags.SetCoolFlowTemperatureZone1;
|
|
559
558
|
break;
|
|
560
559
|
default:
|
|
561
560
|
deviceData.Device.SetTemperatureZone1 = value;
|
|
562
|
-
|
|
561
|
+
flag = HeatPump.EffectiveFlags.SetTemperatureZone1;
|
|
563
562
|
break
|
|
564
563
|
};
|
|
565
564
|
break;
|
|
566
565
|
case caseHotWater: //Hot Water
|
|
567
566
|
deviceData.Device.SetTankWaterTemperature = value;
|
|
568
|
-
|
|
567
|
+
flag = HeatPump.EffectiveFlags.SetTankWaterTemperature;
|
|
569
568
|
break;
|
|
570
569
|
case caseZone2: //Zone 2
|
|
571
570
|
switch (zone.operationMode) {
|
|
572
571
|
case 1: //HEAT FLOW
|
|
573
572
|
deviceData.Device.SetHeatFlowTemperatureZone2 = value;
|
|
574
|
-
|
|
573
|
+
flag = HeatPump.EffectiveFlags.SetHeatFlowTemperatureZone2;
|
|
575
574
|
break;
|
|
576
575
|
case 4: //COOL FLOW
|
|
577
576
|
deviceData.Device.SetCoolFlowTemperatureZone2 = value;
|
|
578
|
-
|
|
577
|
+
flag = HeatPump.EffectiveFlags.SetCoolFlowTemperatureZone2;
|
|
579
578
|
break;
|
|
580
579
|
default:
|
|
581
580
|
deviceData.Device.SetTemperatureZone2 = value;
|
|
582
|
-
|
|
581
|
+
flag = HeatPump.EffectiveFlags.SetTemperatureZone2;
|
|
583
582
|
break
|
|
584
583
|
};
|
|
585
584
|
break;
|
|
586
585
|
};
|
|
587
586
|
|
|
588
|
-
if (i > 0) await this.melCloudAtw.send(this.accountType, this.displayType, deviceData,
|
|
587
|
+
if (i > 0) await this.melCloudAtw.send(this.accountType, this.displayType, deviceData, flag);
|
|
589
588
|
if (this.logInfo && i !== 0) this.emit('info', `${zoneName}, Set heating threshold temperature: ${value}${this.accessory.temperatureUnit}`);
|
|
590
589
|
} catch (error) {
|
|
591
590
|
if (this.logWarn) this.emit('warn', `${zoneName}, Set heating threshold temperature error: ${error}`);
|
|
@@ -671,27 +670,27 @@ class DeviceAtw extends EventEmitter {
|
|
|
671
670
|
.onSet(async (value) => {
|
|
672
671
|
try {
|
|
673
672
|
let operationModeText = '';
|
|
674
|
-
let
|
|
673
|
+
let flag = null;
|
|
675
674
|
switch (i) {
|
|
676
675
|
case caseHeatPump: //Heat Pump - HEAT, COOL
|
|
677
676
|
switch (value) {
|
|
678
677
|
case 0: //OFF
|
|
679
678
|
deviceData.Device.Power = false;
|
|
680
|
-
|
|
679
|
+
flag = HeatPump.EffectiveFlags.Power;
|
|
681
680
|
break;
|
|
682
681
|
case 1: //HEAT
|
|
683
682
|
deviceData.Device.Power = true;
|
|
684
683
|
deviceData.Device.UnitStatus = 0;
|
|
685
|
-
|
|
684
|
+
flag = HeatPump.EffectiveFlags.Power + HeatPump.EffectiveFlags.OperationMode;
|
|
686
685
|
break;
|
|
687
686
|
case 2: //COOL
|
|
688
687
|
deviceData.Device.Power = true;
|
|
689
688
|
deviceData.Device.UnitStatus = 1;
|
|
690
|
-
|
|
689
|
+
flag = HeatPump.EffectiveFlags.Power + HeatPump.EffectiveFlags.OperationMode;
|
|
691
690
|
break;
|
|
692
691
|
case 3: //AUTO
|
|
693
692
|
deviceData.Device.Power = true;
|
|
694
|
-
|
|
693
|
+
flag = HeatPump.EffectiveFlags.Power;
|
|
695
694
|
break;
|
|
696
695
|
};
|
|
697
696
|
operationModeText = [HeatPump.SystemMapEnumToString[0], HeatPump.SystemMapEnumToString[deviceData.Device.UnitStatus]][this.accessory.power];
|
|
@@ -700,19 +699,19 @@ class DeviceAtw extends EventEmitter {
|
|
|
700
699
|
switch (value) {
|
|
701
700
|
case 0: //OFF - HEAT CURVE
|
|
702
701
|
deviceData.Device.OperationModeZone1 = 2;
|
|
703
|
-
|
|
702
|
+
flag = HeatPump.EffectiveFlags.OperationModeZone1;
|
|
704
703
|
break;
|
|
705
704
|
case 1: //HEAT - HEAT THERMOSTAT / COOL THERMOSTAT
|
|
706
705
|
deviceData.Device.OperationModeZone1 = [0, 3][this.unitStatus];
|
|
707
|
-
|
|
706
|
+
flag = HeatPump.EffectiveFlags.OperationModeZone1;
|
|
708
707
|
break;
|
|
709
708
|
case 2: //COOL - HEAT FLOW / COOL FLOW
|
|
710
709
|
deviceData.Device.OperationModeZone1 = [1, 4][this.unitStatus];
|
|
711
|
-
|
|
710
|
+
flag = HeatPump.EffectiveFlags.OperationModeZone1;
|
|
712
711
|
break;
|
|
713
712
|
case 3: //AUTO - HEAT CURVE
|
|
714
713
|
deviceData.Device.OperationModeZone1 = 2;
|
|
715
|
-
|
|
714
|
+
flag = HeatPump.EffectiveFlags.OperationModeZone1;
|
|
716
715
|
break;
|
|
717
716
|
};
|
|
718
717
|
operationModeText = HeatPump.ZoneOperationMapEnumToString[deviceData.Device.OperationModeZone1];
|
|
@@ -721,19 +720,19 @@ class DeviceAtw extends EventEmitter {
|
|
|
721
720
|
switch (value) {
|
|
722
721
|
case 0: //OFF
|
|
723
722
|
deviceData.Device.ForcedHotWaterMode = false;
|
|
724
|
-
|
|
723
|
+
flag = HeatPump.EffectiveFlags.ForcedHotWaterMode;
|
|
725
724
|
break;
|
|
726
725
|
case 1: //HEAT
|
|
727
726
|
deviceData.Device.ForcedHotWaterMode = true;
|
|
728
|
-
|
|
727
|
+
flag = HeatPump.EffectiveFlags.ForcedHotWaterMode;
|
|
729
728
|
break;
|
|
730
729
|
case 2: //COOL
|
|
731
730
|
deviceData.Device.ForcedHotWaterMode = false;
|
|
732
|
-
|
|
731
|
+
flag = HeatPump.EffectiveFlags.ForcedHotWaterMode;
|
|
733
732
|
break;
|
|
734
733
|
case 3: //AUTO
|
|
735
734
|
deviceData.Device.ForcedHotWaterMode = false;
|
|
736
|
-
|
|
735
|
+
flag = HeatPump.EffectiveFlags.ForcedHotWaterMode;
|
|
737
736
|
break;
|
|
738
737
|
};
|
|
739
738
|
operationModeText = deviceData.Device.OperationMode === 1 ? HeatPump.ForceDhwMapEnumToString[1] : HeatPump.ForceDhwMapEnumToString[deviceData.Device.ForcedHotWaterMode ? 1 : 0];
|
|
@@ -742,26 +741,26 @@ class DeviceAtw extends EventEmitter {
|
|
|
742
741
|
switch (value) {
|
|
743
742
|
case 0: //OFF - HEAT CURVE
|
|
744
743
|
deviceData.Device.OperationModeZone2 = 2;
|
|
745
|
-
|
|
744
|
+
flag = HeatPump.EffectiveFlags.OperationModeZone2;
|
|
746
745
|
break;
|
|
747
746
|
case 1: //HEAT - HEAT THERMOSTAT / COOL THERMOSTAT
|
|
748
747
|
deviceData.Device.OperationModeZone2 = [0, 3][this.unitStatus];
|
|
749
|
-
|
|
748
|
+
flag = HeatPump.EffectiveFlags.OperationModeZone2;
|
|
750
749
|
break;
|
|
751
750
|
case 2: //COOL - HEAT FLOW / COOL FLOW
|
|
752
751
|
deviceData.Device.OperationModeZone2 = [1, 4][this.unitStatus];
|
|
753
|
-
|
|
752
|
+
flag = HeatPump.EffectiveFlags.OperationModeZone2;
|
|
754
753
|
break;
|
|
755
754
|
case 3: //AUTO - HEAT CURVE
|
|
756
755
|
deviceData.Device.OperationModeZone2 = 2;
|
|
757
|
-
|
|
756
|
+
flag = HeatPump.EffectiveFlags.OperationModeZone2;
|
|
758
757
|
break;
|
|
759
758
|
};
|
|
760
759
|
operationModeText = HeatPump.ZoneOperationMapEnumToString[deviceData.Device.OperationModeZone2];
|
|
761
760
|
break;
|
|
762
761
|
};
|
|
763
762
|
|
|
764
|
-
await this.melCloudAtw.send(this.accountType, this.displayType, deviceData,
|
|
763
|
+
await this.melCloudAtw.send(this.accountType, this.displayType, deviceData, flag);
|
|
765
764
|
if (this.logInfo) this.emit('info', `${zoneName}, Set operation mode: ${operationModeText}`);
|
|
766
765
|
} catch (error) {
|
|
767
766
|
if (this.logWarn) this.emit('warn', `${zoneName}, Set operation mode error: ${error}`);
|
|
@@ -789,27 +788,27 @@ class DeviceAtw extends EventEmitter {
|
|
|
789
788
|
})
|
|
790
789
|
.onSet(async (value) => {
|
|
791
790
|
try {
|
|
792
|
-
let
|
|
791
|
+
let flag = null;
|
|
793
792
|
switch (i) {
|
|
794
793
|
case caseHeatPump: //Heat Pump
|
|
795
794
|
//deviceData.Device.SetTemperatureZone1 = value;
|
|
796
|
-
//
|
|
795
|
+
//flag = CONSTANTS.HeatPump.EffectiveFlags.SetTemperatureZone1;
|
|
797
796
|
break;
|
|
798
797
|
case caseZone1: //Zone 1
|
|
799
798
|
deviceData.Device.SetTemperatureZone1 = value;
|
|
800
|
-
|
|
799
|
+
flag = HeatPump.EffectiveFlags.SetTemperatureZone1;
|
|
801
800
|
break;
|
|
802
801
|
case caseHotWater: //Hot Water
|
|
803
802
|
deviceData.Device.SetTankWaterTemperature = value;
|
|
804
|
-
|
|
803
|
+
flag = HeatPump.EffectiveFlags.SetTankWaterTemperature;
|
|
805
804
|
break;
|
|
806
805
|
case caseZone2: //Zone 2
|
|
807
806
|
deviceData.Device.SetTemperatureZone2 = value;
|
|
808
|
-
|
|
807
|
+
flag = HeatPump.EffectiveFlags.SetTemperatureZone2;
|
|
809
808
|
break;
|
|
810
809
|
};
|
|
811
810
|
|
|
812
|
-
if (i > 0) await this.melCloudAtw.send(this.accountType, this.displayType, deviceData,
|
|
811
|
+
if (i > 0) await this.melCloudAtw.send(this.accountType, this.displayType, deviceData, flag);
|
|
813
812
|
if (this.logInfo && i !== 0) this.emit('info', `${zoneName}, Set temperature: ${value}${this.accessory.temperatureUnit}`);
|
|
814
813
|
} catch (error) {
|
|
815
814
|
if (this.logWarn) this.emit('warn', `${zoneName}, Set temperature error: ${error}`);
|
|
@@ -1321,123 +1320,130 @@ class DeviceAtw extends EventEmitter {
|
|
|
1321
1320
|
.onSet(async (state) => {
|
|
1322
1321
|
if (displayType > 0 && displayType < 3) {
|
|
1323
1322
|
try {
|
|
1324
|
-
let
|
|
1323
|
+
let flag = null;
|
|
1325
1324
|
switch (mode) {
|
|
1326
1325
|
case 0: //POWER ON,OFF
|
|
1327
1326
|
deviceData.Device.Power = state;
|
|
1328
|
-
|
|
1327
|
+
flag = HeatPump.EffectiveFlags.Power;
|
|
1329
1328
|
break;
|
|
1330
1329
|
case 1: //HEAT PUMP HEAT
|
|
1331
1330
|
button.previousValue = state ? deviceData.Device.UnitStatus : button.previousValue ?? deviceData.Device.UnitStatus;
|
|
1332
1331
|
deviceData.Device.Power = true;
|
|
1333
1332
|
deviceData.Device.UnitStatus = state ? 0 : button.previousValue;
|
|
1334
|
-
|
|
1333
|
+
flag = HeatPump.EffectiveFlags.Power + HeatPump.EffectiveFlags.OperationMode;
|
|
1335
1334
|
break;
|
|
1336
1335
|
case 2: //COOL
|
|
1337
1336
|
button.previousValue = state ? deviceData.Device.UnitStatus : button.previousValue ?? deviceData.Device.UnitStatus;
|
|
1338
1337
|
deviceData.Device.Power = true;
|
|
1339
1338
|
deviceData.Device.UnitStatus = state ? 1 : button.previousValue;
|
|
1340
|
-
|
|
1339
|
+
flag = HeatPump.EffectiveFlags.Power + HeatPump.EffectiveFlags.OperationMode;
|
|
1341
1340
|
break;
|
|
1342
1341
|
case 3: //HOLIDAY
|
|
1343
|
-
|
|
1344
|
-
|
|
1342
|
+
if (this.accountType === 'melcloud') {
|
|
1343
|
+
deviceData.Device.HolidayMode = state;
|
|
1344
|
+
flag = HeatPump.EffectiveFlags.HolidayMode;
|
|
1345
|
+
}
|
|
1346
|
+
|
|
1347
|
+
if (this.accountType === 'melcloudhome') {
|
|
1348
|
+
deviceData.Device.HolidayMode.Enabled = state;
|
|
1349
|
+
flag = 'holidaymode';
|
|
1350
|
+
}
|
|
1345
1351
|
break;
|
|
1346
1352
|
case 10: //ALL ZONES PHYSICAL LOCK CONTROL
|
|
1347
1353
|
deviceData.Device.ProhibitZone1 = state;
|
|
1348
1354
|
deviceData.Device.ProhibitHotWater = state;
|
|
1349
1355
|
deviceData.Device.ProhibitZone2 = state;
|
|
1350
|
-
|
|
1356
|
+
flag = HeatPump.EffectiveFlags.ProhibitHeatingZone1 + HeatPump.EffectiveFlags.ProhibitHotWater + HeatPump.EffectiveFlags.ProhibitHeatingZone2;
|
|
1351
1357
|
break;
|
|
1352
1358
|
case 20: //ZONE 1 HEAT THERMOSTAT
|
|
1353
1359
|
button.previousValue = state ? deviceData.Device.OperationModeZone1 : button.previousValue ?? deviceData.Device.OperationModeZone1;
|
|
1354
1360
|
deviceData.Device.Power = true;
|
|
1355
1361
|
deviceData.Device.OperationModeZone1 = state ? 0 : button.previousValue;
|
|
1356
|
-
|
|
1362
|
+
flag = HeatPump.EffectiveFlags.Power + HeatPump.EffectiveFlags.OperationModeZone1;
|
|
1357
1363
|
break;
|
|
1358
1364
|
case 21: //HEAT FLOW
|
|
1359
1365
|
button.previousValue = state ? deviceData.Device.OperationModeZone1 : button.previousValue ?? deviceData.Device.OperationModeZone1;
|
|
1360
1366
|
deviceData.Device.Power = true;
|
|
1361
1367
|
deviceData.Device.OperationModeZone1 = state ? 1 : button.previousValue;
|
|
1362
|
-
|
|
1368
|
+
flag = HeatPump.EffectiveFlags.Power + HeatPump.EffectiveFlags.OperationModeZone1;
|
|
1363
1369
|
break;
|
|
1364
1370
|
case 22: //HEAT CURVE
|
|
1365
1371
|
button.previousValue = state ? deviceData.Device.OperationModeZone1 : button.previousValue ?? deviceData.Device.OperationModeZone1;
|
|
1366
1372
|
deviceData.Device.Power = true;
|
|
1367
1373
|
deviceData.Device.OperationModeZone1 = state ? 2 : button.previousValue;
|
|
1368
|
-
|
|
1374
|
+
flag = HeatPump.EffectiveFlags.Power + HeatPump.EffectiveFlags.OperationModeZone1;
|
|
1369
1375
|
break;
|
|
1370
1376
|
case 23: //COOL THERMOSTAT
|
|
1371
1377
|
button.previousValue = state ? deviceData.Device.OperationModeZone1 : button.previousValue ?? deviceData.Device.OperationModeZone1;
|
|
1372
1378
|
deviceData.Device.Power = true;
|
|
1373
1379
|
deviceData.Device.OperationModeZone1 = state ? 3 : button.previousValue;
|
|
1374
|
-
|
|
1380
|
+
flag = HeatPump.EffectiveFlags.Power + HeatPump.EffectiveFlags.OperationModeZone1;
|
|
1375
1381
|
break;
|
|
1376
1382
|
case 24: //COOL FLOW
|
|
1377
1383
|
button.previousValue = state ? deviceData.Device.OperationModeZone1 : button.previousValue ?? deviceData.Device.OperationModeZone1;
|
|
1378
1384
|
deviceData.Device.Power = true;
|
|
1379
1385
|
deviceData.Device.OperationModeZone1 = state ? 4 : button.previousValue;
|
|
1380
|
-
|
|
1386
|
+
flag = HeatPump.EffectiveFlags.Power + HeatPump.EffectiveFlags.OperationModeZone1;
|
|
1381
1387
|
break;
|
|
1382
1388
|
case 25: //FLOOR DRY UP
|
|
1383
1389
|
button.previousValue = state ? deviceData.Device.OperationModeZone1 : button.previousValue ?? deviceData.Device.OperationModeZone1;
|
|
1384
1390
|
deviceData.Device.Power = true;
|
|
1385
1391
|
deviceData.Device.OperationModeZone1 = state ? 5 : button.previousValue;
|
|
1386
|
-
|
|
1392
|
+
flag = HeatPump.EffectiveFlags.Power + HeatPump.EffectiveFlags.OperationModeZone1;
|
|
1387
1393
|
break;
|
|
1388
1394
|
case 30: //PHYSICAL LOCK CONTROL
|
|
1389
1395
|
deviceData.Device.ProhibitZone1 = state;
|
|
1390
|
-
|
|
1396
|
+
flag = HeatPump.EffectiveFlags.ProhibitHeatingZone1;
|
|
1391
1397
|
break;
|
|
1392
1398
|
case 40: //HOT WATER NORMAL/FORCE HOT WATER
|
|
1393
1399
|
deviceData.Device.Power = true;
|
|
1394
1400
|
deviceData.Device.ForcedHotWaterMode = state;
|
|
1395
|
-
|
|
1401
|
+
flag = HeatPump.EffectiveFlags.Power + HeatPump.EffectiveFlags.ForcedHotWaterMode;
|
|
1396
1402
|
break;
|
|
1397
1403
|
case 41: //NORMAL/ECO
|
|
1398
1404
|
deviceData.Device.Power = true;
|
|
1399
1405
|
deviceData.Device.EcoHotWater = state;
|
|
1400
|
-
|
|
1406
|
+
flag = HeatPump.EffectiveFlags.Power + HeatPump.EffectiveFlags.EcoHotWater;
|
|
1401
1407
|
break;
|
|
1402
1408
|
case 50: //PHYSICAL LOCK CONTROL
|
|
1403
1409
|
deviceData.Device.ProhibitHotWater = state;
|
|
1404
|
-
|
|
1410
|
+
flag = HeatPump.EffectiveFlags.ProhibitHotWater;
|
|
1405
1411
|
break;
|
|
1406
1412
|
case 60: //ZONE 2 HEAT THERMOSTAT
|
|
1407
1413
|
button.previousValue = state ? deviceData.Device.OperationModeZone2 : button.previousValue ?? deviceData.Device.OperationModeZone2;
|
|
1408
1414
|
deviceData.Device.Power = true;
|
|
1409
1415
|
deviceData.Device.OperationModeZone2 = state ? 0 : button.previousValue;
|
|
1410
|
-
|
|
1416
|
+
flag = HeatPump.EffectiveFlags.Power + HeatPump.EffectiveFlags.OperationModeZone2;
|
|
1411
1417
|
break;
|
|
1412
1418
|
case 61: // HEAT FLOW
|
|
1413
1419
|
button.previousValue = state ? deviceData.Device.OperationModeZone2 : button.previousValue ?? deviceData.Device.OperationModeZone2;
|
|
1414
1420
|
deviceData.Device.Power = true;
|
|
1415
1421
|
deviceData.Device.OperationModeZone2 = state ? 1 : button.previousValue;
|
|
1416
|
-
|
|
1422
|
+
flag = HeatPump.EffectiveFlags.Power + HeatPump.EffectiveFlags.OperationModeZone2;
|
|
1417
1423
|
break;
|
|
1418
1424
|
case 62: //HEAT CURVE
|
|
1419
1425
|
button.previousValue = state ? deviceData.Device.OperationModeZone2 : button.previousValue ?? deviceData.Device.OperationModeZone2;
|
|
1420
1426
|
deviceData.Device.Power = true;
|
|
1421
1427
|
deviceData.Device.OperationModeZone2 = state ? 2 : button.previousValue;
|
|
1422
|
-
|
|
1428
|
+
flag = HeatPump.EffectiveFlags.Power + HeatPump.EffectiveFlags.OperationModeZone2;
|
|
1423
1429
|
break;
|
|
1424
1430
|
case 63: //COOL THERMOSTAT
|
|
1425
1431
|
button.previousValue = state ? deviceData.Device.OperationModeZone2 : button.previousValue ?? deviceData.Device.OperationModeZone2;
|
|
1426
1432
|
deviceData.Device.Power = true;
|
|
1427
1433
|
deviceData.Device.OperationModeZone2 = state ? 3 : button.previousValue;
|
|
1428
|
-
|
|
1434
|
+
flag = HeatPump.EffectiveFlags.Power + HeatPump.EffectiveFlags.OperationModeZone2;
|
|
1429
1435
|
break;
|
|
1430
1436
|
case 64: //COOL FLOW
|
|
1431
1437
|
button.previousValue = state ? deviceData.Device.OperationModeZone2 : button.previousValue ?? deviceData.Device.OperationModeZone2;
|
|
1432
1438
|
deviceData.Device.Power = true;
|
|
1433
1439
|
deviceData.Device.OperationModeZone2 = state ? 4 : button.previousValue;
|
|
1434
|
-
|
|
1440
|
+
flag = HeatPump.EffectiveFlags.Power + HeatPump.EffectiveFlags.OperationModeZone2;
|
|
1435
1441
|
break;
|
|
1436
1442
|
case 65: //FLOOR DRY UP
|
|
1437
1443
|
button.previousValue = state ? deviceData.Device.OperationModeZone2 : button.previousValue ?? deviceData.Device.OperationModeZone2;
|
|
1438
1444
|
deviceData.Device.Power = true;
|
|
1439
1445
|
deviceData.Device.OperationModeZone2 = state ? 5 : button.previousValue;
|
|
1440
|
-
|
|
1446
|
+
flag = HeatPump.EffectiveFlags.Power + HeatPump.EffectiveFlags.OperationModeZone2;
|
|
1441
1447
|
break;
|
|
1442
1448
|
case 70: //PHYSICAL LOCK CONTROL
|
|
1443
1449
|
deviceData.Device.ProhibitZone2 = state;
|
|
@@ -1448,7 +1454,7 @@ class DeviceAtw extends EventEmitter {
|
|
|
1448
1454
|
break;
|
|
1449
1455
|
};
|
|
1450
1456
|
|
|
1451
|
-
await this.melCloudAtw.send(this.accountType, this.displayType, deviceData,
|
|
1457
|
+
await this.melCloudAtw.send(this.accountType, this.displayType, deviceData, flag);
|
|
1452
1458
|
if (this.logInfo) this.emit('info', `${state ? `Set: ${name}` : `Unset: ${name}, Set: ${button.previousValue}`}`);
|
|
1453
1459
|
} catch (error) {
|
|
1454
1460
|
if (this.logWarn) this.emit('warn', `Set button error: ${error}`);
|
|
@@ -1471,7 +1477,7 @@ class DeviceAtw extends EventEmitter {
|
|
|
1471
1477
|
try {
|
|
1472
1478
|
//melcloud device
|
|
1473
1479
|
this.melCloudAtw = new MelCloudAtw(this.account, this.device, this.devicesFile, this.defaultTempsFile)
|
|
1474
|
-
.on('deviceInfo', (
|
|
1480
|
+
.on('deviceInfo', ( modelIndoor, modelOutdoor, serialNumber, firmwareAppVersion, supportsHotWaterTank, supportsZone2) => {
|
|
1475
1481
|
if (this.logDeviceInfo && this.displayDeviceInfo) {
|
|
1476
1482
|
this.emit('devInfo', `---- ${this.deviceTypeText}: ${this.deviceName} ----`);
|
|
1477
1483
|
this.emit('devInfo', `Account: ${this.accountName}`);
|
|
@@ -1479,7 +1485,7 @@ class DeviceAtw extends EventEmitter {
|
|
|
1479
1485
|
if (modelOutdoor) this.emit('devInfo', `Outdoor: ${modelOutdoor}`);
|
|
1480
1486
|
this.emit('devInfo', `Serial: ${serialNumber}`)
|
|
1481
1487
|
this.emit('devInfo', `Firmware: ${firmwareAppVersion}`);
|
|
1482
|
-
this.emit('devInfo', `Manufacturer:
|
|
1488
|
+
this.emit('devInfo', `Manufacturer: Mitsubishi`);
|
|
1483
1489
|
this.emit('devInfo', '----------------------------------');
|
|
1484
1490
|
this.emit('devInfo', `Zone 1: Yes`);
|
|
1485
1491
|
this.emit('devInfo', `Hot Water Tank: ${supportsHotWaterTank ? 'Yes' : 'No'}`);
|
|
@@ -1489,7 +1495,7 @@ class DeviceAtw extends EventEmitter {
|
|
|
1489
1495
|
}
|
|
1490
1496
|
|
|
1491
1497
|
//accessory info
|
|
1492
|
-
this.manufacturer =
|
|
1498
|
+
this.manufacturer = 'Mitsubishi';
|
|
1493
1499
|
this.model = modelIndoor ? modelIndoor : modelOutdoor ? modelOutdoor : `${this.deviceTypeText} ${this.deviceId}`;
|
|
1494
1500
|
this.serialNumber = serialNumber.toString();
|
|
1495
1501
|
this.firmwareRevision = firmwareAppVersion.toString();
|
|
@@ -1510,7 +1516,8 @@ class DeviceAtw extends EventEmitter {
|
|
|
1510
1516
|
const scheduleEnabled = deviceData.ScheduleEnabled;
|
|
1511
1517
|
const schedulesOnServer = deviceData.Schedule ?? [];
|
|
1512
1518
|
const presetsOnServer = deviceData.Presets ?? [];
|
|
1513
|
-
const
|
|
1519
|
+
const holidayMode = deviceData.Device.HolidayMode;
|
|
1520
|
+
const holidayModeEnabled = accountTypeMelcloud ? holidayMode : deviceData.HolidayMode?.Enabled;
|
|
1514
1521
|
const holidayModeActive = deviceData.HolidayMode?.Active ?? false;
|
|
1515
1522
|
|
|
1516
1523
|
//device info
|
|
@@ -1545,12 +1552,11 @@ class DeviceAtw extends EventEmitter {
|
|
|
1545
1552
|
|
|
1546
1553
|
//heat pump
|
|
1547
1554
|
const heatPumpName = 'Heat Pump';
|
|
1548
|
-
const power = deviceData.Device.Power
|
|
1555
|
+
const power = deviceData.Device.Power;
|
|
1549
1556
|
const inStandbyMode = deviceData.Device.InStandbyMode;
|
|
1550
1557
|
const unitStatus = deviceData.Device.UnitStatus ?? 0;
|
|
1551
1558
|
const operationMode = deviceData.Device.OperationMode;
|
|
1552
1559
|
const outdoorTemperature = deviceData.Device.OutdoorTemperature;
|
|
1553
|
-
const holidayMode = deviceData.Device.HolidayMode ?? false;
|
|
1554
1560
|
const flowTemperatureHeatPump = deviceData.Device.FlowTemperature;
|
|
1555
1561
|
const returnTemperatureHeatPump = deviceData.Device.ReturnTemperature;
|
|
1556
1562
|
const isConnected = accountTypeMelcloud ? !deviceData.Device[connectKey] : deviceData.Device[connectKey];
|
|
@@ -1594,7 +1600,7 @@ class DeviceAtw extends EventEmitter {
|
|
|
1594
1600
|
const obj = {
|
|
1595
1601
|
presets: presetsOnServer,
|
|
1596
1602
|
schedules: schedulesOnServer,
|
|
1597
|
-
power: power
|
|
1603
|
+
power: power,
|
|
1598
1604
|
inStandbyMode: inStandbyMode,
|
|
1599
1605
|
unitStatus: unitStatus,
|
|
1600
1606
|
idleZone1: idleZone1,
|
|
@@ -1880,11 +1886,11 @@ class DeviceAtw extends EventEmitter {
|
|
|
1880
1886
|
let operationModeText = '';
|
|
1881
1887
|
switch (i) {
|
|
1882
1888
|
case caseHeatPump: //Heat Pump - HEAT, COOL, OFF
|
|
1883
|
-
this.emit('info', `${heatPumpName}, Power: ${power ? '
|
|
1889
|
+
this.emit('info', `${heatPumpName}, Power: ${power ? 'On' : 'Off'}`)
|
|
1884
1890
|
this.emit('info', `${heatPumpName}, Operation mode: ${HeatPump.SystemMapEnumToString[unitStatus]}`);
|
|
1885
1891
|
this.emit('info', `${heatPumpName},'Outdoor temperature: ${roomTemperature}${obj.temperatureUnit}`);
|
|
1886
1892
|
this.emit('info', `${heatPumpName}, Temperature display unit: ${obj.temperatureUnit}`);
|
|
1887
|
-
this.emit('info', `${heatPumpName}, Lock physical controls: ${lockPhysicalControl ? '
|
|
1893
|
+
this.emit('info', `${heatPumpName}, Lock physical controls: ${lockPhysicalControl ? 'Locked' : 'Unlocked'}`);
|
|
1888
1894
|
break;
|
|
1889
1895
|
case caseZone1: //Zone 1 - HEAT THERMOSTAT, HEAT FLOW, HEAT CURVE, COOL THERMOSTAT, COOL FLOW, FLOOR DRY UP
|
|
1890
1896
|
operationModeText = idleZone1 ? HeatPump.ZoneOperationMapEnumToString[6] : HeatPump.ZoneOperationMapEnumToString[operationModeZone1];
|
|
@@ -1892,7 +1898,7 @@ class DeviceAtw extends EventEmitter {
|
|
|
1892
1898
|
this.emit('info', `${zone1Name}, Temperature: ${roomTemperature}${obj.temperatureUnit}`);
|
|
1893
1899
|
this.emit('info', `${zone1Name}, Target temperature: ${setTemperature}${obj.temperatureUnit}`)
|
|
1894
1900
|
this.emit('info', `${zone1Name}, Temperature display unit: ${obj.temperatureUnit}`);
|
|
1895
|
-
this.emit('info', `${zone1Name}, Lock physical controls: ${lockPhysicalControl ? '
|
|
1901
|
+
this.emit('info', `${zone1Name}, Lock physical controls: ${lockPhysicalControl ? 'Locked' : 'Unlocked'}`);
|
|
1896
1902
|
break;
|
|
1897
1903
|
case caseHotWater: //Hot Water - AUTO, HEAT NOW
|
|
1898
1904
|
operationModeText = operationMode === 1 ? HeatPump.ForceDhwMapEnumToString[1] : HeatPump.ForceDhwMapEnumToString[forcedHotWaterMode ? 1 : 0];
|
|
@@ -1900,7 +1906,7 @@ class DeviceAtw extends EventEmitter {
|
|
|
1900
1906
|
this.emit('info', `${hotWaterName}, Temperature: ${roomTemperature}${obj.temperatureUnit}`);
|
|
1901
1907
|
this.emit('info', `${hotWaterName}, Target temperature: ${setTemperature}${obj.temperatureUnit}`)
|
|
1902
1908
|
this.emit('info', `${hotWaterName}, Temperature display unit: ${obj.temperatureUnit}`);
|
|
1903
|
-
this.emit('info', `${hotWaterName}, Lock physical controls: ${lockPhysicalControl ? '
|
|
1909
|
+
this.emit('info', `${hotWaterName}, Lock physical controls: ${lockPhysicalControl ? 'Locked' : 'Unlocked'}`);
|
|
1904
1910
|
break;
|
|
1905
1911
|
case caseZone2: //Zone 2 - HEAT THERMOSTAT, HEAT FLOW, HEAT CURVE, COOL THERMOSTAT, COOL FLOW, FLOOR DRY UP
|
|
1906
1912
|
operationModeText = idleZone2 ? HeatPump.ZoneOperationMapEnumToString[6] : HeatPump.ZoneOperationMapEnumToString[operationModeZone2];
|
|
@@ -1908,7 +1914,7 @@ class DeviceAtw extends EventEmitter {
|
|
|
1908
1914
|
this.emit('info', `${zone2Name}, Temperature: ${roomTemperature}${obj.temperatureUnit}`);
|
|
1909
1915
|
this.emit('info', `${zone2Name}, Target temperature: ${setTemperature}${obj.temperatureUnit}`)
|
|
1910
1916
|
this.emit('info', `${zone2Name}, Temperature display unit: ${obj.temperatureUnit}`);
|
|
1911
|
-
this.emit('info', `${zone2Name}, Lock physical controls: ${lockPhysicalControl ? '
|
|
1917
|
+
this.emit('info', `${zone2Name}, Lock physical controls: ${lockPhysicalControl ? 'Locked' : 'Unlocked'}`);
|
|
1912
1918
|
break;
|
|
1913
1919
|
};
|
|
1914
1920
|
};
|
|
@@ -2065,7 +2071,7 @@ class DeviceAtw extends EventEmitter {
|
|
|
2065
2071
|
button.state = power ? (operationMode === 1) : false;
|
|
2066
2072
|
break;
|
|
2067
2073
|
case 53: //HOLIDAY
|
|
2068
|
-
button.state = power ? (
|
|
2074
|
+
button.state = power ? (holidayModeEnabled === true) : false;
|
|
2069
2075
|
break;
|
|
2070
2076
|
case 10: //ALL ZONES PHYSICAL LOCK CONTROL
|
|
2071
2077
|
button.state = power ? (prohibitZone1 === true && prohibitHotWater === true && prohibitZone2 === true) : false;
|