bbriatte / homebridge-ps4-waker-platform

BSD 3-Clause "New" or "Revised" License
19 stars 7 forks source link

Installing the plug-in but not configuring the platform results in an error message #1

Closed codyc1515 closed 5 years ago

codyc1515 commented 5 years ago

Installing the plug-in but not configuring it (i.e. adding anything to the config.json) results in an error message, as below:

Jun 02 19:56:22 raspberrypi homebridge[5493]: [2/06/2019, 7:56:22 PM] Loaded plugin: homebridge-ps4-waker-platform
Jun 02 19:56:22 raspberrypi homebridge[5493]: [2/06/2019, 7:56:22 PM] Registering platform 'homebridge-ps4-waker-platform.PS4WakerPlatform'

Jun 02 19:56:24 raspberrypi homebridge[5493]: Load homebridge-ps4-waker-platform.PS4WakerPlatform

Jun 02 19:56:24 raspberrypi homebridge[5493]: [2/06/2019, 7:56:24 PM] [homebridge-ps4-waker-platform.PS4WakerPlatform] Searching accessories...

Jun 02 19:56:24 raspberrypi homebridge[5493]: [2/06/2019, 7:56:24 PM] [homebridge-ps4-waker-platform.PS4WakerPlatform] TypeError: Cannot read property 'accessories' of null
Jun 02 19:56:24 raspberrypi homebridge[5493]:     at PS4WakerPlatform.<anonymous> (/usr/lib/node_modules/homebridge-ps4-waker-platform/dist/ps4-waker-platform.js:81:48)
Jun 02 19:56:24 raspberrypi homebridge[5493]:     at step (/usr/lib/node_modules/homebridge-ps4-waker-platform/dist/ps4-waker-platform.js:45:23)
Jun 02 19:56:24 raspberrypi homebridge[5493]:     at Object.next (/usr/lib/node_modules/homebridge-ps4-waker-platform/dist/ps4-waker-platform.js:26:53)
Jun 02 19:56:24 raspberrypi homebridge[5493]:     at /usr/lib/node_modules/homebridge-ps4-waker-platform/dist/ps4-waker-platform.js:20:71
Jun 02 19:56:24 raspberrypi homebridge[5493]:     at new Promise (<anonymous>)
Jun 02 19:56:24 raspberrypi homebridge[5493]:     at __awaiter (/usr/lib/node_modules/homebridge-ps4-waker-platform/dist/ps4-waker-platform.js:16:12)
Jun 02 19:56:24 raspberrypi homebridge[5493]:     at PS4WakerPlatform.searchDevices (/usr/lib/node_modules/homebridge-ps4-waker-platform/dist/ps4-waker-platform.js:78:16)
Jun 02 19:56:24 raspberrypi homebridge[5493]:     at PS4WakerPlatform.<anonymous> (/usr/lib/node_modules/homebridge-ps4-waker-platform/node_modules/homebridge-base-platform/dist/platform.js:84:55)
Jun 02 19:56:24 raspberrypi homebridge[5493]:     at step (/usr/lib/node_modules/homebridge-ps4-waker-platform/node_modules/homebridge-base-platform/dist/platform.js:45:23)
Jun 02 19:56:24 raspberrypi homebridge[5493]:     at Object.next (/usr/lib/node_modules/homebridge-ps4-waker-platform/node_modules/homebridge-base-platform/dist/platform.js:26:53)
codyc1515 commented 5 years ago

Obviously the user should configure the accessory but it should handle the error gracefully until such time.

bbriatte commented 5 years ago

fix npm 1.0.3