Maxmudjon / homebridge-mijia

Mijia plugin for homebridge
49 stars 7 forks source link

Errors on startup #8

Open iCarl opened 7 years ago

iCarl commented 7 years ago

I'm getting errors upon startup. NodeJS v6.9.5 NPM 3.10.10 The Aqara version works without issues.

Load homebridge-mijia.MiJiaPlatform
/usr/lib/node_modules/homebridge-mijia/lib/MiJiaAccessoryFactory.js:26
  if (config['sensor_names']) {
            ^

TypeError: Cannot read property 'sensor_names' of null
    at new MiJiaAccessoryFactory (/usr/lib/node_modules/homebridge-mijia/lib/MiJiaAccessoryFactory.js:26:13)
    at new MiJiaPlatform (/usr/lib/node_modules/homebridge-mijia/lib/MiJiaPlatform.js:27:18)
    at Server._loadDynamicPlatforms (/usr/lib/node_modules/homebridge/lib/server.js:315:30)
    at Server.run (/usr/lib/node_modules/homebridge/lib/server.js:82:8)
    at module.exports (/usr/lib/node_modules/homebridge/lib/cli.js:40:10)
    at Object.<anonymous> (/usr/lib/node_modules/homebridge/bin/homebridge:17:22)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
eviewei commented 7 years ago

same problem

timh1004 commented 7 years ago

I had the same problem, but after uninstalling the homebridge-aqara plugin, it works fine for me. Seems like you can't have the installed both at the same time.

Edit: And I think you have to remove the cachedAccessories file in .homebridge/accessories/ after changing the plugins. Otherwise it tries to add a device with the same ID a second time and crashes.

magichew commented 7 years ago

I had the same problem, but after uninstalling the homebridge-aqara plugin, it works fine for me. Seems like you can't have the installed both at the same time.

What's the command for uninstalling please?

timh1004 commented 7 years ago

npm uninstall -g homebridge-aqara

new4u commented 6 years ago

npm uninstall -g homebridge-aqara

Thanks, thats very helpful!