ebaauw / homebridge-zp

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

Homebridge crashes #49

Closed xMAIKx closed 5 years ago

xMAIKx commented 5 years ago

Hello, I have rebuilt my system and now Homebridge does not start anymore. I get this error message and ask for help.

[2018-9-21 11:19:36] [ZP] uncaught exception [2018-9-21 11:19:36] [ZP] TypeError: Cannot read property 'identity' of undefined at Client. (/usr/local/lib/node_modules/homebridge-harmonyhub/node_modules/harmonyhubjs-client/lib/login/hub.js:59:20) at Client.emit (events.js:160:13) at Client._handleStanza (/usr/local/lib/node_modules/homebridge-harmonyhub/node_modules/harmonyhubjs-client/node_modules/node-xmpp-client/lib/Client.js:228:12) at Client.onStanza (/usr/local/lib/node_modules/homebridge-harmonyhub/node_modules/harmonyhubjs-client/node_modules/node-xmpp-client/lib/Client.js:222:8) at Connection.emit (events.js:160:13) at Connection.onStanza (/usr/local/lib/node_modules/homebridge-harmonyhub/node_modules/harmonyhubjs-client/node_modules/node-xmpp-client/node_modules/node-xmpp-core/lib/Connection.js:369:10) at StreamParser. (/usr/local/lib/node_modules/homebridge-harmonyhub/node_modules/harmonyhubjs-client/node_modules/node-xmpp-client/node_modules/node-xmpp-core/lib/Connection.js:226:10) at StreamParser.emit (events.js:160:13) at SaxLtx. (/usr/local/lib/node_modules/homebridge-harmonyhub/node_modules/harmonyhubjs-client/node_modules/node-xmpp-client/nodemodules/node-xmpp-core/lib/StreamParser.js:58:14) at SaxLtx.emit (events.js:160:13) [2018-9-21 11:19:36] Got SIGTERM, shutting down Homebridge... [2018-9-21 11:19:36] [ZP] cleaning up... [2018-9-21 11:19:37] [Big Ass Fan] Found a light for: Ventilator Schlafzimmer Fan Light [2018-9-21 11:19:38] [Calendar] Pushing calendar sensor 'Geburtstag' state 0 - value 0 [2018-9-21 11:19:38] [Calendar] No events to schedule. [2018-9-21 11:19:38] [Calendar] Pushing calendar sensor 'Urlaub' state 0 - value 0 [2018-9-21 11:19:38] [Calendar] No events to schedule. [2018-9-21 11:19:38] [Calendar] Pushing calendar sensor 'Abfall' state 0 - value 0 [2018-9-21 11:19:38] [Calendar] Pushing calendar sensor 'Restabfall' state 0 - value 0 [2018-9-21 11:19:38] [Calendar] Pushing calendar sensor 'Gelber Sack' state 0 - value 0 [2018-9-21 11:19:38] [Calendar] Scheduling next action in 86400000ms [2018-9-21 11:19:39] [ZP] Initializing platform accessory 'Kueche Sonos'... [2018-9-21 11:19:39] [ZP] Initializing platform accessory 'Bad2 Sonos'... [2018-9-21 11:19:39] [ZP] Initializing platform accessory 'Schlafzimmer Sonos'... [2018-9-21 11:19:39] [ZP] Initializing platform accessory 'Wohnzimmer Sonos'... [2018-9-21 11:19:39] [ZP] Schlafzimmer Sonos: coordinator for group Schlafzimmer [2018-9-21 11:19:39] [ZP] Kueche Sonos: coordinator for group Kueche [2018-9-21 11:19:39] [ZP] Kueche Sonos: platform coordinator [2018-9-21 11:19:39] [ZP] Wohnzimmer Sonos: set power (play/pause) from undefined to true [2018-9-21 11:19:39] [ZP] Bad2 Sonos: member of group Kueche Sonos [2018-9-21 11:19:39] [ZP] Wohnzimmer Sonos: member of group Kueche Sonos [2018-9-21 11:19:39] [ZP] Bad2 Sonos: set power (play/pause) from undefined to true [2018-9-21 11:19:39] [ZP] Schlafzimmer Sonos: unknown track metadata {"$":{"id":"-1","parentID":"-1","restricted":"true"},"res":[{"":"x-rincon-mp3radio://http://stream.radiohamburg.de/rhh-live/mp3-192/tunein/play.m3u","$":{"protocolInfo":"x-rincon-mp3radio:*:audio/mpegurl:*"}}],"r:streamContent":[""],"r:radioShowMd":[""],"upnp:albumArtURI":["/getaa?u=x-rincon-mp3radio%3a%2f%2fhttp%3a%2f%2fstream.radiohamburg.de%2frhh-live%2fmp3-192%2ftunein%2fplay.m3u&v=398"],"dc:title":["Playlist"],"upnp:class":["object.item"]} [2018-9-21 11:19:39] [ZP] Schlafzimmer Sonos: set power (play/pause) from undefined to false [2018-9-21 11:19:39] [ZP] Schlafzimmer Sonos: set current track from undefined to "Playlist" [2018-9-21 11:19:39] [ZP] Kueche Sonos: set power (play/pause) from undefined to false [2018-9-21 11:19:39] [ZP] Kueche Sonos: set current track from undefined to "Radio Hamburg" [2018-9-21 11:19:39] [ZP] Schlafzimmer Sonos: set group volume from undefined to 24 [2018-9-21 11:19:39] [ZP] Schlafzimmer Sonos: set group mute from undefined to false [2018-9-21 11:19:39] [ZP] Kueche Sonos: set group volume from undefined to 33 [2018-9-21 11:19:39] [ZP] Kueche Sonos: set group mute from undefined to false [2018-9-21 11:19:40] [Hue] Philips hue: Philips BSB002 bridge v1806051111, api v1.26.0 [2018-9-21 11:19:40] [Hue] Philips hue: 4 accessories [2018-9-21 11:19:40] [Hue] masked debug info dumped to /root/.homebridge/homebridge-hue.json.gz [2018-9-21 11:19:40] [Hue] Initializing platform accessory 'Philips hue'... [2018-9-21 11:19:40] [Hue] Philips hue: 3 services [2018-9-21 11:19:40] [Hue] Initializing platform accessory 'xxxxx '... [2018-9-21 11:19:40] [Hue] Initializing platform accessory 'XFDAnybodyHome'... [2018-9-21 11:19:40] [Hue] Initializing platform accessory 'xxx'... [2018-9-21 11:19:41] [ZP] exit

ebaauw commented 5 years ago

[2018-9-21 11:19:36] [ZP] TypeError: Cannot read property 'identity' of undefined at Client. (/usr/local/lib/node_modules/homebridge-harmonyhub/node_modules/harmonyhubjs-client/lib/login/hub.js:59:20)

The error is caused by the homebridge-harmonyhub plugin.

homebridge-zp handles uncaught exceptions that would otherwise cause NodeJS to exit, so it can cancel the subscriptions with the Sonos zoneplayers, see #41.

xMAIKx commented 5 years ago

It was definitely on the Harmony plugin. I have brought the plugin to the last version and then again to 0.1.1. Now everything is running again. Thank you for the fast answer.