tschamm / boschshc-hass

Home Assistant component for accessing Bosch Smart Home Controller using boschshcpy python library.
Other
157 stars 24 forks source link

Configuring new Integration - TLS/SSL error #135

Closed boriskroeger closed 8 months ago

boriskroeger commented 8 months ago

Hello,

I replaced the code Bosch SHC integration with the one from this repository because I had to re-authorized the integration which didn't worked (see issue in HomeAssistant / Core: https://github.com/home-assistant/core/issues/98181).

My Bosch SHC runs firmware 10.18.3249-29524

When following the setup procedure I get errors when entering the password for the Bosch SHC. This is the same as for the HA core integration. In the logs I see that there seems to be an issue with SSL/TLS:

Registration error: SHC probably not in pairing mode! Please press the Bosch Smart Home Controller button until LED starts flashing. (SSL Error: HTTPSConnectionPool(host='10.40.0.248', port=8443): Max retries exceeded with url: /smarthome/clients (Caused by SSLError(SSLError(1, '[SSL: SSLV3_ALERT_BAD_CERTIFICATE] sslv3 alert bad certificate (_ssl.c:1006)')))).
Registration error: API call returned non-OK result (code 500)!: b'<HTML><HEAD><TITLE>500</TITLE></HEAD><BODY><H1>500 No message</H1></BODY></HTML>'... Please check your password?

Could it be that any update - either Bosch or HA or boschshc-hass integration - broke the SSL/TLS compatibility or processing? May be due to SSL/TLS version being dropped?

best regards

Boris

tschamm commented 8 months ago

What SHC are you using? SHC 1 or 2?

tschamm commented 8 months ago

Could be related to that issue? https://github.com/home-assistant/core/issues/85698

boriskroeger commented 8 months ago

I have SHC 2. I pressed the button shortly and two leds are blinking yellow: internet and network. Not pressing the button yields a message with a hint in the GUI.

tschamm commented 8 months ago

And does it work now?

boriskroeger commented 8 months ago

I tried it right now again with all the inputs and a very short button press (leds are blinking yellow), but same result

Logger: custom_components.bosch_shc
Source: custom_components/bosch_shc/config_flow.py:142
Integration: bosch_shc ([documentation](https://github.com/tschamm/boschshc-hass/blob/master/README.md), [issues](https://github.com/tschamm/boschshc-hass/issues))
First occurred: 19:45:27 (14 occurrences)
Last logged: 21:24:18

Registration error: SHC probably not in pairing mode! Please press the Bosch Smart Home Controller button until LED starts flashing. (SSL Error: HTTPSConnectionPool(host='10.40.0.248', port=8443): Max retries exceeded with url: /smarthome/clients (Caused by SSLError(SSLError(1, '[SSL: SSLV3_ALERT_BAD_CERTIFICATE] sslv3 alert bad certificate (_ssl.c:1006)')))).
Registration error: API call returned non-OK result (code 500)!: b'<HTML><HEAD><TITLE>500</TITLE></HEAD><BODY><H1>500 No message</H1></BODY></HTML>'... Please check your password?
tschamm commented 8 months ago

I did not change anything in the config flow since some months, this is confusing me. Can you check whether it works with an older release, maybe 0.4.42?

boriskroeger commented 8 months ago

I disconnected the SHC from power, waited 2 minutes and reconnected it. Now it worked. Strange.

tschamm commented 8 months ago

No clue why this happend. Maybe an inconsitency after the update?

boriskroeger commented 8 months ago

That could be the case. Really strange. Happy to have it running. Will close the issue.