Closed mcomer-captech closed 3 weeks ago
And of course, happy to help with debugging or to provide additional information!
Please try v7.0.4. Thanks for the report.
I am seeing a similar but slightly different error with 7.0.4
TypeError: Cannot read properties of undefined (reading 'replace') at ProtectCamera.configureVideoStream (file:///var/lib/homebridge/node_modules/homebridge-unifi-protect/src/devices/protect-camera.ts:616:32) at processTicksAndRejections (node:internal/process/task_queues:95:5) at ProtectCamera.configureDevice (file:///var/lib/homebridge/node_modules/homebridge-unifi-protect/src/devices/protect-camera.ts:159:5)
Thanks for the great tool and for the support as well!
Thanks! Always appreciate the support.
What cameras do you have exactly? I'm curious. You're also on what is now an "old" Protect controller version.
I suspect that's the core issue here...though I should handle things more gracefully. Protect 4 came out a week or two ago...hence the major version bump for HBUP from 6 to 7, as I begin to incorporate some of the newer capabilities.
v7.0.5 should address the issue. Give it a go.
v7.0.5 does indeed seem to work just fine, thank you!
Protect 4 came out a week or two ago... Yes, I've been a little skittish about taking Protect upgrades too aggressively, specifically because I don't want to break HBUP. I may go ahead and upgrade shortly though since it seems like you are pretty much on board with it.
Thanks again!
Protect 4 is mostly a solid update. There's some new stuff in there, but rest assured, HBUP works well with it. Apologies for the regression and appreciate the report. Glad you're up and running again.
This issue is locked to prevent necroposting on closed issues. Please create a new issue for related support requests, bug reports, or feature suggestions.
Homebridge UniFi Protect Version
7.0.1
Homebridge Platform and OS
ProxMox 8, Alpine container (from https://helper-scripts.com/scripts?id=Homebridge)
Homebridge Version
1.8.2
Node Version
v20.12.2
UniFi OS Version
3.2.12
UniFi Protect Controller Version
3.0.26
Describe the problem
I receive a new error on startup after upgrade to 7.0.1 and the plugin ends up in a restart loop:
[6/9/2024, 2:46:44 PM] [UniFi Protect] UNVR [UNVR4]: Syncing Protect device names to HomeKit. TypeError: Cannot read properties of undefined (reading 'replace') at formatEntry (file:///var/lib/homebridge/node_modules/homebridge-unifi-protect/src/devices/protect-camera.ts:1032:4) at ProtectCamera.findRtspEntry (file:///var/lib/homebridge/node_modules/homebridge-unifi-protect/src/devices/protect-camera.ts:1052:8) at ProtectCamera.findRtsp (file:///var/lib/homebridge/node_modules/homebridge-unifi-protect/src/devices/protect-camera.ts:1085:12) at ProtectCamera.configureVideoStream (file:///var/lib/homebridge/node_modules/homebridge-unifi-protect/src/devices/protect-camera.ts:660:18) at processTicksAndRejections (node:internal/process/task_queues:95:5) at ProtectCamera.configureDevice (file:///var/lib/homebridge/node_modules/homebridge-unifi-protect/src/devices/protect-camera.ts:160:5)
Reverting to 6.22.0 fixes the problem.
Homebridge HBUP JSON configuration
Relevant log output
Acknowledgment that you are only running UniFi OS and UniFi Protect releases from the Ubiquiti Official release channel