homebridge-mijia icon indicating copy to clipboard operation
homebridge-mijia copied to clipboard

Errors on startup

Open iCarl opened this issue 8 years ago • 5 comments

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)

iCarl avatar May 10 '17 19:05 iCarl

same problem

eviewei avatar May 16 '17 08:05 eviewei

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.

timh1004 avatar May 21 '17 15:05 timh1004

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?

magichew avatar Jun 01 '17 19:06 magichew

npm uninstall -g homebridge-aqara

timh1004 avatar Jun 02 '17 13:06 timh1004

npm uninstall -g homebridge-aqara

Thanks, thats very helpful!

new4u avatar Oct 17 '18 10:10 new4u