beele / homebridge-unifi-protect-camera-motion

Camera & Motion sensor support for Unifi Protect cameras in Homekit via Homebridge
Apache License 2.0
103 stars 12 forks source link

Failed Install on RPi Stretch Lite #5

Closed tylerlamparter closed 4 years ago

tylerlamparter commented 4 years ago

I keep getting this error when trying to install on RPi 3b+ and node.js 11.15.0. I'm a noob so I'm not sure what needs to be done.

pi@raspberrypi2:~ $ sudo npm install homebridge-unifi-protect-camera-motion -g --unsafe-perm=true

@tensorflow/tfjs-node@1.3.2 install /usr/lib/node_modules/homebridge-unifi-protect-camera-motion/node_modules/@tensorflow/tfjs-node node scripts/install.js

CPU-linux-1.3.2.tar.gz

canvas@2.6.0 install /usr/lib/node_modules/homebridge-unifi-protect-camera-motion/node_modules/canvas node-pre-gyp install --fallback-to-build

node-pre-gyp WARN Using request for node-pre-gyp https download node-pre-gyp WARN Tried to download(404): https://github.com/node-gfx/node-canvas-prebuilt/releases/download/v2.6.0/canvas-v2.6.0-node-v67-linux-glibc-arm.tar.gz node-pre-gyp WARN Pre-built binaries not found for canvas@2.6.0 and node@11.15.0 (node-v67 ABI, glibc) (falling back to source compile with node-gyp) Package pixman-1 was not found in the pkg-config search path. Perhaps you should add the directory containing `pixman-1.pc' to the PKG_CONFIG_PATH environment variable No package 'pixman-1' found gyp: Call to 'pkg-config pixman-1 --libs' returned exit status 1 while in binding.gyp. while trying to load binding.gyp gyp ERR! configure error gyp ERR! stack Error: gyp failed with exit code: 1 gyp ERR! stack at ChildProcess.onCpExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:345:16) gyp ERR! stack at ChildProcess.emit (events.js:193:13) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:255:12) gyp ERR! System Linux 4.19.75-v7+ gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/usr/lib/node_modules/homebridge-unifi-protect-camera-motion/node_modules/canvas/build/Release/canvas.node" "--module_name=canvas" "--module_path=/usr/lib/node_modules/homebridge-unifi-protect-camera-motion/node_modules/canvas/build/Release" "--napi_version=4" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v67" gyp ERR! cwd /usr/lib/node_modules/homebridge-unifi-protect-camera-motion/node_modules/canvas gyp ERR! node -v v11.15.0 gyp ERR! node-gyp -v v3.8.0 gyp ERR! not ok node-pre-gyp ERR! build error node-pre-gyp ERR! stack Error: Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/usr/lib/node_modules/homebridge-unifi-protect-camera-motion/node_modules/canvas/build/Release/canvas.node --module_name=canvas --module_path=/usr/lib/node_modules/homebridge-unifi-protect-camera-motion/node_modules/canvas/build/Release --napi_version=4 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v67' (1) node-pre-gyp ERR! stack at ChildProcess. (/usr/lib/node_modules/homebridge-unifi-protect-camera-motion/node_modules/canvas/node_modules/node-pre-gyp/lib/util/compile.js:83:29) node-pre-gyp ERR! stack at ChildProcess.emit (events.js:193:13) node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:999:16) node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:266:5) node-pre-gyp ERR! System Linux 4.19.75-v7+ node-pre-gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/homebridge-unifi-protect-camera-motion/node_modules/canvas/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build" node-pre-gyp ERR! cwd /usr/lib/node_modules/homebridge-unifi-protect-camera-motion/node_modules/canvas node-pre-gyp ERR! node -v v11.15.0 node-pre-gyp ERR! node-pre-gyp -v v0.11.0 node-pre-gyp ERR! not ok Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/usr/lib/node_modules/homebridge-unifi-protect-camera-motion/node_modules/canvas/build/Release/canvas.node --module_name=canvas --module_path=/usr/lib/node_modules/homebridge-unifi-protect-camera-motion/node_modules/canvas/build/Release --napi_version=4 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v67' (1) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! canvas@2.6.0 install: node-pre-gyp install --fallback-to-build npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the canvas@2.6.0 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/2019-11-19T06_10_14_452Z-debug.log

ryanschmidt commented 4 years ago

I'm having the same issue. It's unrelated to this plugin and I'm finding several others struggling to install canvas. Let me know if you have any luck. I'll be trying again soon and will report back once I figure it out.

kinektech-au commented 4 years ago

Having trouble also, not sure if related but the link to Canvas V 2.6.0 returns a 404 file not found. https://github.com/node-gfx/node-canvas-prebuilt/releases/ shows a minor update to 2.6.1

kwalkington commented 4 years ago

I'm having same issue.

nathsea commented 4 years ago

yep me as well ...

kinektech-au commented 4 years ago

@beele Are you able to chime in on the above?

beele commented 4 years ago

Sorry I only seem to get email notifications when someone mentions me, not for new issues.

Could you try running the following command before installing this plugin with NPM

sudo apt-get update && sudo apt-get install build-essential libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-dev (for ubuntu/debian only, other os'es see: https://github.com/Automattic/node-canvas#compiling)

These are the required dependencies to build node-canvas from source. It wants to compile it from source since it can't find the OS/Node combo in the list of precompiled binaries.

I'll add this command to the package.json preinstall Readme updated!

vlasinus commented 4 years ago

@beele installed with out errors but homebridge not started

Nov 30 11:22:34 openHABianPi homebridge[4143]: at Server._loadPlatforms (/usr/lib/node_modules/homebridge/lib/server.js:327:45) Nov 30 11:22:34 openHABianPi homebridge[4143]: at Server.run (/usr/lib/node_modules/homebridge/lib/server.js:90:36) Nov 30 11:22:34 openHABianPi homebridge[4143]: at module.exports (/usr/lib/node_modules/homebridge/lib/cli.js:59:10) Nov 30 11:22:34 openHABianPi homebridge[4143]: at Object.<anonymous> (/usr/lib/node_modules/homebridge/bin/homebridge:17:22) Nov 30 11:22:34 openHABianPi homebridge[4143]: at Module._compile (internal/modules/cjs/loader.js:689:30) Nov 30 11:22:34 openHABianPi homebridge[4143]: at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10) Nov 30 11:22:34 openHABianPi homebridge[4143]: at Module.load (internal/modules/cjs/loader.js:599:32) Nov 30 11:22:34 openHABianPi homebridge[4143]: at tryModuleLoad (internal/modules/cjs/loader.js:538:12) Nov 30 11:22:34 openHABianPi homebridge[4143]: at Function.Module._load (internal/modules/cjs/loader.js:530:3) Nov 30 11:22:34 openHABianPi homebridge[4143]: [11/30/2019, 11:22:34 AM] Got SIGTERM, shutting down Homebridge...

● homebridge.service - Node.js HomeKit Server Loaded: loaded (/etc/systemd/system/homebridge.service; enabled; vendor preset: enabled) Active: activating (auto-restart) (Result: exit-code) since Sat 2019-11-30 11:22:39 MSK; 128ms ago Process: 4143 ExecStart=/usr/bin/homebridge $HOMEBRIDGE_OPTS (code=exited, status=143) Main PID: 4143 (code=exited, status=143)

without "platform": "Unifi-Protect-Camera-Motion" started ok @beele what is the problem?

tylerlamparter commented 4 years ago

@beele Mine installed as well, but I get this error when homebridge starts up and repeatedly shuts down. -- Logs begin at Sat 2019-11-30 09:20:27 CST. -- Nov 30 09:29:53 raspberrypi homebridge[1128]: [11/30/2019, 09:29:53] [Config] Homebridge Config UI X v4.6.4 is listening on :: port 8080 Nov 30 09:29:53 raspberrypi systemd[1]: homebridge.service: Main process exited, code=exited, status=143/n/a Nov 30 09:29:53 raspberrypi systemd[1]: homebridge.service: Failed with result 'exit-code'. Nov 30 09:29:56 raspberrypi systemd[1]: homebridge.service: Service RestartSec=3s expired, scheduling restart. Nov 30 09:29:56 raspberrypi systemd[1]: homebridge.service: Scheduled restart job, restart counter is at 2. Nov 30 09:29:56 raspberrypi systemd[1]: Stopped Homebridge. Nov 30 09:29:56 raspberrypi systemd[1]: Started Homebridge. Nov 30 09:29:58 raspberrypi homebridge[1177]: [11/30/2019, 09:29:58] Loaded config.json with 1 accessories and 3 platforms. Nov 30 09:29:58 raspberrypi homebridge[1177]: [11/30/2019, 09:29:58] --- Nov 30 09:29:58 raspberrypi homebridge[1177]: [11/30/2019, 09:29:58] Loaded plugin: homebridge-config-ui-x Nov 30 09:29:58 raspberrypi homebridge[1177]: [11/30/2019, 09:29:58] Registering platform 'homebridge-config-ui-x.config' Nov 30 09:29:58 raspberrypi homebridge[1177]: [11/30/2019, 09:29:58] --- Nov 30 09:30:01 raspberrypi homebridge[1177]: [11/30/2019, 09:30:01] Loaded plugin: homebridge-hue Nov 30 09:30:01 raspberrypi homebridge[1177]: [11/30/2019, 09:30:01] Registering platform 'homebridge-hue.Hue' Nov 30 09:30:01 raspberrypi homebridge[1177]: [11/30/2019, 09:30:01] --- Nov 30 09:30:04 raspberrypi homebridge[1177]: [11/30/2019, 09:30:04] ==================== Nov 30 09:30:04 raspberrypi homebridge[1177]: [11/30/2019, 09:30:04] ERROR LOADING PLUGIN homebridge-unifi-protect-camera-motion: Nov 30 09:30:04 raspberrypi homebridge[1177]: [11/30/2019, 09:30:04] Error: /usr/lib/node_modules/homebridge-unifi-protect-camera-motion/node_modules/@tensorflow/tfjs-node/lib/napi-v4/tfjs_binding.node: wrong ELF class: ELFCLASS64 Nov 30 09:30:04 raspberrypi homebridge[1177]: at Object.Module._extensions..node (internal/modules/cjs/loader.js:1025:18) Nov 30 09:30:04 raspberrypi homebridge[1177]: at Module.load (internal/modules/cjs/loader.js:815:32) Nov 30 09:30:04 raspberrypi homebridge[1177]: at Function.Module._load (internal/modules/cjs/loader.js:727:14) Nov 30 09:30:04 raspberrypi homebridge[1177]: at Module.require (internal/modules/cjs/loader.js:852:19) Nov 30 09:30:04 raspberrypi homebridge[1177]: at require (internal/modules/cjs/helpers.js:74:18) Nov 30 09:30:04 raspberrypi homebridge[1177]: at Object.<anonymous> (/usr/lib/node_modules/homebridge-unifi-protect-camera-motion/node_modules/@tensorflow/tfjs-node/dist/index.js:44:16) Nov 30 09:30:04 raspberrypi homebridge[1177]: at Module._compile (internal/modules/cjs/loader.js:959:30) Nov 30 09:30:04 raspberrypi homebridge[1177]: at Object.Module._extensions..js (internal/modules/cjs/loader.js:995:10) Nov 30 09:30:04 raspberrypi homebridge[1177]: at Module.load (internal/modules/cjs/loader.js:815:32) Nov 30 09:30:04 raspberrypi homebridge[1177]: at Function.Module._load (internal/modules/cjs/loader.js:727:14) Nov 30 09:30:04 raspberrypi homebridge[1177]: [11/30/2019, 09:30:04] ==================== Nov 30 09:30:04 raspberrypi homebridge[1177]: [11/30/2019, 09:30:04] Loaded plugin: homebridge-webos-tv Nov 30 09:30:04 raspberrypi homebridge[1177]: [11/30/2019, 09:30:04] Registering accessory 'homebridge-webos-tv.webostv' Nov 30 09:30:04 raspberrypi homebridge[1177]: [11/30/2019, 09:30:04] --- Nov 30 09:30:04 raspberrypi homebridge[1177]: [11/30/2019, 09:30:04] Loading 3 platforms... Nov 30 09:30:04 raspberrypi homebridge[1177]: [11/30/2019, 09:30:04] [Config] Initializing config platform... Nov 30 09:30:04 raspberrypi homebridge[1177]: [11/30/2019, 09:30:04] [Config] Spawning homebridge-config-ui-x with PID 1198 Nov 30 09:30:04 raspberrypi homebridge[1177]: [11/30/2019, 09:30:04] [Hue] Initializing Hue platform... Nov 30 09:30:04 raspberrypi homebridge[1177]: [11/30/2019, 09:30:04] [Hue] homebridge-hue v0.11.44, node v12.13.1, homebridge v0.4.50 Nov 30 09:30:04 raspberrypi homebridge[1177]: [11/30/2019, 09:30:04] Error: The requested platform 'Unifi-Protect-Camera-Motion' was not registered by any plugin. Nov 30 09:30:04 raspberrypi homebridge[1177]: at API.platform (/usr/lib/node_modules/homebridge/lib/api.js:134:13) Nov 30 09:30:04 raspberrypi homebridge[1177]: at Server._loadPlatforms (/usr/lib/node_modules/homebridge/lib/server.js:327:45) Nov 30 09:30:04 raspberrypi homebridge[1177]: at Server.run (/usr/lib/node_modules/homebridge/lib/server.js:90:36) Nov 30 09:30:04 raspberrypi homebridge[1177]: at module.exports (/usr/lib/node_modules/homebridge/lib/cli.js:59:10) Nov 30 09:30:04 raspberrypi homebridge[1177]: at Object.<anonymous> (/usr/lib/node_modules/homebridge/bin/homebridge:17:22) Nov 30 09:30:04 raspberrypi homebridge[1177]: at Module._compile (internal/modules/cjs/loader.js:959:30) Nov 30 09:30:04 raspberrypi homebridge[1177]: at Object.Module._extensions..js (internal/modules/cjs/loader.js:995:10) Nov 30 09:30:04 raspberrypi homebridge[1177]: at Module.load (internal/modules/cjs/loader.js:815:32) Nov 30 09:30:04 raspberrypi homebridge[1177]: at Function.Module._load (internal/modules/cjs/loader.js:727:14) Nov 30 09:30:04 raspberrypi homebridge[1177]: at Function.Module.runMain (internal/modules/cjs/loader.js:1047:10) Nov 30 09:30:04 raspberrypi homebridge[1177]: [11/30/2019, 09:30:04] Got SIGTERM, shutting down Homebridge... Nov 30 09:30:09 raspberrypi homebridge[1177]: [11/30/2019, 09:30:09] [Config] Homebridge Config UI X v4.6.4 is listening on :: port 8080 Nov 30 09:30:09 raspberrypi systemd[1]: homebridge.service: Main process exited, code=exited, status=143/n/a Nov 30 09:30:09 raspberrypi systemd[1]: homebridge.service: Failed with result 'exit-code'. Nov 30 09:30:13 raspberrypi systemd[1]: homebridge.service: Service RestartSec=3s expired, scheduling restart. Nov 30 09:30:13 raspberrypi systemd[1]: homebridge.service: Scheduled restart job, restart counter is at 3. Nov 30 09:30:13 raspberrypi systemd[1]: Stopped Homebridge.

beele commented 4 years ago

@beele installed with out errors but homebridge not started

Nov 30 11:22:34 openHABianPi homebridge[4143]: at Server._loadPlatforms (/usr/lib/node_modules/homebridge/lib/server.js:327:45) Nov 30 11:22:34 openHABianPi homebridge[4143]: at Server.run (/usr/lib/node_modules/homebridge/lib/server.js:90:36) Nov 30 11:22:34 openHABianPi homebridge[4143]: at module.exports (/usr/lib/node_modules/homebridge/lib/cli.js:59:10) Nov 30 11:22:34 openHABianPi homebridge[4143]: at Object.<anonymous> (/usr/lib/node_modules/homebridge/bin/homebridge:17:22) Nov 30 11:22:34 openHABianPi homebridge[4143]: at Module._compile (internal/modules/cjs/loader.js:689:30) Nov 30 11:22:34 openHABianPi homebridge[4143]: at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10) Nov 30 11:22:34 openHABianPi homebridge[4143]: at Module.load (internal/modules/cjs/loader.js:599:32) Nov 30 11:22:34 openHABianPi homebridge[4143]: at tryModuleLoad (internal/modules/cjs/loader.js:538:12) Nov 30 11:22:34 openHABianPi homebridge[4143]: at Function.Module._load (internal/modules/cjs/loader.js:530:3) Nov 30 11:22:34 openHABianPi homebridge[4143]: [11/30/2019, 11:22:34 AM] Got SIGTERM, shutting down Homebridge...

● homebridge.service - Node.js HomeKit Server Loaded: loaded (/etc/systemd/system/homebridge.service; enabled; vendor preset: enabled) Active: activating (auto-restart) (Result: exit-code) since Sat 2019-11-30 11:22:39 MSK; 128ms ago Process: 4143 ExecStart=/usr/bin/homebridge $HOMEBRIDGE_OPTS (code=exited, status=143) Main PID: 4143 (code=exited, status=143)

without "platform": "Unifi-Protect-Camera-Motion" started ok @beele what is the problem?

If that the full stacktrace, because I don't see anything related to my plugin in that logging...

beele commented 4 years ago

@beele Mine installed as well, but I get this error when homebridge starts up and repeatedly shuts down. -- Logs begin at Sat 2019-11-30 09:20:27 CST. -- Nov 30 09:29:53 raspberrypi homebridge[1128]: [11/30/2019, 09:29:53] [Config] Homebridge Config UI X v4.6.4 is listening on :: port 8080 Nov 30 09:29:53 raspberrypi systemd[1]: homebridge.service: Main process exited, code=exited, status=143/n/a Nov 30 09:29:53 raspberrypi systemd[1]: homebridge.service: Failed with result 'exit-code'. Nov 30 09:29:56 raspberrypi systemd[1]: homebridge.service: Service RestartSec=3s expired, scheduling restart. Nov 30 09:29:56 raspberrypi systemd[1]: homebridge.service: Scheduled restart job, restart counter is at 2. Nov 30 09:29:56 raspberrypi systemd[1]: Stopped Homebridge. Nov 30 09:29:56 raspberrypi systemd[1]: Started Homebridge. Nov 30 09:29:58 raspberrypi homebridge[1177]: [11/30/2019, 09:29:58] Loaded config.json with 1 accessories and 3 platforms. Nov 30 09:29:58 raspberrypi homebridge[1177]: [11/30/2019, 09:29:58] --- Nov 30 09:29:58 raspberrypi homebridge[1177]: [11/30/2019, 09:29:58] Loaded plugin: homebridge-config-ui-x Nov 30 09:29:58 raspberrypi homebridge[1177]: [11/30/2019, 09:29:58] Registering platform 'homebridge-config-ui-x.config' Nov 30 09:29:58 raspberrypi homebridge[1177]: [11/30/2019, 09:29:58] --- Nov 30 09:30:01 raspberrypi homebridge[1177]: [11/30/2019, 09:30:01] Loaded plugin: homebridge-hue Nov 30 09:30:01 raspberrypi homebridge[1177]: [11/30/2019, 09:30:01] Registering platform 'homebridge-hue.Hue' Nov 30 09:30:01 raspberrypi homebridge[1177]: [11/30/2019, 09:30:01] --- Nov 30 09:30:04 raspberrypi homebridge[1177]: [11/30/2019, 09:30:04] ==================== Nov 30 09:30:04 raspberrypi homebridge[1177]: [11/30/2019, 09:30:04] ERROR LOADING PLUGIN homebridge-unifi-protect-camera-motion: Nov 30 09:30:04 raspberrypi homebridge[1177]: [11/30/2019, 09:30:04] Error: /usr/lib/node_modules/homebridge-unifi-protect-camera-motion/node_modules/@tensorflow/tfjs-node/lib/napi-v4/tfjs_binding.node: wrong ELF class: ELFCLASS64 Nov 30 09:30:04 raspberrypi homebridge[1177]: at Object.Module._extensions..node (internal/modules/cjs/loader.js:1025:18) Nov 30 09:30:04 raspberrypi homebridge[1177]: at Module.load (internal/modules/cjs/loader.js:815:32) Nov 30 09:30:04 raspberrypi homebridge[1177]: at Function.Module._load (internal/modules/cjs/loader.js:727:14) Nov 30 09:30:04 raspberrypi homebridge[1177]: at Module.require (internal/modules/cjs/loader.js:852:19) Nov 30 09:30:04 raspberrypi homebridge[1177]: at require (internal/modules/cjs/helpers.js:74:18) Nov 30 09:30:04 raspberrypi homebridge[1177]: at Object.<anonymous> (/usr/lib/node_modules/homebridge-unifi-protect-camera-motion/node_modules/@tensorflow/tfjs-node/dist/index.js:44:16) Nov 30 09:30:04 raspberrypi homebridge[1177]: at Module._compile (internal/modules/cjs/loader.js:959:30) Nov 30 09:30:04 raspberrypi homebridge[1177]: at Object.Module._extensions..js (internal/modules/cjs/loader.js:995:10) Nov 30 09:30:04 raspberrypi homebridge[1177]: at Module.load (internal/modules/cjs/loader.js:815:32) Nov 30 09:30:04 raspberrypi homebridge[1177]: at Function.Module._load (internal/modules/cjs/loader.js:727:14) Nov 30 09:30:04 raspberrypi homebridge[1177]: [11/30/2019, 09:30:04] ==================== Nov 30 09:30:04 raspberrypi homebridge[1177]: [11/30/2019, 09:30:04] Loaded plugin: homebridge-webos-tv Nov 30 09:30:04 raspberrypi homebridge[1177]: [11/30/2019, 09:30:04] Registering accessory 'homebridge-webos-tv.webostv' Nov 30 09:30:04 raspberrypi homebridge[1177]: [11/30/2019, 09:30:04] --- Nov 30 09:30:04 raspberrypi homebridge[1177]: [11/30/2019, 09:30:04] Loading 3 platforms... Nov 30 09:30:04 raspberrypi homebridge[1177]: [11/30/2019, 09:30:04] [Config] Initializing config platform... Nov 30 09:30:04 raspberrypi homebridge[1177]: [11/30/2019, 09:30:04] [Config] Spawning homebridge-config-ui-x with PID 1198 Nov 30 09:30:04 raspberrypi homebridge[1177]: [11/30/2019, 09:30:04] [Hue] Initializing Hue platform... Nov 30 09:30:04 raspberrypi homebridge[1177]: [11/30/2019, 09:30:04] [Hue] homebridge-hue v0.11.44, node v12.13.1, homebridge v0.4.50 Nov 30 09:30:04 raspberrypi homebridge[1177]: [11/30/2019, 09:30:04] Error: The requested platform 'Unifi-Protect-Camera-Motion' was not registered by any plugin. Nov 30 09:30:04 raspberrypi homebridge[1177]: at API.platform (/usr/lib/node_modules/homebridge/lib/api.js:134:13) Nov 30 09:30:04 raspberrypi homebridge[1177]: at Server._loadPlatforms (/usr/lib/node_modules/homebridge/lib/server.js:327:45) Nov 30 09:30:04 raspberrypi homebridge[1177]: at Server.run (/usr/lib/node_modules/homebridge/lib/server.js:90:36) Nov 30 09:30:04 raspberrypi homebridge[1177]: at module.exports (/usr/lib/node_modules/homebridge/lib/cli.js:59:10) Nov 30 09:30:04 raspberrypi homebridge[1177]: at Object.<anonymous> (/usr/lib/node_modules/homebridge/bin/homebridge:17:22) Nov 30 09:30:04 raspberrypi homebridge[1177]: at Module._compile (internal/modules/cjs/loader.js:959:30) Nov 30 09:30:04 raspberrypi homebridge[1177]: at Object.Module._extensions..js (internal/modules/cjs/loader.js:995:10) Nov 30 09:30:04 raspberrypi homebridge[1177]: at Module.load (internal/modules/cjs/loader.js:815:32) Nov 30 09:30:04 raspberrypi homebridge[1177]: at Function.Module._load (internal/modules/cjs/loader.js:727:14) Nov 30 09:30:04 raspberrypi homebridge[1177]: at Function.Module.runMain (internal/modules/cjs/loader.js:1047:10) Nov 30 09:30:04 raspberrypi homebridge[1177]: [11/30/2019, 09:30:04] Got SIGTERM, shutting down Homebridge... Nov 30 09:30:09 raspberrypi homebridge[1177]: [11/30/2019, 09:30:09] [Config] Homebridge Config UI X v4.6.4 is listening on :: port 8080 Nov 30 09:30:09 raspberrypi systemd[1]: homebridge.service: Main process exited, code=exited, status=143/n/a Nov 30 09:30:09 raspberrypi systemd[1]: homebridge.service: Failed with result 'exit-code'. Nov 30 09:30:13 raspberrypi systemd[1]: homebridge.service: Service RestartSec=3s expired, scheduling restart. Nov 30 09:30:13 raspberrypi systemd[1]: homebridge.service: Scheduled restart job, restart counter is at 3. Nov 30 09:30:13 raspberrypi systemd[1]: Stopped Homebridge.

Can you give me more information about your os/pi. The issue seems to be with tensorflowjs:
Error: /usr/lib/node_modules/homebridge-unifi-protect-camera-motion/node_modules/@tensorflow/tfjs-node/lib/napi-v4/tfjs_binding.node: wrong ELF class:

Delete the @tensorflow folder in the node_module folder and try installing the plugin again.

vlasinus commented 4 years ago

without "platform": "Unifi-Protect-Camera-Motion" started ok @beele what is the problem?

If that the full stacktrace, because I don't see anything related to my plugin in that logging...

How to see the log of your plugin?

tylerlamparter commented 4 years ago

Can you give me more information about your os/pi. The issue seems to be with tensorflowjs: Error: /usr/lib/node_modules/homebridge-unifi-protect-camera-motion/node_modules/@tensorflow/tfjs-node/lib/napi-v4/tfjs_binding.node: wrong ELF class:

Delete the @tensorflow folder in the node_module folder and try installing the plugin again.

@beele I have homebridge installed according to the instructions on homebridge github. Stretch Lite RPi 3b+. I tried deleting the tensorflow folder and files within and reinstalling, but I end up with the same error.

tylerlamparter commented 4 years ago

@beele I got it to work when homebridge is not set up as a service user. I'm now just using a normal user and pm2 for starting homebridge on startup.