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

Cant Seem to get the plugin to install

Open KenHaass opened this issue 8 years ago • 9 comments

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)

KenHaass avatar Nov 11 '16 18:11 KenHaass

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

flochtililoch avatar Nov 11 '16 23:11 flochtililoch

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?

KenHaass avatar Nov 14 '16 14:11 KenHaass

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.

flochtililoch avatar Nov 15 '16 05:11 flochtililoch

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

rgrasmus avatar Nov 15 '16 21:11 rgrasmus

@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 │ └────────────┴────┴──────┴───────┴────────┴─────────┴────────┴─────┴───────────┴──────────┘ Use pm2 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

dasoutherland avatar Nov 22 '16 03:11 dasoutherland

Comments in JavaScript should be //, not #

flochtililoch avatar Nov 22 '16 16:11 flochtililoch

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.

keithajmani avatar Dec 31 '16 03:12 keithajmani

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!

tobeychris avatar Jan 06 '17 19:01 tobeychris

@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!

rjmcfadd avatar Jan 08 '17 13:01 rjmcfadd