homebridge-denon-tv 4.3.8 → 4.3.9
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/denondevice.js +18 -5
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"displayName": "Denon TV",
|
|
3
3
|
"name": "homebridge-denon-tv",
|
|
4
|
-
"version": "4.3.
|
|
4
|
+
"version": "4.3.9",
|
|
5
5
|
"description": "Homebridge plugin (https://github.com/homebridge/homebridge) to control Denon/Marantz AV Receivers.",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"author": "grzegorz914",
|
package/src/denondevice.js
CHANGED
|
@@ -503,12 +503,25 @@ class DenonDevice extends EventEmitter {
|
|
|
503
503
|
const zone = [inputMode, 'Z2', 'Z3', inputMode][zoneControl];
|
|
504
504
|
const reference = zone + inputReference;
|
|
505
505
|
|
|
506
|
-
|
|
507
|
-
|
|
506
|
+
switch (this.power) {
|
|
507
|
+
case false:
|
|
508
|
+
this.inputSet = false;
|
|
509
|
+
|
|
510
|
+
setInterval(async () => {
|
|
511
|
+
if (this.inputSet) {
|
|
512
|
+
return;
|
|
513
|
+
}
|
|
514
|
+
|
|
515
|
+
const setInput = this.power ? await this.denon.send(reference) : false;
|
|
516
|
+
this.inputSet = this.power;
|
|
517
|
+
const info = this.disableLogInfo || !this.power ? false : this.emit('message', `set ${this.inputSurround} Name: ${inputName}, Reference: ${inputReference}`);
|
|
518
|
+
}, 2000);
|
|
519
|
+
break;
|
|
520
|
+
case true:
|
|
521
|
+
await this.denon.send(reference);
|
|
522
|
+
const info = this.disableLogInfo ? false : this.emit('message', `set ${this.inputSurround} Name: ${inputName}, Reference: ${inputReference}`);
|
|
523
|
+
break;
|
|
508
524
|
}
|
|
509
|
-
|
|
510
|
-
await this.denon.send(reference);
|
|
511
|
-
const info = this.disableLogInfo ? false : this.emit('message', `set ${this.inputSurround} Name: ${inputName}, Reference: ${inputReference}`);
|
|
512
525
|
} catch (error) {
|
|
513
526
|
this.emit('error', `set ${this.inputSurround} error: ${error}`);
|
|
514
527
|
};
|