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

All detection sensors not working on SSL/HTTPS #179

Open
FirewizzNL opened this issue May 6, 2024 · 10 comments
Open

All detection sensors not working on SSL/HTTPS #179

FirewizzNL opened this issue May 6, 2024 · 10 comments

Comments

@FirewizzNL
Copy link

FirewizzNL commented May 6, 2024

When using SSL/HTTPS on home assistant the alerts/sensors are not working.

It does not seem to accept the dns name, but IP and https also does not seem to work.

image
image
image
Also the nvr does not seem to accept DNS.

NVR: DS-7604NI-K1 / 4P

@Mark7714
Copy link

Mark7714 commented Jun 2, 2024

Same issue here. Internally, HA sits on 8123 and my firewall forwards external requests for https://camera.myhouse.com from 443 outside to 8123 inside and I use LetsEncrypt cert on the HA box. When the NVR on the same network tries to contact it, it fails as it asks for a cert on 8123 and there is no non-https fall back (HA doesnt allow it).

@FirewizzNL
Copy link
Author

@Mark7714 Did you find any solution or workaround yet?

@Mark7714
Copy link

Mark7714 commented Jun 6, 2024 via email

@bradkeifer
Copy link

Please see the solution I implemented for #149

@FirewizzNL
Copy link
Author

Please see the solution I implemented for #149

This is not a solution but a workaround.

@bradkeifer
Copy link

Please see the solution I implemented for #149

This is not a solution but a workaround.

I'm all ears if you can offer a better resolution.

@Mark7714
Copy link

Mark7714 commented Jul 15, 2024 via email

@FirewizzNL
Copy link
Author

@bradkeifer the workaround you provided is a good workaround. I just wanted to mention it is not a solution, it does not solve the existing problem that the API is exposed by default to https and does not accept http requests. And the NVR is only using http (in my case) and not https.

If your workaround can be implemented in the integration and be automated, it will be great. But by adding the manual proxy in NGinx is outside the integration.
I am going to look in to it later but too busy at the moment.

@bradkeifer
Copy link

@bradkeifer the workaround you provided is a good workaround. I just wanted to mention it is not a solution, it does not solve the existing problem that the API is exposed by default to https and does not accept http requests. And the NVR is only using http (in my case) and not https.

If your workaround can be implemented in the integration and be automated, it will be great. But by adding the manual proxy in NGinx is outside the integration. I am going to look in to it later but too busy at the moment.

Understood @FirewizzNL I think the root cause of this problem might be nothing to do with the HIKVision integration, but perhaps more in the core of home assistant. I have been unable to get my internal_url: to work, and it has been defined to use http. I think that if it worked, then home assistant would be listening for both https and http and then the integration would work as expected. Have you been able to get both your external_url: and internal_url: to work?

@FirewizzNL
Copy link
Author

@bradkeifer
Yes I have both working, but on a valid DNS wildcard certificate. I configured outside.mydns.nl (example) through the router with portforwarding as my outside address and inside.mydns.nl as my inside address adding it as a dost to my router which forwards that traffic to home assistant.
But the problems here for me is that:

  1. My HikVision NVR does not support https on the alarm server api
  2. Home assistant when https is enabled does not support (out of the box) the http usage. It only accepts https from that point on.

I know there is nginx and the nginx addon, but I prefer not to use these kinds of 'solutions'. But unfortunately I think for now there is no better workaround than that.
I have had no time to study/look in to this integration to see if something could be improved there. Busy time of the year here haha.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants