Closed leglagladu13 closed 6 years ago
it appears like the plugin was not installed correctly. Try to uninstall and re-install again with the -g flag. Please share the results of the install as well as your config.json.
Thanks for your help ^_^ With the -g flag "if it's good my enter" : MacBook-de-Users:~ Users$ sudo npm -g i homebridge-onkyo Password: npm ERR! code 1 npm ERR! Command failed: /usr/bin/git clone -q git://github.com/tillbaks/node-eiscp.git /Users/Users/.npm/_cacache/tmp/git-clone-64583399 npm ERR! /Users/Users/.npm/_cacache/tmp/git-clone-64583399/.git: Permission denied npm ERR!
npm ERR! A complete log of this run can be found in: npm ERR! /Users/Users/.npm/_logs/2018-04-06T16_08_10_813Z-debug.log
But if I put in normal enter : MacBook-de-Users:~ Users$ sudo npm i homebridge-onkyo Password: npm WARN saveError ENOENT: no such file or directory, open '/Users/Users/package.json' npm WARN enoent ENOENT: no such file or directory, open '/Users/Users/package.json' npm WARN Users No description npm WARN Users No repository field. npm WARN Users No README data npm WARN Users No license field.
And the config.json is : { "bridge": { "name": "CasaBridge", "username": "00:00:00:00:00:00", "port": 51825, "pin": "031-45-154" }, "accessories": [ { "accessory": "Onkyo", "name": "Stereo", "ip_address": "000.000.0.0", "model" : "TX-NR818", "poll_status_interval": "900", "default_input": "net", "default_volume": "10", "max_volume": "35", "map_volume_100": true, "zone" : "zone2" } ],
"platforms": [
{
"platform" : "yeelight",
"name" : "yeelight"
}
],
"platforms": [
{
"platform": "FoscamCamera",
"name": "Foscam",
"cameras": [{
"username": "name",
"password": "password",
"host": "000.000.0.0",
"port": 88,
"stay": 1,
"away": 12,
"night": 2,
"sensitivity": 2,
"triggerInterval": 5,
"gain": 6,
"spkrEnable": false,
"spkrCompression": true,
"spkrGain": 1,
"path": "/Users/Users/Desktop/Snapshot_Cameras"
}]
}]
}
Check out issue #3, this looks like the same problem which is a permissions issue with NPM. Try using option 2 from https://docs.npmjs.com/getting-started/fixing-npm-permissions Then you would need to uninstall all references of the plugin (or other plugins as well), and reinstall using 'npm install -g homebridge-onkyo".
OHH thank you very much! I reinstalled node.js with the pkg supplied on the official site. I had a old version and I had installed it with a dmg, what maybe caused the problem of permission. Furthermore I installed it by using -npm install g homebridge-onkyo
. Now I have no more problem. Thank you again for the support
Please some helps ! It's not working :
MacBook-de-Users:~ Users$ homebridge
┌───────────────────────────────────────────────────────────┐ │ npm update check failed │ │ Try running with sudo or get access │ │ to the local update config store via │ │ sudo chown -R $USER:$(id -gn $USER) /Users/Users/.config │ └───────────────────────────────────────────────────────────┘ [2018-4-4 23:04:59] Loaded plugin: homebridge-foscamcamera [2018-4-4 23:04:59] Registering platform 'homebridge-foscamcamera.FoscamCamera' [2018-4-4 23:04:59] --- [2018-4-4 23:04:59] Loaded plugin: homebridge-freemote [2018-4-4 23:04:59] Registering accessory 'homebridge-freemote.Freemote' [2018-4-4 23:04:59] --- [2018-4-4 23:04:59] ==================== [2018-4-4 23:04:59] ERROR LOADING PLUGIN homebridge-onkyo: [2018-4-4 23:04:59] Error: Cannot find module 'request' at Function.Module._resolveFilename (module.js:547:15) at Function.Module._load (module.js:474:25) at Module.require (module.js:596:17) at require (internal/module.js:11:18) at Object. (/usr/local/lib/node_modules/homebridge-onkyo/index.js:4:15)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at Plugin.load (/usr/local/lib/node_modules/homebridge/lib/plugin.js:72:22)
at Server. (/usr/local/lib/node_modules/homebridge/lib/server.js:142:14)
at Array.forEach ()
at Server._loadPlugins (/usr/local/lib/node_modules/homebridge/lib/server.js:138:22)
at new Server (/usr/local/lib/node_modules/homebridge/lib/server.js:56:24)
at module.exports (/usr/local/lib/node_modules/homebridge/lib/cli.js:26:16)
at Object. (/usr/local/lib/node_modules/homebridge/bin/homebridge:17:22)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
at Function.Module.runMain (module.js:693:10)
at startup (bootstrap_node.js:188:16)
at bootstrap_node.js:609:3
[2018-4-4 23:04:59] ====================
failed to load BLE module!
[2018-4-4 23:04:59] Loaded plugin: homebridge-yeelight
[2018-4-4 23:04:59] Registering platform 'homebridge-yeelight.yeelight'
[2018-4-4 23:04:59] ---
[2018-4-4 23:04:59] Loaded config.json with 1 accessories and 1 platforms.
[2018-4-4 23:04:59] ---
[2018-4-4 23:05:00] Loading 1 platforms...
[2018-4-4 23:05:00] [Foscam] Initializing FoscamCamera platform...
[2018-4-4 23:05:00] Loading 1 accessories...
/usr/local/lib/node_modules/homebridge/lib/api.js:64
throw new Error("The requested accessory '" + name + "' was not registered by any plugin.");
^
Error: The requested accessory 'Onkyo' was not registered by any plugin. at API.accessory (/usr/local/lib/node_modules/homebridge/lib/api.js:64:13) at Server._loadAccessories (/usr/local/lib/node_modules/homebridge/lib/server.js:264:42) at Server.run (/usr/local/lib/node_modules/homebridge/lib/server.js:86: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:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
at Function.Module.runMain (module.js:693:10)
at startup (bootstrap_node.js:188:16)
at bootstrap_node.js:609:3