grover / homebridge-dacp

Remotely control Apple TV and iTunes via HomeKit.
MIT License
153 stars 15 forks source link

ERROR - Plugin not registered #36

Closed crazy-jackrabbit closed 6 years ago

crazy-jackrabbit commented 6 years ago

Hello, i have a Problem with your plugin. i´ve installed the Plugin with npm install -g homebridge-dacp --unsafe-perm and added

{ "platform": "DACP", "devices": [ ] }

to the config.

After restart my homebridge with sudsystemctl restart homebridge -l I got the following Problem

Mär 30 11:04:59 hbridge2 homebridge[6895]: /usr/local/lib/node_modules/homebridge/lib/api.js:122 Mär 30 11:04:59 hbridge2 homebridge[6895]: throw new Error("The requested platform '" + name + "' was not registered by any plugin."); Mär 30 11:04:59 hbridge2 homebridge[6895]: ^ Mär 30 11:04:59 hbridge2 homebridge[6895]: Error: The requested platform 'DACP' was not registered by any plugin. Mär 30 11:04:59 hbridge2 homebridge[6895]: at API.platform (/usr/local/lib/node_modules/homebridge/lib/api.js:122:13) Mär 30 11:04:59 hbridge2 homebridge[6895]: at Server._loadPlatforms (/usr/local/lib/node_modules/homebridge/lib/server.js:294:45) Mär 30 11:04:59 hbridge2 homebridge[6895]: at Server.run (/usr/local/lib/node_modules/homebridge/lib/server.js:85:36) Mär 30 11:04:59 hbridge2 homebridge[6895]: at module.exports (/usr/local/lib/node_modules/homebridge/lib/cli.js:40:10) Mär 30 11:04:59 hbridge2 homebridge[6895]: at Object. (/usr/local/lib/node_modules/homebridge/bin/homebridge:17:22) Mär 30 11:04:59 hbridge2 homebridge[6895]: at Module._compile (module.js:571:32) Mär 30 11:04:59 hbridge2 homebridge[6895]: at Object.Module._extensions..js (module.js:580:10) Mär 30 11:04:59 hbridge2 homebridge[6895]: at Module.load (module.js:488:32) Mär 30 11:04:59 hbridge2 homebridge[6895]: at tryModuleLoad (module.js:447:12) Mär 30 11:04:59 hbridge2 homebridge[6895]: at Function.Module._load (module.js:439:3) Mär 30 11:04:59 hbridge2 systemd[1]: homebridge.service: main process exited, code=exited, status=1/FAILURE Mär 30 11:04:59 hbridge2 systemd[1]: Unit homebridge.service entered failed state.

Versions:

pi@hbridge2:~ npm -v 5.8.0 pi@hbridge2:~ $ sudo npm view homebridge-dacp version 0.9.1 pi@hbridge2:~ $ node -v v7.10.0 pi@hbridge2:~ $ sudo npm list -g --depth=0 /usr/local/lib ├── homebridge@0.4.38

Update: If I clear the config (remove { "platform": "DACP", "devices": [ ] } homebridge starts without problems but with this notification:

Mär 30 16:43:06 hbridge2 homebridge[29973]: [2018-3-30 16:43:06] ERROR LOADING PLUGIN homebridge-dacp: Mär 30 16:43:06 hbridge2 homebridge[29973]: [2018-3-30 16:43:06] Error: Cannot find module '../build/Release/dns_sd_bindings' Mär 30 16:43:06 hbridge2 homebridge[29973]: at Function.Module._resolveFilename (module.js:470:15) Mär 30 16:43:06 hbridge2 homebridge[29973]: at Function.Module._load (module.js:418:25) Mär 30 16:43:06 hbridge2 homebridge[29973]: at Module.require (module.js:498:17) Mär 30 16:43:06 hbridge2 homebridge[29973]: at require (internal/module.js:20:19) Mär 30 16:43:06 hbridge2 homebridge[29973]: at Object. (/usr/local/lib/node_modules/homebridge-dacp/node_modules/mdns/lib/dns_sd.js:32:22) Mär 30 16:43:06 hbridge2 homebridge[29973]: at Module._compile (module.js:571:32) Mär 30 16:43:06 hbridge2 homebridge[29973]: at Object.Module._extensions..js (module.js:580:10) Mär 30 16:43:06 hbridge2 homebridge[29973]: at Module.load (module.js:488:32) Mär 30 16:43:06 hbridge2 homebridge[29973]: at tryModuleLoad (module.js:447:12) Mär 30 16:43:06 hbridge2 homebridge[29973]: at Function.Module._load (module.js:439:3)

recipriversexcluson commented 6 years ago

I have exactly the same issue. Clean install. Are you using the username homebridge through systemd?

grover commented 6 years ago

In other instances of bug reports like this, the node modules were installed in a different node installation. Are you sure that you have used the right node install? See #12 for example.