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

Support for not using @tensorflow/tfjs-node (FreeBSD) #40

Closed s1rc closed 4 years ago

s1rc commented 4 years ago

I've been running homebridge-camera-ffmpeg for a long time but I want to switch to your plugin to make use of motion events.

Since I'm running FreeBSD, ffmpeg-for-homebridge gives the error ffmpeg-for-homebridge: freebsd x64 is not supported, you will need to install/compile ffmpeg manually. And I have done this, since homebridge-camera-ffmpeg works fine with it.

homebridge-camera-ffmpeg allows for falling back to global ffmpeg, can your plugin do the same? https://github.com/homebridge-plugins/homebridge-camera-ffmpeg/blob/master/CHANGELOG.md#v100-2020-05-11

s1rc commented 4 years ago

After doing some more digging, I think the issue is @tensorflow/tfjs-node is not supported.

I found this error:

> @tensorflow/tfjs-node@1.7.4 install /root/node_modules/@tensorflow/tfjs-node
> node scripts/install.js
/root/node_modules/@tensorflow/tfjs-node/scripts/deps-constants.js:85
  throw Exception('Unsupported platform: ' + os.platform());
  ^

Is it possible to use this plugin with just the UniFi protect score?

beele commented 4 years ago

For now it's not possible to install the plugin without tensorflow. As for FFMpeg, I use homebridge-camera-ffmpeg as a dependency so it should itstall like it's standalone (just in the node_modules folder of my plugin), so the fallback logic 'should' work.

s1rc commented 4 years ago

I couldn’t get it to work on a fork of your plugin without tensorflow installing.

I’m currently trying the plugin on a fresh Ubuntu VM, but running into other issues with the packaged ffmpeg not being called. I commented in another similar issue: https://github.com/beele/homebridge-unifi-protect-camera-motion/issues/35#issuecomment-630320579