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

EZVIZ integration add-on throws SSL error #91701

Closed
akominch opened this issue Apr 19, 2023 · 5 comments
Closed

EZVIZ integration add-on throws SSL error #91701

akominch opened this issue Apr 19, 2023 · 5 comments

Comments

@akominch
Copy link

akominch commented Apr 19, 2023

The problem

The integration with my Ezviz cameras stopped working. There is an error like this in the logs:

Logger: homeassistant.config_entries
Source: components/ezviz/__init__.py:74
First occurred: 23:31:09 (2 occurrences)
Last logged: 23:32:59

Error setting up entry mygmail@gmail.com for ezviz
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 703, in urlopen
    httplib_response = self._make_request(
  File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 386, in _make_request
    self._validate_conn(conn)
  File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 1042, in _validate_conn
    conn.connect()
  File "/usr/local/lib/python3.10/site-packages/urllib3/connection.py", line 419, in connect
    self.sock = ssl_wrap_socket(
  File "/usr/local/lib/python3.10/site-packages/urllib3/util/ssl_.py", line 449, in ssl_wrap_socket
    ssl_sock = _ssl_wrap_socket_impl(
  File "/usr/local/lib/python3.10/site-packages/urllib3/util/ssl_.py", line 493, in _ssl_wrap_socket_impl
    return ssl_context.wrap_socket(sock, server_hostname=server_hostname)
  File "/usr/local/lib/python3.10/ssl.py", line 513, in wrap_socket
    return self.sslsocket_class._create(
  File "/usr/local/lib/python3.10/ssl.py", line 1071, in _create
    self.do_handshake()
  File "/usr/local/lib/python3.10/ssl.py", line 1342, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLError: [SSL: WRONG_SIGNATURE_TYPE] wrong signature type (_ssl.c:997)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/requests/adapters.py", line 489, in send
    resp = conn.urlopen(
  File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 787, in urlopen
    retries = retries.increment(
  File "/usr/local/lib/python3.10/site-packages/urllib3/util/retry.py", line 592, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='apiieu.ezvizlife.com', port=443): Max retries exceeded with url: /v3/apigateway/login (Caused by SSLError(SSLError(1, '[SSL: WRONG_SIGNATURE_TYPE] wrong signature type (_ssl.c:997)')))

What version of Home Assistant Core has the issue?

core-2023.4.6

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Supervised

Integration causing the issue

EZVIZ

Link to integration documentation on our website

https://www.home-assistant.io/integrations/ezviz/

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

@home-assistant
Copy link

Hey there @RenierM26, @BaQs, mind taking a look at this issue as it has been labeled with an integration (ezviz) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of ezviz can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Renames the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign ezviz Removes the current integration label and assignees on the issue, add the integration domain after the command.

(message by CodeOwnersMention)


ezviz documentation
ezviz source
(message by IssueLinks)

@akominch
Copy link
Author

Apparently there were problems on the ezviz servers, everything worked.
Most likely the cameras do not support local network control and very badly.

@akominch
Copy link
Author

I am forced to reopen this issue because the integration has stopped working again.

I tried to make a curl -X POST https://apiieu.ezvizlife.com/v3/apigateway/login request with the RPI that is running HASS in Supervised mode. I got the error
curl: (35) error:1414D172:SSL routines:tls12_check_peer_sigalg:wrong signature type,
after searching the internet I found the solution, I have to change the CipherString = DEFAULT@SECLEVEL=2 from 2 to 1 in /etc/ssl/openssl.cnf, after that the requests started working. And I got quite valid response (at least no SSL error)
{"meta":{"code":405, "message": "客户端请求中的方法被禁止", "moreInfo":null}

The question remains, how to make it work in HASS?

@RenierM26
Copy link
Contributor

Hi @akominch,

This can only be one of three things I think:

  1. Time issue : Could cause ssl errors if out by more than a few minutes.
  2. API is blocked in your region. (Try one of the other API regions)
  3. A proxy or other mitm type of firewall device is present. (deep packet inspection on fortigates for example)

@issue-triage-workflows
Copy link

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.
Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍
This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

@issue-triage-workflows issue-triage-workflows bot closed this as not planned Won't fix, can't repro, duplicate, stale Sep 8, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Oct 8, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants