homebridge-melcloud-control 3.8.2-beta.1 → 3.8.2-beta.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "displayName": "MELCloud Control",
3
3
  "name": "homebridge-melcloud-control",
4
- "version": "3.8.2-beta.1",
4
+ "version": "3.8.2-beta.3",
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 presetsOnServer = this.mielHvac.presets;
265
- const modelSupportsHeat = this.mielHvac.modelSupportsHeat;
266
- const modelSupportsDry = this.mielHvac.modelSupportsDry;
267
- const modelSupportsCool = this.mielHvac.modelSupportsCool;
268
- const modelSupportsAuto = this.mielHvac.modelSupportsAuto;
269
- const modelSupportsFanSpeed = this.mielHvac.modelSupportsFanSpeed;
270
- const hasAutomaticFanSpeed = this.mielHvac.hasAutomaticFanSpeed;
271
- const hasOutdoorTemperature = this.mielHvac.hasOutdoorTemperature;
272
- const numberOfFanSpeeds = this.mielHvac.numberOfFanSpeeds;
273
- const swingFunction = this.mielHvac.swingFunction;
274
- const autoDryFanMode = [this.mielHvac.operationMode, 8, modelSupportsDry ? 2 : 8, 7][this.autoDryFanMode]; //NONE, AUTO - 8, DRY - 2, FAN - 7
275
- const heatDryFanMode = [this.mielHvac.operationMode, 1, modelSupportsDry ? 2 : 1, 7][this.heatDryFanMode]; //NONE, HEAT - 1, DRY - 2, FAN - 7
276
- const coolDryFanMode = [this.mielHvac.operationMode, 3, modelSupportsDry ? 2 : 3, 7][this.coolDryFanMode]; //NONE, COOL - 3, DRY - 2, FAN - 7
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 = this.mielHvac.power;
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 = this.mielHvac.currentOperationMode;
319
+ const value = mielHvac.currentOperationMode;
319
320
  return value;
320
321
  });
321
322
  this.melCloudService.getCharacteristic(Characteristic.TargetHeaterCoolerState)
322
323
  .setProps({
323
- minValue: this.mielHvac.operationModeSetPropsMinValue,
324
- maxValue: this.mielHvac.operationModeSetPropsMaxValue,
325
- validValues: this.mielHvac.operationModeSetPropsValidValues
324
+ minValue: mielHvac.operationModeSetPropsMinValue,
325
+ maxValue: mielHvac.operationModeSetPropsMaxValue,
326
+ validValues: mielHvac.operationModeSetPropsValidValues
326
327
  })
327
328
  .onGet(async () => {
328
- const value = this.mielHvac.targetOperationMode; //1 = HEAT, 2 = DRY 3 = COOL, 7 = FAN, 8 = AUTO
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 = this.mielHvac.roomTemperature;
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: this.mielHvac.fanSpeedSetPropsMaxValue,
363
+ maxValue: mielHvac.fanSpeedSetPropsMaxValue,
363
364
  minStep: 1
364
365
  })
365
366
  .onGet(async () => {
366
- const value = this.mielHvac.fanSpeed; //AUTO, 1, 2, 3, 4, 5, 6, OFF
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 = this.mielHvac.swingMode;
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: this.mielHvac.minTempCoolDry,
424
- maxValue: this.mielHvac.maxTempCoolDry,
425
- minStep: this.mielHvac.temperatureIncrement
424
+ minValue: mielHvac.minTempCoolDry,
425
+ maxValue: mielHvac.maxTempCoolDry,
426
+ minStep: mielHvac.temperatureIncrement
426
427
  })
427
428
  .onGet(async () => {
428
- const value = this.mielHvac.operationMode === 8 ? this.mielHvac.defaultCoolingSetTemperature : this.mielHvac.setTemperature;
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}${this.mielHvac.temperatureUnit}`);
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: this.mielHvac.minTempHeat,
445
- maxValue: this.mielHvac.maxTempHeat,
446
- minStep: this.mielHvac.temperatureIncrement
445
+ minValue: mielHvac.minTempHeat,
446
+ maxValue: mielHvac.maxTempHeat,
447
+ minStep: mielHvac.temperatureIncrement
447
448
  })
448
449
  .onGet(async () => {
449
- const value = this.mielHvac.operationMode === 8 ? this.mielHvac.defaultHeatingSetTemperature : this.mielHvac.setTemperature;
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}${this.mielHvac.temperatureUnit}`);
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 = this.mielHvac.lockPhysicalControl;
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 = this.mielHvac.useFahrenheit;
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
- this.mielHvac.useFahrenheit = value;
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 = this.mielHvac.currentOperationMode;
505
+ const value = mielHvac.currentOperationMode;
505
506
  return value;
506
507
  });
507
508
  this.melCloudService.getCharacteristic(Characteristic.TargetHeatingCoolingState)
508
509
  .setProps({
509
- minValue: this.mielHvac.operationModeSetPropsMinValue,
510
- maxValue: this.mielHvac.operationModeSetPropsMaxValue,
511
- validValues: this.mielHvac.operationModeSetPropsValidValues
510
+ minValue: mielHvac.operationModeSetPropsMinValue,
511
+ maxValue: mielHvac.operationModeSetPropsMaxValue,
512
+ validValues: mielHvac.operationModeSetPropsValidValues
512
513
  })
513
514
  .onGet(async () => {
514
- const value = this.mielHvac.targetOperationMode; //1 = HEAT, 2 = DRY 3 = COOL, 7 = FAN, 8 = AUTO
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 = this.mielHvac.roomTemperature;
551
+ const value = mielHvac.roomTemperature;
551
552
  return value;
552
553
  });
553
554
  this.melCloudService.getCharacteristic(Characteristic.TargetTemperature)
554
555
  .setProps({
555
- minValue: this.mielHvac.minTempHeat,
556
- maxValue: this.mielHvac.maxTempHeat,
557
- minStep: this.mielHvac.temperatureIncrement
556
+ minValue: mielHvac.minTempHeat,
557
+ maxValue: mielHvac.maxTempHeat,
558
+ minStep: mielHvac.temperatureIncrement
558
559
  })
559
560
  .onGet(async () => {
560
- const value = this.mielHvac.setTemperature;
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}${this.mielHvac.temperatureUnit}`);
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 = this.mielHvac.useFahrenheit;
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
- this.mielHvac.useFahrenheit = value;
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 && this.mielHvac.roomTemperature !== null) {
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 = this.mielHvac.roomTemperature;
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 && this.mielHvac.outdoorTemperature !== null) {
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 = this.mielHvac.outdoorTemperature;
624
+ const state = mielHvac.outdoorTemperature;
624
625
  return state;
625
626
  })
626
627
  accessory.addService(this.outdoorTemperatureSensorService);
@@ -1055,7 +1056,7 @@ class DeviceAta extends EventEmitter {
1055
1056
  temperatureUnit: this.useFahrenheit,
1056
1057
  temperatureIncrement: temperatureIncrement,
1057
1058
  operationModeSetPropsMinValue: 0,
1058
- operationModeSetPropsMaxValue: 2,
1059
+ operationModeSetPropsMaxValue: 3,
1059
1060
  operationModeSetPropsValidValues: [0, 1, 2],
1060
1061
  fanSpeedSetPropsMaxValue: 6
1061
1062
 
@@ -1204,6 +1205,8 @@ class DeviceAta extends EventEmitter {
1204
1205
  };
1205
1206
  break;
1206
1207
  };
1208
+
1209
+ //add obj to mielHvac
1207
1210
  this.mielHvac = obj;
1208
1211
 
1209
1212
  if (this.roomTemperatureSensorService) {
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 presetsOnServer = this.mielHvac.presets;
291
- const zonesCount = this.mielHvac.zonesCount;
292
- const caseHeatPump = this.mielHvac.caseHeatPump;
293
- const caseZone1 = this.mielHvac.caseZone1;
294
- const caseHotWater = this.mielHvac.caseHotWater;
295
- const caseZone2 = this.mielHvac.caseZone2;
296
- const heatCoolModes = this.mielHvac.heatCoolModes;
297
-
298
- const zonesSensorsCount = this.mielHvac.sensorsCount;
299
- const caseHeatPumpSensor = this.mielHvac.caseHeatPumpSensor;
300
- const caseZone1Sensor = this.mielHvac.caseZone1Sensor;
301
- const caseHotWaterSensor = this.mielHvac.caseHotWaterSensor;
302
- const caseZone2Sensor = this.mielHvac.caseZone2Sensor;
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
- this.mielHvac.zones.forEach((zone, i) => {
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 = this.mielHvac.power;
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]][this.mielHvac.power];
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: this.mielHvac.temperatureIncrement
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}${this.mielHvac.temperatureUnit}`);
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: this.mielHvac.temperatureIncrement
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}${this.mielHvac.temperatureUnit}`);
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 = this.mielHvac.useFahrenheit;
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
- this.mielHvac.useFahrenheit = value;
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]][this.mielHvac.power];
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: this.mielHvac.temperatureIncrement
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}${this.mielHvac.temperatureUnit}`);
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 = this.mielHvac.useFahrenheit;
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
- this.mielHvac.useFahrenheit = value;
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
- this.mielHvac.zonesSensors.forEach((zone, i) => {
827
+ mielHvac.zonesSensors.forEach((zone, i) => {
827
828
  const zoneName = zone.name
828
829
  const serviceName = `${deviceTypeText} ${accessoryName}: ${zoneName}`;
829
830
  switch (i) {
@@ -1460,6 +1461,7 @@ class DeviceAtw extends EventEmitter {
1460
1461
  let temperatureSetPropsMinValue = -35;
1461
1462
  let temperatureSetPropsMaxValue = 100;
1462
1463
 
1464
+ //zones
1463
1465
  for (let i = 0; i < zonesCount; i++) {
1464
1466
  switch (this.displayMode) {
1465
1467
  case 1: //Heater Cooler
@@ -1735,7 +1737,7 @@ class DeviceAtw extends EventEmitter {
1735
1737
  };
1736
1738
  };
1737
1739
 
1738
- //update sensors characteristics
1740
+ //sensors
1739
1741
  for (let i = 0; i < zonesSensorsCount; i++) {
1740
1742
  switch (i) {
1741
1743
  case caseHeatPumpSensor: //Heat Pump
@@ -1863,6 +1865,8 @@ class DeviceAtw extends EventEmitter {
1863
1865
  };
1864
1866
  };
1865
1867
  };
1868
+
1869
+ //add obj to mielHvac
1866
1870
  this.mielHvac = obj;
1867
1871
 
1868
1872
  //update presets state
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 presetsOnServer = this.mielHvac.presets;
253
- const hasRoomTemperature = this.mielHvac.hasRoomTemperature;
254
- const hasSupplyTemperature = this.mielHvac.hasSupplyTemperature;
255
- const hasOutdoorTemperature = this.mielHvac.hasOutdoorTemperature;
256
- const hasCoolOperationMode = this.mielHvac.hasCoolOperationMode;
257
- const hasHeatOperationMode = this.mielHvac.hasHeatOperationMode;
258
- const hasAutoVentilationMode = this.mielHvac.hasAutoVentilationMode;
259
- const hasBypassVentilationMode = this.mielHvac.hasBypassVentilationMode;
260
- const hasAutomaticFanSpeed = this.mielHvac.hasAutomaticFanSpeed;
261
- const hasCO2Sensor = this.mielHvac.hasCO2Sensor;
262
- const hasPM25Sensor = this.mielHvac.hasPM25Sensor;
263
- const numberOfFanSpeeds = this.mielHvac.numberOfFanSpeeds;
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 = this.mielHvac.power;
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 = this.mielHvac.currentOperationMode;
306
+ const value = mielHvac.currentOperationMode;
306
307
  return value;
307
308
  });
308
309
  this.melCloudService.getCharacteristic(Characteristic.TargetHeaterCoolerState)
309
310
  .setProps({
310
- minValue: this.mielHvac.operationModeSetPropsMinValue,
311
- maxValue: this.mielHvac.operationModeSetPropsMaxValue,
312
- validValues: this.mielHvac.operationModeSetPropsValidValues
311
+ minValue: mielHvac.operationModeSetPropsMinValue,
312
+ maxValue: mielHvac.operationModeSetPropsMaxValue,
313
+ validValues: mielHvac.operationModeSetPropsValidValues
313
314
  })
314
315
  .onGet(async () => {
315
- const value = this.mielHvac.targetOperationMode ?? 0; //LOSSNAY, BYPASS, AUTO
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 = this.mielHvac.roomTemperature;
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: this.mielHvac.fanSpeedSetPropsMaxValue,
349
+ maxValue: mielHvac.fanSpeedSetPropsMaxValue,
349
350
  minStep: 1
350
351
  })
351
352
  .onGet(async () => {
352
- const value = this.mielHvac.fanSpeed; //STOP, 1, 2, 3, 4, OFF
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: this.mielHvac.minTempCoolDry,
388
- maxValue: this.mielHvac.maxTempCoolDry,
389
- minStep: this.mielHvac.temperatureIncrement
388
+ minValue: mielHvac.minTempCoolDry,
389
+ maxValue: mielHvac.maxTempCoolDry,
390
+ minStep: mielHvac.temperatureIncrement
390
391
  })
391
392
  .onGet(async () => {
392
- const value = this.mielHvac.ventilationMode === 2 ? this.mielHvac.defaultHeatingSetTemperature : this.mielHvac.setTemperature;
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}${this.mielHvac.temperatureUnit}`);
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: this.mielHvac.minTempHeat,
411
- maxValue: this.mielHvac.maxTempHeat,
412
- minStep: this.mielHvac.temperatureIncrement
411
+ minValue: mielHvac.minTempHeat,
412
+ maxValue: mielHvac.maxTempHeat,
413
+ minStep: mielHvac.temperatureIncrement
413
414
  })
414
415
  .onGet(async () => {
415
- const value = this.mielHvac.ventilationMode === 2 ? this.mielHvac.defaultHeatingSetTemperature : this.mielHvac.setTemperature;
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}${this.mielHvac.temperatureUnit}`);
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 = this.mielHvac.lockPhysicalControl;
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 = this.mielHvac.useFahrenheit;
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
- this.mielHvac.useFahrenheit = value;
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 = this.mielHvac.currentOperationMode;
470
+ const value = mielHvac.currentOperationMode;
470
471
  return value;
471
472
  });
472
473
  this.melCloudService.getCharacteristic(Characteristic.TargetHeatingCoolingState)
473
474
  .setProps({
474
- minValue: this.mielHvac.operationModeSetPropsMinValue,
475
- maxValue: this.mielHvac.operationModeSetPropsMaxValue,
476
- validValues: this.mielHvac.operationModeSetPropsValidValues
475
+ minValue: mielHvac.operationModeSetPropsMinValue,
476
+ maxValue: mielHvac.operationModeSetPropsMaxValue,
477
+ validValues: mielHvac.operationModeSetPropsValidValues
477
478
  })
478
479
  .onGet(async () => {
479
- const value = this.mielHvac.targetOperationMode ?? 0; //LOSSNAY, BYPASS, AUTO
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 = this.mielHvac.roomTemperature;
516
+ const value = mielHvac.roomTemperature;
516
517
  return value;
517
518
  });
518
519
  this.melCloudService.getCharacteristic(Characteristic.TargetTemperature)
519
520
  .setProps({
520
- minValue: this.mielHvac.minTempHeat,
521
- maxValue: this.mielHvac.maxTempHeat,
522
- minStep: this.mielHvac.temperatureIncrement
521
+ minValue: mielHvac.minTempHeat,
522
+ maxValue: mielHvac.maxTempHeat,
523
+ minStep: mielHvac.temperatureIncrement
523
524
  })
524
525
  .onGet(async () => {
525
- const value = this.mielHvac.setTemperature;
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}${this.mielHvac.temperatureUnit}`);
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 = this.mielHvac.useFahrenheit;
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
- this.mielHvac.useFahrenheit = value;
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 && this.mielHvac.roomTemperature !== null) {
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 = this.mielHvac.roomTemperature;
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 && this.mielHvac.supplyTemperature !== null) {
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 = this.mielHvac.supplyTemperature;
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 && this.mielHvac.outdoorTemperature !== null) {
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 = this.mielHvac.outdoorTemperature;
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 = this.mielHvac.coreMaintenanceRequired;
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 = this.mielHvac.filterMaintenanceRequired;
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 = this.mielHvac.roomCO2Detected;
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 = this.mielHvac.roomCO2Level;
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 = this.mielHvac.pM25AirQuality;
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 = this.mielHvac.pM25Level;
673
+ const value = mielHvac.pM25Level;
673
674
  return value;
674
675
  });
675
676
  accessory.addService(this.airQualitySensorService);
@@ -1094,7 +1095,9 @@ class DeviceErv extends EventEmitter {
1094
1095
  };
1095
1096
  break;
1096
1097
  };
1097
- this.mielHvac = obj;
1098
+
1099
+ //add obj to mielHvac
1100
+ this.mielHvac = obj;
1098
1101
 
1099
1102
  //update temperature sensors
1100
1103
  if (this.roomTemperatureSensorService) {