iobroker.denon 1.15.3 → 1.15.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/README.md +3 -0
- package/build/main.js +38 -29
- package/io-package.json +14 -13
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -908,6 +908,9 @@ 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.4 (2023-08-19)
|
|
912
|
+
* (foxriver76) fixed detection of display content if content does not contain `NULL` (closes #323)
|
|
913
|
+
|
|
911
914
|
### 1.15.3 (2023-07-13)
|
|
912
915
|
* (foxriver76) fixed log entry when setting channel volume states (closes #321)
|
|
913
916
|
|
package/build/main.js
CHANGED
|
@@ -309,10 +309,9 @@ class Denon extends utils.Adapter {
|
|
|
309
309
|
});
|
|
310
310
|
this.client.on('data', data => {
|
|
311
311
|
// split data by <cr>
|
|
312
|
-
const dataArr = data.toString().split(/[\r\n]+/);
|
|
312
|
+
const dataArr = data.toString().split(/[\r\n]+/);
|
|
313
313
|
for (const data of dataArr) {
|
|
314
314
|
if (data) {
|
|
315
|
-
// data not empty
|
|
316
315
|
this.log.debug(`[DATA] <== Incoming data: ${data}`);
|
|
317
316
|
this.handleResponse(data);
|
|
318
317
|
}
|
|
@@ -1400,7 +1399,7 @@ class Denon extends utils.Adapter {
|
|
|
1400
1399
|
/**
|
|
1401
1400
|
* Handle single response from AVR
|
|
1402
1401
|
*
|
|
1403
|
-
* @param data
|
|
1402
|
+
* @param data single data line
|
|
1404
1403
|
*/
|
|
1405
1404
|
async handleResponse(data) {
|
|
1406
1405
|
if (!this.pollTimer) {
|
|
@@ -1418,33 +1417,10 @@ class Denon extends utils.Adapter {
|
|
|
1418
1417
|
}
|
|
1419
1418
|
// Detect receiver type --> first poll is SV? and SV00?
|
|
1420
1419
|
if (!this.receiverType) {
|
|
1421
|
-
|
|
1422
|
-
if (/^SV[\d]+/g.test(data)) {
|
|
1423
|
-
this.receiverType = 'US';
|
|
1424
|
-
await this.createStandardStates('US');
|
|
1425
|
-
this.log.debug('[UPDATE] Updating states');
|
|
1426
|
-
return void this.updateStates(); // Update states when connected
|
|
1427
|
-
}
|
|
1428
|
-
else {
|
|
1429
|
-
this.receiverType = 'DE';
|
|
1430
|
-
await this.createStandardStates('DE');
|
|
1431
|
-
this.log.debug('[UPDATE] Updating states');
|
|
1432
|
-
return void this.updateStates();
|
|
1433
|
-
}
|
|
1434
|
-
}
|
|
1435
|
-
else if (data.startsWith('BDSTATUS')) {
|
|
1436
|
-
// DENON Ceol Piccolo protocol detected , but we handle it as DE
|
|
1437
|
-
this.receiverType = 'DE';
|
|
1438
|
-
await this.createStandardStates('DE');
|
|
1439
|
-
this.log.debug('[UPDATE] Updating states');
|
|
1440
|
-
return void this.updateStates();
|
|
1441
|
-
}
|
|
1442
|
-
else {
|
|
1443
|
-
return;
|
|
1444
|
-
} // return if remote command received before response to SV (receiverCheck)
|
|
1420
|
+
return this.determineReceiverType(data);
|
|
1445
1421
|
}
|
|
1446
1422
|
else if (this.receiverType === 'US') {
|
|
1447
|
-
return
|
|
1423
|
+
return this.handleUsResponse(data);
|
|
1448
1424
|
}
|
|
1449
1425
|
// get command out of String
|
|
1450
1426
|
let command;
|
|
@@ -1540,7 +1516,8 @@ class Denon extends utils.Adapter {
|
|
|
1540
1516
|
// on older models it sometimes sends just NSE for unknown reasons - ignore it
|
|
1541
1517
|
return;
|
|
1542
1518
|
}
|
|
1543
|
-
|
|
1519
|
+
// Remove all STX, SOH, NULL
|
|
1520
|
+
const displayCont = (data.includes('\0') ? data.substring(4, data.indexOf('\0')) : data.substring(4)).replace(/[\1\2]/g, '');
|
|
1544
1521
|
const dispContNr = data.slice(3, 4);
|
|
1545
1522
|
if (!this.capabilities.display) {
|
|
1546
1523
|
await this.createDisplayAndHttp();
|
|
@@ -1860,6 +1837,38 @@ class Denon extends utils.Adapter {
|
|
|
1860
1837
|
this.log.debug(`[INFO] <== Unhandled command ${command}`);
|
|
1861
1838
|
}
|
|
1862
1839
|
}
|
|
1840
|
+
/**
|
|
1841
|
+
* Handle single response from AVR
|
|
1842
|
+
*
|
|
1843
|
+
* @param data single data line
|
|
1844
|
+
*/
|
|
1845
|
+
async determineReceiverType(data) {
|
|
1846
|
+
if (data.startsWith('SV') || /^MV\d+/g.test(data)) {
|
|
1847
|
+
if (/^SV[\d]+/g.test(data)) {
|
|
1848
|
+
this.receiverType = 'US';
|
|
1849
|
+
await this.createStandardStates('US');
|
|
1850
|
+
this.log.debug('[UPDATE] Updating states');
|
|
1851
|
+
return void this.updateStates(); // Update states when connected
|
|
1852
|
+
}
|
|
1853
|
+
else {
|
|
1854
|
+
this.receiverType = 'DE';
|
|
1855
|
+
await this.createStandardStates('DE');
|
|
1856
|
+
this.log.debug('[UPDATE] Updating states');
|
|
1857
|
+
return void this.updateStates();
|
|
1858
|
+
}
|
|
1859
|
+
}
|
|
1860
|
+
else if (data.startsWith('BDSTATUS')) {
|
|
1861
|
+
// DENON Ceol Piccolo protocol detected , but we handle it as DE
|
|
1862
|
+
this.receiverType = 'DE';
|
|
1863
|
+
await this.createStandardStates('DE');
|
|
1864
|
+
this.log.debug('[UPDATE] Updating states');
|
|
1865
|
+
return void this.updateStates();
|
|
1866
|
+
}
|
|
1867
|
+
else {
|
|
1868
|
+
// return if remote command received before response to SV (receiverCheck)
|
|
1869
|
+
return;
|
|
1870
|
+
}
|
|
1871
|
+
}
|
|
1863
1872
|
/**
|
|
1864
1873
|
* Create all zone specific objects for given zone
|
|
1865
1874
|
*
|
package/io-package.json
CHANGED
|
@@ -1,8 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"common": {
|
|
3
3
|
"name": "denon",
|
|
4
|
-
"version": "1.15.
|
|
4
|
+
"version": "1.15.4",
|
|
5
5
|
"news": {
|
|
6
|
+
"1.15.4": {
|
|
7
|
+
"en": "fixed detection of display content if content does not contain `NULL` (closes #323)",
|
|
8
|
+
"de": "feste Erkennung von Anzeigeinhalten, wenn Inhalt NULL nicht enthält (schließt #323)",
|
|
9
|
+
"ru": "фиксированное обнаружение содержимого дисплея, если содержимое не содержит NULL (заметки #323)",
|
|
10
|
+
"pt": "detecção fixa de conteúdo de exibição se o conteúdo não contém NULL (fecha #323)",
|
|
11
|
+
"nl": "vertaling:",
|
|
12
|
+
"fr": "détection fixe de contenu d'affichage si le contenu ne contient pas de NULL (ferme #323)",
|
|
13
|
+
"it": "rilevamento fisso del contenuto di visualizzazione se il contenuto non contiene NULL (chiude #323)",
|
|
14
|
+
"es": "detección fija de contenido de pantalla si el contenido no contiene NULL (cerca #323)",
|
|
15
|
+
"pl": "ostateczne wykrywanie treści nie zawiera NULL (oznaczenie #323)",
|
|
16
|
+
"uk": "фіксоване виявлення вмісту дисплея, якщо вміст не містить NULL (закриває #323)",
|
|
17
|
+
"zh-cn": "如果内容不包含NULL(编号:第323号)的固定识别显示内容"
|
|
18
|
+
},
|
|
6
19
|
"1.15.3": {
|
|
7
20
|
"en": "fixed log entry when setting channel volume states (closes #321)",
|
|
8
21
|
"de": "fester log-eintrag beim einstellen von kanalvolumenzuständen (schließt #321)",
|
|
@@ -79,18 +92,6 @@
|
|
|
79
92
|
"es": "ahora respetamos `requestInterval` al determinar el modelo AVR también",
|
|
80
93
|
"pl": "teraz szanujemy również „requestInterval” przy określaniu modelu AVR",
|
|
81
94
|
"zh-cn": "我们现在在确定 AVR 模型时也尊重`requestInterval`"
|
|
82
|
-
},
|
|
83
|
-
"1.13.3": {
|
|
84
|
-
"en": "fixed timeout beeing only applied on first reconnect (fixes #232)",
|
|
85
|
-
"de": "Behobenes Timeout, das nur beim ersten Reconnect angewendet wird (Fixes Nr. 232)",
|
|
86
|
-
"ru": "фиксированный тайм-аут применяется только при первом повторном подключении (исправления № 232)",
|
|
87
|
-
"pt": "tempo limite fixo sendo aplicado apenas na primeira reconexão (correções #232)",
|
|
88
|
-
"nl": "vaste time-out wordt alleen toegepast bij de eerste keer opnieuw verbinden (fixt #232)",
|
|
89
|
-
"fr": "le délai d'attente fixe n'est appliqué qu'à la première reconnexion (corrections #232)",
|
|
90
|
-
"it": "timeout fisso applicato solo alla prima riconnessione (correzioni n. 232)",
|
|
91
|
-
"es": "el tiempo de espera fijo solo se aplica en la primera reconexión (correcciones # 232)",
|
|
92
|
-
"pl": "naprawiony limit czasu stosowany tylko przy pierwszym ponownym połączeniu (poprawki #232)",
|
|
93
|
-
"zh-cn": "固定超时蜂鸣仅适用于第一次重新连接(修复#232)"
|
|
94
95
|
}
|
|
95
96
|
},
|
|
96
97
|
"title": "DENON AVR",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "iobroker.denon",
|
|
3
|
-
"version": "1.15.
|
|
3
|
+
"version": "1.15.4",
|
|
4
4
|
"engines": {
|
|
5
5
|
"node": ">=14.0.0"
|
|
6
6
|
},
|
|
@@ -41,12 +41,12 @@
|
|
|
41
41
|
"@typescript-eslint/parser": "^5.48.0",
|
|
42
42
|
"axios": "^0.26.1",
|
|
43
43
|
"chai": "^4.3.6",
|
|
44
|
-
"eslint": "^8.
|
|
45
|
-
"eslint-config-prettier": "^
|
|
46
|
-
"eslint-plugin-prettier": "^
|
|
44
|
+
"eslint": "^8.47.0",
|
|
45
|
+
"eslint-config-prettier": "^9.0.0",
|
|
46
|
+
"eslint-plugin-prettier": "^5.0.0",
|
|
47
47
|
"gulp": "^4.0.2",
|
|
48
48
|
"mocha": "^9.2.2",
|
|
49
|
-
"prettier": "^
|
|
49
|
+
"prettier": "^3.0.2",
|
|
50
50
|
"ts-node": "^10.9.1",
|
|
51
51
|
"typescript": "^4.9.4"
|
|
52
52
|
},
|