homebridge-denon-tv 5.2.1 → 5.2.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/CHANGELOG.md +7 -0
- package/index.js +29 -29
- package/package.json +4 -4
- package/src/denon.js +10 -10
- package/src/mainzone.js +10 -10
- package/src/mqtt.js +2 -2
- package/src/surround.js +9 -9
- package/src/zone2.js +10 -10
- package/src/zone3.js +10 -10
package/CHANGELOG.md
CHANGED
|
@@ -11,6 +11,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
11
11
|
- after update to 4.7.x buttons, sensors, volume display type need to be configure again using config UI
|
|
12
12
|
- after update to 3.15.x need remove the accessory frome Home app and add it again
|
|
13
13
|
|
|
14
|
+
## [5.2.3] - (19.12.2024)
|
|
15
|
+
|
|
16
|
+
## Changes
|
|
17
|
+
|
|
18
|
+
- bump dependencies
|
|
19
|
+
- cleanup
|
|
20
|
+
|
|
14
21
|
## [5.2.0] - (01.12.2024)
|
|
15
22
|
|
|
16
23
|
## Changes
|
package/index.js
CHANGED
|
@@ -11,7 +11,7 @@ class DenonPlatform {
|
|
|
11
11
|
constructor(log, config, api) {
|
|
12
12
|
// only load if configured
|
|
13
13
|
if (!config || !Array.isArray(config.devices)) {
|
|
14
|
-
log.warn(`No configuration found for ${PluginName}
|
|
14
|
+
log.warn(`No configuration found for ${PluginName}.`);
|
|
15
15
|
return;
|
|
16
16
|
}
|
|
17
17
|
this.accessories = [];
|
|
@@ -21,7 +21,7 @@ class DenonPlatform {
|
|
|
21
21
|
try {
|
|
22
22
|
mkdirSync(prefDir, { recursive: true });
|
|
23
23
|
} catch (error) {
|
|
24
|
-
log.error(`Prepare directory error: ${error
|
|
24
|
+
log.error(`Prepare directory error: ${error}.`);
|
|
25
25
|
return;
|
|
26
26
|
}
|
|
27
27
|
|
|
@@ -47,7 +47,7 @@ class DenonPlatform {
|
|
|
47
47
|
passwd: 'removed'
|
|
48
48
|
}
|
|
49
49
|
};
|
|
50
|
-
const debug1 = enableDebugMode ? log.info(`Device: ${host} ${deviceName}, Config: ${JSON.stringify(config, null, 2)}
|
|
50
|
+
const debug1 = enableDebugMode ? log.info(`Device: ${host} ${deviceName}, Config: ${JSON.stringify(config, null, 2)}.`) : false;
|
|
51
51
|
|
|
52
52
|
//zones
|
|
53
53
|
const zoneControl = device.zoneControl;
|
|
@@ -75,7 +75,7 @@ class DenonPlatform {
|
|
|
75
75
|
}
|
|
76
76
|
});
|
|
77
77
|
} catch (error) {
|
|
78
|
-
log.error(`Device: ${host} ${deviceName}, Prepare files error: ${error}
|
|
78
|
+
log.error(`Device: ${host} ${deviceName}, Prepare files error: ${error}.`);
|
|
79
79
|
return;
|
|
80
80
|
}
|
|
81
81
|
|
|
@@ -92,19 +92,19 @@ class DenonPlatform {
|
|
|
92
92
|
log.info(devInfo);
|
|
93
93
|
})
|
|
94
94
|
.on('success', (message) => {
|
|
95
|
-
log.success(`Device: ${host} ${deviceName}, ${message}
|
|
95
|
+
log.success(`Device: ${host} ${deviceName}, ${message}.`);
|
|
96
96
|
})
|
|
97
97
|
.on('message', (message) => {
|
|
98
|
-
log.info(`Device: ${host} ${deviceName}, ${message}
|
|
98
|
+
log.info(`Device: ${host} ${deviceName}, ${message}.`);
|
|
99
99
|
})
|
|
100
100
|
.on('debug', (debug) => {
|
|
101
|
-
log.info(`Device: ${host} ${deviceName}, debug: ${debug}
|
|
101
|
+
log.info(`Device: ${host} ${deviceName}, debug: ${debug}.`);
|
|
102
102
|
})
|
|
103
103
|
.on('warn', (warn) => {
|
|
104
|
-
log.warn(`Device: ${host} ${deviceName}, ${warn}
|
|
104
|
+
log.warn(`Device: ${host} ${deviceName}, ${warn}.`);
|
|
105
105
|
})
|
|
106
106
|
.on('error', async (error) => {
|
|
107
|
-
log.error(`Device: ${host} ${deviceName}, ${error}
|
|
107
|
+
log.error(`Device: ${host} ${deviceName}, ${error}.`);
|
|
108
108
|
});
|
|
109
109
|
|
|
110
110
|
//create impulse generator
|
|
@@ -123,7 +123,7 @@ class DenonPlatform {
|
|
|
123
123
|
//start impulse generator
|
|
124
124
|
impulseGenerator.start([{ name: 'start', sampling: 45000 }]);
|
|
125
125
|
} catch (error) {
|
|
126
|
-
log.error(`Device: ${host} ${deviceName}, Did finish launching error: ${error}
|
|
126
|
+
log.error(`Device: ${host} ${deviceName}, Did finish launching error: ${error}.`);
|
|
127
127
|
}
|
|
128
128
|
break;
|
|
129
129
|
case 1: //zone 1
|
|
@@ -137,19 +137,19 @@ class DenonPlatform {
|
|
|
137
137
|
log(devInfo);
|
|
138
138
|
})
|
|
139
139
|
.on('success', (message) => {
|
|
140
|
-
log.success(`Device: ${host} ${deviceName}, ${message}
|
|
140
|
+
log.success(`Device: ${host} ${deviceName}, ${message}.`);
|
|
141
141
|
})
|
|
142
142
|
.on('message', (message) => {
|
|
143
|
-
log(`Device: ${host} ${deviceName}, ${message}
|
|
143
|
+
log(`Device: ${host} ${deviceName}, ${message}.`);
|
|
144
144
|
})
|
|
145
145
|
.on('debug', (debug) => {
|
|
146
|
-
log(`Device: ${host} ${deviceName}, debug: ${debug}
|
|
146
|
+
log(`Device: ${host} ${deviceName}, debug: ${debug}.`);
|
|
147
147
|
})
|
|
148
148
|
.on('warn', (warn) => {
|
|
149
|
-
log.warn(`Device: ${host} ${deviceName}, ${warn}
|
|
149
|
+
log.warn(`Device: ${host} ${deviceName}, ${warn}.`);
|
|
150
150
|
})
|
|
151
151
|
.on('error', async (error) => {
|
|
152
|
-
log.error(`Device: ${host} ${deviceName}, ${error}
|
|
152
|
+
log.error(`Device: ${host} ${deviceName}, ${error}.`);
|
|
153
153
|
});
|
|
154
154
|
|
|
155
155
|
//create impulse generator
|
|
@@ -168,7 +168,7 @@ class DenonPlatform {
|
|
|
168
168
|
//start impulse generator
|
|
169
169
|
impulseGenerator.start([{ name: 'start', sampling: 45000 }]);
|
|
170
170
|
} catch (error) {
|
|
171
|
-
log.error(`Device: ${host} ${deviceName}, Did finish launching error: ${error}
|
|
171
|
+
log.error(`Device: ${host} ${deviceName}, Did finish launching error: ${error}.`);
|
|
172
172
|
}
|
|
173
173
|
break;
|
|
174
174
|
case 2: //zone 2
|
|
@@ -182,19 +182,19 @@ class DenonPlatform {
|
|
|
182
182
|
log.info(devInfo);
|
|
183
183
|
})
|
|
184
184
|
.on('success', (message) => {
|
|
185
|
-
log.success(`Device: ${host} ${deviceName}, ${message}
|
|
185
|
+
log.success(`Device: ${host} ${deviceName}, ${message}.`);
|
|
186
186
|
})
|
|
187
187
|
.on('message', (message) => {
|
|
188
|
-
log.info(`Device: ${host} ${deviceName}, ${message}
|
|
188
|
+
log.info(`Device: ${host} ${deviceName}, ${message}.`);
|
|
189
189
|
})
|
|
190
190
|
.on('debug', (debug) => {
|
|
191
|
-
log.info(`Device: ${host} ${deviceName}, debug: ${debug}
|
|
191
|
+
log.info(`Device: ${host} ${deviceName}, debug: ${debug}.`);
|
|
192
192
|
})
|
|
193
193
|
.on('warn', (warn) => {
|
|
194
|
-
log.warn(`Device: ${host} ${deviceName}, ${warn}
|
|
194
|
+
log.warn(`Device: ${host} ${deviceName}, ${warn}.`);
|
|
195
195
|
})
|
|
196
196
|
.on('error', async (error) => {
|
|
197
|
-
log.error(`Device: ${host} ${deviceName}, ${error}
|
|
197
|
+
log.error(`Device: ${host} ${deviceName}, ${error}.`);
|
|
198
198
|
});
|
|
199
199
|
|
|
200
200
|
//create impulse generator
|
|
@@ -213,7 +213,7 @@ class DenonPlatform {
|
|
|
213
213
|
//start impulse generator
|
|
214
214
|
impulseGenerator.start([{ name: 'start', sampling: 45000 }]);
|
|
215
215
|
} catch (error) {
|
|
216
|
-
log.error(`Device: ${host} ${deviceName}, Did finish launching error: ${error}
|
|
216
|
+
log.error(`Device: ${host} ${deviceName}, Did finish launching error: ${error}.`);
|
|
217
217
|
}
|
|
218
218
|
break;
|
|
219
219
|
case 3: //surround
|
|
@@ -227,19 +227,19 @@ class DenonPlatform {
|
|
|
227
227
|
log.info(devInfo);
|
|
228
228
|
})
|
|
229
229
|
.on('success', (message) => {
|
|
230
|
-
log.success(`Device: ${host} ${deviceName}, ${message}
|
|
230
|
+
log.success(`Device: ${host} ${deviceName}, ${message}.`);
|
|
231
231
|
})
|
|
232
232
|
.on('message', (message) => {
|
|
233
|
-
log.info(`Device: ${host} ${deviceName}, ${message}
|
|
233
|
+
log.info(`Device: ${host} ${deviceName}, ${message}.`);
|
|
234
234
|
})
|
|
235
235
|
.on('debug', (debug) => {
|
|
236
|
-
log.info(`Device: ${host} ${deviceName}, debug: ${debug}
|
|
236
|
+
log.info(`Device: ${host} ${deviceName}, debug: ${debug}.`);
|
|
237
237
|
})
|
|
238
238
|
.on('warn', (warn) => {
|
|
239
|
-
log.warn(`Device: ${host} ${deviceName}, ${warn}
|
|
239
|
+
log.warn(`Device: ${host} ${deviceName}, ${warn}.`);
|
|
240
240
|
})
|
|
241
241
|
.on('error', async (error) => {
|
|
242
|
-
log.error(`Device: ${host} ${deviceName}, ${error}
|
|
242
|
+
log.error(`Device: ${host} ${deviceName}, ${error}.`);
|
|
243
243
|
});
|
|
244
244
|
|
|
245
245
|
//create impulse generator
|
|
@@ -258,11 +258,11 @@ class DenonPlatform {
|
|
|
258
258
|
//start impulse generator
|
|
259
259
|
impulseGenerator.start([{ name: 'start', sampling: 45000 }]);
|
|
260
260
|
} catch (error) {
|
|
261
|
-
log.error(`Device: ${host} ${deviceName}, Did finish launching error: ${error}
|
|
261
|
+
log.error(`Device: ${host} ${deviceName}, Did finish launching error: ${error}.`);
|
|
262
262
|
}
|
|
263
263
|
break;
|
|
264
264
|
default:
|
|
265
|
-
log.warn(`Device: ${host} ${deviceName}, unknown zone: ${zoneControl}
|
|
265
|
+
log.warn(`Device: ${host} ${deviceName}, unknown zone: ${zoneControl}.`);
|
|
266
266
|
break;
|
|
267
267
|
}
|
|
268
268
|
await new Promise(resolve => setTimeout(resolve, 500));
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"displayName": "Denon TV",
|
|
3
3
|
"name": "homebridge-denon-tv",
|
|
4
|
-
"version": "5.2.
|
|
4
|
+
"version": "5.2.3",
|
|
5
5
|
"description": "Homebridge plugin to control Denon/Marantz AV Receivers.",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"author": "grzegorz914",
|
|
@@ -35,9 +35,9 @@
|
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"async-mqtt": "^2.6.3",
|
|
38
|
-
"axios": "^1.7.
|
|
39
|
-
"fast-xml-parser": "^4.5.
|
|
40
|
-
"express": "^4.21.
|
|
38
|
+
"axios": "^1.7.9",
|
|
39
|
+
"fast-xml-parser": "^4.5.1",
|
|
40
|
+
"express": "^4.21.2"
|
|
41
41
|
},
|
|
42
42
|
"keywords": [
|
|
43
43
|
"homebridge",
|
package/src/denon.js
CHANGED
|
@@ -79,10 +79,10 @@ class Denon extends EventEmitter {
|
|
|
79
79
|
try {
|
|
80
80
|
await this.checkState();
|
|
81
81
|
} catch (error) {
|
|
82
|
-
const logError = config.disableLogConnectError ? false : this.emit('error', `Impulse generator
|
|
82
|
+
const logError = config.disableLogConnectError ? false : this.emit('error', `Impulse generator error: ${error}`);
|
|
83
83
|
};
|
|
84
84
|
}).on('state', (state) => {
|
|
85
|
-
const emitState = state ? this.emit('success', `Impulse generator started
|
|
85
|
+
const emitState = state ? this.emit('success', `Impulse generator started`) : this.emit('warn', `Impulse generator stopped`);
|
|
86
86
|
});
|
|
87
87
|
};
|
|
88
88
|
|
|
@@ -201,7 +201,7 @@ class Denon extends EventEmitter {
|
|
|
201
201
|
|
|
202
202
|
//check seriaql number
|
|
203
203
|
if (!serialNumber) {
|
|
204
|
-
this.emit('error', `Missing Serial Number
|
|
204
|
+
this.emit('error', `Missing Serial Number`);
|
|
205
205
|
return;
|
|
206
206
|
}
|
|
207
207
|
|
|
@@ -218,14 +218,14 @@ class Denon extends EventEmitter {
|
|
|
218
218
|
|
|
219
219
|
//check inputs
|
|
220
220
|
if (!inputsExist) {
|
|
221
|
-
this.emit('warn', `Found: ${allInputs} inputs
|
|
221
|
+
this.emit('warn', `Found: ${allInputs} inputs`);
|
|
222
222
|
}
|
|
223
223
|
|
|
224
224
|
//save inputs if exist
|
|
225
225
|
const saveInputs = inputsExist ? await this.saveData(this.inputsFile, allInputs) : false;
|
|
226
226
|
|
|
227
227
|
//connect to deice success
|
|
228
|
-
this.emit('success', `Connect Success
|
|
228
|
+
this.emit('success', `Connect Success`)
|
|
229
229
|
|
|
230
230
|
//emit device info
|
|
231
231
|
this.emit('deviceInfo', manufacturer, modelName, serialNumber, firmwareRevision, deviceZones, apiVersion, supportPictureMode);
|
|
@@ -238,7 +238,7 @@ class Denon extends EventEmitter {
|
|
|
238
238
|
|
|
239
239
|
return true;
|
|
240
240
|
} catch (error) {
|
|
241
|
-
throw new Error(`Connect error: ${error
|
|
241
|
+
throw new Error(`Connect error: ${error}`);
|
|
242
242
|
|
|
243
243
|
};
|
|
244
244
|
};
|
|
@@ -316,7 +316,7 @@ class Denon extends EventEmitter {
|
|
|
316
316
|
|
|
317
317
|
return true;
|
|
318
318
|
} catch (error) {
|
|
319
|
-
throw new Error(`Check state error: ${error
|
|
319
|
+
throw new Error(`Check state error: ${error}`);
|
|
320
320
|
};
|
|
321
321
|
};
|
|
322
322
|
|
|
@@ -450,7 +450,7 @@ class Denon extends EventEmitter {
|
|
|
450
450
|
|
|
451
451
|
return allInputs;
|
|
452
452
|
} catch (error) {
|
|
453
|
-
throw new Error(`Get inputus error: ${error
|
|
453
|
+
throw new Error(`Get inputus error: ${error}`);
|
|
454
454
|
}
|
|
455
455
|
};
|
|
456
456
|
|
|
@@ -461,7 +461,7 @@ class Denon extends EventEmitter {
|
|
|
461
461
|
const debug = this.debugLog ? this.emit('debug', `Saved data: ${data}`) : false;
|
|
462
462
|
return true;
|
|
463
463
|
} catch (error) {
|
|
464
|
-
throw new Error(`Save data error: ${error
|
|
464
|
+
throw new Error(`Save data error: ${error}`);
|
|
465
465
|
};
|
|
466
466
|
};
|
|
467
467
|
|
|
@@ -471,7 +471,7 @@ class Denon extends EventEmitter {
|
|
|
471
471
|
await this.axiosInstance(path);
|
|
472
472
|
return true;
|
|
473
473
|
} catch (error) {
|
|
474
|
-
throw new Error(error);
|
|
474
|
+
throw new Error(`Send data error: ${error}`);
|
|
475
475
|
};
|
|
476
476
|
};
|
|
477
477
|
};
|
package/src/mainzone.js
CHANGED
|
@@ -76,7 +76,7 @@ class MainZone extends EventEmitter {
|
|
|
76
76
|
sensor.state = false;
|
|
77
77
|
this.sensorsInputsConfigured.push(sensor);
|
|
78
78
|
} else {
|
|
79
|
-
const log = sensorInputDisplayType === 0 ? false : this.emit('message', `Sensor Name: ${sensorInputName ? sensorInputName : 'Missing'}, Reference: ${sensorInputReference ? sensorInputReference : 'Missing'}
|
|
79
|
+
const log = sensorInputDisplayType === 0 ? false : this.emit('message', `Sensor Name: ${sensorInputName ? sensorInputName : 'Missing'}, Reference: ${sensorInputReference ? sensorInputReference : 'Missing'}`);
|
|
80
80
|
};
|
|
81
81
|
}
|
|
82
82
|
this.sensorsInputsConfiguredCount = this.sensorsInputsConfigured.length || 0;
|
|
@@ -94,7 +94,7 @@ class MainZone extends EventEmitter {
|
|
|
94
94
|
button.state = false;
|
|
95
95
|
this.buttonsConfigured.push(button);
|
|
96
96
|
} else {
|
|
97
|
-
const log = buttonDisplayType === 0 ? false : this.emit('message', `Button Name: ${buttonName ? buttonName : 'Missing'}, Reference: ${buttonReference ? buttonReference : 'Missing'}
|
|
97
|
+
const log = buttonDisplayType === 0 ? false : this.emit('message', `Button Name: ${buttonName ? buttonName : 'Missing'}, Reference: ${buttonReference ? buttonReference : 'Missing'}`);
|
|
98
98
|
};
|
|
99
99
|
}
|
|
100
100
|
this.buttonsConfiguredCount = this.buttonsConfigured.length || 0;
|
|
@@ -204,7 +204,7 @@ class MainZone extends EventEmitter {
|
|
|
204
204
|
try {
|
|
205
205
|
await this.setOverExternalIntegration('MQTT', key, value);
|
|
206
206
|
} catch (error) {
|
|
207
|
-
this.emit('warn', `MQTT set error: ${error}
|
|
207
|
+
this.emit('warn', `MQTT set error: ${error}`);
|
|
208
208
|
};
|
|
209
209
|
})
|
|
210
210
|
.on('debug', (debug) => {
|
|
@@ -215,7 +215,7 @@ class MainZone extends EventEmitter {
|
|
|
215
215
|
});
|
|
216
216
|
};
|
|
217
217
|
} catch (error) {
|
|
218
|
-
this.emit('warn', `External integration start error: ${error
|
|
218
|
+
this.emit('warn', `External integration start error: ${error}`);
|
|
219
219
|
};
|
|
220
220
|
})
|
|
221
221
|
.on('prepareAccessory', async (allInputs) => {
|
|
@@ -245,7 +245,7 @@ class MainZone extends EventEmitter {
|
|
|
245
245
|
//start impulse generator
|
|
246
246
|
await this.denon.impulseGenerator.start([{ name: 'checkState', sampling: this.refreshInterval }]);
|
|
247
247
|
} catch (error) {
|
|
248
|
-
this.emit('error', `Prepare accessory error: ${error
|
|
248
|
+
this.emit('error', `Prepare accessory error: ${error}`);
|
|
249
249
|
};
|
|
250
250
|
})
|
|
251
251
|
.on('stateChanged', (power, reference, volume, volumeControlType, mute, pictureMode) => {
|
|
@@ -386,7 +386,7 @@ class MainZone extends EventEmitter {
|
|
|
386
386
|
|
|
387
387
|
return true;
|
|
388
388
|
} catch (error) {
|
|
389
|
-
throw new Error(`Start error: ${error
|
|
389
|
+
throw new Error(`Start error: ${error}`);
|
|
390
390
|
};
|
|
391
391
|
};
|
|
392
392
|
|
|
@@ -415,7 +415,7 @@ class MainZone extends EventEmitter {
|
|
|
415
415
|
this.televisionService.setCharacteristic(Characteristic.DisplayOrder, Encode(1, displayOrder).toString('base64'));
|
|
416
416
|
return true;
|
|
417
417
|
} catch (error) {
|
|
418
|
-
throw new Error(`Display order error: ${error
|
|
418
|
+
throw new Error(`Display order error: ${error}`);
|
|
419
419
|
};
|
|
420
420
|
}
|
|
421
421
|
|
|
@@ -426,7 +426,7 @@ class MainZone extends EventEmitter {
|
|
|
426
426
|
const debug = this.debugLog ? this.emit('debug', `Saved data: ${data}`) : false;
|
|
427
427
|
return true;
|
|
428
428
|
} catch (error) {
|
|
429
|
-
throw new Error(`Save data error: ${error
|
|
429
|
+
throw new Error(`Save data error: ${error}`);
|
|
430
430
|
};
|
|
431
431
|
}
|
|
432
432
|
|
|
@@ -435,7 +435,7 @@ class MainZone extends EventEmitter {
|
|
|
435
435
|
const data = await fsPromises.readFile(path);
|
|
436
436
|
return data;
|
|
437
437
|
} catch (error) {
|
|
438
|
-
throw new Error(`Read data error: ${error
|
|
438
|
+
throw new Error(`Read data error: ${error}`);
|
|
439
439
|
};
|
|
440
440
|
}
|
|
441
441
|
|
|
@@ -473,7 +473,7 @@ class MainZone extends EventEmitter {
|
|
|
473
473
|
};
|
|
474
474
|
return set;
|
|
475
475
|
} catch (error) {
|
|
476
|
-
throw new Error(`${integration} set key: ${key}, value: ${value}, error: ${error
|
|
476
|
+
throw new Error(`${integration} set key: ${key}, value: ${value}, error: ${error}`);
|
|
477
477
|
};
|
|
478
478
|
}
|
|
479
479
|
|
package/src/mqtt.js
CHANGED
|
@@ -17,11 +17,11 @@ class Mqtt extends EventEmitter {
|
|
|
17
17
|
try {
|
|
18
18
|
//connect
|
|
19
19
|
this.mqttClient = await connectAsync(url, options);
|
|
20
|
-
this.emit('connected', 'MQTT Connected
|
|
20
|
+
this.emit('connected', 'MQTT Connected');
|
|
21
21
|
|
|
22
22
|
//subscribe
|
|
23
23
|
await this.mqttClient.subscribe(subscribeTopic);
|
|
24
|
-
this.emit('subscribed', `MQTT Subscribe topic: ${subscribeTopic}
|
|
24
|
+
this.emit('subscribed', `MQTT Subscribe topic: ${subscribeTopic}`);
|
|
25
25
|
|
|
26
26
|
//subscribed message
|
|
27
27
|
this.mqttClient.on('message', (topic, message) => {
|
package/src/surround.js
CHANGED
|
@@ -77,7 +77,7 @@ class Surround extends EventEmitter {
|
|
|
77
77
|
sensor.state = false;
|
|
78
78
|
this.sensorsInputsConfigured.push(sensor);
|
|
79
79
|
} else {
|
|
80
|
-
const log = sensorInputDisplayType === 0 ? false : this.emit('message', `Sensor Name: ${sensorInputName ? sensorInputName : 'Missing'}, Reference: ${sensorInputReference ? sensorInputReference : 'Missing'}
|
|
80
|
+
const log = sensorInputDisplayType === 0 ? false : this.emit('message', `Sensor Name: ${sensorInputName ? sensorInputName : 'Missing'}, Reference: ${sensorInputReference ? sensorInputReference : 'Missing'}`);
|
|
81
81
|
};
|
|
82
82
|
}
|
|
83
83
|
this.sensorsInputsConfiguredCount = this.sensorsInputsConfigured.length || 0;
|
|
@@ -185,7 +185,7 @@ class Surround extends EventEmitter {
|
|
|
185
185
|
try {
|
|
186
186
|
await this.setOverExternalIntegration('MQTT', key, value);
|
|
187
187
|
} catch (error) {
|
|
188
|
-
this.emit('warn', `MQTT set error: ${error}
|
|
188
|
+
this.emit('warn', `MQTT set error: ${error}`);
|
|
189
189
|
};
|
|
190
190
|
})
|
|
191
191
|
.on('debug', (debug) => {
|
|
@@ -196,7 +196,7 @@ class Surround extends EventEmitter {
|
|
|
196
196
|
});
|
|
197
197
|
};
|
|
198
198
|
} catch (error) {
|
|
199
|
-
this.emit('error', `External integration start error: ${error
|
|
199
|
+
this.emit('error', `External integration start error: ${error}`);
|
|
200
200
|
};
|
|
201
201
|
})
|
|
202
202
|
.on('prepareAccessory', async (allInputs) => {
|
|
@@ -226,7 +226,7 @@ class Surround extends EventEmitter {
|
|
|
226
226
|
//start impulse generator
|
|
227
227
|
await this.denon.impulseGenerator.start([{ name: 'checkState', sampling: this.refreshInterval }]);
|
|
228
228
|
} catch (error) {
|
|
229
|
-
this.emit('error', `Prepare accessory error: ${error
|
|
229
|
+
this.emit('error', `Prepare accessory error: ${error}`);
|
|
230
230
|
};
|
|
231
231
|
})
|
|
232
232
|
.on('stateChanged', (power, reference, volume, volumeControlType, mute, pictureMode) => {
|
|
@@ -352,7 +352,7 @@ class Surround extends EventEmitter {
|
|
|
352
352
|
|
|
353
353
|
return true;
|
|
354
354
|
} catch (error) {
|
|
355
|
-
throw new Error(`Start error: ${error
|
|
355
|
+
throw new Error(`Start error: ${error}`);
|
|
356
356
|
};
|
|
357
357
|
};
|
|
358
358
|
|
|
@@ -381,7 +381,7 @@ class Surround extends EventEmitter {
|
|
|
381
381
|
this.televisionService.setCharacteristic(Characteristic.DisplayOrder, Encode(1, displayOrder).toString('base64'));
|
|
382
382
|
return true;
|
|
383
383
|
} catch (error) {
|
|
384
|
-
throw new Error(`Display order error: ${error
|
|
384
|
+
throw new Error(`Display order error: ${error}`);
|
|
385
385
|
};
|
|
386
386
|
}
|
|
387
387
|
|
|
@@ -392,7 +392,7 @@ class Surround extends EventEmitter {
|
|
|
392
392
|
const debug = this.debugLog ? this.emit('debug', `Saved data: ${data}`) : false;
|
|
393
393
|
return true;
|
|
394
394
|
} catch (error) {
|
|
395
|
-
throw new Error(`Save data error: ${error
|
|
395
|
+
throw new Error(`Save data error: ${error}`);
|
|
396
396
|
};
|
|
397
397
|
}
|
|
398
398
|
|
|
@@ -401,7 +401,7 @@ class Surround extends EventEmitter {
|
|
|
401
401
|
const data = await fsPromises.readFile(path);
|
|
402
402
|
return data;
|
|
403
403
|
} catch (error) {
|
|
404
|
-
throw new Error(`Read saved data error: ${error
|
|
404
|
+
throw new Error(`Read saved data error: ${error}`);
|
|
405
405
|
};
|
|
406
406
|
}
|
|
407
407
|
|
|
@@ -439,7 +439,7 @@ class Surround extends EventEmitter {
|
|
|
439
439
|
};
|
|
440
440
|
return set;
|
|
441
441
|
} catch (error) {
|
|
442
|
-
throw new Error(`${integration} set key: ${key}, value: ${value}, error: ${error
|
|
442
|
+
throw new Error(`${integration} set key: ${key}, value: ${value}, error: ${error}`);
|
|
443
443
|
};
|
|
444
444
|
}
|
|
445
445
|
|
package/src/zone2.js
CHANGED
|
@@ -80,7 +80,7 @@ class Zone2 extends EventEmitter {
|
|
|
80
80
|
sensor.state = false;
|
|
81
81
|
this.sensorsInputsConfigured.push(sensor);
|
|
82
82
|
} else {
|
|
83
|
-
const log = sensorInputDisplayType === 0 ? false : this.emit('message', `Sensor Name: ${sensorInputName ? sensorInputName : 'Missing'}, Reference: ${sensorInputReference ? sensorInputReference : 'Missing'}
|
|
83
|
+
const log = sensorInputDisplayType === 0 ? false : this.emit('message', `Sensor Name: ${sensorInputName ? sensorInputName : 'Missing'}, Reference: ${sensorInputReference ? sensorInputReference : 'Missing'}`);
|
|
84
84
|
};
|
|
85
85
|
}
|
|
86
86
|
this.sensorsInputsConfiguredCount = this.sensorsInputsConfigured.length || 0;
|
|
@@ -98,7 +98,7 @@ class Zone2 extends EventEmitter {
|
|
|
98
98
|
button.state = false;
|
|
99
99
|
this.buttonsConfigured.push(button);
|
|
100
100
|
} else {
|
|
101
|
-
const log = buttonDisplayType === 0 ? false : this.emit('message', `Button Name: ${buttonName ? buttonName : 'Missing'}, Reference: ${buttonReference ? buttonReference : 'Missing'}
|
|
101
|
+
const log = buttonDisplayType === 0 ? false : this.emit('message', `Button Name: ${buttonName ? buttonName : 'Missing'}, Reference: ${buttonReference ? buttonReference : 'Missing'}`);
|
|
102
102
|
};
|
|
103
103
|
}
|
|
104
104
|
this.buttonsConfiguredCount = this.buttonsConfigured.length || 0;
|
|
@@ -204,7 +204,7 @@ class Zone2 extends EventEmitter {
|
|
|
204
204
|
try {
|
|
205
205
|
await this.setOverExternalIntegration('MQTT', key, value);
|
|
206
206
|
} catch (error) {
|
|
207
|
-
this.emit('warn', `MQTT set error: ${error}
|
|
207
|
+
this.emit('warn', `MQTT set error: ${error}`);
|
|
208
208
|
};
|
|
209
209
|
})
|
|
210
210
|
.on('debug', (debug) => {
|
|
@@ -215,7 +215,7 @@ class Zone2 extends EventEmitter {
|
|
|
215
215
|
});
|
|
216
216
|
};
|
|
217
217
|
} catch (error) {
|
|
218
|
-
this.emit('warn', `External integrationstart error: ${error
|
|
218
|
+
this.emit('warn', `External integrationstart error: ${error}`);
|
|
219
219
|
};
|
|
220
220
|
})
|
|
221
221
|
.on('prepareAccessory', async (allInputs) => {
|
|
@@ -245,7 +245,7 @@ class Zone2 extends EventEmitter {
|
|
|
245
245
|
//start impulse generator
|
|
246
246
|
await this.denon.impulseGenerator.start([{ name: 'checkState', sampling: this.refreshInterval }]);
|
|
247
247
|
} catch (error) {
|
|
248
|
-
this.emit('error', `Prepare accessory error: ${error
|
|
248
|
+
this.emit('error', `Prepare accessory error: ${error}`);
|
|
249
249
|
};
|
|
250
250
|
})
|
|
251
251
|
.on('stateChanged', (power, reference, volume, volumeControlType, mute, pictureMode) => {
|
|
@@ -382,7 +382,7 @@ class Zone2 extends EventEmitter {
|
|
|
382
382
|
|
|
383
383
|
return true;
|
|
384
384
|
} catch (error) {
|
|
385
|
-
throw new Error(`Start error: ${error
|
|
385
|
+
throw new Error(`Start error: ${error}`);
|
|
386
386
|
};
|
|
387
387
|
};
|
|
388
388
|
|
|
@@ -411,7 +411,7 @@ class Zone2 extends EventEmitter {
|
|
|
411
411
|
this.televisionService.setCharacteristic(Characteristic.DisplayOrder, Encode(1, displayOrder).toString('base64'));
|
|
412
412
|
return true;
|
|
413
413
|
} catch (error) {
|
|
414
|
-
throw new Error(`Display order error: ${error
|
|
414
|
+
throw new Error(`Display order error: ${error}`);
|
|
415
415
|
};
|
|
416
416
|
}
|
|
417
417
|
|
|
@@ -422,7 +422,7 @@ class Zone2 extends EventEmitter {
|
|
|
422
422
|
const debug = this.debugLog ? this.emit('debug', `Saved data: ${data}`) : false;
|
|
423
423
|
return true;
|
|
424
424
|
} catch (error) {
|
|
425
|
-
throw new Error(`Save data error: ${error
|
|
425
|
+
throw new Error(`Save data error: ${error}`);
|
|
426
426
|
};
|
|
427
427
|
}
|
|
428
428
|
|
|
@@ -431,7 +431,7 @@ class Zone2 extends EventEmitter {
|
|
|
431
431
|
const data = await fsPromises.readFile(path);
|
|
432
432
|
return data;
|
|
433
433
|
} catch (error) {
|
|
434
|
-
throw new Error(`Read saved data error: ${error
|
|
434
|
+
throw new Error(`Read saved data error: ${error}`);
|
|
435
435
|
};
|
|
436
436
|
}
|
|
437
437
|
|
|
@@ -469,7 +469,7 @@ class Zone2 extends EventEmitter {
|
|
|
469
469
|
};
|
|
470
470
|
return set;
|
|
471
471
|
} catch (error) {
|
|
472
|
-
throw new Error(`${integration} set key: ${key}, value: ${value}, error: ${error
|
|
472
|
+
throw new Error(`${integration} set key: ${key}, value: ${value}, error: ${error}`);
|
|
473
473
|
};
|
|
474
474
|
}
|
|
475
475
|
|
package/src/zone3.js
CHANGED
|
@@ -80,7 +80,7 @@ class Zone3 extends EventEmitter {
|
|
|
80
80
|
sensor.state = false;
|
|
81
81
|
this.sensorsInputsConfigured.push(sensor);
|
|
82
82
|
} else {
|
|
83
|
-
const log = sensorInputDisplayType === 0 ? false : this.emit('message', `Sensor Name: ${sensorInputName ? sensorInputName : 'Missing'}, Reference: ${sensorInputReference ? sensorInputReference : 'Missing'}
|
|
83
|
+
const log = sensorInputDisplayType === 0 ? false : this.emit('message', `Sensor Name: ${sensorInputName ? sensorInputName : 'Missing'}, Reference: ${sensorInputReference ? sensorInputReference : 'Missing'}`);
|
|
84
84
|
};
|
|
85
85
|
}
|
|
86
86
|
this.sensorsInputsConfiguredCount = this.sensorsInputsConfigured.length || 0;
|
|
@@ -98,7 +98,7 @@ class Zone3 extends EventEmitter {
|
|
|
98
98
|
button.state = false;
|
|
99
99
|
this.buttonsConfigured.push(button);
|
|
100
100
|
} else {
|
|
101
|
-
const log = buttonDisplayType === 0 ? false : this.emit('message', `Button Name: ${buttonName ? buttonName : 'Missing'}, Reference: ${buttonReference ? buttonReference : 'Missing'}
|
|
101
|
+
const log = buttonDisplayType === 0 ? false : this.emit('message', `Button Name: ${buttonName ? buttonName : 'Missing'}, Reference: ${buttonReference ? buttonReference : 'Missing'}`);
|
|
102
102
|
};
|
|
103
103
|
}
|
|
104
104
|
this.buttonsConfiguredCount = this.buttonsConfigured.length || 0;
|
|
@@ -204,7 +204,7 @@ class Zone3 extends EventEmitter {
|
|
|
204
204
|
try {
|
|
205
205
|
await this.setOverExternalIntegration('MQTT', key, value);
|
|
206
206
|
} catch (error) {
|
|
207
|
-
this.emit('warn', `MQTT set error: ${error}
|
|
207
|
+
this.emit('warn', `MQTT set error: ${error}`);
|
|
208
208
|
};
|
|
209
209
|
})
|
|
210
210
|
.on('debug', (debug) => {
|
|
@@ -215,7 +215,7 @@ class Zone3 extends EventEmitter {
|
|
|
215
215
|
});
|
|
216
216
|
};
|
|
217
217
|
} catch (error) {
|
|
218
|
-
this.emit('warn', `External integration start error: ${error
|
|
218
|
+
this.emit('warn', `External integration start error: ${error}`);
|
|
219
219
|
};
|
|
220
220
|
})
|
|
221
221
|
.on('prepareAccessory', async (allInputs) => {
|
|
@@ -245,7 +245,7 @@ class Zone3 extends EventEmitter {
|
|
|
245
245
|
//start impulse generator
|
|
246
246
|
await this.denon.impulseGenerator.start([{ name: 'checkState', sampling: this.refreshInterval }]);
|
|
247
247
|
} catch (error) {
|
|
248
|
-
this.emit('error', `Prepare accessory error: ${error
|
|
248
|
+
this.emit('error', `Prepare accessory error: ${error}`);
|
|
249
249
|
};
|
|
250
250
|
})
|
|
251
251
|
.on('stateChanged', (power, reference, volume, volumeControlType, mute, pictureMode) => {
|
|
@@ -382,7 +382,7 @@ class Zone3 extends EventEmitter {
|
|
|
382
382
|
|
|
383
383
|
return true;
|
|
384
384
|
} catch (error) {
|
|
385
|
-
throw new Error(`Start error: ${error
|
|
385
|
+
throw new Error(`Start error: ${error}`);
|
|
386
386
|
};
|
|
387
387
|
};
|
|
388
388
|
|
|
@@ -411,7 +411,7 @@ class Zone3 extends EventEmitter {
|
|
|
411
411
|
this.televisionService.setCharacteristic(Characteristic.DisplayOrder, Encode(1, displayOrder).toString('base64'));
|
|
412
412
|
return true;
|
|
413
413
|
} catch (error) {
|
|
414
|
-
throw new Error(`Display order error: ${error
|
|
414
|
+
throw new Error(`Display order error: ${error}`);
|
|
415
415
|
};
|
|
416
416
|
}
|
|
417
417
|
|
|
@@ -422,7 +422,7 @@ class Zone3 extends EventEmitter {
|
|
|
422
422
|
const debug = this.debugLog ? this.emit('debug', `Saved data: ${data}`) : false;
|
|
423
423
|
return true;
|
|
424
424
|
} catch (error) {
|
|
425
|
-
throw new Error(`Save data error: ${error
|
|
425
|
+
throw new Error(`Save data error: ${error}`);
|
|
426
426
|
};
|
|
427
427
|
}
|
|
428
428
|
|
|
@@ -431,7 +431,7 @@ class Zone3 extends EventEmitter {
|
|
|
431
431
|
const data = await fsPromises.readFile(path);
|
|
432
432
|
return data;
|
|
433
433
|
} catch (error) {
|
|
434
|
-
throw new Error(`Read saved data error: ${error
|
|
434
|
+
throw new Error(`Read saved data error: ${error}`);
|
|
435
435
|
};
|
|
436
436
|
}
|
|
437
437
|
|
|
@@ -469,7 +469,7 @@ class Zone3 extends EventEmitter {
|
|
|
469
469
|
};
|
|
470
470
|
return set;
|
|
471
471
|
} catch (error) {
|
|
472
|
-
throw new Error(`${integration} set key: ${key}, value: ${value}, error: ${error
|
|
472
|
+
throw new Error(`${integration} set key: ${key}, value: ${value}, error: ${error}`);
|
|
473
473
|
};
|
|
474
474
|
}
|
|
475
475
|
|