@tplnet/homebridge-denon-heos-audio 1.2.1 → 1.2.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/CHANGELOG.md +7 -0
- package/README.md +1 -1
- package/dist/denonClientHeosCli.js +2 -1
- package/dist/platformAccessory.d.ts +2 -0
- package/dist/platformAccessory.js +15 -8
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes of this fork. The fork is based on [hov3rcraft/homebridge-denon-heos-audio](https://github.com/hov3rcraft/homebridge-denon-heos-audio) 1.0.0-beta.1.
|
|
4
4
|
|
|
5
|
+
## 1.2.2
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
|
|
9
|
+
- The tile in the Homebridge UI / Home app no longer jumps back to "off" while switching on takes a few seconds: HomeKit gets the answer immediately and switching continues in the background. If switching fails, the tile shows the real state again and the error is logged.
|
|
10
|
+
- A radio station that needs a few seconds to buffer is no longer replaced by the power on favorite: the plugin now waits up to 8 seconds (before: 3) for playback to start.
|
|
11
|
+
|
|
5
12
|
## 1.2.1
|
|
6
13
|
|
|
7
14
|
### Fixed
|
package/README.md
CHANGED
|
@@ -56,7 +56,7 @@ Not sure what your device supports? Turn on [device discovery](#1-find-your-devi
|
|
|
56
56
|
| **Hybrid** | AV receivers and amplifiers with HEOS (e.g. Marantz Cinema series, Denon AVR-X, Denon Home Amp) | Real power on / standby | ✅ | ✅ |
|
|
57
57
|
|
|
58
58
|
**Why does "power" mean "playback" with HEOS CLI?** HEOS speakers have no real standby command. The plugin therefore treats "playing" as on and "stopped/paused" as off.
|
|
59
|
-
Switching on resumes the last source. If there is nothing to resume (e.g. after the speaker was restarted or a streaming session ended), or playback doesn't start within
|
|
59
|
+
Switching on resumes the last source. If there is nothing to resume (e.g. after the speaker was restarted or a streaming session ended), or playback doesn't start within 8 seconds, the first HEOS favorite is started, so switching on also works in scenes and automations. You can choose another favorite or turn this off with `powerOnFavorite`.
|
|
60
60
|
|
|
61
61
|
> **Requirement:** at least one favorite in the HEOS app (*Music → Favorites*, e.g. a radio station). Without a favorite, a speaker that has nothing to resume can't be switched on from HomeKit.
|
|
62
62
|
|
|
@@ -248,7 +248,8 @@ export class DenonClientHeosCli extends DenonClient {
|
|
|
248
248
|
player_id;
|
|
249
249
|
/** HEOS favorite (1, 2, …) that is started when switching on without something to resume; 0 = disabled. */
|
|
250
250
|
powerOnFavorite = 1;
|
|
251
|
-
|
|
251
|
+
// radio streams may need a few seconds of buffering before the device reports "play"
|
|
252
|
+
static PLAY_VERIFY_CHECKS = 8;
|
|
252
253
|
playVerifyIntervalMs = 1000;
|
|
253
254
|
/** Log for actions the user should see without debug logging (e.g. starting the power on favorite). */
|
|
254
255
|
infoLog = (message) => this.debugLog(message);
|
|
@@ -39,6 +39,8 @@ export declare class DenonAudioAccessory {
|
|
|
39
39
|
private volumeChangeOngoing;
|
|
40
40
|
private pendingActive;
|
|
41
41
|
private powerChangeInProgress;
|
|
42
|
+
/** The power change running in the background (for tests). */
|
|
43
|
+
private powerChange;
|
|
42
44
|
private playingChangeOngoing;
|
|
43
45
|
constructor(platform: DenonAudioPlatform, accessory: PlatformAccessory, config: DeviceConfig, log: Logger);
|
|
44
46
|
/**
|
|
@@ -45,6 +45,8 @@ export class DenonAudioAccessory {
|
|
|
45
45
|
volumeChangeOngoing = false;
|
|
46
46
|
pendingActive;
|
|
47
47
|
powerChangeInProgress = false;
|
|
48
|
+
/** The power change running in the background (for tests). */
|
|
49
|
+
powerChange;
|
|
48
50
|
playingChangeOngoing = false;
|
|
49
51
|
constructor(platform, accessory, config, log) {
|
|
50
52
|
log.debug("Initializing DenonAudioAccessory...");
|
|
@@ -317,18 +319,23 @@ export class DenonAudioAccessory {
|
|
|
317
319
|
// started), and the device reports intermediate states during that time.
|
|
318
320
|
this.pendingActive = { value: active, until: Number.POSITIVE_INFINITY };
|
|
319
321
|
this.powerChangeInProgress = true;
|
|
320
|
-
|
|
321
|
-
|
|
322
|
+
// HomeKit gets the answer immediately; switching continues in the background. Otherwise HomeKit / the Homebridge UI
|
|
323
|
+
// would show the old state until switching on has finished (which can take several seconds).
|
|
324
|
+
this.powerChange = this.denonClient
|
|
325
|
+
.setPower(active)
|
|
326
|
+
.then(() => {
|
|
322
327
|
this.pendingActive = { value: active, until: Date.now() + DenonAudioAccessory.POWER_STATE_SETTLE_TIME };
|
|
323
|
-
}
|
|
324
|
-
|
|
328
|
+
})
|
|
329
|
+
.catch(async (error) => {
|
|
325
330
|
this.pendingActive = undefined;
|
|
326
331
|
this.log.error(`An error occured while setting power status for ${this.name}.`, error);
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
332
|
+
// show the real state again
|
|
333
|
+
const deviceState = await this.denonClient.getPower().catch(() => !active);
|
|
334
|
+
this.tvService.updateCharacteristic(this.platform.Characteristic.Active, deviceState);
|
|
335
|
+
})
|
|
336
|
+
.finally(() => {
|
|
330
337
|
this.powerChangeInProgress = false;
|
|
331
|
-
}
|
|
338
|
+
});
|
|
332
339
|
}
|
|
333
340
|
async setActiveIdentifier(newValue) {
|
|
334
341
|
this.log.debug(`setActiveIdentifier for ${this.name} set to ${newValue}`);
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@tplnet/homebridge-denon-heos-audio",
|
|
3
3
|
"displayName": "Homebridge Denon Heos Audio (tplnet)",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"version": "1.2.
|
|
5
|
+
"version": "1.2.2",
|
|
6
6
|
"description": "Control your Denon and Marantz HEOS speakers, amplifiers and AVRs via AVR Control and/or HEOS CLI",
|
|
7
7
|
"author": "tplnet",
|
|
8
8
|
"contributors": [
|