homebridge-denon-tv 4.1.13 → 4.2.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/src/denondevice.js +16 -0
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"displayName": "Denon TV",
|
|
3
3
|
"name": "homebridge-denon-tv",
|
|
4
|
-
"version": "4.
|
|
4
|
+
"version": "4.2.0-beta.0",
|
|
5
5
|
"description": "Homebridge plugin (https://github.com/homebridge/homebridge) to control Denon/Marantz AV Receivers.",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"author": "grzegorz914",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"async-mqtt": "^2.6.3",
|
|
32
|
-
"axios": "^1.
|
|
32
|
+
"axios": "^1.4.0",
|
|
33
33
|
"fast-xml-parser": "^4.2.2"
|
|
34
34
|
},
|
|
35
35
|
"keywords": [
|
package/src/denondevice.js
CHANGED
|
@@ -749,6 +749,8 @@ class DenonDevice extends EventEmitter {
|
|
|
749
749
|
const debug = !this.enableDebugMode ? false : this.emit('debug', `Prepare volume service`);
|
|
750
750
|
if (this.volumeControl === 0) {
|
|
751
751
|
this.volumeService = new Service.Lightbulb(`${accessoryName} Volume`, 'Volume');
|
|
752
|
+
this.volumeService.addOptionalCharacteristic(Characteristic.ConfiguredName);
|
|
753
|
+
this.volumeService.setCharacteristic(Characteristic.ConfiguredName, `Volume`);
|
|
752
754
|
this.volumeService.getCharacteristic(Characteristic.Brightness)
|
|
753
755
|
.onGet(async () => {
|
|
754
756
|
const volume = this.volume;
|
|
@@ -772,6 +774,8 @@ class DenonDevice extends EventEmitter {
|
|
|
772
774
|
|
|
773
775
|
if (this.volumeControl === 1) {
|
|
774
776
|
this.volumeServiceFan = new Service.Fan(`${accessoryName} Volume`, 'Volume');
|
|
777
|
+
this.volumeServiceFan.addOptionalCharacteristic(Characteristic.ConfiguredName);
|
|
778
|
+
this.volumeServiceFan.setCharacteristic(Characteristic.ConfiguredName, `Volume`);
|
|
775
779
|
this.volumeServiceFan.getCharacteristic(Characteristic.RotationSpeed)
|
|
776
780
|
.onGet(async () => {
|
|
777
781
|
const volume = this.volume;
|
|
@@ -798,6 +802,8 @@ class DenonDevice extends EventEmitter {
|
|
|
798
802
|
if (this.sensorPower) {
|
|
799
803
|
const debug = !this.enableDebugMode ? false : this.emit('debug', `Prepare power sensor service`);
|
|
800
804
|
this.sensorPowerService = new Service.ContactSensor(`${this.sZoneName} Power Sensor`, `Power Sensor`);
|
|
805
|
+
this.sensorPowerService.addOptionalCharacteristic(Characteristic.ConfiguredName);
|
|
806
|
+
this.sensorPowerService.setCharacteristic(Characteristic.ConfiguredName, `Power Sensor`);
|
|
801
807
|
this.sensorPowerService.getCharacteristic(Characteristic.ContactSensorState)
|
|
802
808
|
.onGet(async () => {
|
|
803
809
|
const state = this.power;
|
|
@@ -811,6 +817,8 @@ class DenonDevice extends EventEmitter {
|
|
|
811
817
|
if (this.sensorVolume) {
|
|
812
818
|
const debug = !this.enableDebugMode ? false : this.emit('debug', `Prepare volume sensor service`);
|
|
813
819
|
this.sensorVolumeService = new Service.ContactSensor(`${this.sZoneName} Volume Sensor`, `Volume Sensor`);
|
|
820
|
+
this.sensorVolumeService.addOptionalCharacteristic(Characteristic.ConfiguredName);
|
|
821
|
+
this.sensorVolumeService.setCharacteristic(Characteristic.ConfiguredName, `Volume Sensor`);
|
|
814
822
|
this.sensorVolumeService.getCharacteristic(Characteristic.ContactSensorState)
|
|
815
823
|
.onGet(async () => {
|
|
816
824
|
const state = this.sensorVolumeState;
|
|
@@ -824,6 +832,8 @@ class DenonDevice extends EventEmitter {
|
|
|
824
832
|
if (this.sensorMute) {
|
|
825
833
|
const debug = !this.enableDebugMode ? false : this.emit('debug', `Prepare mute sensor service`);
|
|
826
834
|
this.sensorMuteService = new Service.ContactSensor(`${this.sZoneName} Mute Sensor`, `Mute Sensor`);
|
|
835
|
+
this.sensorMuteService.addOptionalCharacteristic(Characteristic.ConfiguredName);
|
|
836
|
+
this.sensorMuteService.setCharacteristic(Characteristic.ConfiguredName, `Mute Sensor`);
|
|
827
837
|
this.sensorMuteService.getCharacteristic(Characteristic.ContactSensorState)
|
|
828
838
|
.onGet(async () => {
|
|
829
839
|
const state = this.power ? this.mute : false;
|
|
@@ -837,6 +847,8 @@ class DenonDevice extends EventEmitter {
|
|
|
837
847
|
if (this.sensorInput) {
|
|
838
848
|
const debug = !this.enableDebugMode ? false : this.emit('debug', `Prepare input sensor service`);
|
|
839
849
|
this.sensorInputService = new Service.ContactSensor(`${this.sZoneName} Input Sensor`, `Input Sensor`);
|
|
850
|
+
this.sensorInputService.addOptionalCharacteristic(Characteristic.ConfiguredName);
|
|
851
|
+
this.sensorInputService.setCharacteristic(Characteristic.ConfiguredName, `Input Sensor`);
|
|
840
852
|
this.sensorInputService.getCharacteristic(Characteristic.ContactSensorState)
|
|
841
853
|
.onGet(async () => {
|
|
842
854
|
const state = this.sensorInputState;
|
|
@@ -966,6 +978,8 @@ class DenonDevice extends EventEmitter {
|
|
|
966
978
|
const serviceType = [Service.MotionSensor, Service.OccupancySensor, Service.ContactSensor][sensorInputDisplayType];
|
|
967
979
|
const characteristicType = [Characteristic.MotionDetected, Characteristic.OccupancyDetected, Characteristic.ContactSensorState][sensorInputDisplayType];
|
|
968
980
|
const sensorInputService = new serviceType(`${accessoryName} ${sensorInputName}`, `Sensor ${i}`);
|
|
981
|
+
sensorInputService.addOptionalCharacteristic(Characteristic.ConfiguredName);
|
|
982
|
+
sensorInputService.setCharacteristic(Characteristic.ConfiguredName, sensorInputName);
|
|
969
983
|
sensorInputService.getCharacteristic(characteristicType)
|
|
970
984
|
.onGet(async () => {
|
|
971
985
|
const state = this.power ? (this.reference === sensorInputReference) : false;
|
|
@@ -1008,6 +1022,8 @@ class DenonDevice extends EventEmitter {
|
|
|
1008
1022
|
if (buttonName && buttonReference) {
|
|
1009
1023
|
const serviceType = [Service.Outlet, Service.Switch][buttonDisplayType];
|
|
1010
1024
|
const buttonService = new serviceType(`${this.sZoneName} ${buttonName}`, `Button ${i}`);
|
|
1025
|
+
buttonService.addOptionalCharacteristic(Characteristic.ConfiguredName);
|
|
1026
|
+
buttonService.setCharacteristic(Characteristic.ConfiguredName, buttonName);
|
|
1011
1027
|
buttonService.getCharacteristic(Characteristic.On)
|
|
1012
1028
|
.onGet(async () => {
|
|
1013
1029
|
const state = false;
|