snOOrz / homebridge-aqara

HomeBridge plugin for Aqara gateway and devices
536 stars 74 forks source link

Homebidge failed after sensors rename #73

Closed oleg77s closed 6 years ago

oleg77s commented 7 years ago

config: { "platform": "AqaraPlatform", "sid": ["xxx"], "password": ["xxx"], "sensor_names": { "37a1":"Toilet" } Log: May 14 16:56:35 raspberrypi-0W homebridge[29648]: [5/14/2017, 4:56:35 PM] Resetting saved name 37a1 -> Toilet May 14 16:56:35 raspberrypi-0W homebridge[29648]: /usr/local/lib/node_modules/homebridge-aqara/lib/AqaraAccessoryFactory.js:52 May 14 16:56:35 raspberrypi-0W homebridge[29648]: var characteristic = service.getCharacteristic(Characteristic.Name); May 14 16:56:35 raspberrypi-0W homebridge[29648]: ^ May 14 16:56:35 raspberrypi-0W homebridge[29648]: ReferenceError: service is not defined May 14 16:56:35 raspberrypi-0W homebridge[29648]: at AqaraAccessoryFactory.configureAccessory (/usr/local/lib/node_modules/homebridge-aqara/lib/AqaraAccessoryFactory.js:52:35) May 14 16:56:35 raspberrypi-0W homebridge[29648]: at AqaraPlatform.configureAccessory (/usr/local/lib/node_modules/homebridge-aqara/lib/AqaraPlatform.js:190:16) May 14 16:56:35 raspberrypi-0W homebridge[29648]: at Server._configCachedPlatformAccessories (/usr/local/lib/node_modules/homebridge/lib/server.js:342:24) May 14 16:56:35 raspberrypi-0W homebridge[29648]: at Server.run (/usr/local/lib/node_modules/homebridge/lib/server.js:83:8) May 14 16:56:35 raspberrypi-0W homebridge[29648]: at module.exports (/usr/local/lib/node_modules/homebridge/lib/cli.js:40:10) May 14 16:56:35 raspberrypi-0W homebridge[29648]: at Object. (/usr/local/lib/node_modules/homebridge/bin/homebridge:17:22) May 14 16:56:35 raspberrypi-0W homebridge[29648]: at Module._compile (module.js:570:32) May 14 16:56:35 raspberrypi-0W homebridge[29648]: at Object.Module._extensions..js (module.js:579:10) May 14 16:56:35 raspberrypi-0W homebridge[29648]: at Module.load (module.js:487:32) May 14 16:56:35 raspberrypi-0W homebridge[29648]: at tryModuleLoad (module.js:446:12) May 14 16:56:35 raspberrypi-0W homebridge[29648]: at Function.Module._load (module.js:438:3) May 14 16:56:35 raspberrypi-0W homebridge[29648]: at Module.runMain (module.js:604:10) May 14 16:56:35 raspberrypi-0W homebridge[29648]: at run (bootstrap_node.js:390:7) May 14 16:56:35 raspberrypi-0W homebridge[29648]: at startup (bootstrap_node.js:150:9) May 14 16:56:35 raspberrypi-0W homebridge[29648]: at bootstrap_node.js:505:3 May 14 16:56:35 raspberrypi-0W systemd[1]: homebridge.service: main process exited, code=exited, status=1/FAILURE May 14 16:56:35 raspberrypi-0W systemd[1]: Unit homebridge.service entered failed state.

wlongxiang commented 7 years ago

got the same problem after renaming

seikan commented 7 years ago

I'm having same issue. The "service" variable is not defined.

jelvs commented 7 years ago

it's probably better, just to rename it on Apple Home app instead of doing on the config,i did it, and it works just fine

timh1004 commented 7 years ago

Try deleting ~/.homebridge/accessories/cachedAccessories

phenomeus commented 6 years ago

reseting …accessories/cachedAccessories did the trick