Open remko2000 opened 4 years ago
This issue (and specifically this comment) suggests it may be an issue with mixed installs (different versions of Node.js installed).
I notice that you're using node-gyp@5.0.5
, but the current version is node-gyp@6.1.0
so it might be worthwhile to upgrade that package first and see if that fixes the problem:
$ sudo npm i -g node-gyp
In any case, it's not specifically an issue with homebridge-klikaanklikuit
.
Strange, I updated gyp but still errors and it refers to the old gyp version:
pi@raspberrypi:~ $ sudo npm i -g node-gyp npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142 /usr/local/bin/node-gyp -> /usr/local/lib/node_modules/node-gyp/bin/node-gyp.js
- node-gyp@6.1.0 updated 1 package in 61.993s pi@raspberrypi:~ $ sudo npm install -g --unsafe-perm homebridge-klikaanklikuit
rpio@1.7.1 install /usr/local/lib/node_modules/homebridge-klikaanklikuit/node_modules/rpio node-gyp rebuild
gyp ERR! UNCAUGHT EXCEPTION
gyp ERR! stack TypeError: tar.extract is not a function
gyp ERR! stack at Request.node-gyp
.
gyp ERR! Try to update node-gyp and file an Issue if it does not help:
gyp ERR! https://github.com/nodejs/node-gyp/issues
npm ERR! code ELIFECYCLE
npm ERR! errno 7
npm ERR! rpio@1.7.1 install: node-gyp rebuild
npm ERR! Exit status 7
npm ERR!
npm ERR! Failed at the rpio@1.7.1 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2020-03-21T11_06_15_831Z-debug.log
and it refers to the old gyp version
It looks like npm
is using a version that is packaged specifically with it (installed in /usr/local/lib/node_modules/npm/node_modules/node-gyp/
).
Which version of npm
are you using? Perhaps that's needs upgrading too (sudo npm i -g npm
).
Indeed after updating npm I could install. Now I'm struggling with the json. Is there maybe a error in it? This is my config now:
{ "bridge": { "name": "Homebridge 82AE", "username": "0E:44:7B:CC:82:AE", "port": 51400, "pin": "340-42-632" }, "platforms": [ { "name": "Config", "port": 8581, "platform": "config" }, { "platform": "KlikAanKlikUit", "driver": { "type": "rpi", "pin": 6 }, "accessories": [ { "name": "Light Closet", "type": "Outlet", "dimmable": false, "address": "0000e1", "device": "2" } ] ] } }
But I get an syntaxerror. I dont't see where the mistake is.
{
"bridge": {
"name": "Homebridge 82AE",
"username": "0E:44:7B:CC:82:AE",
"port": 51400,
"pin": "340-42-632"
},
"platforms": [
{
"name": "Config",
"port": 8581,
"platform": "config"
},
{
"platform": "KlikAanKlikUit",
"driver": {
"type": "rpi",
"pin": 6
},
"accessories": [
{
"name": "Light Closet",
"type": "Outlet",
"dimmable": false,
"address": "0000e1",
"device": "2"
}
]
}
]
}
thx, that do the job.
Homebridge GUI gives me now:
Error: Unable to load driver 'rpi': Pin 6 is not valid when using physical mapping
at new KaKuPlatform (/usr/local/lib/node_modules/homebridge-klikaanklikuit/index.js:26:13)
at Server._loadPlatforms (/usr/local/lib/node_modules/homebridge/lib/server.js:337:32)
at Server.run (/usr/local/lib/node_modules/homebridge/lib/server.js:90:36)
at module.exports (/usr/local/lib/node_modules/homebridge/lib/cli.js:59:10)
at Object.
I change it to 8 and now I don't have errors anymore. I will test my transmitter now :-)
I ty to installe this plugin but I get:
My raspberry is up to date with the last software so what can be the problem here?