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

The requested platform 'Unifi-Protect-Camera-Motion' was not registered by any plugin #2

Closed MitchJackson94 closed 4 years ago

MitchJackson94 commented 4 years ago

Hi, I'm getting the following errors when starting homebridge after installing and updating my config.

0|homebridge | Error: The requested platform 'Unifi-Protect-Camera-Motion' was not registered by any plugin. 0|homebridge | at API.platform (/usr/local/lib/node_modules/homebridge/lib/api.js:134:13) 0|homebridge | at Server._loadPlatforms (/usr/local/lib/node_modules/homebridge/lib/server.js:327:45) 0|homebridge | at Server.run (/usr/local/lib/node_modules/homebridge/lib/server.js:90:36) 0|homebridge | at module.exports (/usr/local/lib/node_modules/homebridge/lib/cli.js:59:10) 0|homebridge | at Object.<anonymous> (/usr/local/lib/node_modules/homebridge/bin/homebridge:17:22) 0|homebridge | at Module._compile (internal/modules/cjs/loader.js:799:30) 0|homebridge | at Object.Module._extensions..js (internal/modules/cjs/loader.js:810:10) 0|homebridge | at Module.load (internal/modules/cjs/loader.js:666:32) 0|homebridge | at tryModuleLoad (internal/modules/cjs/loader.js:606:12) 0|homebridge | at Function.Module._load (internal/modules/cjs/loader.js:598:3) 0|homebridge | at Function._load (/usr/local/lib/node_modules/pm2/node_modules/@pm2/io/build/main/metrics/httpMetrics.js:172:43) 0|homebridge | at Object.<anonymous> (/usr/local/lib/node_modules/pm2/lib/ProcessContainerFork.js:27:21) 0|homebridge | at Module._compile (internal/modules/cjs/loader.js:799:30) 0|homebridge | at Object.Module._extensions..js (internal/modules/cjs/loader.js:810:10) 0|homebridge | at Module.load (internal/modules/cjs/loader.js:666:32) 0|homebridge | at tryModuleLoad (internal/modules/cjs/loader.js:606:12) 0|homebridge | at Function.Module._load (internal/modules/cjs/loader.js:598:3) 0|homebridge | at Function.Module.runMain (internal/modules/cjs/loader.js:862:12) 0|homebridge | at internal/main/run_main_module.js:21:11

0|homebridge | [10/19/2019, 7:20:42 PM] ERROR LOADING PLUGIN homebridge-unifi-protect-camera-motion: 0|homebridge | [10/19/2019, 7:20:42 PM] Error: Cannot find module '/usr/local/lib/node_modules/homebridge-unifi-protect-camera-motion/node_modules/@tensorflow/tfjs-node/lib/napi-v4/tfjs_binding.node' 0|homebridge | at Function.Module._resolveFilename (internal/modules/cjs/loader.js:649:15) 0|homebridge | at Function.Module._load (internal/modules/cjs/loader.js:575:25) 0|homebridge | at Function._load (/usr/local/lib/node_modules/pm2/node_modules/@pm2/io/build/main/metrics/httpMetrics.js:172:43) 0|homebridge | at Module.require (internal/modules/cjs/loader.js:705:19) 0|homebridge | at require (internal/modules/cjs/helpers.js:14:16) 0|homebridge | at Object.<anonymous> (/usr/local/lib/node_modules/homebridge-unifi-protect-camera-motion/node_modules/@tensorflow/tfjs-node/dist/index.js:44:16) 0|homebridge | at Module._compile (internal/modules/cjs/loader.js:799:30) 0|homebridge | at Object.Module._extensions..js (internal/modules/cjs/loader.js:810:10) 0|homebridge | at Module.load (internal/modules/cjs/loader.js:666:32) 0|homebridge | at tryModuleLoad (internal/modules/cjs/loader.js:606:12) 0|homebridge | at Function.Module._load (internal/modules/cjs/loader.js:598:3) 0|homebridge | at Function._load (/usr/local/lib/node_modules/pm2/node_modules/@pm2/io/build/main/metrics/httpMetrics.js:172:43) 0|homebridge | at Module.require (internal/modules/cjs/loader.js:705:19) 0|homebridge | at require (internal/modules/cjs/helpers.js:14:16) 0|homebridge | at Object.<anonymous> (/usr/local/lib/node_modules/homebridge-unifi-protect-camera-motion/src/coco/coco.js:12:12) 0|homebridge | at Module._compile (internal/modules/cjs/loader.js:799:30) 0|homebridge | at Object.Module._extensions..js (internal/modules/cjs/loader.js:810:10) 0|homebridge | at Module.load (internal/modules/cjs/loader.js:666:32) 0|homebridge | at tryModuleLoad (internal/modules/cjs/loader.js:606:12) 0|homebridge | at Function.Module._load (internal/modules/cjs/loader.js:598:3) 0|homebridge | at Function._load (/usr/local/lib/node_modules/pm2/node_modules/@pm2/io/build/main/metrics/httpMetrics.js:172:43) 0|homebridge | at Module.require (internal/modules/cjs/loader.js:705:19)

{ "bridge": { "name": "Homebridge", "username": "CC:22:3D:E3:CE:30", "port": 51826, "pin": "031-45-154" }, "description": "This is an example configuration file with one fake accessory and one fake platform. You can use this as a template for creating your own configuration file containing devices you actually own.", "platforms": [ { "platform": "ZP" }, { "platform": "Unifi-Protect-Camera-Motion", "name": "Unifi protect cameras & motion sensors", "unifi": { "controller": "https://192.168.0.39:7443", "controller_rtsp": "rtsp://192.168.0.39:7447/7Zvq8XERIQY4yfit", "username": "email", "password": "password", "motion_interval": 5000, "motion_score": 50, "enhanced_motion": true, "enhanced_motion_score": 50, "debug": false }, "videoConfig": { "vcodec": "h264_omx", "audio": false, "maxStreams": 2, "maxWidth": 1024, "maxHeight": 576, "maxFPS": 15, "mapvideo": "0:1", "mapaudio": "0:0" } } ], "accessories": [ ] }

I am running homebridge on iocage on my FreeNAS server

beele commented 4 years ago

Looks liks the tensorflow.js binding arent generated/working correctly. Have no experience with freeNas server, but my best guess would be that tensorflow.js might not be supported on that platform?

==> Cannot find module '/usr/local/lib/node_modules/homebridge-unifi-protect-camera-motion/node_modules/@tensorflow/tfjs-node/lib/napi-v4/tfjs_binding.node'

MitchJackson94 commented 4 years ago

Oh okay that makes sense now I have been playing around with it and tried to install tensorflow.js on its own and I get Unsupported platform so looks like it’s just not supported on FreeNAS