homebridge-denon-tv 3.18.3 → 3.18.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
6
6
 
7
7
  ## Note - after update to 3.15.x need remove the accessory frome Home app and add it again.
8
8
 
9
+ ## [3.18.4] - (18.12.2022)
10
+ ## Changes
11
+ - fix buttons and switch services
12
+
9
13
  ## [3.18.3] - (06.12.2022)
10
14
  ## Changes
11
15
  - bump dependencies
package/README.md CHANGED
@@ -63,9 +63,6 @@ This plugin is based upon the official documentation for communicating with and
63
63
  | `host` | Here set the *Hsostname or Address IP* of TV. |
64
64
  | `port` | Here set the API communication port, if `8080` is not working try to use port `80` which some receivers use alternatively. |
65
65
  | `zoneControl` | Selects which zone will be controlled by this section (`0` - Main Zone, `1` - Zone 2, `2` - Zone 3, `3` - Surround Mode) or choice from the configurations GUI |
66
- | `enableDebugMode` | If enabled, deep log will be present in homebridge console. |
67
- | `disableLogInfo` | If enabled, disable log info, all values and state will not be displayed in Homebridge log console. |
68
- | `disableLogDeviceInfo` | If enabled, add ability to disable log device info by every connections device to the network. |
69
66
  | `masterPower` | If enabled, then the Power switch for that zone (typically you would only use this for the Main Zone) will turn the entire receiver `ON` or `OFF/STANDBY` rather than just the zone itself |
70
67
  | `sensorPower`| If enabled, then the Power will be exposed as a `Motion Sensor` to use with automations. |
71
68
  | `masterVolume`| If enabled, then the Volume for that zone (typically you would only use this for the Main Zone) will set the entire receiver `UP` or `DOWN` rather than just the zone itself |
@@ -92,6 +89,9 @@ This plugin is based upon the official documentation for communicating with and
92
89
  | `surrounds.reference` | Here choice *Surround Mode*, the mode that should be published to and appear in HomeKit app in the extra tile as Surrounds List. |
93
90
  | `surrounds.switch` | If enabled, the tile for that surround mode will be expose to the *Homebridge/HomeKit* and can be used for HomeKit automation. |
94
91
  | `surrounds.displayType` | Here select display type in HomeKit app, possible `Button`, `Switch`, `Motion Sensor`, `Occupancy Sensor`.|
92
+ | `enableDebugMode` | If enabled, deep log will be present in homebridge console. |
93
+ | `disableLogInfo` | If enabled, disable log info, all values and state will not be displayed in Homebridge log console. |
94
+ | `disableLogDeviceInfo` | If enabled, add ability to disable log device info by every connections device to the network. |
95
95
  | `enableMqtt` | If enabled, MQTT Broker will start automatically and publish all awailable PV installation data. |
96
96
  | `mqttHost` | Here set the *IP Address* or *Hostname* for MQTT Broker.) |
97
97
  | `mqttPort` | Here set the *Port* for MQTT Broker, default 1883.) |
package/index.js CHANGED
@@ -280,7 +280,7 @@ class denonTvDevice {
280
280
  }
281
281
 
282
282
  if (this.sensorMuteService) {
283
- const state = power ? this.mute : false;
283
+ const state = power ? mute : false;
284
284
  this.sensorMuteService
285
285
  .updateCharacteristic(Characteristic.MotionDetected, state)
286
286
  }
@@ -870,10 +870,12 @@ class denonTvDevice {
870
870
  try {
871
871
  const setSwitchInput = (state && this.power) ? await this.denon.send(CONSTANS.ApiUrls.iPhoneDirect + inputSwitchRef) : false;
872
872
  const logInfo = this.disableLogInfo ? false : this.log('Device: %s %s, set new Input successful, name: %s, reference: %s', this.host, accessoryName, inputSwitchName, inputSwitchReference);
873
- switchService.updateCharacteristic(Characteristic.On, false);
873
+
874
+ setTimeout(() => {
875
+ const setChar = (state && this.power) ? switchService.updateCharacteristic(Characteristic.On, false) : false;
876
+ }, 300)
874
877
  } catch (error) {
875
878
  this.log.error('Device: %s %s, can not set new Input. Might be due to a wrong settings in config, error: %s.', this.host, accessoryName, error);
876
- switchService.updateCharacteristic(Characteristic.On, false);
877
879
  };
878
880
  };
879
881
  });
@@ -916,10 +918,12 @@ class denonTvDevice {
916
918
  try {
917
919
  const setFunction = (state && this.power) ? await this.denon.send(CONSTANS.ApiUrls.iPhoneDirect + buttonReference) : false;
918
920
  const logInfo = this.disableLogInfo ? false : this.log('Device: %s %s, set new Input successful, name: %s, reference: %s', this.host, accessoryName, buttonName, buttonReference);
919
- buttonService.updateCharacteristic(Characteristic.On, false);
921
+
922
+ setTimeout(() => {
923
+ const setChar = (state && this.power) ? buttonService.updateCharacteristic(Characteristic.On, false) : false;
924
+ }, 300)
920
925
  } catch (error) {
921
926
  this.log.error('Device: %s %s, can not set new Input. Might be due to a wrong settings in config, error: %s.', this.host, accessoryName, error);
922
- buttonService.updateCharacteristic(Characteristic.On, false);
923
927
  };
924
928
  });
925
929
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "displayName": "Denon TV",
3
3
  "name": "homebridge-denon-tv",
4
- "version": "3.18.3",
4
+ "version": "3.18.4",
5
5
  "description": "Homebridge plugin (https://github.com/homebridge/homebridge) to control Denon/Marantz AV Receivers.",
6
6
  "license": "MIT",
7
7
  "author": "grzegorz914",