Comments (13)
Can you paste your config?
from homebridge-unifi-protect.
Sure thing:
{
"server": {
"port": 1234,
"origin": "*",
"autostart": 0,
"home_setup_id": "X-HM://00XXXXXXXXXXX",
"polling_seconds": 5
},
"client": {
"default_route": "status",
"inactive_logoff": 30,
"theme": "hoobs-dark",
"locale": "en",
"temp_units": "celsius",
"country_code": "BE",
"postal_code": "1000"
},
"bridge": {
"name": "HOOBS",
"port": 51826,
"pin": "000-00-000",
"username": “XX:XX:XX:XX:XX:XX”
},
"description": "",
"ports": {},
"accessories": [],
"platforms": [
{
"platform": "Camera-UniFi-Protect",
"plugin_map": {
"plugin_name": "homebridge-unifi-protect2"
},
"name": "UniFi Protect",
"controllers": [
{
"platform": "Camera-UniFi-Protect",
"name": "G4 Pro",
"controllers": [
{
"url": "https://192.168.1.10:7443",
"username": "homebridge",
"password": "PASSWORD"
}
]
}
],
"videoProcessor": "ffmpeg",
"debugProtect": false,
"videoConfig": {
"sourcePrefix": "-re -rtsp_transport tcp",
"additionalCommandline": "-preset slow -profile:v high -level 4.2 -x264-params intra-refresh=1:bframes=0",
"mapaudio": "0:0",
"mapvideo": "0:1",
"maxStreams": 4,
"maxWidth": 1920,
"maxHeight": 1080,
"maxFPS": 20,
"packetSize": 564,
"audio": false
}
}
]
}
from homebridge-unifi-protect.
First, are you sure ffmpeg is available in your PATH? When you run ffmpeg from a terminal or ssh, does it work?
Secondly, I would delete the entire videoConfig section, it is totally optional to get a basic working stream and is only needed to fine tune things.
Try both of those things and let us know if it is still happening.
from homebridge-unifi-protect.
So only keep it like this? ffmpeg is in my path, I can execute it from any user on the system
{
"server": {
"port": 1234,
"origin": "*",
"autostart": 0,
"home_setup_id": "X-HM://00XXXXXXXXXXX",
"polling_seconds": 5
},
"client": {
"default_route": "status",
"inactive_logoff": 30,
"theme": "hoobs-dark",
"locale": "en",
"temp_units": "celsius",
"country_code": "BE",
"postal_code": "1000"
},
"bridge": {
"name": "HOOBS",
"port": 51826,
"pin": "000-00-000",
"username": "XX:XX:XX:XX:XX:XX"
},
"description": "",
"ports": {},
"accessories": [],
"platforms": [
{
"platform": "Camera-UniFi-Protect",
"plugin_map": {
"plugin_name": "homebridge-unifi-protect2"
},
"name": "UniFi Protect",
"controllers": [
{
"platform": "Camera-UniFi-Protect",
"name": "G4 Pro attic above kitchen",
"controllers": [
{
"url": "https://192.168.1.10:7443",
"username": "homebridge",
"password": "PASSWORD"
}
]
}
]
}
]
}
from homebridge-unifi-protect.
Yep, as long as that is valid json, it should work fine.
from homebridge-unifi-protect.
yeah the json is valid but homebridge still won't start :-/
from homebridge-unifi-protect.
Why did you close it? As the json is valid but Homebridge won't start...this is literally the only plugin I have in my Homebridge, would be eager to have it fixed :-)
from homebridge-unifi-protect.
@jcvangent I closed it because it's 2+ weeks old and either is abandoned or resolved. 😄
If you're still having this issue...let's try a few things:
- Are you on a clean install?
- What is your UniFi Protect setup? Are you using a Cloud Key Gen2+, UDM-Pro, or UNVR4?
- Post the relevant portion (not the entire file please) of your config.json that shows the configuration settings for this plugin.
Thanks!
from homebridge-unifi-protect.
I'm having a Cloud Key Gen2 (with HDD) that is running my Unifi Protect setup and a Raspberry Pi 3 model B+ running HOOBS (https://hoobs.org/).
It is a completely clean install, nothing else. I installed the plugin into my HOOBS (Homebridge setup) and it is the only plugin installed. Without the plugin, Homebridge starts, when I enable the plugin Homebridge won't start.
The entire config was posted already earlier, but I guess the only relevant part would be this part?
"plugins": [
"homebridge-unifi-protect2"
],
"accessories": [],
"platforms": [
{
"platform": "Camera-UniFi-Protect",
"plugin_map": {
"plugin_name": "homebridge-unifi-protect2"
},
"name": "UniFi Protect",
"controllers": [
{
"platform": "Camera-UniFi-Protect",
"name": "G4 Pro attic above kitchen",
"controllers": [
{
"url": "https://192.168.1.10:7443",
"username": "homebridge",
"password": "PASSWORD"
}
]
}
]
}
],
Oh and the logfile of Homebridge with the error is in my first post, but let me put it here for convenience as well:
15/06/2020, 21:01:46 Loaded plugin "homebridge-unifi-protect2".
15/06/2020, 21:01:46 TypeError: Cannot read property 'replace' of undefined
at getUnifiAuthConfig (/home/hoobs/.hoobs/node_modules/homebridge-unifi-protect2/index.js:34:56)
at /home/hoobs/.hoobs/node_modules/homebridge-unifi-protect2/index.js:159:14
at Array.map (<anonymous>)
at unifiPlatform.didFinishLaunching (/home/hoobs/.hoobs/node_modules/homebridge-unifi-protect2/index.js:158:32)
at API.emit (events.js:210:5)
at Server.run (/usr/local/lib/node_modules/@hoobs/hoobs/bridge/server.js:104:18)
at module.exports (/usr/local/lib/node_modules/@hoobs/hoobs/bridge/cli.js:84:12)
at Object.<anonymous> (/usr/local/lib/node_modules/@hoobs/hoobs/bin/hoobs:95:81)
at Module._compile (internal/modules/cjs/loader.js:959:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:995:10)
at Module.load (internal/modules/cjs/loader.js:815:32)
at Function.Module._load (internal/modules/cjs/loader.js:727:14)
at Function.Module.runMain (internal/modules/cjs/loader.js:1047:10)
at internal/main/run_main_module.js:17:11
15/06/2020, 21:01:46 Bridge is running on port 51826.
15/06/2020, 21:01:46 Got SIGTERM, shutting down Bridge...
from homebridge-unifi-protect.
It seems to be related to this part of the code, or at least the first error:
function getUnifiAuthConfig(controllerConfig, log, debugProtect) {
// Cleanup some common URL issues - eliminate multiple slashes and trailing slashes.
controllerConfig.url = 'https://' + controllerConfig.url
.replace(/^https\:\/\//, '') // Remove the leading "https://" for now.
.replace(/\/+/g, '/') // Replace consecutive slashes with a single slash.
.replace(/\/+$/, ''); // Remove trailing slashes.
from homebridge-unifi-protect.
@jcvangent It's not an issue in the code. The issue is in your config.json. If you read through the README carefully, you should find additional examples of what this should look like.
Here's a corrected version:
"platforms": [
{
"platform": "Camera-UniFi-Protect",
"name": "UniFi Protect",
"controllers": [
{
"url": "https://192.168.1.10:7443",
"username": "homebridge",
"password": "PASSWORD"
}
]
}
],
from homebridge-unifi-protect.
Okay weird, sorry for this now it starts indeed, I thought I took the example correctly and edited where needed.
Thanks a lot and now it can indeed be properly closed :-)
from homebridge-unifi-protect.
This issue is locked to prevent necroposting on closed issues. Please create a new issue for related support requests, bug reports, or feature suggestions.
from homebridge-unifi-protect.
Related Issues (20)
- MFA Support HOT 1
- Package camera snapshot is occasionally taken from the main camera HOT 8
- Invoke ring on doorbell remotely HOT 3
- Issue with livestreaming in HKSV on Unifi Protect Version 6.20.0 HOT 4
- Moved to Mac Mini M1 Verison V6.20 and V.19 won't play video HOT 3
- Errors in the Log after Update from G3 to G5 Cameras HOT 2
- Homekit video / snapshot not loading after a while require reboot of plugin or homebridge HOT 2
- Unifi Protect HKSV recordings cut off HOT 3
- Memory Leaked warning HOT 3
- Possible cause of #1061 (Author's note: nope.). HOT 2
- Unifi Baby Cry AI Detection - Device to trigger off of HOT 2
- Is it possible to add only motion sensors from some of the devices? HOT 2
- Transcoding based on IP address HOT 3
- HBUP API behaviour is impacting local admin login to Protect (4.0.3) HOT 2
- Live Streaming does not work but works with other tools HOT 2
- Switch to disable doorbell inside HomeKit HOT 2
- Max CPU usage and 32 Protect API errors per second HOT 6
- Why does UP Floodlight require full admin rights? HOT 2
- 2FA SUPPORT HOT 3
- Protect Controller taking too long to respond HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from homebridge-unifi-protect.