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

Fails to load without MQTT configured #90

Closed scottrus closed 2 years ago

scottrus commented 3 years ago

https://github.com/beele/homebridge-unifi-protect-camera-motion/blob/6198567ebec047800109e0e1d715560693dd878c/src/utils/mqtt.ts#L16

I'm guessing we need to update this test with if (!config || !config.mqtt_enabled) {

BadgerBadgerAndFox commented 3 years ago

Seeing the same, MQTT disabled results in the following:

[13/08/2021, 16:36:56] [Unifi protect cameras & motion sensors] VIDEO PROCESSOR: /usr/local/lib/node_modules/homebridge-unifi-protect-camera-motion/node_modules/ffmpeg-for-homebridge/ffmpeg

/usr/local/lib/node_modules/homebridge-unifi-protect-camera-motion/src/utils/mqtt.js:35 if (this.client.connected) { ^ TypeError: Cannot read property 'connected' of undefined at Timeout._onTimeout (/usr/local/lib/node_modules/homebridge-unifi-protect-camera-motion/src/utils/mqtt.js:35:33) at listOnTimeout (internal/timers.js:555:17) at processTimers (internal/timers.js:498:7) [13/08/2021, 16:36:57] [Unifi protect cameras & motion sensors] Child bridge process ended [13/08/2021, 16:36:57] [Unifi protect cameras & motion sensors] Process Ended. Code: 1, Signal: null

omrd commented 3 years ago

Has anyone figured out a solution to this? I'm also getting the same error.

beele commented 2 years ago

Should be fixed wit 0.4.6

nstefanelli commented 2 years ago

Seems to persist in 0.4.7, any thoughts?

beele commented 2 years ago

Should be fixed with #98