elad-bar / ha-blueiris

Integration with Blue Iris Video Security Software
179 stars 42 forks source link

Cannot login to webserver from initial setup for intigration. #214

Closed Hellmanx closed 10 months ago

Hellmanx commented 1 year ago

When I provide the correct server details and login info, I will get the error: Invalid server details. Kinda wish there was a debugger. The integration seems to try for about 10 seconds until it gives up.

kramttocs commented 1 year ago

You can turn on logging and see if that gives you anything. Undoubtedly a network or credential issue as the former is the most common. Please review the guide here in this repo as well as the official Blue Iris doc to ensure your BI instance is accessible. Let me know what you find.

Hellmanx commented 1 year ago

You can turn on logging and see if that gives you anything. Undoubtedly a network or credential issue as the former is the most common. Please review the guide here in this repo as well as the official Blue Iris doc to ensure your BI instance is accessible. Let me know what you find.

Nah, something must be wrong with this version. I had SSL check marked and it shows as false in the logs.

``This error originated from a custom integration.

Logger: custom_components.blueiris.api.blue_iris_api Source: custom_components/blueiris/api/blue_iris_api.py:131 Integration: Blue Iris NVR (documentation) First occurred: 7:29:13 PM (2 occurrences) Last logged: 7:33:20 PM

Failed to connect https://10.0.0.12:444/json, Error: Cannot connect to host 10.0.0.12:444 ssl:False [Connect call failed ('10.0.0.12', 444)], Line: 84``

kramttocs commented 1 year ago

Did you try it without ssl? I am not at my computer currently but BI should give you an SSL port and a non-ssl port. I have the integration setup using the non-ssl since I am using the IP internally. But with the mobile app or webui I use SSL and my domain name.

kramttocs commented 1 year ago

Nah, something must be wrong with this version. I had SSL check marked and it shows as false in the logs.

No, that's not what false means. :) It means to ignore certificate validation.

The error that the integration is spitting back is : Failed to connect https://10.0.0.12:444/json,

The other is from the library it's using. Can you hit that IP from a PC other than your BI machine?

Hellmanx commented 1 year ago

Nah, something must be wrong with this version. I had SSL check marked and it shows as false in the logs.

No, that's not what false means. :) It means to ignore certificate validation.

The error that the integration is spitting back is : Failed to connect https://10.0.0.12:444/json,

The other is from the library it's using. Can you hit that IP from a PC other than your BI machine?

Yep, i can connect to it. I've never really had a problem with the web interface for BI.

kramttocs commented 1 year ago

Did you try non SSL just to rule that out?

Hellmanx commented 1 year ago

Did you try non SSL just to rule that out?

Yep, same type of error. Only gave a bit more detail this time.

This error originated from a custom integration.

Logger: custom_components.blueiris.api.blue_iris_api Source: custom_components/blueiris/api/blue_iris_api.py:131 Integration: Blue Iris NVR (documentation) First occurred: August 18, 2023 at 7:43:02 PM (12 occurrences) Last logged: 12:34:09 AM

Failed to connect https://10.0.0.12:444/json, Error: Cannot connect to host 10.0.0.12:444 ssl:False [Connect call failed ('10.0.0.12', 444)], Line: 84 Failed to connect http://10.0.0.12:81/json, Error: Cannot connect to host 10.0.0.12:81 ssl:False [Connect call failed ('10.0.0.12', 81)], Line: 84 Failed to connect http://http://10.0.0.12:81/json, Error: Cannot connect to host http:80 ssl:False [Name has no usable address], Line: 84 Failed to connect https://10.0.0.12:81/json, Error: Cannot connect to host 10.0.0.12:81 ssl:False [Connect call failed ('10.0.0.12', 81)], Line: 84 Failed to connect http://10.0.0.12:444/json, Error: Cannot connect to host 10.0.0.12:444 ssl:False [Connect call failed ('10.0.0.12', 444)], Line: 84

kramttocs commented 1 year ago

Ok, that rules that out so I won't try retesting mine using ssl. Nothing looks like a code issue that I can see or have seen in the past. The integration is just unable to connect to the host. It looks like a network thing as a credential issue should manifest differently. What it's trying to do is grab a session id from BI to use. I am unable to really help with network connectivity issues as people have things setup a myriad of ways. I don't know if you read through the guide here and the BI help file I mentioned above but they both have good information about this.

I'll leave this open for a few days in case you do find something unique in your setup the code should account for. Or just have some questions I can try to help out with.

ingus16 commented 10 months ago

Hi, did this thing been sorted? I have the same issue. Edit: It was an issue with the port, I forgot that Nat was redirected by the client. Since I put the BI port correctly went smooth as butter

kramttocs commented 10 months ago

Great!