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

[Unifi protect cameras & motion sensors] Cannot get cameras: Error: ERROR: Could not enumerate motion sensors: Error: Authentication failed: {} #16

Closed andrewoke closed 4 years ago

andrewoke commented 4 years ago

Getting this error. It was previously working and I'm not sure what changed during an update. I've verified I can login with the user I provided etc. etc. Turning debug to true doesn't seem to increase logging though.

andrewoke commented 4 years ago
{
            "platform": "Unifi-Protect-Camera-Motion",
            "name": "Unifi protect cameras & motion sensors",
            "unifi": {
                "controller": "https://unifi:7443",
                "controller_rtsp": "rtsp://unifi:7447",
                "username": "***",
                "password": "***",
                "motion_interval": 5000,
                "motion_repeat_interval": 30000,
                "motion_score": 50,
                "enhanced_motion": true,
                "enhanced_motion_score": 50,
                "enhanced_classes": [
                    "person"
                ],
                "debug": true,
                "save_snapshot": true
            },
            "videoConfig": {
                "vcodec": "h264",
                "audio": false,
                "maxStreams": 2,
                "maxWidth": 3840,
                "maxHeight": 2160,
                "maxFPS": 30,
                "mapvideo": "0:1",
                "mapaudio": "0:0"
            }
        },
alvaroledesma commented 4 years ago

I am also having this issue

andrewoke commented 4 years ago

I'm glad it's not just me haha. I thought I must have missed something.

Protect version is 1.13.1

andrewoke commented 4 years ago

Ok, so I didn't catch it the first time, but ubuntu's resolvconf was messing with dns. I basically had to disable it, add my dns server in and now it's working again. You should be able to check that unifi-protect actually resolves to the cloudkey.

alvaroledesma commented 4 years ago

Ok, so I didn't catch it the first time, but ubuntu's resolvconf was messing with dns. I basically had to disable it, add my dns server in and now it's working again. You should be able to check that unifi-protect actually resolves to the cloudkey.

@andrewoke suggestions on how to do that? I can’t tell if it’s my firewall or the DNS on the homebridge controller. I think is has something to do with the PiHole I setup

Sent with GitHawk

andrewoke commented 4 years ago

Well, from wherever you run homebridge you should be able to resolve your cloud keys dns name. If not then you have a dns problem, otherwise it's something else.