datMaffin / homebridge-tesla-powerwall

Homebridge Plugin for the Tesla Powerwall
ISC License
21 stars 11 forks source link

Crash with latest plugin #6

Closed StephenNorris closed 6 years ago

StephenNorris commented 6 years ago

Hi, I get the following in my log with the latest plugin from npm. It was previously working.

Sep 4 09:47:52 raspberrypi homebridge[5860]: └──────────────────────────────────────────────────────────────┘ Sep 4 09:47:52 raspberrypi homebridge[5860]: [2018-9-4 09:47:52] Loaded config.json with 2 accessories and 1 platforms. Sep 4 09:47:52 raspberrypi homebridge[5860]: [2018-9-4 09:47:52] --- Sep 4 09:47:52 raspberrypi homebridge[5860]: [2018-9-4 09:47:52] Loaded plugin: homebridge-raspberrypi-temperature Sep 4 09:47:52 raspberrypi homebridge[5860]: [2018-9-4 09:47:52] Registering accessory 'homebridge-raspberrypi-temperature.RaspberryPiTemperature' Sep 4 09:47:52 raspberrypi homebridge[5860]: [2018-9-4 09:47:52] --- Sep 4 09:47:54 raspberrypi homebridge[5860]: [2018-9-4 09:47:54] Loaded plugin: homebridge-roomba Sep 4 09:47:54 raspberrypi homebridge[5860]: [2018-9-4 09:47:54] Registering accessory 'homebridge-roomba.Roomba' Sep 4 09:47:54 raspberrypi homebridge[5860]: [2018-9-4 09:47:54] --- Sep 4 09:47:55 raspberrypi homebridge[5860]: [2018-9-4 09:47:55] Loaded plugin: homebridge-tesla-powerwall Sep 4 09:47:56 raspberrypi homebridge[5860]: [2018-9-4 09:47:56] Registering platform 'homebridge-tesla-powerwall.TeslaPowerwall' Sep 4 09:47:56 raspberrypi homebridge[5860]: [2018-9-4 09:47:56] --- Sep 4 09:47:56 raspberrypi homebridge[5860]: [2018-9-4 09:47:56] Loading 1 platforms... Sep 4 09:47:56 raspberrypi homebridge[5860]: [2018-9-4 09:47:56] [Tesla] Initializing TeslaPowerwall platform... Sep 4 09:47:56 raspberrypi homebridge[5860]: [2018-9-4 09:47:56] [Tesla] Initializing platform accessory 'Powerwall'... Sep 4 09:47:56 raspberrypi homebridge[5860]: /usr/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Accessory.js:155 Sep 4 09:47:56 raspberrypi homebridge[5860]: this.services.push(service); Sep 4 09:47:56 raspberrypi homebridge[5860]: ^ Sep 4 09:47:56 raspberrypi homebridge[5860]: TypeError: Cannot read property 'push' of undefined Sep 4 09:47:56 raspberrypi homebridge[5860]: at Powerwall.Accessory.addService (/usr/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Accessory.js:155:17) Sep 4 09:47:56 raspberrypi homebridge[5860]: at FakeGatoHistory.registerEvents (/usr/lib/node_modules/homebridge-tesla-powerwall/node_modules/fakegato-history/fakegato-history.js:455:35) Sep 4 09:47:56 raspberrypi homebridge[5860]: at new FakeGatoHistory (/usr/lib/node_modules/homebridge-tesla-powerwall/node_modules/fakegato-history/fakegato-history.js:441:9) Sep 4 09:47:56 raspberrypi homebridge[5860]: at Powerwall.getServices (/usr/lib/node_modules/homebridge-tesla-powerwall/index.js:455:17) Sep 4 09:47:56 raspberrypi homebridge[5860]: at Server._createAccessory (/usr/lib/node_modules/homebridge/lib/server.js:409:36) Sep 4 09:47:56 raspberrypi homebridge[5860]: at Server. (/usr/lib/node_modules/homebridge/lib/server.js:395:32) Sep 4 09:47:56 raspberrypi homebridge[5860]: at /usr/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/util/once.js:16:19 Sep 4 09:47:56 raspberrypi homebridge[5860]: at TeslaPowerwall.accessories (/usr/lib/node_modules/homebridge-tesla-powerwall/index.js:353:9) Sep 4 09:47:56 raspberrypi homebridge[5860]: at Server._loadPlatformAccessories (/usr/lib/node_modules/homebridge/lib/server.js:385:20) Sep 4 09:47:56 raspberrypi homebridge[5860]: at Server._loadPlatforms (/usr/lib/node_modules/homebridge/lib/server.js:329:16) Sep 4 09:47:56 raspberrypi homebridge[5860]: at Server.run (/usr/lib/node_modules/homebridge/lib/server.js:85:36) Sep 4 09:47:56 raspberrypi homebridge[5860]: at module.exports (/usr/lib/node_modules/homebridge/lib/cli.js:43:10) Sep 4 09:47:56 raspberrypi homebridge[5860]: at Object. (/usr/lib/node_modules/homebridge/bin/homebridge:17:22) Sep 4 09:47:56 raspberrypi homebridge[5860]: at Module._compile (module.js:652:30) Sep 4 09:47:56 raspberrypi homebridge[5860]: at Object.Module._extensions..js (module.js:663:10) Sep 4 09:47:56 raspberrypi homebridge[5860]: at Module.load (module.js:565:32) Sep 4 09:47:56 raspberrypi homebridge[5860]: at tryModuleLoad (module.js:505:12) Sep 4 09:47:56 raspberrypi homebridge[5860]: at Function.Module._load (module.js:497:3) Sep 4 09:47:56 raspberrypi homebridge[5860]: at Function.Module.runMain (module.js:693:10) Sep 4 09:47:56 raspberrypi homebridge[5860]: at startup (bootstrap_node.js:191:16) Sep 4 09:47:56 raspberrypi homebridge[5860]: at bootstrap_node.js:612:3 Sep 4 09:47:56 raspberrypi systemd[1]: homebridge.service: Main process exited, code=exited, status=1/FAILURE Sep 4 09:47:56 raspberrypi systemd[1]: homebridge.service: Unit entered failed state. Sep 4 09:47:56 raspberrypi systemd[1]: homebridge.service: Failed with result 'exit-code'.

datMaffin commented 6 years ago

Thanks for the crashlog!

I'm pretty sure I had the exact same error and fixed it in version 0.2.1 with the commit 86d48781e032a16adfe24c4014b617716de150a6.

I also had no luck reproducing it with version 0.2.6 (the latest version)

Do you by any chance know which version you had installed before?

StephenNorris commented 6 years ago

Ah! That'll be my problem. It looks like my npm isn't updating (or I'm not using it right).

Turns out I specified a version when I installed it, so I haven't been getting updates. Sorry to waste your time with this, it's working fine when I actually updated.

StephenNorris commented 6 years ago

User error.