dubocr / homebridge-gpio-device

Homebridge GPIO device expose several HomeKit accessories interacting with GPIO
Apache License 2.0
65 stars 22 forks source link

Homebridge loading failure if `GPIODevice` accessory used #93

Open nov- opened 4 years ago

nov- commented 4 years ago

Is there any way to correct install all dependency for plugin? Permanently get error on Homebridge start.

ERROR LOADING PLUGIN homebridge-gpio-device:
Error: Could not locate the bindings file. Tried:
 → /usr/local/lib/node_modules/homebridge-gpio-device/node_modules/node-wiring-pi/build/nodeWiringPi.node
 → /usr/local/lib/node_modules/homebridge-gpio-device/node_modules/node-wiring-pi/build/Debug/nodeWiringPi.node
 → /usr/local/lib/node_modules/homebridge-gpio-device/node_modules/node-wiring-pi/build/Release/nodeWiringPi.node
 → /usr/local/lib/node_modules/homebridge-gpio-device/node_modules/node-wiring-pi/out/Debug/nodeWiringPi.node
 → /usr/local/lib/node_modules/homebridge-gpio-device/node_modules/node-wiring-pi/Debug/nodeWiringPi.node
 → /usr/local/lib/node_modules/homebridge-gpio-device/node_modules/node-wiring-pi/out/Release/nodeWiringPi.node
 → /usr/local/lib/node_modules/homebridge-gpio-device/node_modules/node-wiring-pi/Release/nodeWiringPi.node
 → /usr/local/lib/node_modules/homebridge-gpio-device/node_modules/node-wiring-pi/build/default/nodeWiringPi.node
 → /usr/local/lib/node_modules/homebridge-gpio-device/node_modules/node-wiring-pi/compiled/12.16.2/linux/arm/nodeWiringPi.node
    at bindings (/usr/local/lib/node_modules/homebridge-gpio-device/node_modules/bindings/bindings.js:88:9)
    at Object.<anonymous> (/usr/local/lib/node_modules/homebridge-gpio-device/node_modules/node-wiring-pi/index.js:1:37)
    at Module._compile (internal/modules/cjs/loader.js:1156:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1176:10)
    at Module.load (internal/modules/cjs/loader.js:1000:32)
    at Function.Module._load (internal/modules/cjs/loader.js:899:14)
    at Module.require (internal/modules/cjs/loader.js:1042:19)
    at require (internal/modules/cjs/helpers.js:77:18)
    at Object.<anonymous> (/usr/local/lib/node_modules/homebridge-gpio-device/index.js:3:11)
    at Module._compile (internal/modules/cjs/loader.js:1156:30)

gpio installed and seems like works

gpio -v
gpio version: 2.60
Copyright (c) 2012-2018 Gordon Henderson
This is free software with ABSOLUTELY NO WARRANTY.
For details type: gpio -warranty

Raspberry Pi Details:
  Type: Pi 4B, Revision: 02, Memory: 4096MB, Maker: Sony 
  * Device tree is enabled.
  *--> Raspberry Pi 4 Model B Rev 1.2
  * This Raspberry Pi supports user-level GPIO access.
gpio readall
 +-----+-----+---------+------+---+---Pi 4B--+---+------+---------+-----+-----+
 | BCM | wPi |   Name  | Mode | V | Physical | V | Mode | Name    | wPi | BCM |
 +-----+-----+---------+------+---+----++----+---+------+---------+-----+-----+
 |     |     |    3.3v |      |   |  1 || 2  |   |      | 5v      |     |     |
 |   2 |   8 |   SDA.1 |   IN | 1 |  3 || 4  |   |      | 5v      |     |     |
 |   3 |   9 |   SCL.1 |   IN | 1 |  5 || 6  |   |      | 0v      |     |     |
 |   4 |   7 | GPIO. 7 |   IN | 1 |  7 || 8  | 1 | IN   | TxD     | 15  | 14  |
 |     |     |      0v |      |   |  9 || 10 | 1 | IN   | RxD     | 16  | 15  |
 |  17 |   0 | GPIO. 0 |   IN | 0 | 11 || 12 | 0 | IN   | GPIO. 1 | 1   | 18  |
 |  27 |   2 | GPIO. 2 |   IN | 0 | 13 || 14 |   |      | 0v      |     |     |
 |  22 |   3 | GPIO. 3 |   IN | 0 | 15 || 16 | 0 | IN   | GPIO. 4 | 4   | 23  |
 |     |     |    3.3v |      |   | 17 || 18 | 0 | IN   | GPIO. 5 | 5   | 24  |
 |  10 |  12 |    MOSI |   IN | 0 | 19 || 20 |   |      | 0v      |     |     |
 |   9 |  13 |    MISO |   IN | 0 | 21 || 22 | 0 | IN   | GPIO. 6 | 6   | 25  |
 |  11 |  14 |    SCLK |   IN | 0 | 23 || 24 | 1 | IN   | CE0     | 10  | 8   |
 |     |     |      0v |      |   | 25 || 26 | 1 | IN   | CE1     | 11  | 7   |
 |   0 |  30 |   SDA.0 |   IN | 1 | 27 || 28 | 1 | IN   | SCL.0   | 31  | 1   |
 |   5 |  21 | GPIO.21 |   IN | 1 | 29 || 30 |   |      | 0v      |     |     |
 |   6 |  22 | GPIO.22 |   IN | 1 | 31 || 32 | 0 | IN   | GPIO.26 | 26  | 12  |
 |  13 |  23 | GPIO.23 |   IN | 0 | 33 || 34 |   |      | 0v      |     |     |
 |  19 |  24 | GPIO.24 |   IN | 0 | 35 || 36 | 0 | IN   | GPIO.27 | 27  | 16  |
 |  26 |  25 | GPIO.25 |   IN | 0 | 37 || 38 | 0 | IN   | GPIO.28 | 28  | 20  |
 |     |     |      0v |      |   | 39 || 40 | 0 | IN   | GPIO.29 | 29  | 21  |
 +-----+-----+---------+------+---+----++----+---+------+---------+-----+-----+
 | BCM | wPi |   Name  | Mode | V | Physical | V | Mode | Name    | wPi | BCM |
 +-----+-----+---------+------+---+---Pi 4B--+---+------+---------+-----+-----+
YuuichiLV commented 4 years ago

Same problem. Did fresh raspberry pi install, installed homebridge, homebridge UI, and GPIODevice only, no special config yet, and getting the same error. Node v10.19.0.

[5/11/2020, 10:11:37 AM] [HB Supervisor] Started Homebridge v1.0.4 with PID: 4849 [5/11/2020, 10:11:41 AM] Loaded config.json with 0 accessories and 1 platforms. [5/11/2020, 10:11:41 AM] --- [5/11/2020, 10:11:45 AM] Loaded plugin: homebridge-config-ui-x [5/11/2020, 10:11:45 AM] Registering platform 'homebridge-config-ui-x.config' [5/11/2020, 10:11:45 AM] --- [5/11/2020, 10:11:46 AM] ==================== [5/11/2020, 10:11:46 AM] ERROR LOADING PLUGIN homebridge-gpio-device: [5/11/2020, 10:11:46 AM] Error: Could not locate the bindings file. Tried: → /usr/local/lib/node_modules/homebridge-gpio-device/node_modules/node-wiring-pi/build/nodeWiringPi.node → /usr/local/lib/node_modules/homebridge-gpio-device/node_modules/node-wiring-pi/build/Debug/nodeWiringPi.node → /usr/local/lib/node_modules/homebridge-gpio-device/node_modules/node-wiring-pi/build/Release/nodeWiringPi.node → /usr/local/lib/node_modules/homebridge-gpio-device/node_modules/node-wiring-pi/out/Debug/nodeWiringPi.node → /usr/local/lib/node_modules/homebridge-gpio-device/node_modules/node-wiring-pi/Debug/nodeWiringPi.node → /usr/local/lib/node_modules/homebridge-gpio-device/node_modules/node-wiring-pi/out/Release/nodeWiringPi.node → /usr/local/lib/node_modules/homebridge-gpio-device/node_modules/node-wiring-pi/Release/nodeWiringPi.node → /usr/local/lib/node_modules/homebridge-gpio-device/node_modules/node-wiring-pi/build/default/nodeWiringPi.node → /usr/local/lib/node_modules/homebridge-gpio-device/node_modules/node-wiring-pi/compiled/10.19.0/linux/arm/nodeWiringPi.node at bindings (/usr/local/lib/node_modules/homebridge-gpio-device/node_modules/bindings/bindings.js:88:9) at Object.<anonymous> (/usr/local/lib/node_modules/homebridge-gpio-device/node_modules/node-wiring-pi/index.js:1:37) at Module._compile (internal/modules/cjs/loader.js:778:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10) at Module.load (internal/modules/cjs/loader.js:653:32) at tryModuleLoad (internal/modules/cjs/loader.js:593:12) at Function.Module._load (internal/modules/cjs/loader.js:585:3) at Module.require (internal/modules/cjs/loader.js:692:17) at require (internal/modules/cjs/helpers.js:25:18) at Object.<anonymous> (/usr/local/lib/node_modules/homebridge-gpio-device/index.js:3:11) [5/11/2020, 10:11:46 AM] ==================== [5/11/2020, 10:11:46 AM] Loading 1 platforms... [5/11/2020, 10:11:46 AM] [Config] Initializing config platform... [5/11/2020, 10:11:46 AM] [Config] Running in Service Mode

matijus91 commented 4 years ago

Same problem here. Also fresh install.

Error: Could not locate the bindings file. Tried: → /home/hoobs/.hoobs/node_modules/node-wiring-pi/build/nodeWiringPi.node → /home/hoobs/.hoobs/node_modules/node-wiring-pi/build/Debug/nodeWiringPi.node → /home/hoobs/.hoobs/node_modules/node-wiring-pi/build/Release/nodeWiringPi.node → /home/hoobs/.hoobs/node_modules/node-wiring-pi/out/Debug/nodeWiringPi.node → /home/hoobs/.hoobs/node_modules/node-wiring-pi/Debug/nodeWiringPi.node → /home/hoobs/.hoobs/node_modules/node-wiring-pi/out/Release/nodeWiringPi.node → /home/hoobs/.hoobs/node_modules/node-wiring-pi/Release/nodeWiringPi.node → /home/hoobs/.hoobs/node_modules/node-wiring-pi/build/default/nodeWiringPi.node → /home/hoobs/.hoobs/node_modules/node-wiring-pi/compiled/12.13.1/linux/arm/nodeWiringPi.node at bindings (/home/hoobs/.hoobs/node_modules/bindings/bindings.js:88:9) at Object. (/home/hoobs/.hoobs/node_modules/node-wiring-pi/index.js:1:37) at Module._compile (internal/modules/cjs/loader.js:959:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:995:10) at Module.load (internal/modules/cjs/loader.js:815:32) at Function.Module._load (internal/modules/cjs/loader.js:727:14) at Module.require (internal/modules/cjs/loader.js:852:19) at require (internal/modules/cjs/helpers.js:74:18) at Object. (/home/hoobs/.hoobs/node_modules/homebridge-gpio-device/index.js:3:11) at Module._compile (internal/modules/cjs/loader.js:959:30)

gpio -v gpio version: 2.46 Copyright (c) 2012-2018 Gordon Henderson This is free software with ABSOLUTELY NO WARRANTY. For details type: gpio -warranty

Raspberry Pi Details: Type: Pi 3, Revision: 02, Memory: 1024MB, Maker: Sony

jaumeorejuela commented 4 years ago

Same problem here

ffaamm commented 4 years ago

Right now I think that the only way to keep this plugin working is to stay on Node.js v10, Homebridge 0.4.53, and WiringPi 2.46. Otherwise, consider moving to homebridge-rpi.

fritsjan commented 4 years ago

same issue here

SRamsdell1 commented 4 years ago

same issue with both Homebridge on RPi4 and Hoobs on RPi 3B+.

itekhi commented 4 years ago

Right now I think that the only way to keep this plugin working is to stay on Node.js v10, Homebridge 0.4.53, and WiringPi 2.46.

That's awful... Does anyone know will the owner work on the plugin?

clrmsc commented 4 years ago

Pls fix this problem! Plssss

coshy81 commented 4 years ago

Right now I think that the only way to keep this plugin working is to stay on Node.js v10, Homebridge 0.4.53, and WiringPi 2.46. Otherwise, consider moving to homebridge-rpi.

Can confirm, I had to downgrade to Homebridge 0.4.53 && use wiringpi 2.46 in order to get this up and running again, I'm running Node.js 10.21

aebgit commented 4 years ago

Otherwise, consider moving to homebridge-rpi.

Same problem here. Moving to homebridge-rpi did not change a thing.

aebgit commented 4 years ago

Finally got it working on homebridge-rpiwith the following steps:

  1. log on via SSH
  2. stop Homebridge sudo hb-service stop
  3. uninstall pre-installed versions of Homebridge and the WebInterface via sudo npm uninstall -g homebridgeand sudo npm uninstall -g homebridge-config-ui-x. Uninstall homebridge-gpio-device too if it is still around from testing sudo npm uninstall -g homebridge-gpio-device
  4. downgrade Node to version 10 with sudo npm install -g n 10 and sudo n 10
  5. re-install Homebridge and the WebInterface via sudo npm install -g homebridge-gpio-device --unsafe-perm and sudo npm install -g homebridge-config-ui-x --unsafe-perm. Both are now built to fit perfectly to the installed version of Node.
  6. make sure WiringPi is installed sudo apt install wiringpi
  7. Install homebridge-gpio-device via sudo npm install -g homebridge-gpio-device --unsafe-perm

Now the plugin should work fine with the latest version of Homebridge (1.1.1) and Homebridge-Config-UI-X (4.24.0) on Node 10.22.0 - at least it does for me ;-). But keep in mind to NOT update Node when updating the system unless the compatibility-issues are fixed.

I have not tested it, but I'd assume that these steps should also work on other installations (meaning not homebridge-rpi).