stfnhmplr / homebridge-synology

Control your Synology Diskstation with Homekit
MIT License
162 stars 16 forks source link

Error Message #12

Closed CharlyFive closed 7 years ago

CharlyFive commented 7 years ago

Hi, I have been using Homebridge for a long time. Today I installed the plugin "Synology" and adapted the config.json, but I get a error message (homebridge.err):

`s=libdns_sd&e=nodejs&f=DNSServiceRegister> /usr/lib/node_modules/homebridge/lib/api.js:104 if (name.indexOf('.') == -1) { ^

TypeError: Cannot read property 'indexOf' of undefined at API.platform (/usr/lib/node_modules/homebridge/lib/api.js:104:11) at Server._loadPlatforms (/usr/lib/node_modules/homebridge/lib/server.js:281:45) at Server.run (/usr/lib/node_modules/homebridge/lib/server.js:77:36) at module.exports (/usr/lib/node_modules/homebridge/lib/cli.js:40:10) at Object. (/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) at Function.Module._load (module.js:438:3) at Module.runMain (module.js:604:10) at run (bootstrap_node.js:394:7) at startup (bootstrap_node.js:149:9) at bootstrap_node.js:509:3`

stfnhmplr commented 7 years ago

sorry for my late reply. is this still a current problem? can you post the synology part from your config.json?

djxmax commented 7 years ago

I have the same problem.

My config.json part : { "ip": "192.168.1.48", "mac": "00:11:32:53:E1:4C", "port": "5000", "secure": false, "account": "maxime", "password": "XXXXX", "version": 6, "timeout": 5000, "disabled": [ "switch" ], "doPolling": true, "pollingInterval": 60 }

my error :

`/usr/local/lib/node_modules/homebridge/lib/api.js:50 if (name.indexOf('.') == -1) { ^

TypeError: Cannot read property 'indexOf' of undefined at API.accessory (/usr/local/lib/node_modules/homebridge/lib/api.js:50:11) at Server._loadAccessories (/usr/local/lib/node_modules/homebridge/lib/server.js:254:42) at Server.run (/usr/local/lib/node_modules/homebridge/lib/server.js:81:38) at module.exports (/usr/local/lib/node_modules/homebridge/lib/cli.js:40:10) at Object. (/usr/local/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) at Function.Module._load (module.js:438:3) at Module.runMain (module.js:604:10) at run (bootstrap_node.js:389:7) at startup (bootstrap_node.js:149:9) at bootstrap_node.js:504:3`

Without the part of config.json, work without problem. Thank you

stfnhmplr commented 7 years ago

Your config is missing the name and the accessory attribute. Take a look at the example at the readme.