dubocr / homebridge-gpio-device

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

Plugin does crash my homebridge #76

Open StefanMeGit opened 4 years ago

StefanMeGit commented 4 years ago

At first! AWESOME PLUGIN! Exactly what I am looking for! Unfortunately the plugin doesn't work for me...

Node v8.11.1

Any idea what is going wrong?

pi@hassbian:~ $ homebridge
[15/09/2019, 21:16:07] Loaded config.json with 1 accessories and 1 platforms.
[15/09/2019, 21:16:07] ---
[15/09/2019, 21:16:08] Loaded plugin: homebridge-gpio-onoff
[15/09/2019, 21:16:08] Registering accessory 'homebridge-gpio-onoff.GPIO-OnOff'
[15/09/2019, 21:16:08] ---
[15/09/2019, 21:16:08] Loaded plugin: homebridge-hc-sr501
[15/09/2019, 21:16:08] Registering accessory 'homebridge-hc-sr501.HC-SR501'
[15/09/2019, 21:16:08] ---
[15/09/2019, 21:16:08] ====================
[15/09/2019, 21:16:08] ERROR LOADING PLUGIN homebridge-gpio-device:
[15/09/2019, 21:16:08] Error: Could not locate the bindings file. Tried:
 → /usr/lib/node_modules/homebridge-gpio-device/node_modules/node-wiring-pi/build/nodeWiringPi.node
 → /usr/lib/node_modules/homebridge-gpio-device/node_modules/node-wiring-pi/build/Debug/nodeWiringPi.node
 → /usr/lib/node_modules/homebridge-gpio-device/node_modules/node-wiring-pi/build/Release/nodeWiringPi.node
 → /usr/lib/node_modules/homebridge-gpio-device/node_modules/node-wiring-pi/out/Debug/nodeWiringPi.node
 → /usr/lib/node_modules/homebridge-gpio-device/node_modules/node-wiring-pi/Debug/nodeWiringPi.node
 → /usr/lib/node_modules/homebridge-gpio-device/node_modules/node-wiring-pi/out/Release/nodeWiringPi.node
 → /usr/lib/node_modules/homebridge-gpio-device/node_modules/node-wiring-pi/Release/nodeWiringPi.node
 → /usr/lib/node_modules/homebridge-gpio-device/node_modules/node-wiring-pi/build/default/nodeWiringPi.node
 → /usr/lib/node_modules/homebridge-gpio-device/node_modules/node-wiring-pi/compiled/8.11.1/linux/arm/nodeWiringPi.node
    at bindings (/usr/lib/node_modules/homebridge-gpio-device/node_modules/bindings/bindings.js:88:9)
    at Object.<anonymous> (/usr/lib/node_modules/homebridge-gpio-device/node_modules/node-wiring-pi/index.js:1:99)
    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 Object.<anonymous> (/usr/lib/node_modules/homebridge-gpio-device/index.js:3:11)
[15/09/2019, 21:16:08] ====================
[15/09/2019, 21:16:08] Loaded plugin: homebridge-gpio-wpi2
[15/09/2019, 21:16:08] Registering platform 'homebridge-gpio-wpi2.WiringPiPlatform'
[15/09/2019, 21:16:08] ---
[15/09/2019, 21:16:08] Loading 1 platforms...
[15/09/2019, 21:16:08] [Pi GPIO (WiringPi)] Initializing WiringPiPlatform platform...
[15/09/2019, 21:16:08] [Pi GPIO (WiringPi)] WORK IN PROGRESS... Report issues on https://github.com/rsg98/homebridge-gpio-wpi2
[15/09/2019, 21:16:08] [Pi GPIO (WiringPi)] Exporting GPIO Pins from config file...
[15/09/2019, 21:16:08] [Pi GPIO (WiringPi)] Exporting and configuring: HouseDoor
[15/09/2019, 21:16:08] [Pi GPIO (WiringPi)] homebridge API version: 2.4
[15/09/2019, 21:16:08] Loading 1 accessories...
[15/09/2019, 21:16:08] Error: The requested accessory 'GPIODevice' 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:297:42)
    at Server.run (/usr/local/lib/node_modules/homebridge/lib/server.js:91:38)
    at module.exports (/usr/local/lib/node_modules/homebridge/lib/cli.js:59:10)
    at Object.<anonymous> (/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)
[15/09/2019, 21:16:08] Got SIGTERM, shutting down Homebridge...
toshibochan commented 4 years ago

Post your config and what is you gpio -v?

bobisaperson1 commented 4 years ago

wasn't the one who opened the issue but it is exactly the same as what I'm getting:

pi@raspberrypi:~ $ 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: 03, Memory: 1024MB, Maker: Sony

AndreasPrang commented 4 years ago

@bobisaperson1 I got the same issue. I think I got it working with a reinstall:

sudo npm uninstall -g homebridge-gpio-device
sudo npm install -g homebridge-gpio-device --unsafe-perm
bobisaperson1 commented 4 years ago

This comes up at the end of the install:

make: *** [nodeWiringPi.target.mk:126: Release/obj.target/nodeWiringPi/src/wiringPi.o] Error 1 make: Leaving directory '/usr/lib/node_modules/homebridge-gpio-device/node_modules/node-wiring-pi/build' gyp ERR! build error gyp ERR! stack Error: make failed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23) gyp ERR! stack at ChildProcess.emit (events.js:311:20) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12) gyp ERR! System Linux 4.19.97-v7+ gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "build" gyp ERR! cwd /usr/lib/node_modules/homebridge-gpio-device/node_modules/node-wiring-pi gyp ERR! node -v v12.16.1 gyp ERR! node-gyp -v v5.1.0 gyp ERR! not ok

thornerjohan commented 4 years ago

@bobisaperson1, I have the same issue on my RPi 4.

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: 00, Revision: 02, Memory: 0MB, Maker: Sony

I tried with the WiringPi 2.52 that is updated for RPi4 as well but same Error.

bobisaperson1 commented 4 years ago

what method of installing homebridge did you use?

thornerjohan commented 4 years ago

I followed this instruction when I installed Homebridge: https://github.com/homebridge/homebridge/wiki/Install-Homebridge-on-Raspbian And I am running it on Raspbian newly installed, so Feb2020 version.

and with wiringpi updated to 2.52. ( I also tested with 2.46 but it doesn't seem fully compatible with RPi 4 as you see in my post above it states type: 00)

how I updated to 2.52: cd /tmp wget https://project-downloads.drogon.net/wiringpi-latest.deb sudo dpkg -i wiringpi-latest.deb