ebaauw / homebridge-zp

Homebridge plugin for Sonos ZonePlayer
Apache License 2.0
240 stars 20 forks source link

UnhandledPromiseRejectionWarning after installing #105

Closed ando01 closed 5 years ago

ando01 commented 5 years ago

I am having some trouble getting this plugin to work as I have 9 speakers in my house and it seems to only discover a few of them.In looking at the logs I see the error below and was wondering if someone can tell me what it means:

node:6366) UnhandledPromiseRejectionWarning: TypeError: events.once is not a function at ZpPlatform.logTopology (/usr/lib/node_modules/homebridge-zp/lib/ZpPlatform.js:407:28) at ZpPlatform.createZpClient (/usr/lib/node_modules/homebridge-zp/lib/ZpPlatform.js:288:14) at at process._tickCallback (internal/process/next_tick.js:189:7) (node:6366) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 12) Here is more of the log:

[2019-9-13 16:11:23] [HomeSonos] found 9 zone players in 7 zones [2019-9-13 16:11:23] [HomeSonos] ├─ Andrews Room [2019-9-13 16:11:23] [HomeSonos] │ └─ RINCON_949F3EF93F0E01400 [Andrews Room]: Sonos Play:1 (S12) (master) [2019-9-13 16:11:23] [HomeSonos] ├─ Boost (invisible) [2019-9-13 16:11:23] [HomeSonos] │ └─ RINCON_7828CA70862E01400 [Boost]: Sonos Boost (BR200) (master) [2019-9-13 16:11:23] [HomeSonos] ├─ Deck [2019-9-13 16:11:23] [HomeSonos] │ └─ RINCON_000E58226D5801400 [Deck]: Sonos ZP80 (ZP80) (master, audioIn) [2019-9-13 16:11:23] [HomeSonos] ├─ Kitchen (L+R) [2019-9-13 16:11:23] [HomeSonos] │ ├─ RINCON_949F3E8FD69001400 [Kitchen (L)]: Sonos Play:1 (S12) (master) [2019-9-13 16:11:23] [HomeSonos] │ └─ RINCON_949F3E8FDAC201400 [Kitchen (R)]: Sonos Play:1 (S12) (slave) [2019-9-13 16:11:23] [HomeSonos] ├─ Office (L+R) [2019-9-13 16:11:23] [HomeSonos] │ ├─ RINCON_7828CA30404601400 [Office (L)]: Sonos Play:1 (S12) (master) [2019-9-13 16:11:23] [HomeSonos] │ └─ RINCON_7828CA30454001400 [Office (R)]: Sonos Play:1 (S12) (slave) [2019-9-13 16:11:23] [HomeSonos] ├─ Sonos Speakers [2019-9-13 16:11:23] [HomeSonos] │ └─ RINCON_5CAAFDF8F96C01400 [Sonos Speakers]: Sonos Play:5 (S6) (master, airPlay, audioIn) [2019-9-13 16:11:23] [HomeSonos] └─ Wills Room [2019-9-13 16:11:23] [HomeSonos] └─ RINCON_949F3EF282AC01400 [Wills Room]: Sonos Play:1 (S12) (master) [2019-9-13 16:11:23] [HomeSonos] Andrews Room: set Serial Number to "RINCON_949F3EF93F0E01400" [2019-9-13 16:11:23] [HomeSonos] Andrews Room: set Manufacturer to "Sonos" [2019-9-13 16:11:23] [HomeSonos] Andrews Room: set Model to "Play:1 (S12)" [2019-9-13 16:11:23] [HomeSonos] Andrews Room: set Firmware Revision to "10.4" [2019-9-13 16:11:23] [HomeSonos] Andrews Room Sonos: set Volume Change to 0 [2019-9-13 16:11:23] [HomeSonos] Andrews Room Sonos: set Track Change to 0 [2019-9-13 16:11:23] [HomeSonos] Andrews Room Sonos: set Sonos Coordinator to false [2019-9-13 16:11:23] [HomeSonos] Andrews Room Speakers: set Volume Change to 0 (node:6366) UnhandledPromiseRejectionWarning: TypeError: events.once is not a function at ZpPlatform.logTopology (/usr/lib/node_modules/homebridge-zp/lib/ZpPlatform.js:407:28) at ZpPlatform.createZpClient (/usr/lib/node_modules/homebridge-zp/lib/ZpPlatform.js:288:14) at at process._tickCallback (internal/process/next_tick.js:189:7) (node:6366) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 12) [2019-9-13 16:11:23] [HomeSeer] Successfully connected to ASCII Control Interface of HomeSeer. Instant Status Enabled. [2019-9-13 16:11:23] [HomeSeer] Setting HomeSeer polling rate to: 600 seconds. [2019-9-13 16:11:23] [HomeSonos] Andrews Room Sonos: set Sonos Group to "Andrews Room" [2019-9-13 16:11:23] [HomeSonos] Andrews Room Speakers: set On to false [2019-9-13 16:11:23] [HomeSonos] Andrews Room Speakers: set Brightness to 30% [2019-9-13 16:11:23] [HomeSonos] Andrews Room Speakers: set Mute to false [2019-9-13 16:11:23] [HomeSonos] Andrews Room Speakers: set Loudness to true [2019-9-13 16:11:23] [HomeSonos] Andrews Room Speakers: set Bass to 8 [2019-9-13 16:11:23] [HomeSonos] Andrews Room Speakers: set Treble to 10 [2019-9-13 16:11:23] [HomeSonos] Andrews Room Sonos: set On to false [2019-9-13 16:11:23] [HomeSonos] Andrews Room Sonos: set Track to "Roxanne (Remastered 2003)" [2019-9-13 16:11:23] [HomeSonos] Andrews Room Sonos: set Brightness to 30% [2019-9-13 16:11:23] [HomeSonos] Andrews Room Sonos: set Mute to false [2019-9-13 16:11:23] [HomeSonos] Andrews Room Sonos: set Remaining Duration to 0s

ebaauw commented 5 years ago

You're using an old version of NodeJS that doesn't support events.once.