homebridge-denon-tv 6.2.2 → 6.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 CHANGED
@@ -21,6 +21,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
21
21
  - For plugin < v6.1.0 use Homebridge UI <= v5.5.0
22
22
  - For plugin >= v6.1.0 use Homebridge UI >= v5.13.0
23
23
 
24
+ ## [6.2.4] - (24.09.2026)
25
+
26
+ ### Changes
27
+
28
+ - fix: with more than one zone configured for the same receiver, every zone overwrote the shared receiver capabilities. The Main Zone lost sound mode and picture mode support (sound mode was no longer read, so Home Assistant did not show the current sound mode) and could report the name of another zone. Each zone now works on its own copy of the receiver capabilities
29
+
30
+ ## [6.2.3] - (24.09.2026)
31
+
32
+ ### Changes
33
+
34
+ - changed: HA Discovery, sound modes are shown with readable names (e.g. `Pure Direct`, `DTS Surround` instead of `PURE DIRECT`, `DTS SURROUND`). Commands are unchanged
35
+
24
36
  ## [6.2.2] - (24.09.2026)
25
37
 
26
38
  ### Changes
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "displayName": "Denon TV",
3
3
  "name": "homebridge-denon-tv",
4
- "version": "6.2.2",
4
+ "version": "6.2.4",
5
5
  "description": "Homebridge plugin to control Denon/Marantz AV Receivers.",
6
6
  "license": "MIT",
7
7
  "author": "grzegorz914",
package/src/constants.js CHANGED
@@ -661,3 +661,32 @@ export const ZonePrefixMap = {
661
661
  3: 'MS',
662
662
  4: 'SI'
663
663
  };
664
+
665
+ // Display names for the normalized sound modes (Home Assistant)
666
+ export const SoundModeDisplayName = {
667
+ "AUTO": "Auto",
668
+ "MOVIE": "Movie",
669
+ "MUSIC": "Music",
670
+ "GAME": "Game",
671
+ "DIRECT": "Direct",
672
+ "PURE DIRECT": "Pure Direct",
673
+ "STEREO": "Stereo",
674
+ "MCH STEREO": "Multi Ch Stereo",
675
+ "DOLBY DIGITAL": "Dolby Digital",
676
+ "DTS SURROUND": "DTS Surround",
677
+ "AURO3D": "Auro-3D",
678
+ "AURO2DSURR": "Auro-2D Surround",
679
+ "WIDE SCREEN": "Wide Screen",
680
+ "SUPER STADIUM": "Super Stadium",
681
+ "ROCK ARENA": "Rock Arena",
682
+ "JAZZ CLUB": "Jazz Club",
683
+ "CLASSIC CONCERT": "Classic Concert",
684
+ "MONO MOVIE": "Mono Movie",
685
+ "MATRIX": "Matrix",
686
+ "VIDEO GAME": "Video Game",
687
+ "VIRTUAL": "Virtual",
688
+ "NEURAL": "Neural",
689
+ "STANDARD": "Standard",
690
+ "LEFT": "Left",
691
+ "RIGHT": "Right"
692
+ };
package/src/mainzone.js CHANGED
@@ -2,7 +2,7 @@ import EventEmitter from 'events';
2
2
  import Zone from './zone.js';
3
3
  import Functions from './functions.js';
4
4
  import HaDiscovery from './hadiscovery.js';
5
- import { PictureModesConversionToHomeKit, PictureModesDenonNumber, PictureModesDenonString, DirectSoundMode, SoundModeConversion } from './constants.js';
5
+ import { PictureModesConversionToHomeKit, PictureModesDenonNumber, PictureModesDenonString, DirectSoundMode, SoundModeConversion, SoundModeDisplayName } from './constants.js';
6
6
  let Accessory, Characteristic, Service, Categories, Encode, AccessoryUUID;
7
7
 
8
8
  class MainZone extends EventEmitter {
@@ -1004,7 +1004,7 @@ class MainZone extends EventEmitter {
1004
1004
 
1005
1005
  try {
1006
1006
  const sources = (this.inputsServices ?? []).map(input => ({ id: `${input.zonePrefix}${input.reference}`, name: input.name }));
1007
- const soundModes = this.ha.commands.sound_mode ? [...new Set(Object.values(SoundModeConversion))].map(mode => ({ id: mode, name: mode })) : [];
1007
+ const soundModes = this.ha.commands.sound_mode ? [...new Set(Object.values(SoundModeConversion))].map(mode => ({ id: mode, name: SoundModeDisplayName[mode] ?? mode })) : [];
1008
1008
  await this.ha.publishConfig({ sources, soundModes });
1009
1009
  await this.haUpdateState();
1010
1010
  } catch (error) {
package/src/zone.js CHANGED
@@ -261,10 +261,15 @@ class Zone extends EventEmitter {
261
261
 
262
262
  async checkInfo(denonInfo) {
263
263
  try {
264
+ // All zones of one receiver share the same denonInfo object. Keep the receiver capabilities
265
+ // untouched and work on a copy per zone, otherwise every zone overwrites the flags of the others
266
+ const deviceInfo = denonInfo.deviceInfo ??= { ...denonInfo.info };
267
+ const info = { ...deviceInfo };
268
+
264
269
  // Capabilities
265
- denonInfo.info.supportPictureMode = this.zoneControl === 0 && denonInfo.info.supportPictureMode;
266
- denonInfo.info.supportSoundMode = (this.zoneControl === 0 || this.zoneControl === 3) && denonInfo.info.supportSoundMode;
267
- denonInfo.info.supportFavorites = this.zoneControl < 3 && denonInfo.info.supportFavorites;
270
+ info.supportPictureMode = this.zoneControl === 0 && deviceInfo.supportPictureMode;
271
+ info.supportSoundMode = (this.zoneControl === 0 || this.zoneControl === 3) && deviceInfo.supportSoundMode;
272
+ info.supportFavorites = this.zoneControl < 3 && deviceInfo.supportFavorites;
268
273
 
269
274
  // Zone capabilities
270
275
  const keys = Object.keys(denonInfo);
@@ -274,14 +279,14 @@ class Zone extends EventEmitter {
274
279
  const zone = this.zoneControl === 4 ? 0 : this.zoneControl;
275
280
  zoneCaps = zones[zone] || {};
276
281
  }
277
- denonInfo.info.supportShortcuts = zoneCaps.ShortcutControl?.Control === 1;
278
- denonInfo.info.supportQuickSelect = zoneCaps.Operation?.QuickSelect?.Control === 1;
279
- denonInfo.info.controlZone = ZoneName[this.zoneControl];
280
- this.info = denonInfo.info;
282
+ info.supportShortcuts = zoneCaps.ShortcutControl?.Control === 1;
283
+ info.supportQuickSelect = zoneCaps.Operation?.QuickSelect?.Control === 1;
284
+ info.controlZone = ZoneName[this.zoneControl];
285
+ this.info = info;
281
286
 
282
287
  // Success event
283
288
  if (this.firstRun) {
284
- this.emit('deviceInfo', denonInfo.info);
289
+ this.emit('deviceInfo', info);
285
290
  this.firstRun = false;
286
291
  }
287
292
 
@@ -295,7 +300,7 @@ class Zone extends EventEmitter {
295
300
  2: inputsNewDevice
296
301
  };
297
302
  const inputs = this.getInputsFromDevice ? inputsMap[this.generation] : this.inputs;
298
- const allInputs = await this.prepareInputs(denonInfo, this.generation, this.zoneControl, inputs, zoneCaps, this.getInputsFromDevice, this.getFavoritesFromDevice, this.getQuickSmartSelectFromDevice, denonInfo.info.supportFavorites, denonInfo.info.supportShortcuts, denonInfo.info.supportQuickSelect);
303
+ const allInputs = await this.prepareInputs(denonInfo, this.generation, this.zoneControl, inputs, zoneCaps, this.getInputsFromDevice, this.getFavoritesFromDevice, this.getQuickSmartSelectFromDevice, info.supportFavorites, info.supportShortcuts, info.supportQuickSelect);
299
304
 
300
305
  // Emit inputs
301
306
  this.emit('addRemoveOrUpdateInput', allInputs, false);
package/src/zone2.js CHANGED
@@ -2,7 +2,7 @@ import EventEmitter from 'events';
2
2
  import Zone from './zone.js';
3
3
  import Functions from './functions.js';
4
4
  import HaDiscovery from './hadiscovery.js';
5
- import { PictureModesConversionToHomeKit, PictureModesDenonNumber, SoundModeConversion } from './constants.js';
5
+ import { PictureModesConversionToHomeKit, PictureModesDenonNumber, SoundModeConversion, SoundModeDisplayName } from './constants.js';
6
6
  let Accessory, Characteristic, Service, Categories, Encode, AccessoryUUID;
7
7
 
8
8
  class Zone2 extends EventEmitter {
@@ -918,7 +918,7 @@ class Zone2 extends EventEmitter {
918
918
 
919
919
  try {
920
920
  const sources = (this.inputsServices ?? []).map(input => ({ id: `${input.zonePrefix}${input.reference}`, name: input.name }));
921
- const soundModes = this.ha.commands.sound_mode ? [...new Set(Object.values(SoundModeConversion))].map(mode => ({ id: mode, name: mode })) : [];
921
+ const soundModes = this.ha.commands.sound_mode ? [...new Set(Object.values(SoundModeConversion))].map(mode => ({ id: mode, name: SoundModeDisplayName[mode] ?? mode })) : [];
922
922
  await this.ha.publishConfig({ sources, soundModes });
923
923
  await this.haUpdateState();
924
924
  } catch (error) {
package/src/zone3.js CHANGED
@@ -2,7 +2,7 @@ import EventEmitter from 'events';
2
2
  import Zone from './zone.js';
3
3
  import Functions from './functions.js';
4
4
  import HaDiscovery from './hadiscovery.js';
5
- import { PictureModesConversionToHomeKit, PictureModesDenonNumber, SoundModeConversion } from './constants.js';
5
+ import { PictureModesConversionToHomeKit, PictureModesDenonNumber, SoundModeConversion, SoundModeDisplayName } from './constants.js';
6
6
  let Accessory, Characteristic, Service, Categories, Encode, AccessoryUUID;
7
7
 
8
8
  class Zone3 extends EventEmitter {
@@ -918,7 +918,7 @@ class Zone3 extends EventEmitter {
918
918
 
919
919
  try {
920
920
  const sources = (this.inputsServices ?? []).map(input => ({ id: `${input.zonePrefix}${input.reference}`, name: input.name }));
921
- const soundModes = this.ha.commands.sound_mode ? [...new Set(Object.values(SoundModeConversion))].map(mode => ({ id: mode, name: mode })) : [];
921
+ const soundModes = this.ha.commands.sound_mode ? [...new Set(Object.values(SoundModeConversion))].map(mode => ({ id: mode, name: SoundModeDisplayName[mode] ?? mode })) : [];
922
922
  await this.ha.publishConfig({ sources, soundModes });
923
923
  await this.haUpdateState();
924
924
  } catch (error) {