@tplnet/homebridge-denon-heos-audio 1.2.1 → 1.2.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 +26 -0
- package/README.md +22 -21
- package/config.schema.json +2 -2
- package/dist/denonClientHeosCli.js +2 -1
- package/dist/platformAccessory.d.ts +2 -0
- package/dist/platformAccessory.js +15 -8
- package/package.json +14 -4
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,32 @@
|
|
|
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.4
|
|
6
|
+
|
|
7
|
+
### Changed
|
|
8
|
+
|
|
9
|
+
- Shorter npm description without the fork notice, so the search results in the Homebridge UI show the supported devices and features. The fork is mentioned at the top of the README and in the credits.
|
|
10
|
+
|
|
11
|
+
1.2.3 was not published on npm; its changes are included in 1.2.4.
|
|
12
|
+
|
|
13
|
+
## 1.2.3
|
|
14
|
+
|
|
15
|
+
### Changed
|
|
16
|
+
|
|
17
|
+
- Easier to find in the plugin search of the Homebridge UI: new display name *Homebridge Denon & Marantz HEOS (tplnet)*, a description that names the supported devices and features, and more keywords (Denon Home, Home Amp, Marantz Cinema, AV receiver, amplifier, soundbar, Apple Home).
|
|
18
|
+
- Documentation: *Apple Home* instead of *HomeKit*; *Compatibility and security* section and badges; troubleshooting for devices that appear offline in the Homebridge UI.
|
|
19
|
+
|
|
20
|
+
### Security / CI
|
|
21
|
+
|
|
22
|
+
- Weekly *Compatibility & CVE check* with homebridge@latest and @beta on Node.js 22, 24 and 26, Dependabot for dependency updates.
|
|
23
|
+
|
|
24
|
+
## 1.2.2
|
|
25
|
+
|
|
26
|
+
### Fixed
|
|
27
|
+
|
|
28
|
+
- 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.
|
|
29
|
+
- 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.
|
|
30
|
+
|
|
5
31
|
## 1.2.1
|
|
6
32
|
|
|
7
33
|
### Fixed
|
package/README.md
CHANGED
|
@@ -1,4 +1,11 @@
|
|
|
1
|
-
# Homebridge Denon
|
|
1
|
+
# Homebridge Denon & Marantz HEOS (tplnet)
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/@tplnet/homebridge-denon-heos-audio)
|
|
4
|
+
[](https://github.com/tplnet/homebridge-denon-heos-audio/actions/workflows/ci.yml)
|
|
5
|
+
[](https://github.com/tplnet/homebridge-denon-heos-audio/actions/workflows/compat.yml)
|
|
6
|
+
[](LICENSE)
|
|
7
|
+
|
|
8
|
+
Package: [`@tplnet/homebridge-denon-heos-audio`](https://www.npmjs.com/package/@tplnet/homebridge-denon-heos-audio)
|
|
2
9
|
|
|
3
10
|
Control your **Denon and Marantz HEOS speakers, amplifiers and AV receivers** from Apple Home.
|
|
4
11
|
|
|
@@ -9,9 +16,6 @@ Each device appears in the Home app as a TV accessory, so you can:
|
|
|
9
16
|
- pick an input (HDMI ARC, optical, AUX, …)
|
|
10
17
|
- play, pause and skip tracks with the Remote in Control Center
|
|
11
18
|
|
|
12
|
-
[](https://www.npmjs.com/package/@tplnet/homebridge-denon-heos-audio)
|
|
13
|
-
[](https://github.com/tplnet/homebridge-denon-heos-audio/actions/workflows/ci.yml)
|
|
14
|
-
|
|
15
19
|
> This is a fork of [hov3rcraft/homebridge-denon-heos-audio](https://github.com/hov3rcraft/homebridge-denon-heos-audio) with stability fixes
|
|
16
20
|
> (no more Homebridge crashes on unexpected device messages), automatic setup of discovered devices, inputs read from the device,
|
|
17
21
|
> Marantz support and automated tests. See the [changelog](CHANGELOG.md).
|
|
@@ -56,9 +60,9 @@ Not sure what your device supports? Turn on [device discovery](#1-find-your-devi
|
|
|
56
60
|
| **Hybrid** | AV receivers and amplifiers with HEOS (e.g. Marantz Cinema series, Denon AVR-X, Denon Home Amp) | Real power on / standby | ✅ | ✅ |
|
|
57
61
|
|
|
58
62
|
**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
|
|
63
|
+
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
64
|
|
|
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
|
|
65
|
+
> **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 Apple Home.
|
|
62
66
|
|
|
63
67
|
**Hybrid** uses AVR Control for power and HEOS CLI for everything else. Pick it whenever discovery reports both protocols and you want real standby.
|
|
64
68
|
|
|
@@ -181,7 +185,7 @@ See the next section.
|
|
|
181
185
|
|
|
182
186
|
## Adding a device to Apple Home (step by step)
|
|
183
187
|
|
|
184
|
-
|
|
188
|
+
Apple Home allows only one TV per bridge. That's why every device is published as its **own accessory**. It does **not** appear in the Home app automatically together with your other Homebridge accessories, so you have to add each device once.
|
|
185
189
|
|
|
186
190
|
**Before you start**
|
|
187
191
|
|
|
@@ -313,30 +317,27 @@ then restart Homebridge **once** and reload the page.
|
|
|
313
317
|
**Homebridge doesn't start: `EADDRINUSE: address already in use`.**
|
|
314
318
|
Usually an old Homebridge process is still running (e.g. after several restarts in a row): `ps aux | grep -i [h]omebridge` shows two main `homebridge` processes. Stop Homebridge, end the old process (`kill <pid>`) and start Homebridge again.
|
|
315
319
|
|
|
316
|
-
**A device is added automatically although I don't want it in
|
|
320
|
+
**A device is added automatically although I don't want it in Apple Home.**
|
|
317
321
|
Add its serial number to `excludedSerialNumbers` and restart Homebridge. Then remove it from the Home app.
|
|
318
322
|
|
|
319
323
|
**Getting more details:** enable debug logging for Homebridge (or `consoleLogEnabled`) and include the log when [opening an issue](https://github.com/tplnet/homebridge-denon-heos-audio/issues).
|
|
320
324
|
|
|
321
325
|
## Compatibility and security
|
|
322
326
|
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
| Checked | Versions |
|
|
326
|
-
| --- | --- |
|
|
327
|
-
| Homebridge | 1.11.4 and 2.5.0 (HAP-NodeJS 0.14.3 / 2.3.0) |
|
|
328
|
-
| Node.js | 22, 24 and 26 (Homebridge 1.x: up to 24) |
|
|
329
|
-
| Known vulnerabilities | `npm audit`: 0 findings (runtime and development dependencies) |
|
|
327
|
+
This plugin is kept compatible with the **newest Homebridge release** and free of **known vulnerabilities (CVEs)**:
|
|
330
328
|
|
|
331
|
-
|
|
329
|
+
- **Weekly and on every dependency change** the [Compatibility & CVE check](https://github.com/tplnet/homebridge-denon-heos-audio/actions/workflows/compat.yml) workflow
|
|
330
|
+
- runs `npm audit` – any known vulnerability in the runtime dependencies fails the check,
|
|
331
|
+
- builds the plugin and starts it with **homebridge@latest** and **homebridge@beta** on Node.js 22, 24 and 26 with simulated HEOS and AVR Control devices (`npm run smoke`): the plugin must load, be accepted as compatible (`engines`), connect to the devices, read their inputs and run without errors, HAP warnings or deprecation warnings.
|
|
332
|
+
- **On every push** the [CI](https://github.com/tplnet/homebridge-denon-heos-audio/actions/workflows/ci.yml) workflow runs lint, the unit tests and the smoke test, also with **Homebridge 1.x** (on Node.js 22 and 24).
|
|
333
|
+
- **Every release** runs the same CVE and Homebridge checks before the version is staged on npm – a release with a known vulnerability or an incompatibility is not published.
|
|
334
|
+
- **Dependabot** opens weekly pull requests for dependency and GitHub Actions updates.
|
|
332
335
|
|
|
333
|
-
|
|
336
|
+
Requirements: Homebridge 1.8 or newer (2.x supported), Node.js 22.12+, 24 or 26.
|
|
334
337
|
|
|
335
|
-
|
|
336
|
-
npm run check # npm audit + lint + unit tests + smoke test
|
|
337
|
-
```
|
|
338
|
+
Run all checks locally with `npm run check` (`npm audit`, lint, unit tests, smoke test). To test another Homebridge version, install it temporarily with `npm install --no-save homebridge@<version>`.
|
|
338
339
|
|
|
339
|
-
|
|
340
|
+
Found a security issue? Please report it privately via GitHub (*Security* → *Report a vulnerability*) instead of a public issue.
|
|
340
341
|
|
|
341
342
|
## Development
|
|
342
343
|
|
package/config.schema.json
CHANGED
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
},
|
|
82
82
|
"volumeLimitEnabled": {
|
|
83
83
|
"title": "Volume Limit",
|
|
84
|
-
"description": "When you set a volume limit, 100% volume in
|
|
84
|
+
"description": "When you set a volume limit, 100% volume in the Home app will correspond to this percentage on your device.",
|
|
85
85
|
"type": "boolean",
|
|
86
86
|
"required": false,
|
|
87
87
|
"default": false
|
|
@@ -216,7 +216,7 @@
|
|
|
216
216
|
},
|
|
217
217
|
"showInList": {
|
|
218
218
|
"title": "Show in Input List",
|
|
219
|
-
"description": "If disabled, this input will not be shown in the list of selectable inputs in
|
|
219
|
+
"description": "If disabled, this input will not be shown in the list of selectable inputs in the Home app.",
|
|
220
220
|
"type": "boolean",
|
|
221
221
|
"required": false,
|
|
222
222
|
"default": true
|
|
@@ -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
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tplnet/homebridge-denon-heos-audio",
|
|
3
|
-
"displayName": "Homebridge Denon
|
|
3
|
+
"displayName": "Homebridge Denon & Marantz HEOS (tplnet)",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"version": "1.2.
|
|
6
|
-
"description": "
|
|
5
|
+
"version": "1.2.4",
|
|
6
|
+
"description": "Denon and Marantz HEOS devices in Apple Home: Denon Home speakers, Home Amp and AV receivers (e.g. Marantz Cinema, Denon AVR). Power, volume, inputs, play/pause, automatic discovery.",
|
|
7
7
|
"author": "tplnet",
|
|
8
8
|
"contributors": [
|
|
9
9
|
"hov3rcraft (original author, https://github.com/hov3rcraft)"
|
|
@@ -22,14 +22,24 @@
|
|
|
22
22
|
"provenance": true
|
|
23
23
|
},
|
|
24
24
|
"keywords": [
|
|
25
|
-
"homebridge",
|
|
26
25
|
"homebridge-plugin",
|
|
26
|
+
"homebridge",
|
|
27
27
|
"denon",
|
|
28
28
|
"marantz",
|
|
29
29
|
"heos",
|
|
30
|
+
"denon-home",
|
|
31
|
+
"home-amp",
|
|
32
|
+
"marantz-cinema",
|
|
30
33
|
"avr",
|
|
34
|
+
"av-receiver",
|
|
35
|
+
"receiver",
|
|
36
|
+
"amplifier",
|
|
31
37
|
"speaker",
|
|
38
|
+
"soundbar",
|
|
32
39
|
"ceol",
|
|
40
|
+
"apple-home",
|
|
41
|
+
"homekit",
|
|
42
|
+
"tv",
|
|
33
43
|
"avrcontrol",
|
|
34
44
|
"heoscli",
|
|
35
45
|
"heos-cli"
|