hjdhjd / homebridge-unifi-protect

:video_camera: Complete HomeKit integration for all UniFi Protect device types with full support for most features including HomeKit Secure Video, and more. https://homebridge.io
Other
1.43k stars 88 forks source link

Unable to configure HOOBS for UniFi Protect 2 #40

Closed aenglish86 closed 4 years ago

aenglish86 commented 4 years ago

Hello. I have followed the instructions on the plugin page of hoobs, set the username and password as well as IP address. I’m using the udm pro for unifi protect and have tried both ip address’ with and without the port value of 7443. I’ve also tried with and without http and https. I’ve also tried pointing it to unifi.ui.com 9AA13241-0582-4937-91A0-7E4279F52A0E

aenglish86 commented 4 years ago

I can send you screenshots via email of the actual configuration page

hjdhjd commented 4 years ago

Sure. The error is that you haven't configured a controller. If you can post the relevant portion of your config.json as well, it would be helpful.

aenglish86 commented 4 years ago

1C2E02DC-3C52-4BF0-A4CA-717F1DFD6F00

hjdhjd commented 4 years ago

A few questions:

aenglish86 commented 4 years ago

Plugin version Unifi Protect2 3.3.0 published 8/17/2020

I am using the UDM Pro for my unifi protect. As with the udm pro accessing the unit is only accessible via: unifi.ui.com

hjdhjd commented 4 years ago

Well, the good news is that it looks like your config.json is right. The bad news is that you can't access UniFi Protect locally. That's necessary for this plugin to work.

If you go to https://192.168.1.1 that should take you to your UDM-Pro login page. When you login, if you look in the top right you should see 9 "dots"...clicking on that should allow you to go to your local UniFi Protect. You should be able to login there.

aenglish86 commented 4 years ago

Ok, so when I go to https://192.168.1.1 it does take me to the login page which it has never done before in the past. But when I put that address into the config, it still says no host or ip has been configured in the hoobs logs

hjdhjd commented 4 years ago

No. Your prior config was correct. You shouldn't have modified it.

You need to confirm that you, not the plugin, can successfully login to your UniFi Protect installation. Once you do, you can turn your focus to the plugin.

aenglish86 commented 4 years ago

here is my config file in its entirety minus passwords:

"platforms": [
        {
            "platform": "TplinkSmarthome",
            "plugin_map": {
                "plugin_name": "homebridge-tplink-smarthome"
            }
        },
        {
            "platform": "Camera-ffmpeg",
            "plugin_map": {
                "plugin_name": "homebridge-camera-ffmpeg"
            },
            "name": "Camera FFmpeg"
        },
        {
            "platform": "UniFi Protect",
            "plugin_map": {
                "plugin_name": "homebridge-unifi-protect2"
            },
            "debug": false,
            "controllers": [
                {
                    "platform": "UniFi Protect",
                    "controllers": [
                        {
                            "address": "192.168.1.1",
                            "username": "aenglish86",
                            "password": "password"
                        }
                    ]
                }
            ]
        }
    ]
}

and here is the log:

2020-08-17, 7:54:40 PM Got SIGINT, shutting down Bridge...
2020-08-17, 7:54:45 PM Loaded plugin "homebridge-camera-ffmpeg".
2020-08-17, 7:54:45 PM Loaded plugin "homebridge-chamberlain".
2020-08-17, 7:54:46 PM Loaded plugin "homebridge-tplink-smarthome".
2020-08-17, 7:54:46 PM Loaded plugin "homebridge-unifi-protect2".
2020-08-17, 7:54:46 PM [TplinkSmarthome] homebridge-tplink-smarthome v5.1.0, node v12.16.3, homebridge v3.2.6
2020-08-17, 7:54:46 PM [UniFi Protect] No host or IP address has been configured.
2020-08-17, 7:54:46 PM [TplinkSmarthome] Configuring cached accessory: [Kids Bedroom] 800640B417ABB297FD65A2A8C91FDBEF1A75B6D4 01ef84df-6376-4f09-a926-f0cb8f5a2c9d
2020-08-17, 7:54:46 PM [TplinkSmarthome] Configuring cached accessory: [Laundry Room] 8006551926FEC0E86030E84D9B6DEF681A7587B4 ef11bec1-d034-4090-86c1-9a08f31e9c35
2020-08-17, 7:54:46 PM Bridge is running on port 51826.
2020-08-17, 7:54:46 PM [TplinkSmarthome] New Device Online: [Laundry Room] plug [8006551926FEC0E86030E84D9B6DEF681A7587B4] 192.168.1.61 9999
2020-08-17, 7:54:46 PM [TplinkSmarthome] Adding: [Laundry Room] plug [8006551926FEC0E86030E84D9B6DEF681A7587B4]
2020-08-17, 7:54:46 PM [TplinkSmarthome] New Device Online: [Kids Bedroom] plug [800640B417ABB297FD65A2A8C91FDBEF1A75B6D4] 192.168.1.203 9999
2020-08-17, 7:54:46 PM [TplinkSmarthome] Adding: [Kids Bedroom] plug [800640B417ABB297FD65A2A8C91FDBEF1A75B6D4]

If it couldn't connect to the controller wouldn't it throw some kind of error instead of saying no host or ip configured?

hjdhjd commented 4 years ago

Your configuration is in fact incorrect. Try this:

"platforms": [
        {
            "platform": "TplinkSmarthome",
            "plugin_map": {
                "plugin_name": "homebridge-tplink-smarthome"
            }
        },
        {
            "platform": "Camera-ffmpeg",
            "plugin_map": {
                "plugin_name": "homebridge-camera-ffmpeg"
            },
            "name": "Camera FFmpeg"
        },
        {
            "platform": "UniFi Protect",
            "plugin_map": {
                "plugin_name": "homebridge-unifi-protect2"
            },
            "debug": false,
            "controllers": [
              {
                  "address": "192.168.1.1",
                  "username": "aenglish86",
                  "password": "password"
               }
           ]
        }
    ]
}
aenglish86 commented 4 years ago

copied and pasted the updated config file you posted for me to try and i still get this:

2020-08-17, 8:17:20 PM HOOBS listening on port 80. 2020-08-17, 8:17:23 PM Loaded plugin "homebridge-camera-ffmpeg". 2020-08-17, 8:17:23 PM Loaded plugin "homebridge-chamberlain". 2020-08-17, 8:17:23 PM Loaded plugin "homebridge-tplink-smarthome". 2020-08-17, 8:17:24 PM Loaded plugin "homebridge-unifi-protect2". 2020-08-17, 8:17:24 PM [TplinkSmarthome] homebridge-tplink-smarthome v5.1.0, node v12.16.3, homebridge v3.2.6 2020-08-17, 8:17:24 PM [UniFi Protect] No host or IP address has been configured.

hjdhjd commented 4 years ago

@aenglish86 I'm afraid I'm at the end of my ability to help you troubleshoot this on HOOBS. You might want to look at a regular homebridge install instead. Perhaps someone who is more familiar with HOOBS can provide some additional insight.

aenglish86 commented 4 years ago

I appreciate the troubleshooting help that you tried. I ended up using camera ffmpeg and got it working that way

zellunit commented 4 years ago

i have exactly the same problem. has worked for 4 months flawlessly with 8 cameras then as soon as the last version bumped this happened @hjdhjd

Altivec-Dan commented 3 years ago

Have you tried replacing your username with email address? Unifi Protect login has been flaky for me if not using the full email address.

Tom-Enns commented 3 years ago

I realize this is an old thread but if anyone else on hoobs has a similar experience. If you follow the instructions for install for homebridge you'll end up with this error. Hoobs already puts most of the config together for you. the only thing you need to add to the config through the config editor for the Unifi Protect Plugin is this:

image

You'll notice the platform callouts, the controller callout etc are all missing, Hoobs adds those in the config afterwards and if you put them here you'll be entering them twice and thus no IP is found.

Not sure if this is the same issue but it solved it for me.

github-actions[bot] commented 1 year ago

This issue is locked to prevent necroposting on closed issues. Please create a new issue for related support requests, bug reports, or feature suggestions.