homebridge-denon-tv 5.0.3 → 5.0.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/index.js +1 -0
- package/package.json +1 -1
- package/src/mainzone.js +4 -4
- package/src/restful.js +2 -2
- package/src/surround.js +10 -10
- package/src/zone2.js +10 -10
- package/src/zone3.js +4 -4
package/index.js
CHANGED
package/package.json
CHANGED
package/src/mainzone.js
CHANGED
|
@@ -259,11 +259,11 @@ class MainZone extends EventEmitter {
|
|
|
259
259
|
this.emit('message', message);
|
|
260
260
|
this.restFulConnected = true;
|
|
261
261
|
})
|
|
262
|
-
.on('error', (error) => {
|
|
263
|
-
this.emit('error', error);
|
|
264
|
-
})
|
|
265
262
|
.on('debug', (debug) => {
|
|
266
263
|
this.emit('debug', debug);
|
|
264
|
+
})
|
|
265
|
+
.on('error', (error) => {
|
|
266
|
+
this.emit('warn', error);
|
|
267
267
|
});
|
|
268
268
|
}
|
|
269
269
|
|
|
@@ -326,7 +326,7 @@ class MainZone extends EventEmitter {
|
|
|
326
326
|
this.emit('debug', debug);
|
|
327
327
|
})
|
|
328
328
|
.on('error', (error) => {
|
|
329
|
-
this.emit('
|
|
329
|
+
this.emit('warn', error);
|
|
330
330
|
});
|
|
331
331
|
};
|
|
332
332
|
|
package/src/restful.js
CHANGED
|
@@ -32,7 +32,7 @@ class RestFul extends EventEmitter {
|
|
|
32
32
|
});
|
|
33
33
|
|
|
34
34
|
} catch (error) {
|
|
35
|
-
this.emit('error', `RESTful error: ${error}`)
|
|
35
|
+
this.emit('error', `RESTful Connect error: ${error}`)
|
|
36
36
|
}
|
|
37
37
|
};
|
|
38
38
|
|
|
@@ -51,7 +51,7 @@ class RestFul extends EventEmitter {
|
|
|
51
51
|
this.restFulData.surround = data;
|
|
52
52
|
break;
|
|
53
53
|
default:
|
|
54
|
-
this.emit('
|
|
54
|
+
this.emit('error', `RESTFul update unknown path: ${path}, data: ${data}`)
|
|
55
55
|
break;
|
|
56
56
|
};
|
|
57
57
|
const emitDebug = this.restFulDebug ? this.emit('debug', `RESTFul update path: ${path}, data: ${data}`) : false;
|
package/src/surround.js
CHANGED
|
@@ -227,11 +227,11 @@ class Surround extends EventEmitter {
|
|
|
227
227
|
this.emit('message', message);
|
|
228
228
|
this.restFulConnected = true;
|
|
229
229
|
})
|
|
230
|
-
.on('error', (error) => {
|
|
231
|
-
this.emit('error', error);
|
|
232
|
-
})
|
|
233
230
|
.on('debug', (debug) => {
|
|
234
231
|
this.emit('debug', debug);
|
|
232
|
+
})
|
|
233
|
+
.on('error', (error) => {
|
|
234
|
+
this.emit('warn', error);
|
|
235
235
|
});
|
|
236
236
|
}
|
|
237
237
|
|
|
@@ -294,7 +294,7 @@ class Surround extends EventEmitter {
|
|
|
294
294
|
this.emit('debug', debug);
|
|
295
295
|
})
|
|
296
296
|
.on('error', (error) => {
|
|
297
|
-
this.emit('
|
|
297
|
+
this.emit('warn', error);
|
|
298
298
|
});
|
|
299
299
|
};
|
|
300
300
|
|
|
@@ -316,8 +316,8 @@ class Surround extends EventEmitter {
|
|
|
316
316
|
//sort surrounds list
|
|
317
317
|
const sortInputsDisplayOrder = this.televisionService ? await this.displayOrder() : false;
|
|
318
318
|
|
|
319
|
-
|
|
320
|
-
|
|
319
|
+
//start check state
|
|
320
|
+
this.denon.impulseGenerator.start([{ name: 'checkState', sampling: refreshInterval }]);
|
|
321
321
|
} catch (error) {
|
|
322
322
|
this.emit('error', `prepare accessory error: ${error}`);
|
|
323
323
|
await new Promise(resolve => setTimeout(resolve, 15000));
|
|
@@ -372,7 +372,7 @@ class Surround extends EventEmitter {
|
|
|
372
372
|
this.televisionService.setCharacteristic(Characteristic.DisplayOrder, Encode(1, displayOrder).toString('base64'));
|
|
373
373
|
return true;
|
|
374
374
|
} catch (error) {
|
|
375
|
-
throw new Error(
|
|
375
|
+
throw new Error(error);
|
|
376
376
|
};
|
|
377
377
|
}
|
|
378
378
|
|
|
@@ -382,7 +382,7 @@ class Surround extends EventEmitter {
|
|
|
382
382
|
const debug = !this.enableDebugMode ? false : this.emit('debug', `Saved data: ${JSON.stringify(data, null, 2)}`);
|
|
383
383
|
return true;
|
|
384
384
|
} catch (error) {
|
|
385
|
-
throw new Error(
|
|
385
|
+
throw new Error(error);
|
|
386
386
|
};
|
|
387
387
|
}
|
|
388
388
|
|
|
@@ -391,7 +391,7 @@ class Surround extends EventEmitter {
|
|
|
391
391
|
const data = await fsPromises.readFile(path);
|
|
392
392
|
return data;
|
|
393
393
|
} catch (error) {
|
|
394
|
-
throw new Error(
|
|
394
|
+
throw new Error(`Read saved data error: ${error}`);
|
|
395
395
|
};
|
|
396
396
|
}
|
|
397
397
|
|
|
@@ -860,7 +860,7 @@ class Surround extends EventEmitter {
|
|
|
860
860
|
|
|
861
861
|
return accessory;
|
|
862
862
|
} catch (error) {
|
|
863
|
-
throw new Error(
|
|
863
|
+
throw new Error(error)
|
|
864
864
|
};
|
|
865
865
|
}
|
|
866
866
|
};
|
package/src/zone2.js
CHANGED
|
@@ -257,11 +257,11 @@ class Zone2 extends EventEmitter {
|
|
|
257
257
|
this.emit('message', message);
|
|
258
258
|
this.restFulConnected = true;
|
|
259
259
|
})
|
|
260
|
-
.on('error', (error) => {
|
|
261
|
-
this.emit('error', error);
|
|
262
|
-
})
|
|
263
260
|
.on('debug', (debug) => {
|
|
264
261
|
this.emit('debug', debug);
|
|
262
|
+
})
|
|
263
|
+
.on('error', (error) => {
|
|
264
|
+
this.emit('warn', error);
|
|
265
265
|
});
|
|
266
266
|
}
|
|
267
267
|
|
|
@@ -324,7 +324,7 @@ class Zone2 extends EventEmitter {
|
|
|
324
324
|
this.emit('debug', debug);
|
|
325
325
|
})
|
|
326
326
|
.on('error', (error) => {
|
|
327
|
-
this.emit('
|
|
327
|
+
this.emit('warn', error);
|
|
328
328
|
});
|
|
329
329
|
};
|
|
330
330
|
|
|
@@ -346,8 +346,8 @@ class Zone2 extends EventEmitter {
|
|
|
346
346
|
//sort inputs list
|
|
347
347
|
const sortInputsDisplayOrder = this.televisionService ? await this.displayOrder() : false;
|
|
348
348
|
|
|
349
|
-
|
|
350
|
-
|
|
349
|
+
//start check state
|
|
350
|
+
this.denon.impulseGenerator.start([{ name: 'checkState', sampling: refreshInterval }]);
|
|
351
351
|
} catch (error) {
|
|
352
352
|
this.emit('error', `prepare accessory error: ${error}`);
|
|
353
353
|
await new Promise(resolve => setTimeout(resolve, 15000));
|
|
@@ -402,7 +402,7 @@ class Zone2 extends EventEmitter {
|
|
|
402
402
|
this.televisionService.setCharacteristic(Characteristic.DisplayOrder, Encode(1, displayOrder).toString('base64'));
|
|
403
403
|
return true;
|
|
404
404
|
} catch (error) {
|
|
405
|
-
throw new Error(
|
|
405
|
+
throw new Error(error);
|
|
406
406
|
};
|
|
407
407
|
}
|
|
408
408
|
|
|
@@ -412,7 +412,7 @@ class Zone2 extends EventEmitter {
|
|
|
412
412
|
const debug = !this.enableDebugMode ? false : this.emit('debug', `Saved data: ${JSON.stringify(data, null, 2)}`);
|
|
413
413
|
return true;
|
|
414
414
|
} catch (error) {
|
|
415
|
-
throw new Error(
|
|
415
|
+
throw new Error(error);
|
|
416
416
|
};
|
|
417
417
|
}
|
|
418
418
|
|
|
@@ -421,7 +421,7 @@ class Zone2 extends EventEmitter {
|
|
|
421
421
|
const data = await fsPromises.readFile(path);
|
|
422
422
|
return data;
|
|
423
423
|
} catch (error) {
|
|
424
|
-
throw new Error(
|
|
424
|
+
throw new Error(`Read saved data error: ${error}`);
|
|
425
425
|
};
|
|
426
426
|
}
|
|
427
427
|
|
|
@@ -918,7 +918,7 @@ class Zone2 extends EventEmitter {
|
|
|
918
918
|
|
|
919
919
|
return accessory;
|
|
920
920
|
} catch (error) {
|
|
921
|
-
throw new Error(
|
|
921
|
+
throw new Error(error)
|
|
922
922
|
};
|
|
923
923
|
}
|
|
924
924
|
};
|
package/src/zone3.js
CHANGED
|
@@ -257,11 +257,11 @@ class Zone3 extends EventEmitter {
|
|
|
257
257
|
this.emit('message', message);
|
|
258
258
|
this.restFulConnected = true;
|
|
259
259
|
})
|
|
260
|
-
.on('error', (error) => {
|
|
261
|
-
this.emit('error', error);
|
|
262
|
-
})
|
|
263
260
|
.on('debug', (debug) => {
|
|
264
261
|
this.emit('debug', debug);
|
|
262
|
+
})
|
|
263
|
+
.on('error', (error) => {
|
|
264
|
+
this.emit('warn', error);
|
|
265
265
|
});
|
|
266
266
|
}
|
|
267
267
|
|
|
@@ -324,7 +324,7 @@ class Zone3 extends EventEmitter {
|
|
|
324
324
|
this.emit('debug', debug);
|
|
325
325
|
})
|
|
326
326
|
.on('error', (error) => {
|
|
327
|
-
this.emit('
|
|
327
|
+
this.emit('warn', error);
|
|
328
328
|
});
|
|
329
329
|
};
|
|
330
330
|
|