KraigM / homebridge-wink

Wink hub plugin for HomeBridge
54 stars 37 forks source link

Cant Seem to get the plugin to install #65

Open KenHaass opened 7 years ago

KenHaass commented 7 years ago

First I am very new to raspberry and Homebridge. followed the instructions to install but get the following when i run homebridge

Any help would be appreciated.

Ken

WARNING The program 'nodejs' uses the Apple Bonjour compatibility layer of Avahi. WARNING Please fix your application to use the native API of Avahi! WARNING For more information see http://0pointer.de/avahi-compat?s=libdns_sd&e=nodejs WARNING The program 'nodejs' called 'DNSServiceRegister()' which is not supported (or only supported partially) in the Apple Bonjour compatibility layer of Avahi. WARNING Please fix your application to use the native API of Avahi! WARNING For more information see http://0pointer.de/avahi-compat?s=libdns_sd&e=nodejs&f=DNSServiceRegister [11/11/2016, 12:13:09 PM] ==================== [11/11/2016, 12:13:10 PM] ERROR LOADING PLUGIN homebridge-wink: [11/11/2016, 12:13:10 PM] TypeError: Path must be a string. Received null at assertPath (path.js:7:11) at Object.dirname (path.js:1324:5) at Object. (/usr/lib/node_modules/homebridge-wink/node_modules/config-file/index.js:17:21) 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.require (module.js:497:17) at require (internal/module.js:20:19) [11/11/2016, 12:13:10 PM] ==================== [11/11/2016, 12:13:10 PM] No plugins found. See the README for information on installing plugins. [11/11/2016, 12:13:10 PM] Loaded config.json with 0 accessories and 1 platforms. [11/11/2016, 12:13:10 PM] --- [11/11/2016, 12:13:10 PM] Loading 1 platforms... /usr/lib/node_modules/homebridge/lib/api.js:118 throw new Error("The requested platform '" + name + "' was not registered by any plugin."); ^

Error: The requested platform 'Wink' was not registered by any plugin. at API.platform (/usr/lib/node_modules/homebridge/lib/api.js:118:13) 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)

flochtililoch commented 7 years ago

this issue is already reported here: https://github.com/KraigM/homebridge-wink/issues/37

KenHaass commented 7 years ago

Flochtililoch, Thanks for the response. I see that the issue was addressed in #37, but i am not sure what the actual resolutions was. Install version 5?

flochtililoch commented 7 years ago

yes, reverting to a node version < 6 seems to solve the issue. You could also simply comment out these lines on your install, these are not used anyway in homebridge-wink plugin and are indirectly causing the issue.

rgrasmus commented 7 years ago

Is there a good way to do this in a docker container?

dasoutherland commented 7 years ago

@flochtililoch I commented out lines 134-137. Ran the following code. Im running node -v 6.9.1 pm2 stop homebridge -- -D pm2 start homebridge -- -D root@HKJail:/ # pm2 start homebridge -- -D [PM2] Applying action restartProcessId on app [homebridge](ids: 0) [PM2] [homebridge](0) ✓ [PM2] Process successfully started ┌────────────┬────┬──────┬───────┬────────┬─────────┬────────┬─────┬───────────┬──────────┐ │ App name │ id │ mode │ pid │ status │ restart │ uptime │ cpu │ mem │ watching │ ├────────────┼────┼──────┼───────┼────────┼─────────┼────────┼─────┼───────────┼──────────┤ │ homebridge │ 0 │ fork │ 58025 │ online │ 30 │ 0s │ 0% │ 24.2 MB │ disabled │ └────────────┴────┴──────┴───────┴────────┴─────────┴────────┴─────┴───────────┴──────────┘ Usepm2 show <id|name>to get more details about an app root@HKJail:/ #

Then I ran homebridge

screen shot 2016-11-21 at 10 49 37 pm
flochtililoch commented 7 years ago

Comments in JavaScript should be //, not #

keithajmani commented 7 years ago

It appears to be dying because it can't find package.json. This worked for me, just "touch package.json" in your ~/.homebridge directory. Definitely a wink plugin issue.

tobeychris commented 7 years ago

It appears to be dying because it can't find package.json. This worked for me, just "touch package.json" in your ~/.homebridge directory. Definitely a wink plugin issue.

This fixed it for me. Thanks!

rjmcfadd commented 7 years ago

@flochtililoch I commented out those lines in the wink-js/index.js file but I'm still getting the same error:

TypeError: Path must be a string. Received null at assertPath (path.js:7:11) at Object.dirname (path.js:1324:5) at Object. (/usr/lib/node_modules/homebridge-wink/node_modules/config-file/index.js:17:21) 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.require (module.js:497:17) at require (internal/module.js:20:19) at Object. (/usr/lib/node_modules/homebridge-wink/node_modules/wink-js/index.js:4:14) 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.require (module.js:497:17) at require (internal/module.js:20:19) at Object. (/usr/lib/node_modules/homebridge-wink/index.js:2:12) at Module._compile (module.js:570:32) at Object.Module._extensions..js (module.js:579:10) at Module.load (module.js:487:32)

Is there something I'm missing?

Thank you!