Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot get cameras: Error: ERROR: Could not enumerate motion sensors: Error: Authentication failed: {} #64

Closed
sullyhome opened this issue Aug 2, 2020 · 14 comments
Labels

Comments

@sullyhome
Copy link

Version: homebridge-unifi-protect-camera-motion v0.4.1

Despite having the correct ID and password in my config file I get the error: Cannot get cameras: Error: ERROR: Could not enumerate motion sensors: Error: Authentication failed: {}

This happens with both local and cloud user accounts to try to rule that out.

Here is full log file.

[8/2/2020, 1:20:54 PM] [Config] Homebridge restart request received
[8/2/2020, 1:20:54 PM] [Config] UI / Bridge settings have not changed; only restarting Homebridge process
[8/2/2020, 1:20:54 PM] [HB Supervisor] Sending SIGTERM to Homebridge
[8/2/2020, 1:20:54 PM] Got SIGTERM, shutting down Homebridge...
[8/2/2020, 1:20:59 PM] [HB Supervisor] Homebridge Process Ended. Code: 143, Signal: null
[8/2/2020, 1:21:04 PM] [HB Supervisor] Restarting Homebridge...
[8/2/2020, 1:21:04 PM] [HB Supervisor] Starting Homebridge with extra flags: -I
[8/2/2020, 1:21:04 PM] [HB Supervisor] Started Homebridge v1.1.1 with PID: 7738
[8/2/2020, 1:21:05 PM] Loaded config.json with 0 accessories and 2 platforms.
[8/2/2020, 1:21:05 PM] ---
[8/2/2020, 1:21:06 PM] Loaded plugin: [email protected]
[8/2/2020, 1:21:06 PM] Registering platform 'homebridge-config-ui-x.config'
[8/2/2020, 1:21:06 PM] ---
cpu backend was already registered. Reusing existing backend factory.
Platform node has already been set. Overwriting the platform with [object Object].
[8/2/2020, 1:21:09 PM] Loaded plugin: [email protected]
[8/2/2020, 1:21:09 PM] Registering platform 'homebridge-unifi-protect-camera-motion.UnifiProtectMotion'
[8/2/2020, 1:21:09 PM] ---
[8/2/2020, 1:21:09 PM] Loading 2 platforms...
[8/2/2020, 1:21:09 PM] [Config] Initializing config platform...
[8/2/2020, 1:21:09 PM] [Config] Running in Service Mode
[8/2/2020, 1:21:09 PM] [Unifi protect cameras & motion sensors] Initializing UnifiProtectMotion platform...
[8/2/2020, 1:21:09 PM] [Unifi protect cameras & motion sensors] Configuring accessory Test
[8/2/2020, 1:21:09 PM] [Unifi protect cameras & motion sensors] Configuring accessory Right Side
[8/2/2020, 1:21:09 PM] [Unifi protect cameras & motion sensors] Configuring accessory Front Door
[8/2/2020, 1:21:09 PM] [Unifi protect cameras & motion sensors] Configuring accessory Garage
[8/2/2020, 1:21:09 PM] [Unifi protect cameras & motion sensors] Configuring accessory Left Side
[8/2/2020, 1:21:09 PM] [Unifi protect cameras & motion sensors] Configuring accessory Rear Door
Setup Payload:
X-HM://0023N1Q0Y3EK3
Enter this code with your HomeKit app on your iOS device to pair with Homebridge:

┌────────────┐     
│ 102-72-002 │     
└────────────┘     

[8/2/2020, 1:21:09 PM] Homebridge is running on port 51740.
[8/2/2020, 1:21:09 PM] [Unifi protect cameras & motion sensors] Endpoint Style: UnifiOS
[8/2/2020, 1:21:13 PM] [Unifi protect cameras & motion sensors] Cannot get cameras: Error: ERROR: Could not enumerate motion sensors: Error: Authentication failed: {}

@beele
Copy link
Owner

beele commented Aug 2, 2020

Post your redacted config please

@beele beele added the Unifi OS label Aug 2, 2020
@sullyhome
Copy link
Author

Post your redacted config please

{
"bridge": {
"name": "Homebridge D415",
"username": "username",
"port": 51740,
"pin": "102-72-002"
},
"accessories": [],
"platforms": [
{
"name": "Config",
"port": 8581,
"platform": "config"
},
{
"platform": "UnifiProtectMotion",
"name": "Unifi protect cameras & motion sensors",
"unifi": {
"controller": "https://192.168.1.172",
"controller_rtsp": "https://192.168.1.172:7447",
"username": "userid",
"password": "password",
"motion_interval": 5000,
"motion_repeat_interval": 30000,
"motion_score": 0,
"enhanced_motion": true,
"enhanced_motion_score": 55,
"enhanced_classes": [
"person"
],
"save_snapshot": false,
"enable_motion_trigger": true,
"enable_doorbell_for": [],
"debug": true,
"debug_network_traffic": true
},
"googlePhotos": {
"upload_gphotos": false,
"auth_clientId": "CLIENT_ID",
"auth_clientSecret": "CLIENT_SECRET",
"auth_redirectUrl": "http://localhost:8080/oauth2-callback"
},
"videoConfig": {
"vcodec": "h264_omx",
"audio": true,
"maxStreams": 2,
"maxWidth": 1920,
"maxHeight": 1080,
"maxFPS": 15,
"mapvideo": "0:1",
"mapaudio": "0:0",
"maxBitrate": "3000",
"packetSize": 188,
"additionalCommandline": "-protocol_whitelist https,crypto,srtp,rtp,udp"
}
}
]
}

@hfagelnour
Copy link

@beele i get the same error as above until i add a "/" at the end of the controller URL which will then Authenticate but gives this error afterwards
[8/3/2020, 20:53:24] [Unifi protect cameras & motion sensors] Cannot get cameras: Error: ERROR: Could not enumerate motion sensors: TypeError: Cannot read property 'status' of undefined

@sullyhome
Copy link
Author

@beele i get the same error as above until i add a "/" at the end of the controller URL which will then Authenticate but gives this error afterwards
[8/3/2020, 20:53:24] [Unifi protect cameras & motion sensors] Cannot get cameras: Error: ERROR: Could not enumerate motion sensors: TypeError: Cannot read property 'status' of undefined

Hmm the forward slash on the url didnt get me any further.

@hfagelnour
Copy link

hfagelnour commented Aug 3, 2020 via email

@sullyhome
Copy link
Author

Which Unifi OS and controller are u using? I am on 1.8rc11 and 6.0.8

Sent from my iPhone
On Aug 4, 2020, at 1:39 AM, sullyhome @.***> wrote:  @beele i get the same error as above until i add a "/" at the end of the controller URL which will then Authenticate but gives this error afterwards [8/3/2020, 20:53:24] [Unifi protect cameras & motion sensors] Cannot get cameras: Error: ERROR: Could not enumerate motion sensors: TypeError: Cannot read property 'status' of undefined Hmm the forward slash on the url didnt get me any further. — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

The new Protect NVR. Firmware 1.3.12 which appears to be the latest. Protect Controller version 1.14.11. Web UI Version 1.23.2

@sullyhome
Copy link
Author

FWIW the new Version 3 of homebridge-unifi-protect2 is working perfectly for me so doesnt appear to be an issue on my side. Going to switch to using that for now.

@beele
Copy link
Owner

beele commented Aug 5, 2020

I've gone over: https://github.com/hjdhjd/homebridge-unifi-protect2/blob/master/src/protect-api.ts
And my plugin does basically the same thing. I'll try some small changes to see if they have any effect.

@hfagelnour
Copy link

hfagelnour commented Aug 5, 2020 via email

@beele
Copy link
Owner

beele commented Aug 5, 2020

@sullyhome & @hfagelnour
Could you try with: sudo npm i -g --unsafe-perm=true [email protected]
I've reworked the calls to the Unifi side of things

@hfagelnour
Copy link

hfagelnour commented Aug 5, 2020 via email

@hfagelnour
Copy link

hfagelnour commented Aug 5, 2020 via email

@beele
Copy link
Owner

beele commented Aug 5, 2020

@hfagelnour good to hear that it's working now.
That message appears to be an error in their code, and can be ignored, tensorflow is already running with the C++ backend. But since the node & tensorflow integration is kinda shitty (mismatching versions and broken build instructions)

@beele
Copy link
Owner

beele commented Aug 17, 2020

Unifi OS should be working now

@beele beele closed this as completed Aug 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants