nfarina / homebridge-tesla

Tesla plugin for homebridge: https://github.com/nfarina/homebridge
154 stars 38 forks source link

Startup error if variables not in config.json #29

Closed dockramer closed 4 years ago

dockramer commented 4 years ago

So I'm back after a short hiatus, and it seems as if the readme was updated, and doesn't state that the previously required entries in config.json are necessary (trunk, trunk, charger, etc). Starting up homebridge without those entires results in a UUID error and homebridge shutting down.

TypeError: Cannot read property 'UUID' of undefined at Accessory.addService (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Accessory.js:149:35) at /usr/local/lib/node_modules/homebridge/lib/server.js:471:19 at Array.forEach () at Server._createAccessory (/usr/local/lib/node_modules/homebridge/lib/server.js:451:14) at Server._loadAccessories (/usr/local/lib/node_modules/homebridge/lib/server.js:309:26) at Server.run (/usr/local/lib/node_modules/homebridge/lib/server.js:91:38) at module.exports (/usr/local/lib/node_modules/homebridge/lib/cli.js:59:10) at Object. (/usr/local/lib/node_modules/homebridge/bin/homebridge:17:22) at Module._compile (module.js:653:30) at Object.Module._extensions..js (module.js:664:10) at Module.load (module.js:566:32) at tryModuleLoad (module.js:506:12) at Function.Module._load (module.js:498:3) at Function.Module.runMain (module.js:694:10) at startup (bootstrap_node.js:204:16) at bootstrap_node.js:625:3 Got SIGTERM, shutting down Homebridge...

When adding them back in, I still cannot get remote start to work, it's not recognized as a command.

Thanks!

nfarina commented 4 years ago

Are you sure you're running the latest version? There should be far less required in the config. Here's mine:

{
  "accessory": "Tesla",
  "name": "Model X",
  "vin": "5YJXCBE22GF006227",
  "username": "<email>",
  "password": "<pass>"
},

All the names of the various services are "implied" now and built off of the "name" from the config. This was the only reliable solution I could come up with.

nfarina commented 4 years ago

Also that UUID error doesn't seem necessarily related to this plugin. Maybe try clearing the cache out by removing the Tesla plugin from your config, restarting Homebridge, ensuring it disappears from the Home app, then adding it back in?

nfarina commented 4 years ago

Feel free to reopen if you're still having problem!