iobroker.denon 1.15.1 → 1.15.3

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/README.md CHANGED
@@ -908,6 +908,12 @@ The adapter is tested with an DENON AVR-X1200W and a Marantz SR5009.
908
908
  Placeholder for the next version (at the beginning of the line):
909
909
  ### __WORK IN PROGRESS__
910
910
  -->
911
+ ### 1.15.3 (2023-07-13)
912
+ * (foxriver76) fixed log entry when setting channel volume states (closes #321)
913
+
914
+ ### 1.15.2 (2023-06-12)
915
+ * (foxriver76) fixed crash case with controller v5
916
+
911
917
  ### 1.15.1 (2023-06-09)
912
918
  * (foxriver76) fix `displayContent` showing old information (closes #318)
913
919
 
package/build/main.js CHANGED
@@ -412,6 +412,7 @@ class Denon extends utils.Adapter {
412
412
  const channel = id.substring(channelVolStartsWith.length);
413
413
  const command = this.CHANNEL_VOLUME_MAPPINGS[channel];
414
414
  await this.sendRequest(`CV${command} ${helper.dbToVol(stateVal)}`);
415
+ return;
415
416
  }
416
417
  switch (id) {
417
418
  case 'zoneMain.powerZone':
@@ -1510,7 +1511,7 @@ class Denon extends utils.Adapter {
1510
1511
  }
1511
1512
  return;
1512
1513
  }
1513
- else if (command.startsWith('SI')) {
1514
+ if (command.startsWith('SI')) {
1514
1515
  // Handle select input
1515
1516
  let siCommand = data.substring(2); // Get only source name
1516
1517
  siCommand = siCommand.replace(' ', ''); // Remove blanks
@@ -1518,13 +1519,13 @@ class Denon extends utils.Adapter {
1518
1519
  this.setState('zoneMain.selectInput', siCommand, true);
1519
1520
  return;
1520
1521
  }
1521
- else if (command.startsWith('MS') && command !== 'MSQUICK' && command !== 'MSSMART') {
1522
+ if (command.startsWith('MS') && command !== 'MSQUICK' && command !== 'MSSMART') {
1522
1523
  // Handle Surround mode
1523
1524
  const msCommand = data.substring(2); // use data because ms can have digits and spaces
1524
1525
  this.setState('settings.surroundMode', msCommand, true);
1525
1526
  return;
1526
1527
  }
1527
- else if (command === 'MSQUICK' || command === 'MSSMART') {
1528
+ if (command === 'MSQUICK' || command === 'MSSMART') {
1528
1529
  const quickNr = parseInt(data.slice(-1));
1529
1530
  const state = await this.getStateAsync('zoneMain.quickSelect');
1530
1531
  if ((state === null || state === void 0 ? void 0 : state.val) === quickNr && (state === null || state === void 0 ? void 0 : state.ack)) {
@@ -1533,7 +1534,7 @@ class Denon extends utils.Adapter {
1533
1534
  this.setState('zoneMain.quickSelect', quickNr, true);
1534
1535
  return;
1535
1536
  }
1536
- else if (command.startsWith('NSE') && !command.startsWith('NSET')) {
1537
+ if (command.startsWith('NSE') && !command.startsWith('NSET')) {
1537
1538
  // Handle display content
1538
1539
  if (command === 'NSE') {
1539
1540
  // on older models it sometimes sends just NSE for unknown reasons - ignore it
@@ -1547,30 +1548,30 @@ class Denon extends utils.Adapter {
1547
1548
  this.setState(`display.displayContent${dispContNr}`, displayCont, true);
1548
1549
  return;
1549
1550
  }
1550
- else if (command.startsWith('NSET')) {
1551
+ if (command.startsWith('NSET')) {
1551
1552
  // Network settings info
1552
1553
  return;
1553
1554
  }
1554
- else if (command.startsWith('SV')) {
1555
+ if (command.startsWith('SV')) {
1555
1556
  // Select Video
1556
1557
  return;
1557
1558
  }
1558
- else if (command.startsWith('NSFRN')) {
1559
+ if (command.startsWith('NSFRN')) {
1559
1560
  // Handle friendly name
1560
1561
  this.setState('info.friendlyName', data.substring(6), true);
1561
1562
  return;
1562
1563
  }
1563
- else if (command.startsWith('PSMULTEQ')) {
1564
+ if (command.startsWith('PSMULTEQ')) {
1564
1565
  const state = data.split(':')[1];
1565
1566
  this.setState('settings.multEq', state, true);
1566
1567
  return;
1567
1568
  }
1568
- else if (command.startsWith('PSDYNVOL')) {
1569
+ if (command.startsWith('PSDYNVOL')) {
1569
1570
  const state = data.split(' ')[1];
1570
1571
  this.setState('settings.dynamicVolume', state, true);
1571
1572
  return;
1572
1573
  }
1573
- else if (command.startsWith('VSMONI')) {
1574
+ if (command.startsWith('VSMONI')) {
1574
1575
  const state = data.substring(6);
1575
1576
  if (!this.capabilities.multiMonitor) {
1576
1577
  // make sure that state exists
@@ -1584,7 +1585,7 @@ class Denon extends utils.Adapter {
1584
1585
  }
1585
1586
  return;
1586
1587
  }
1587
- else if (command.startsWith('VSVPM')) {
1588
+ if (command.startsWith('VSVPM')) {
1588
1589
  const processingMode = data.substring(4);
1589
1590
  if (!this.capabilities.multiMonitor) {
1590
1591
  // make sure that state exists
@@ -1593,20 +1594,25 @@ class Denon extends utils.Adapter {
1593
1594
  this.setState('settings.videoProcessingMode', processingMode, true);
1594
1595
  return;
1595
1596
  }
1596
- else if (command.startsWith('PV') && command.length > 2) {
1597
+ if (command.startsWith('PV') && command.length > 2) {
1597
1598
  const pictureMode = data.substring(1);
1598
1599
  if (!this.capabilities.pictureMode) {
1599
1600
  await this.createPictureMode();
1600
1601
  }
1601
1602
  const obj = await this.getObjectAsync('settings.pictureMode');
1602
- this.setState('settings.pictureMode', obj.common.states[pictureMode], true);
1603
+ if ((obj === null || obj === void 0 ? void 0 : obj.common.states) && pictureMode in obj.common.states) {
1604
+ this.setState('settings.pictureMode', obj.common.states[pictureMode], true);
1605
+ }
1606
+ else {
1607
+ this.log.debug(`Unknown picture mode: "${pictureMode}"`);
1608
+ }
1603
1609
  return;
1604
1610
  }
1605
- else if (command.startsWith('NSH')) {
1611
+ if (command.startsWith('NSH')) {
1606
1612
  const presetNumber = parseInt(data.slice(3, 5));
1607
1613
  const state = await this.getStateAsync('info.onlinePresets');
1608
1614
  let knownPresets;
1609
- if (!state || !state.val) {
1615
+ if (!(state === null || state === void 0 ? void 0 : state.val)) {
1610
1616
  knownPresets = {};
1611
1617
  }
1612
1618
  else {
@@ -1624,19 +1630,19 @@ class Denon extends utils.Adapter {
1624
1630
  this.setState('info.onlinePresets', JSON.stringify(sortedPresets), true);
1625
1631
  return;
1626
1632
  }
1627
- else if (command.startsWith('TFANNAME')) {
1633
+ if (command.startsWith('TFANNAME')) {
1628
1634
  // get name only
1629
1635
  const stationName = data.substring(8);
1630
1636
  this.setState('tuner.stationName', stationName, true);
1631
1637
  return;
1632
1638
  }
1633
- else if (command === 'TFAN') {
1639
+ if (command === 'TFAN') {
1634
1640
  // example TFAN010690 -> 106.9 always 6 digits with 2 decimals
1635
1641
  const freq = parseFloat(`${data.substring(4, 8)}.${data.substring(8)}`);
1636
1642
  this.setState('tuner.frequency', freq, true);
1637
1643
  return;
1638
1644
  }
1639
- else if (command.startsWith('CV')) {
1645
+ if (command.startsWith('CV')) {
1640
1646
  const cvCmd = command.split(' ')[0].substring(2);
1641
1647
  const channel = this.CHANNEL_VOLUME_REMAPPING[cvCmd];
1642
1648
  if (!channel) {
@@ -1645,6 +1651,7 @@ class Denon extends utils.Adapter {
1645
1651
  }
1646
1652
  const channelVolume = data.split(' ')[1];
1647
1653
  this.setState(`zoneMain.channelVolume${channel}`, helper.volToDb(channelVolume), true);
1654
+ return;
1648
1655
  }
1649
1656
  let zoneNumber = '';
1650
1657
  if (/Z\d.+/g.test(command)) {
package/io-package.json CHANGED
@@ -1,8 +1,34 @@
1
1
  {
2
2
  "common": {
3
3
  "name": "denon",
4
- "version": "1.15.1",
4
+ "version": "1.15.3",
5
5
  "news": {
6
+ "1.15.3": {
7
+ "en": "fixed log entry when setting channel volume states (closes #321)",
8
+ "de": "fester log-eintrag beim einstellen von kanalvolumenzuständen (schließt #321)",
9
+ "ru": "фиксированный вход в систему при настройке состояния громкости канала (closes #321)",
10
+ "pt": "entrada de log fixo ao definir estados de volume de canal (fecha #321)",
11
+ "nl": "vertaling:",
12
+ "fr": "entrée en journal fixe lorsque le volume de canal indique (fermetures #321)",
13
+ "it": "voce di registro fissa quando si imposta il volume del canale stati (chiude #321)",
14
+ "es": "entrada de registro fijo cuando se establece el volumen del canal (cerca #321)",
15
+ "pl": "stworzona wersja logna, w której ustawione są stany kanałowe (zamknia #321)",
16
+ "uk": "фіксований запис журналу при встановленні об'ємних станів каналу (закривається #321)",
17
+ "zh-cn": "配量国时的固定标志(第321号)"
18
+ },
19
+ "1.15.2": {
20
+ "en": "fixed crash case with controller v5",
21
+ "de": "fester crashfall mit controller v5",
22
+ "ru": "фиксированный случай аварии с контроллером v5",
23
+ "pt": "caso de acidente fixo com controlador v5",
24
+ "nl": "vertaling:",
25
+ "fr": "boîtier de crash fixe avec controller v5",
26
+ "it": "caso di crash fisso con controller v5",
27
+ "es": "caso de accidente fijo con controlador v5",
28
+ "pl": "sprawa rozruchowa kontrolera v5",
29
+ "uk": "фіксований випадок з контролером v5",
30
+ "zh-cn": "a. 固定事故案件"
31
+ },
6
32
  "1.15.1": {
7
33
  "en": "fix `displayContent` showing old information (closes #318)",
8
34
  "de": "fix displayContent alte Informationen anzeigen (schließt #318)",
@@ -65,30 +91,6 @@
65
91
  "es": "el tiempo de espera fijo solo se aplica en la primera reconexión (correcciones # 232)",
66
92
  "pl": "naprawiony limit czasu stosowany tylko przy pierwszym ponownym połączeniu (poprawki #232)",
67
93
  "zh-cn": "固定超时蜂鸣仅适用于第一次重新连接(修复#232)"
68
- },
69
- "1.13.2": {
70
- "en": "fixed requesting interval",
71
- "de": "festes Abfrageintervall",
72
- "ru": "фиксированный интервал запроса",
73
- "pt": "intervalo de solicitação fixo",
74
- "nl": "vast verzoekinterval",
75
- "fr": "intervalle de demande fixe",
76
- "it": "intervallo di richiesta fisso",
77
- "es": "intervalo de solicitud fijo",
78
- "pl": "naprawiono interwał żądań",
79
- "zh-cn": "固定请求间隔"
80
- },
81
- "1.13.1": {
82
- "en": "added `settings.speakerPreset`",
83
- "de": "`settings.speakerPreset` hinzugefügt",
84
- "ru": "добавлен `settings.speakerPreset`",
85
- "pt": "adicionado `settings.speakerPreset`",
86
- "nl": "`settings.speakerPreset` toegevoegd",
87
- "fr": "ajout de `settings.speakerPreset`",
88
- "it": "aggiunto `settings.speakerPreset`",
89
- "es": "añadido `settings.speakerPreset`",
90
- "pl": "dodano `settings.speakerPreset`",
91
- "zh-cn": "添加了`settings.speakerPreset`"
92
94
  }
93
95
  },
94
96
  "title": "DENON AVR",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "iobroker.denon",
3
- "version": "1.15.1",
3
+ "version": "1.15.3",
4
4
  "engines": {
5
5
  "node": ">=14.0.0"
6
6
  },