homebridge-melcloud-control 3.8.2-beta.1 → 3.8.2-beta.2
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/package.json +1 -1
- package/src/deviceata.js +54 -53
- package/src/deviceatw.js +29 -28
- package/src/deviceerv.js +60 -59
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"displayName": "MELCloud Control",
|
|
3
3
|
"name": "homebridge-melcloud-control",
|
|
4
|
-
"version": "3.8.2-beta.
|
|
4
|
+
"version": "3.8.2-beta.2",
|
|
5
5
|
"description": "Homebridge plugin to control Mitsubishi Air Conditioner, Heat Pump and Energy Recovery Ventilation.",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"author": "grzegorz914",
|
package/src/deviceata.js
CHANGED
|
@@ -261,19 +261,20 @@ class DeviceAta extends EventEmitter {
|
|
|
261
261
|
//prepare accessory
|
|
262
262
|
async prepareAccessory(accountInfo, deviceData, deviceId, deviceTypeText, deviceName, accountName) {
|
|
263
263
|
try {
|
|
264
|
-
const
|
|
265
|
-
const
|
|
266
|
-
const
|
|
267
|
-
const
|
|
268
|
-
const
|
|
269
|
-
const
|
|
270
|
-
const
|
|
271
|
-
const
|
|
272
|
-
const
|
|
273
|
-
const
|
|
274
|
-
const
|
|
275
|
-
const
|
|
276
|
-
const
|
|
264
|
+
const mielHvac = this.mielHvac;
|
|
265
|
+
const presetsOnServer = mielHvac.presets;
|
|
266
|
+
const modelSupportsHeat = mielHvac.modelSupportsHeat;
|
|
267
|
+
const modelSupportsDry = mielHvac.modelSupportsDry;
|
|
268
|
+
const modelSupportsCool = mielHvac.modelSupportsCool;
|
|
269
|
+
const modelSupportsAuto = mielHvac.modelSupportsAuto;
|
|
270
|
+
const modelSupportsFanSpeed = mielHvac.modelSupportsFanSpeed;
|
|
271
|
+
const hasAutomaticFanSpeed = mielHvac.hasAutomaticFanSpeed;
|
|
272
|
+
const hasOutdoorTemperature = mielHvac.hasOutdoorTemperature;
|
|
273
|
+
const numberOfFanSpeeds = mielHvac.numberOfFanSpeeds;
|
|
274
|
+
const swingFunction = mielHvac.swingFunction;
|
|
275
|
+
const autoDryFanMode = [mielHvac.operationMode, 8, modelSupportsDry ? 2 : 8, 7][this.autoDryFanMode]; //NONE, AUTO - 8, DRY - 2, FAN - 7
|
|
276
|
+
const heatDryFanMode = [mielHvac.operationMode, 1, modelSupportsDry ? 2 : 1, 7][this.heatDryFanMode]; //NONE, HEAT - 1, DRY - 2, FAN - 7
|
|
277
|
+
const coolDryFanMode = [mielHvac.operationMode, 3, modelSupportsDry ? 2 : 3, 7][this.coolDryFanMode]; //NONE, COOL - 3, DRY - 2, FAN - 7
|
|
277
278
|
|
|
278
279
|
//accessory
|
|
279
280
|
const debug = this.enableDebugMode ? this.emit('debug', `Prepare accessory`) : false;
|
|
@@ -300,7 +301,7 @@ class DeviceAta extends EventEmitter {
|
|
|
300
301
|
this.melCloudService.setPrimaryService(true);
|
|
301
302
|
this.melCloudService.getCharacteristic(Characteristic.Active)
|
|
302
303
|
.onGet(async () => {
|
|
303
|
-
const state =
|
|
304
|
+
const state = mielHvac.power;
|
|
304
305
|
return state;
|
|
305
306
|
})
|
|
306
307
|
.onSet(async (state) => {
|
|
@@ -315,17 +316,17 @@ class DeviceAta extends EventEmitter {
|
|
|
315
316
|
});
|
|
316
317
|
this.melCloudService.getCharacteristic(Characteristic.CurrentHeaterCoolerState)
|
|
317
318
|
.onGet(async () => {
|
|
318
|
-
const value =
|
|
319
|
+
const value = mielHvac.currentOperationMode;
|
|
319
320
|
return value;
|
|
320
321
|
});
|
|
321
322
|
this.melCloudService.getCharacteristic(Characteristic.TargetHeaterCoolerState)
|
|
322
323
|
.setProps({
|
|
323
|
-
minValue:
|
|
324
|
-
maxValue:
|
|
325
|
-
validValues:
|
|
324
|
+
minValue: mielHvac.operationModeSetPropsMinValue,
|
|
325
|
+
maxValue: mielHvac.operationModeSetPropsMaxValue,
|
|
326
|
+
validValues: mielHvac.operationModeSetPropsValidValues
|
|
326
327
|
})
|
|
327
328
|
.onGet(async () => {
|
|
328
|
-
const value =
|
|
329
|
+
const value = mielHvac.targetOperationMode; //1 = HEAT, 2 = DRY 3 = COOL, 7 = FAN, 8 = AUTO
|
|
329
330
|
return value;
|
|
330
331
|
})
|
|
331
332
|
.onSet(async (value) => {
|
|
@@ -352,18 +353,18 @@ class DeviceAta extends EventEmitter {
|
|
|
352
353
|
});
|
|
353
354
|
this.melCloudService.getCharacteristic(Characteristic.CurrentTemperature)
|
|
354
355
|
.onGet(async () => {
|
|
355
|
-
const value =
|
|
356
|
+
const value = mielHvac.roomTemperature;
|
|
356
357
|
return value;
|
|
357
358
|
});
|
|
358
359
|
if (modelSupportsFanSpeed) {
|
|
359
360
|
this.melCloudService.getCharacteristic(Characteristic.RotationSpeed)
|
|
360
361
|
.setProps({
|
|
361
362
|
minValue: 0,
|
|
362
|
-
maxValue:
|
|
363
|
+
maxValue: mielHvac.fanSpeedSetPropsMaxValue,
|
|
363
364
|
minStep: 1
|
|
364
365
|
})
|
|
365
366
|
.onGet(async () => {
|
|
366
|
-
const value =
|
|
367
|
+
const value = mielHvac.fanSpeed; //AUTO, 1, 2, 3, 4, 5, 6, OFF
|
|
367
368
|
return value;
|
|
368
369
|
})
|
|
369
370
|
.onSet(async (value) => {
|
|
@@ -403,7 +404,7 @@ class DeviceAta extends EventEmitter {
|
|
|
403
404
|
this.melCloudService.getCharacteristic(Characteristic.SwingMode)
|
|
404
405
|
.onGet(async () => {
|
|
405
406
|
//Vane Horizontal: Auto, 1, 2, 3, 4, 5, 6, 12 = Swing //Vertical: Auto, 1, 2, 3, 4, 5, 7 = Swing
|
|
406
|
-
const value =
|
|
407
|
+
const value = mielHvac.swingMode;
|
|
407
408
|
return value;
|
|
408
409
|
})
|
|
409
410
|
.onSet(async (value) => {
|
|
@@ -420,12 +421,12 @@ class DeviceAta extends EventEmitter {
|
|
|
420
421
|
};
|
|
421
422
|
this.melCloudService.getCharacteristic(Characteristic.CoolingThresholdTemperature)
|
|
422
423
|
.setProps({
|
|
423
|
-
minValue:
|
|
424
|
-
maxValue:
|
|
425
|
-
minStep:
|
|
424
|
+
minValue: mielHvac.minTempCoolDry,
|
|
425
|
+
maxValue: mielHvac.maxTempCoolDry,
|
|
426
|
+
minStep: mielHvac.temperatureIncrement
|
|
426
427
|
})
|
|
427
428
|
.onGet(async () => {
|
|
428
|
-
const value =
|
|
429
|
+
const value = mielHvac.operationMode === 8 ? mielHvac.defaultCoolingSetTemperature : mielHvac.setTemperature;
|
|
429
430
|
return value;
|
|
430
431
|
})
|
|
431
432
|
.onSet(async (value) => {
|
|
@@ -433,7 +434,7 @@ class DeviceAta extends EventEmitter {
|
|
|
433
434
|
deviceData.Device.DefaultCoolingSetTemperature = value;
|
|
434
435
|
deviceData.Device.EffectiveFlags = AirConditioner.EffectiveFlags.SetTemperature;
|
|
435
436
|
await this.melCloudAta.send(deviceData, this.displayMode);
|
|
436
|
-
const info = this.disableLogInfo ? false : this.emit('message', `Set cooling threshold temperature: ${value}${
|
|
437
|
+
const info = this.disableLogInfo ? false : this.emit('message', `Set cooling threshold temperature: ${value}${mielHvac.temperatureUnit}`);
|
|
437
438
|
} catch (error) {
|
|
438
439
|
this.emit('warn', `Set cooling threshold temperature error: ${error}`);
|
|
439
440
|
};
|
|
@@ -441,12 +442,12 @@ class DeviceAta extends EventEmitter {
|
|
|
441
442
|
if (modelSupportsHeat) {
|
|
442
443
|
this.melCloudService.getCharacteristic(Characteristic.HeatingThresholdTemperature)
|
|
443
444
|
.setProps({
|
|
444
|
-
minValue:
|
|
445
|
-
maxValue:
|
|
446
|
-
minStep:
|
|
445
|
+
minValue: mielHvac.minTempHeat,
|
|
446
|
+
maxValue: mielHvac.maxTempHeat,
|
|
447
|
+
minStep: mielHvac.temperatureIncrement
|
|
447
448
|
})
|
|
448
449
|
.onGet(async () => {
|
|
449
|
-
const value =
|
|
450
|
+
const value = mielHvac.operationMode === 8 ? mielHvac.defaultHeatingSetTemperature : mielHvac.setTemperature;
|
|
450
451
|
return value;
|
|
451
452
|
})
|
|
452
453
|
.onSet(async (value) => {
|
|
@@ -454,7 +455,7 @@ class DeviceAta extends EventEmitter {
|
|
|
454
455
|
deviceData.Device.DefaultHeatingSetTemperature = value;
|
|
455
456
|
deviceData.Device.EffectiveFlags = AirConditioner.EffectiveFlags.SetTemperature;
|
|
456
457
|
await this.melCloudAta.send(deviceData, this.displayMode);
|
|
457
|
-
const info = this.disableLogInfo ? false : this.emit('message', `Set heating threshold temperature: ${value}${
|
|
458
|
+
const info = this.disableLogInfo ? false : this.emit('message', `Set heating threshold temperature: ${value}${mielHvac.temperatureUnit}`);
|
|
458
459
|
} catch (error) {
|
|
459
460
|
this.emit('warn', `Set heating threshold temperature error: ${error}`);
|
|
460
461
|
};
|
|
@@ -462,7 +463,7 @@ class DeviceAta extends EventEmitter {
|
|
|
462
463
|
};
|
|
463
464
|
this.melCloudService.getCharacteristic(Characteristic.LockPhysicalControls)
|
|
464
465
|
.onGet(async () => {
|
|
465
|
-
const value =
|
|
466
|
+
const value = mielHvac.lockPhysicalControl;
|
|
466
467
|
return value;
|
|
467
468
|
})
|
|
468
469
|
.onSet(async (value) => {
|
|
@@ -480,14 +481,14 @@ class DeviceAta extends EventEmitter {
|
|
|
480
481
|
});
|
|
481
482
|
this.melCloudService.getCharacteristic(Characteristic.TemperatureDisplayUnits)
|
|
482
483
|
.onGet(async () => {
|
|
483
|
-
const value =
|
|
484
|
+
const value = mielHvac.useFahrenheit;
|
|
484
485
|
return value;
|
|
485
486
|
})
|
|
486
487
|
.onSet(async (value) => {
|
|
487
488
|
try {
|
|
488
489
|
accountInfo.UseFahrenheit = [false, true][value];
|
|
489
490
|
await this.melCloud.send(accountInfo);
|
|
490
|
-
|
|
491
|
+
mielHvac.useFahrenheit = value;
|
|
491
492
|
const info = this.disableLogInfo ? false : this.emit('message', `Set temperature display unit: ${TemperatureDisplayUnits[value]}`);
|
|
492
493
|
} catch (error) {
|
|
493
494
|
this.emit('warn', `Set temperature display unit error: ${error}`);
|
|
@@ -501,17 +502,17 @@ class DeviceAta extends EventEmitter {
|
|
|
501
502
|
this.melCloudService.setPrimaryService(true);
|
|
502
503
|
this.melCloudService.getCharacteristic(Characteristic.CurrentHeatingCoolingState)
|
|
503
504
|
.onGet(async () => {
|
|
504
|
-
const value =
|
|
505
|
+
const value = mielHvac.currentOperationMode;
|
|
505
506
|
return value;
|
|
506
507
|
});
|
|
507
508
|
this.melCloudService.getCharacteristic(Characteristic.TargetHeatingCoolingState)
|
|
508
509
|
.setProps({
|
|
509
|
-
minValue:
|
|
510
|
-
maxValue:
|
|
511
|
-
validValues:
|
|
510
|
+
minValue: mielHvac.operationModeSetPropsMinValue,
|
|
511
|
+
maxValue: mielHvac.operationModeSetPropsMaxValue,
|
|
512
|
+
validValues: mielHvac.operationModeSetPropsValidValues
|
|
512
513
|
})
|
|
513
514
|
.onGet(async () => {
|
|
514
|
-
const value =
|
|
515
|
+
const value = mielHvac.targetOperationMode; //1 = HEAT, 2 = DRY 3 = COOL, 7 = FAN, 8 = AUTO
|
|
515
516
|
return value;
|
|
516
517
|
})
|
|
517
518
|
.onSet(async (value) => {
|
|
@@ -547,17 +548,17 @@ class DeviceAta extends EventEmitter {
|
|
|
547
548
|
});
|
|
548
549
|
this.melCloudService.getCharacteristic(Characteristic.CurrentTemperature)
|
|
549
550
|
.onGet(async () => {
|
|
550
|
-
const value =
|
|
551
|
+
const value = mielHvac.roomTemperature;
|
|
551
552
|
return value;
|
|
552
553
|
});
|
|
553
554
|
this.melCloudService.getCharacteristic(Characteristic.TargetTemperature)
|
|
554
555
|
.setProps({
|
|
555
|
-
minValue:
|
|
556
|
-
maxValue:
|
|
557
|
-
minStep:
|
|
556
|
+
minValue: mielHvac.minTempHeat,
|
|
557
|
+
maxValue: mielHvac.maxTempHeat,
|
|
558
|
+
minStep: mielHvac.temperatureIncrement
|
|
558
559
|
})
|
|
559
560
|
.onGet(async () => {
|
|
560
|
-
const value =
|
|
561
|
+
const value = mielHvac.setTemperature;
|
|
561
562
|
return value;
|
|
562
563
|
})
|
|
563
564
|
.onSet(async (value) => {
|
|
@@ -565,21 +566,21 @@ class DeviceAta extends EventEmitter {
|
|
|
565
566
|
deviceData.Device.SetTemperature = value;
|
|
566
567
|
deviceData.Device.EffectiveFlags = AirConditioner.EffectiveFlags.SetTemperature;
|
|
567
568
|
await this.melCloudAta.send(deviceData, this.displayMode);
|
|
568
|
-
const info = this.disableLogInfo ? false : this.emit('message', `Set temperature: ${value}${
|
|
569
|
+
const info = this.disableLogInfo ? false : this.emit('message', `Set temperature: ${value}${mielHvac.temperatureUnit}`);
|
|
569
570
|
} catch (error) {
|
|
570
571
|
this.emit('warn', `Set temperature error: ${error}`);
|
|
571
572
|
};
|
|
572
573
|
});
|
|
573
574
|
this.melCloudService.getCharacteristic(Characteristic.TemperatureDisplayUnits)
|
|
574
575
|
.onGet(async () => {
|
|
575
|
-
const value =
|
|
576
|
+
const value = mielHvac.useFahrenheit;
|
|
576
577
|
return value;
|
|
577
578
|
})
|
|
578
579
|
.onSet(async (value) => {
|
|
579
580
|
try {
|
|
580
581
|
accountInfo.UseFahrenheit = [false, true][value];
|
|
581
582
|
await this.melCloud.send(accountInfo);
|
|
582
|
-
|
|
583
|
+
mielHvac.useFahrenheit = value;
|
|
583
584
|
const info = this.disableLogInfo ? false : this.emit('message', `Set temperature display unit: ${TemperatureDisplayUnits[value]}`);
|
|
584
585
|
} catch (error) {
|
|
585
586
|
this.emit('warn', `Set temperature display unit error: ${error}`);
|
|
@@ -590,7 +591,7 @@ class DeviceAta extends EventEmitter {
|
|
|
590
591
|
};
|
|
591
592
|
|
|
592
593
|
//temperature sensor services
|
|
593
|
-
if (this.temperatureSensor &&
|
|
594
|
+
if (this.temperatureSensor && mielHvac.roomTemperature !== null) {
|
|
594
595
|
const debug = this.enableDebugMode ? this.emit('debug', `Prepare room temperature sensor service`) : false;
|
|
595
596
|
this.roomTemperatureSensorService = new Service.TemperatureSensor(`${serviceName} Room`, `Room Temperature Sensor ${deviceId}`);
|
|
596
597
|
this.roomTemperatureSensorService.addOptionalCharacteristic(Characteristic.ConfiguredName);
|
|
@@ -602,13 +603,13 @@ class DeviceAta extends EventEmitter {
|
|
|
602
603
|
minStep: 0.5
|
|
603
604
|
})
|
|
604
605
|
.onGet(async () => {
|
|
605
|
-
const state =
|
|
606
|
+
const state = mielHvac.roomTemperature;
|
|
606
607
|
return state;
|
|
607
608
|
})
|
|
608
609
|
accessory.addService(this.roomTemperatureSensorService);
|
|
609
610
|
};
|
|
610
611
|
|
|
611
|
-
if (this.temperatureSensorOutdoor && hasOutdoorTemperature &&
|
|
612
|
+
if (this.temperatureSensorOutdoor && hasOutdoorTemperature && mielHvac.outdoorTemperature !== null) {
|
|
612
613
|
const debug = this.enableDebugMode ? this.emit('debug', `Prepare outdoor temperature sensor service`) : false;
|
|
613
614
|
this.outdoorTemperatureSensorService = new Service.TemperatureSensor(`${serviceName} Outdoor`, `Outdoor Temperature Sensor ${deviceId}`);
|
|
614
615
|
this.outdoorTemperatureSensorService.addOptionalCharacteristic(Characteristic.ConfiguredName);
|
|
@@ -620,7 +621,7 @@ class DeviceAta extends EventEmitter {
|
|
|
620
621
|
minStep: 0.5
|
|
621
622
|
})
|
|
622
623
|
.onGet(async () => {
|
|
623
|
-
const state =
|
|
624
|
+
const state = mielHvac.outdoorTemperature;
|
|
624
625
|
return state;
|
|
625
626
|
})
|
|
626
627
|
accessory.addService(this.outdoorTemperatureSensorService);
|
package/src/deviceatw.js
CHANGED
|
@@ -287,19 +287,20 @@ class DeviceAtw extends EventEmitter {
|
|
|
287
287
|
//prepare accessory
|
|
288
288
|
async prepareAccessory(accountInfo, deviceData, deviceId, deviceTypeText, deviceName, accountName) {
|
|
289
289
|
try {
|
|
290
|
-
const
|
|
291
|
-
const
|
|
292
|
-
const
|
|
293
|
-
const
|
|
294
|
-
const
|
|
295
|
-
const
|
|
296
|
-
const
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
const
|
|
300
|
-
const
|
|
301
|
-
const
|
|
302
|
-
const
|
|
290
|
+
const mielHvac = this.mielHvac;
|
|
291
|
+
const presetsOnServer = mielHvac.presets;
|
|
292
|
+
const zonesCount = mielHvac.zonesCount;
|
|
293
|
+
const caseHeatPump = mielHvac.caseHeatPump;
|
|
294
|
+
const caseZone1 = mielHvac.caseZone1;
|
|
295
|
+
const caseHotWater = mielHvac.caseHotWater;
|
|
296
|
+
const caseZone2 = mielHvac.caseZone2;
|
|
297
|
+
const heatCoolModes = mielHvac.heatCoolModes;
|
|
298
|
+
|
|
299
|
+
const zonesSensorsCount = mielHvac.sensorsCount;
|
|
300
|
+
const caseHeatPumpSensor = mielHvac.caseHeatPumpSensor;
|
|
301
|
+
const caseZone1Sensor = mielHvac.caseZone1Sensor;
|
|
302
|
+
const caseHotWaterSensor = mielHvac.caseHotWaterSensor;
|
|
303
|
+
const caseZone2Sensor = mielHvac.caseZone2Sensor;
|
|
303
304
|
|
|
304
305
|
//accessory
|
|
305
306
|
const debug = this.enableDebugMode ? this.emit('debug', `Prepare accessory`) : false;
|
|
@@ -320,7 +321,7 @@ class DeviceAtw extends EventEmitter {
|
|
|
320
321
|
//services
|
|
321
322
|
if (zonesCount > 0) {
|
|
322
323
|
this.melCloudServices = [];
|
|
323
|
-
|
|
324
|
+
mielHvac.zones.forEach((zone, i) => {
|
|
324
325
|
const zoneName = zone.name
|
|
325
326
|
const serviceName = `${deviceTypeText} ${accessoryName}: ${zoneName}`;
|
|
326
327
|
switch (this.displayMode) {
|
|
@@ -330,7 +331,7 @@ class DeviceAtw extends EventEmitter {
|
|
|
330
331
|
melCloudService.setPrimaryService(true);
|
|
331
332
|
melCloudService.getCharacteristic(Characteristic.Active)
|
|
332
333
|
.onGet(async () => {
|
|
333
|
-
const state =
|
|
334
|
+
const state = mielHvac.power;
|
|
334
335
|
return state;
|
|
335
336
|
})
|
|
336
337
|
.onSet(async (state) => {
|
|
@@ -383,7 +384,7 @@ class DeviceAtw extends EventEmitter {
|
|
|
383
384
|
deviceData.Device.EffectiveFlags = HeatPump.EffectiveFlags.Power + HeatPump.EffectiveFlags.OperationMode;
|
|
384
385
|
break;
|
|
385
386
|
};
|
|
386
|
-
operationModeText = [HeatPump.System[0], HeatPump.System[deviceData.Device.UnitStatus]][
|
|
387
|
+
operationModeText = [HeatPump.System[0], HeatPump.System[deviceData.Device.UnitStatus]][mielHvac.power];
|
|
387
388
|
break;
|
|
388
389
|
case caseZone1: //Zone 1 - HEAT THERMOSTAT, HEAT FLOW, HEAT CURVE, COOL THERMOSTAT, COOL FLOW, FLOOR DRY UP
|
|
389
390
|
switch (value) {
|
|
@@ -460,7 +461,7 @@ class DeviceAtw extends EventEmitter {
|
|
|
460
461
|
.setProps({
|
|
461
462
|
minValue: zone.temperaturesSetPropsMinValue,
|
|
462
463
|
maxValue: zone.temperaturesSetPropsMaxValue,
|
|
463
|
-
minStep:
|
|
464
|
+
minStep: mielHvac.temperatureIncrement
|
|
464
465
|
})
|
|
465
466
|
.onGet(async () => {
|
|
466
467
|
const value = zone.setTemperature;
|
|
@@ -512,7 +513,7 @@ class DeviceAtw extends EventEmitter {
|
|
|
512
513
|
};
|
|
513
514
|
|
|
514
515
|
const set = i > 0 ? await this.melCloudAtw.send(deviceData) : false;
|
|
515
|
-
const info = this.disableLogInfo || i === 0 ? false : this.emit('message', `${zoneName}, Set cooling threshold temperature: ${value}${
|
|
516
|
+
const info = this.disableLogInfo || i === 0 ? false : this.emit('message', `${zoneName}, Set cooling threshold temperature: ${value}${mielHvac.temperatureUnit}`);
|
|
516
517
|
} catch (error) {
|
|
517
518
|
this.emit('warn', `${zoneName}, Set cooling threshold temperature error: ${error}`);
|
|
518
519
|
};
|
|
@@ -524,7 +525,7 @@ class DeviceAtw extends EventEmitter {
|
|
|
524
525
|
.setProps({
|
|
525
526
|
minValue: zone.temperaturesSetPropsMinValue,
|
|
526
527
|
maxValue: zone.temperaturesSetPropsMaxValue,
|
|
527
|
-
minStep:
|
|
528
|
+
minStep: mielHvac.temperatureIncrement
|
|
528
529
|
})
|
|
529
530
|
.onGet(async () => {
|
|
530
531
|
const value = zone.setTemperature;
|
|
@@ -576,7 +577,7 @@ class DeviceAtw extends EventEmitter {
|
|
|
576
577
|
};
|
|
577
578
|
|
|
578
579
|
const set = i > 0 ? await this.melCloudAtw.send(deviceData) : false;
|
|
579
|
-
const info = this.disableLogInfo || i === 0 ? false : this.emit('message', `${zoneName}, Set heating threshold temperature: ${value}${
|
|
580
|
+
const info = this.disableLogInfo || i === 0 ? false : this.emit('message', `${zoneName}, Set heating threshold temperature: ${value}${mielHvac.temperatureUnit}`);
|
|
580
581
|
} catch (error) {
|
|
581
582
|
this.emit('warn', `${zoneName}, Set heating threshold temperature error: ${error}`);
|
|
582
583
|
};
|
|
@@ -619,14 +620,14 @@ class DeviceAtw extends EventEmitter {
|
|
|
619
620
|
});
|
|
620
621
|
melCloudService.getCharacteristic(Characteristic.TemperatureDisplayUnits)
|
|
621
622
|
.onGet(async () => {
|
|
622
|
-
const value =
|
|
623
|
+
const value = mielHvac.useFahrenheit;
|
|
623
624
|
return value;
|
|
624
625
|
})
|
|
625
626
|
.onSet(async (value) => {
|
|
626
627
|
try {
|
|
627
628
|
accountInfo.UseFahrenheit = [false, true][value];
|
|
628
629
|
await this.melCloud.send(accountInfo);
|
|
629
|
-
|
|
630
|
+
mielHvac.useFahrenheit = value;
|
|
630
631
|
const info = this.disableLogInfo ? false : this.emit('message', `Set temperature display unit: ${TemperatureDisplayUnits[value]}`);
|
|
631
632
|
} catch (error) {
|
|
632
633
|
this.emit('warn', `Set temperature display unit error: ${error}`);
|
|
@@ -679,7 +680,7 @@ class DeviceAtw extends EventEmitter {
|
|
|
679
680
|
deviceData.Device.EffectiveFlags = HeatPump.EffectiveFlags.Power;
|
|
680
681
|
break;
|
|
681
682
|
};
|
|
682
|
-
operationModeText = [HeatPump.System[0], HeatPump.System[deviceData.Device.UnitStatus]][
|
|
683
|
+
operationModeText = [HeatPump.System[0], HeatPump.System[deviceData.Device.UnitStatus]][mielHvac.power];
|
|
683
684
|
break;
|
|
684
685
|
case caseZone1: //Zone 1 - HEAT THERMOSTAT, HEAT FLOW, HEAT CURVE, COOL THERMOSTAT, COOL FLOW, FLOOR DRY UP
|
|
685
686
|
switch (value) {
|
|
@@ -766,7 +767,7 @@ class DeviceAtw extends EventEmitter {
|
|
|
766
767
|
.setProps({
|
|
767
768
|
minValue: zone.temperaturesSetPropsMinValue,
|
|
768
769
|
maxValue: zone.temperaturesSetPropsMaxValue,
|
|
769
|
-
minStep:
|
|
770
|
+
minStep: mielHvac.temperatureIncrement
|
|
770
771
|
})
|
|
771
772
|
.onGet(async () => {
|
|
772
773
|
const value = zone.setTemperature;
|
|
@@ -794,21 +795,21 @@ class DeviceAtw extends EventEmitter {
|
|
|
794
795
|
};
|
|
795
796
|
|
|
796
797
|
const set = i > 0 ? await this.melCloudAtw.send(deviceData) : false;
|
|
797
|
-
const info = this.disableLogInfo || i === 0 ? false : this.emit('message', `${zoneName}, Set temperature: ${value}${
|
|
798
|
+
const info = this.disableLogInfo || i === 0 ? false : this.emit('message', `${zoneName}, Set temperature: ${value}${mielHvac.temperatureUnit}`);
|
|
798
799
|
} catch (error) {
|
|
799
800
|
this.emit('warn', `${zoneName}, Set temperature error: ${error}`);
|
|
800
801
|
};
|
|
801
802
|
});
|
|
802
803
|
melCloudServiceT.getCharacteristic(Characteristic.TemperatureDisplayUnits)
|
|
803
804
|
.onGet(async () => {
|
|
804
|
-
const value =
|
|
805
|
+
const value = mielHvac.useFahrenheit;
|
|
805
806
|
return value;
|
|
806
807
|
})
|
|
807
808
|
.onSet(async (value) => {
|
|
808
809
|
try {
|
|
809
810
|
accountInfo.UseFahrenheit = [false, true][value];
|
|
810
811
|
await this.melCloud.send(accountInfo);
|
|
811
|
-
|
|
812
|
+
mielHvac.useFahrenheit = value;
|
|
812
813
|
const info = this.disableLogInfo ? false : this.emit('message', `Set temperature display unit: ${TemperatureDisplayUnits[value]}`);
|
|
813
814
|
} catch (error) {
|
|
814
815
|
this.emit('warn', `Set temperature display unit error: ${error}`);
|
|
@@ -823,7 +824,7 @@ class DeviceAtw extends EventEmitter {
|
|
|
823
824
|
|
|
824
825
|
//sensor services
|
|
825
826
|
if (zonesSensorsCount > 0) {
|
|
826
|
-
|
|
827
|
+
mielHvac.zonesSensors.forEach((zone, i) => {
|
|
827
828
|
const zoneName = zone.name
|
|
828
829
|
const serviceName = `${deviceTypeText} ${accessoryName}: ${zoneName}`;
|
|
829
830
|
switch (i) {
|
package/src/deviceerv.js
CHANGED
|
@@ -249,18 +249,19 @@ class DeviceErv extends EventEmitter {
|
|
|
249
249
|
//prepare accessory
|
|
250
250
|
async prepareAccessory(accountInfo, deviceData, deviceId, deviceTypeText, deviceName, accountName) {
|
|
251
251
|
try {
|
|
252
|
-
const
|
|
253
|
-
const
|
|
254
|
-
const
|
|
255
|
-
const
|
|
256
|
-
const
|
|
257
|
-
const
|
|
258
|
-
const
|
|
259
|
-
const
|
|
260
|
-
const
|
|
261
|
-
const
|
|
262
|
-
const
|
|
263
|
-
const
|
|
252
|
+
const mielHvac = this.mielHvac;
|
|
253
|
+
const presetsOnServer = mielHvac.presets;
|
|
254
|
+
const hasRoomTemperature = mielHvac.hasRoomTemperature;
|
|
255
|
+
const hasSupplyTemperature = mielHvac.hasSupplyTemperature;
|
|
256
|
+
const hasOutdoorTemperature = mielHvac.hasOutdoorTemperature;
|
|
257
|
+
const hasCoolOperationMode = mielHvac.hasCoolOperationMode;
|
|
258
|
+
const hasHeatOperationMode = mielHvac.hasHeatOperationMode;
|
|
259
|
+
const hasAutoVentilationMode = mielHvac.hasAutoVentilationMode;
|
|
260
|
+
const hasBypassVentilationMode = mielHvac.hasBypassVentilationMode;
|
|
261
|
+
const hasAutomaticFanSpeed = mielHvac.hasAutomaticFanSpeed;
|
|
262
|
+
const hasCO2Sensor = mielHvac.hasCO2Sensor;
|
|
263
|
+
const hasPM25Sensor = mielHvac.hasPM25Sensor;
|
|
264
|
+
const numberOfFanSpeeds = mielHvac.numberOfFanSpeeds;
|
|
264
265
|
|
|
265
266
|
//accessory
|
|
266
267
|
const debug = this.enableDebugMode ? this.emit('debug', `Prepare accessory`) : false;
|
|
@@ -287,7 +288,7 @@ class DeviceErv extends EventEmitter {
|
|
|
287
288
|
this.melCloudService.setPrimaryService(true);
|
|
288
289
|
this.melCloudService.getCharacteristic(Characteristic.Active)
|
|
289
290
|
.onGet(async () => {
|
|
290
|
-
const state =
|
|
291
|
+
const state = mielHvac.power;
|
|
291
292
|
return state;
|
|
292
293
|
})
|
|
293
294
|
.onSet(async (state) => {
|
|
@@ -302,17 +303,17 @@ class DeviceErv extends EventEmitter {
|
|
|
302
303
|
});
|
|
303
304
|
this.melCloudService.getCharacteristic(Characteristic.CurrentHeaterCoolerState)
|
|
304
305
|
.onGet(async () => {
|
|
305
|
-
const value =
|
|
306
|
+
const value = mielHvac.currentOperationMode;
|
|
306
307
|
return value;
|
|
307
308
|
});
|
|
308
309
|
this.melCloudService.getCharacteristic(Characteristic.TargetHeaterCoolerState)
|
|
309
310
|
.setProps({
|
|
310
|
-
minValue:
|
|
311
|
-
maxValue:
|
|
312
|
-
validValues:
|
|
311
|
+
minValue: mielHvac.operationModeSetPropsMinValue,
|
|
312
|
+
maxValue: mielHvac.operationModeSetPropsMaxValue,
|
|
313
|
+
validValues: mielHvac.operationModeSetPropsValidValues
|
|
313
314
|
})
|
|
314
315
|
.onGet(async () => {
|
|
315
|
-
const value =
|
|
316
|
+
const value = mielHvac.targetOperationMode ?? 0; //LOSSNAY, BYPASS, AUTO
|
|
316
317
|
return value;
|
|
317
318
|
})
|
|
318
319
|
.onSet(async (value) => {
|
|
@@ -339,17 +340,17 @@ class DeviceErv extends EventEmitter {
|
|
|
339
340
|
});
|
|
340
341
|
this.melCloudService.getCharacteristic(Characteristic.CurrentTemperature)
|
|
341
342
|
.onGet(async () => {
|
|
342
|
-
const value =
|
|
343
|
+
const value = mielHvac.roomTemperature;
|
|
343
344
|
return value;
|
|
344
345
|
});
|
|
345
346
|
this.melCloudService.getCharacteristic(Characteristic.RotationSpeed)
|
|
346
347
|
.setProps({
|
|
347
348
|
minValue: 0,
|
|
348
|
-
maxValue:
|
|
349
|
+
maxValue: mielHvac.fanSpeedSetPropsMaxValue,
|
|
349
350
|
minStep: 1
|
|
350
351
|
})
|
|
351
352
|
.onGet(async () => {
|
|
352
|
-
const value =
|
|
353
|
+
const value = mielHvac.fanSpeed; //STOP, 1, 2, 3, 4, OFF
|
|
353
354
|
return value;
|
|
354
355
|
})
|
|
355
356
|
.onSet(async (value) => {
|
|
@@ -384,12 +385,12 @@ class DeviceErv extends EventEmitter {
|
|
|
384
385
|
if (hasAutoVentilationMode && hasCoolOperationMode) {
|
|
385
386
|
this.melCloudService.getCharacteristic(Characteristic.CoolingThresholdTemperature)
|
|
386
387
|
.setProps({
|
|
387
|
-
minValue:
|
|
388
|
-
maxValue:
|
|
389
|
-
minStep:
|
|
388
|
+
minValue: mielHvac.minTempCoolDry,
|
|
389
|
+
maxValue: mielHvac.maxTempCoolDry,
|
|
390
|
+
minStep: mielHvac.temperatureIncrement
|
|
390
391
|
})
|
|
391
392
|
.onGet(async () => {
|
|
392
|
-
const value =
|
|
393
|
+
const value = mielHvac.ventilationMode === 2 ? mielHvac.defaultHeatingSetTemperature : mielHvac.setTemperature;
|
|
393
394
|
return value;
|
|
394
395
|
})
|
|
395
396
|
.onSet(async (value) => {
|
|
@@ -397,7 +398,7 @@ class DeviceErv extends EventEmitter {
|
|
|
397
398
|
deviceData.Device.DefaultCoolingSetTemperature = value;
|
|
398
399
|
deviceData.Device.EffectiveFlags = Ventilation.EffectiveFlags.SetTemperature;
|
|
399
400
|
await this.melCloudErv.send(deviceData, this.displayMode);
|
|
400
|
-
const info = this.disableLogInfo ? false : this.emit('message', `Set cooling threshold temperature: ${value}${
|
|
401
|
+
const info = this.disableLogInfo ? false : this.emit('message', `Set cooling threshold temperature: ${value}${mielHvac.temperatureUnit}`);
|
|
401
402
|
} catch (error) {
|
|
402
403
|
this.emit('warn', `Set cooling threshold temperature error: ${error}`);
|
|
403
404
|
};
|
|
@@ -407,12 +408,12 @@ class DeviceErv extends EventEmitter {
|
|
|
407
408
|
if (hasAutoVentilationMode && hasHeatOperationMode) {
|
|
408
409
|
this.melCloudService.getCharacteristic(Characteristic.HeatingThresholdTemperature)
|
|
409
410
|
.setProps({
|
|
410
|
-
minValue:
|
|
411
|
-
maxValue:
|
|
412
|
-
minStep:
|
|
411
|
+
minValue: mielHvac.minTempHeat,
|
|
412
|
+
maxValue: mielHvac.maxTempHeat,
|
|
413
|
+
minStep: mielHvac.temperatureIncrement
|
|
413
414
|
})
|
|
414
415
|
.onGet(async () => {
|
|
415
|
-
const value =
|
|
416
|
+
const value = mielHvac.ventilationMode === 2 ? mielHvac.defaultHeatingSetTemperature : mielHvac.setTemperature;
|
|
416
417
|
return value;
|
|
417
418
|
})
|
|
418
419
|
.onSet(async (value) => {
|
|
@@ -420,7 +421,7 @@ class DeviceErv extends EventEmitter {
|
|
|
420
421
|
deviceData.Device.DefaultHeatingSetTemperature = value;
|
|
421
422
|
deviceData.Device.EffectiveFlags = Ventilation.EffectiveFlags.SetTemperature;
|
|
422
423
|
await this.melCloudErv.send(deviceData, this.displayMode);
|
|
423
|
-
const info = this.disableLogInfo ? false : this.emit('message', `Set heating threshold temperature: ${value}${
|
|
424
|
+
const info = this.disableLogInfo ? false : this.emit('message', `Set heating threshold temperature: ${value}${mielHvac.temperatureUnit}`);
|
|
424
425
|
} catch (error) {
|
|
425
426
|
this.emit('warn', `Set heating threshold temperature error: ${error}`);
|
|
426
427
|
};
|
|
@@ -428,7 +429,7 @@ class DeviceErv extends EventEmitter {
|
|
|
428
429
|
};
|
|
429
430
|
//this.melCloudService.getCharacteristic(Characteristic.LockPhysicalControls)
|
|
430
431
|
// .onGet(async () => {
|
|
431
|
-
// const value =
|
|
432
|
+
// const value = mielHvac.lockPhysicalControl;
|
|
432
433
|
// const info = this.disableLogInfo ? false : this.emit('message', `Lock physical controls: ${value ? 'LOCKED' : 'UNLOCKED'}`);
|
|
433
434
|
// return value;
|
|
434
435
|
// })
|
|
@@ -445,14 +446,14 @@ class DeviceErv extends EventEmitter {
|
|
|
445
446
|
// });
|
|
446
447
|
this.melCloudService.getCharacteristic(Characteristic.TemperatureDisplayUnits)
|
|
447
448
|
.onGet(async () => {
|
|
448
|
-
const value =
|
|
449
|
+
const value = mielHvac.useFahrenheit;
|
|
449
450
|
return value;
|
|
450
451
|
})
|
|
451
452
|
.onSet(async (value) => {
|
|
452
453
|
try {
|
|
453
454
|
accountInfo.UseFahrenheit = [false, true][value];
|
|
454
455
|
await this.melCloud.send(accountInfo);
|
|
455
|
-
|
|
456
|
+
mielHvac.useFahrenheit = value;
|
|
456
457
|
const info = this.disableLogInfo ? false : this.emit('message', `Set temperature display unit: ${TemperatureDisplayUnits[value]}`);
|
|
457
458
|
} catch (error) {
|
|
458
459
|
this.emit('warn', `Set temperature display unit error: ${error}`);
|
|
@@ -466,17 +467,17 @@ class DeviceErv extends EventEmitter {
|
|
|
466
467
|
this.melCloudService.setPrimaryService(true);
|
|
467
468
|
this.melCloudService.getCharacteristic(Characteristic.CurrentHeatingCoolingState)
|
|
468
469
|
.onGet(async () => {
|
|
469
|
-
const value =
|
|
470
|
+
const value = mielHvac.currentOperationMode;
|
|
470
471
|
return value;
|
|
471
472
|
});
|
|
472
473
|
this.melCloudService.getCharacteristic(Characteristic.TargetHeatingCoolingState)
|
|
473
474
|
.setProps({
|
|
474
|
-
minValue:
|
|
475
|
-
maxValue:
|
|
476
|
-
validValues:
|
|
475
|
+
minValue: mielHvac.operationModeSetPropsMinValue,
|
|
476
|
+
maxValue: mielHvac.operationModeSetPropsMaxValue,
|
|
477
|
+
validValues: mielHvac.operationModeSetPropsValidValues
|
|
477
478
|
})
|
|
478
479
|
.onGet(async () => {
|
|
479
|
-
const value =
|
|
480
|
+
const value = mielHvac.targetOperationMode ?? 0; //LOSSNAY, BYPASS, AUTO
|
|
480
481
|
return value;
|
|
481
482
|
})
|
|
482
483
|
.onSet(async (value) => {
|
|
@@ -512,17 +513,17 @@ class DeviceErv extends EventEmitter {
|
|
|
512
513
|
});
|
|
513
514
|
this.melCloudService.getCharacteristic(Characteristic.CurrentTemperature)
|
|
514
515
|
.onGet(async () => {
|
|
515
|
-
const value =
|
|
516
|
+
const value = mielHvac.roomTemperature;
|
|
516
517
|
return value;
|
|
517
518
|
});
|
|
518
519
|
this.melCloudService.getCharacteristic(Characteristic.TargetTemperature)
|
|
519
520
|
.setProps({
|
|
520
|
-
minValue:
|
|
521
|
-
maxValue:
|
|
522
|
-
minStep:
|
|
521
|
+
minValue: mielHvac.minTempHeat,
|
|
522
|
+
maxValue: mielHvac.maxTempHeat,
|
|
523
|
+
minStep: mielHvac.temperatureIncrement
|
|
523
524
|
})
|
|
524
525
|
.onGet(async () => {
|
|
525
|
-
const value =
|
|
526
|
+
const value = mielHvac.setTemperature;
|
|
526
527
|
return value;
|
|
527
528
|
})
|
|
528
529
|
.onSet(async (value) => {
|
|
@@ -530,21 +531,21 @@ class DeviceErv extends EventEmitter {
|
|
|
530
531
|
deviceData.Device.SetTemperature = value;
|
|
531
532
|
deviceData.Device.EffectiveFlags = Ventilation.EffectiveFlags.SetTemperature;
|
|
532
533
|
await this.melCloudErv.send(deviceData, this.displayMode);
|
|
533
|
-
const info = this.disableLogInfo ? false : this.emit('message', `Set temperature: ${value}${
|
|
534
|
+
const info = this.disableLogInfo ? false : this.emit('message', `Set temperature: ${value}${mielHvac.temperatureUnit}`);
|
|
534
535
|
} catch (error) {
|
|
535
536
|
this.emit('warn', `Set temperature error: ${error}`);
|
|
536
537
|
};
|
|
537
538
|
});
|
|
538
539
|
this.melCloudService.getCharacteristic(Characteristic.TemperatureDisplayUnits)
|
|
539
540
|
.onGet(async () => {
|
|
540
|
-
const value =
|
|
541
|
+
const value = mielHvac.useFahrenheit;
|
|
541
542
|
return value;
|
|
542
543
|
})
|
|
543
544
|
.onSet(async (value) => {
|
|
544
545
|
try {
|
|
545
546
|
accountInfo.UseFahrenheit = [false, true][value];
|
|
546
547
|
await this.melCloud.send(accountInfo);
|
|
547
|
-
|
|
548
|
+
mielHvac.useFahrenheit = value;
|
|
548
549
|
const info = this.disableLogInfo ? false : this.emit('message', `Set temperature display unit: ${TemperatureDisplayUnits[value]}`);
|
|
549
550
|
} catch (error) {
|
|
550
551
|
this.emit('warn', `Set temperature display unit error: ${error}`);
|
|
@@ -555,7 +556,7 @@ class DeviceErv extends EventEmitter {
|
|
|
555
556
|
};
|
|
556
557
|
|
|
557
558
|
//temperature sensor service room
|
|
558
|
-
if (this.temperatureSensor && hasRoomTemperature &&
|
|
559
|
+
if (this.temperatureSensor && hasRoomTemperature && mielHvac.roomTemperature !== null) {
|
|
559
560
|
const debug = this.enableDebugMode ? this.emit('debug', `Prepare room temperature sensor service`) : false;
|
|
560
561
|
this.roomTemperatureSensorService = new Service.TemperatureSensor(`${serviceName} Room`, `Room Temperature Sensor ${deviceId}`);
|
|
561
562
|
this.roomTemperatureSensorService.addOptionalCharacteristic(Characteristic.ConfiguredName);
|
|
@@ -567,14 +568,14 @@ class DeviceErv extends EventEmitter {
|
|
|
567
568
|
minStep: 0.5
|
|
568
569
|
})
|
|
569
570
|
.onGet(async () => {
|
|
570
|
-
const state =
|
|
571
|
+
const state = mielHvac.roomTemperature;
|
|
571
572
|
return state;
|
|
572
573
|
})
|
|
573
574
|
accessory.addService(this.roomTemperatureSensorService);
|
|
574
575
|
};
|
|
575
576
|
|
|
576
577
|
//temperature sensor service supply
|
|
577
|
-
if (this.temperatureSensorSupply && hasSupplyTemperature &&
|
|
578
|
+
if (this.temperatureSensorSupply && hasSupplyTemperature && mielHvac.supplyTemperature !== null) {
|
|
578
579
|
const debug = this.enableDebugMode ? this.emit('debug', `Prepare supply temperature sensor service`) : false;
|
|
579
580
|
this.supplyTemperatureSensorService = new Service.TemperatureSensor(`${serviceName} Supply`, `Supply Temperature Sensor ${deviceId}`);
|
|
580
581
|
this.supplyTemperatureSensorService.addOptionalCharacteristic(Characteristic.ConfiguredName);
|
|
@@ -586,14 +587,14 @@ class DeviceErv extends EventEmitter {
|
|
|
586
587
|
minStep: 0.5
|
|
587
588
|
})
|
|
588
589
|
.onGet(async () => {
|
|
589
|
-
const state =
|
|
590
|
+
const state = mielHvac.supplyTemperature;
|
|
590
591
|
return state;
|
|
591
592
|
})
|
|
592
593
|
accessory.addService(this.supplyTemperatureSensorService);
|
|
593
594
|
};
|
|
594
595
|
|
|
595
596
|
//temperature sensor service outdoor
|
|
596
|
-
if (this.temperatureSensorOutdoor && hasOutdoorTemperature &&
|
|
597
|
+
if (this.temperatureSensorOutdoor && hasOutdoorTemperature && mielHvac.outdoorTemperature !== null) {
|
|
597
598
|
const debug = this.enableDebugMode ? this.emit('debug', `Prepare outdoor temperature sensor service`) : false;
|
|
598
599
|
this.outdoorTemperatureSensorService = new Service.TemperatureSensor(`${serviceName} Outdoor`, `Outdoor Temperature Sensor ${deviceId}`);
|
|
599
600
|
this.outdoorTemperatureSensorService.addOptionalCharacteristic(Characteristic.ConfiguredName);
|
|
@@ -605,7 +606,7 @@ class DeviceErv extends EventEmitter {
|
|
|
605
606
|
minStep: 0.5
|
|
606
607
|
})
|
|
607
608
|
.onGet(async () => {
|
|
608
|
-
const state =
|
|
609
|
+
const state = mielHvac.outdoorTemperature;
|
|
609
610
|
return state;
|
|
610
611
|
})
|
|
611
612
|
accessory.addService(this.outdoorTemperatureSensorService);
|
|
@@ -617,7 +618,7 @@ class DeviceErv extends EventEmitter {
|
|
|
617
618
|
this.coreMaintenanceService.setCharacteristic(Characteristic.ConfiguredName, `${serviceName} Core Maintenance`);
|
|
618
619
|
this.coreMaintenanceService.getCharacteristic(Characteristic.FilterChangeIndication)
|
|
619
620
|
.onGet(async () => {
|
|
620
|
-
const value =
|
|
621
|
+
const value = mielHvac.coreMaintenanceRequired;
|
|
621
622
|
return value;
|
|
622
623
|
});
|
|
623
624
|
this.coreMaintenanceService.getCharacteristic(Characteristic.ResetFilterIndication)
|
|
@@ -631,7 +632,7 @@ class DeviceErv extends EventEmitter {
|
|
|
631
632
|
this.filterMaintenanceService.setCharacteristic(Characteristic.ConfiguredName, `${serviceName} Filter Maintenance`);
|
|
632
633
|
this.filterMaintenanceService.getCharacteristic(Characteristic.FilterChangeIndication)
|
|
633
634
|
.onGet(async () => {
|
|
634
|
-
const value =
|
|
635
|
+
const value = mielHvac.filterMaintenanceRequired;
|
|
635
636
|
return value;
|
|
636
637
|
});
|
|
637
638
|
this.filterMaintenanceService.getCharacteristic(Characteristic.ResetFilterIndication)
|
|
@@ -646,12 +647,12 @@ class DeviceErv extends EventEmitter {
|
|
|
646
647
|
this.carbonDioxideSensorService.setCharacteristic(Characteristic.ConfiguredName, `${serviceName} CO2 Sensor`);
|
|
647
648
|
this.carbonDioxideSensorService.getCharacteristic(Characteristic.CarbonDioxideDetected)
|
|
648
649
|
.onGet(async () => {
|
|
649
|
-
const value =
|
|
650
|
+
const value = mielHvac.roomCO2Detected;
|
|
650
651
|
return value;
|
|
651
652
|
});
|
|
652
653
|
this.carbonDioxideSensorService.getCharacteristic(Characteristic.CarbonDioxideLevel)
|
|
653
654
|
.onGet(async () => {
|
|
654
|
-
const value =
|
|
655
|
+
const value = mielHvac.roomCO2Level;
|
|
655
656
|
return value;
|
|
656
657
|
});
|
|
657
658
|
accessory.addService(this.carbonDioxideSensorService);
|
|
@@ -664,12 +665,12 @@ class DeviceErv extends EventEmitter {
|
|
|
664
665
|
this.airQualitySensorService.setCharacteristic(Characteristic.ConfiguredName, `${serviceName} PM2.5 Sensor`);
|
|
665
666
|
this.airQualitySensorService.getCharacteristic(Characteristic.AirQuality)
|
|
666
667
|
.onGet(async () => {
|
|
667
|
-
const value =
|
|
668
|
+
const value = mielHvac.pM25AirQuality;
|
|
668
669
|
return value;
|
|
669
670
|
});
|
|
670
671
|
this.airQualitySensorService.getCharacteristic(Characteristic.PM2_5Density)
|
|
671
672
|
.onGet(async () => {
|
|
672
|
-
const value =
|
|
673
|
+
const value = mielHvac.pM25Level;
|
|
673
674
|
return value;
|
|
674
675
|
});
|
|
675
676
|
accessory.addService(this.airQualitySensorService);
|