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

SSLError when trying to creat a session #28

Open
ceedee666 opened this issue Jun 1, 2023 · 2 comments
Open

SSLError when trying to creat a session #28

ceedee666 opened this issue Jun 1, 2023 · 2 comments

Comments

@ceedee666
Copy link

I'm currently trying to add support for tilting blinds in boschshcpy. However, I'm facing the problem that whenever I try to create a session I get a SSLError.

This is the code I'm using to create a session:

session = boschshcpy.SHCSession(controller_ip="192.168.178.15", certificate='examples/keystore/dev-cert.pem', key='examples/keystore/dev-key.pem')

Executing it leads to the following error:

ERROR:root:Failed to get public information from SHC controller: API call returned SSLError: HTTPSConnectionPool(host='192.168.178.15', port=8446): Max retries exceeded with url: /smarthome/public/information (Caused by SSLError(SSLCertVerificationError(1, "[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: IP address mismatch, certificate is not valid for '192.168.178.15'. (_ssl.c:1002)"))).
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/christian/Documents/development/boschshcpy/boschshcpy/session.py", line 44, in __init__
    self._enumerate_all()
  File "/Users/christian/Documents/development/boschshcpy/boschshcpy/session.py", line 55, in _enumerate_all
    self.authenticate()
  File "/Users/christian/Documents/development/boschshcpy/boschshcpy/session.py", line 276, in authenticate
    self._shc_information = SHCInformation(api=self._api, zeroconf=self._zeroconf)
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/christian/Documents/development/boschshcpy/boschshcpy/information.py", line 77, in __init__
    raise SHCConnectionError
boschshcpy.exceptions.SHCConnectionError

Using the same certificate I can connect using Postman to the controller without problems.
Also, I already tried to set the ssl.VerifyMode to CERT_NONE.

Any ideas how to solve this?

Christian

@hh-it-co
Copy link

+1

@tschamm
Copy link
Owner

tschamm commented Nov 2, 2024

still occurs?

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