gkreitz / homeassistant-grohe_sense

Grohe Sense integration for Home Assistant
MIT License
42 stars 25 forks source link

Waiting on Integrations to Complete Setup #9

Closed martinkwright closed 3 years ago

martinkwright commented 3 years ago

Thank you so much for pulling this together. I believe I have followed the instructions properly. Was able to get the refresh token and add it to my config along w/ the custom components.

As it stands now, I get the "Waiting on Integrations to complete" and eventually gives up and HA set up proceeds.

Is the integration still working as it did and am I missing something?

  1. Able to extract refresh token per instructions
  2. Added custom_component grohe_sense folder
  3. Updated configuration.yaml per instructions to include the refresh token

Don't see any items being brought in and logs indicate setup never finishes.

Any thoughts?

erikkt commented 3 years ago

After upgrade to 2020.12.0 I see the same thing. I fetched a new refresh_token, but it did not help.

The log states:

2020-12-15 15:46:57 WARNING (MainThread) [homeassistant.bootstrap] Waiting on integrations to complete setup: grohe_sense 2020-12-15 15:47:14 DEBUG (MainThread) [custom_components.grohe_sense] Exception for http post request to https://idp-apigw.cloud.grohe.com/v3/iot/oidc/refresh: Cannot connect to host idp-apigw.cloud.grohe.com:443 ssl:True [SSLCertVerificationError: (1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1124)')]

erikkt commented 3 years ago

After upgrade to 2020.12.0 I see the same thing. I fetched a new refresh_token, but it did not help.

The log states:

2020-12-15 15:46:57 WARNING (MainThread) [homeassistant.bootstrap] Waiting on integrations to complete setup: grohe_sense 2020-12-15 15:47:14 DEBUG (MainThread) [custom_components.grohe_sense] Exception for http post request to https://idp-apigw.cloud.grohe.com/v3/iot/oidc/refresh: Cannot connect to host idp-apigw.cloud.grohe.com:443 ssl:True [SSLCertVerificationError: (1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1124)')]

Can be fixed by changing line 42 in init.py to:

session = aiohttp_client.async_get_clientsession(hass, verify_ssl=False)

gkreitz commented 3 years ago

Grohe's old endpoint that this integration was using used a certificate signed by a root CA that is no longer trusted by many (including home assistant). This should be fixed now by pointing to the new endpoint, thanks to #11

I would strongly advice against turning off verify_ssl as suggested in this issue. If you've done so, note that anyone who is able to intercept your network traffic may have stolen your refresh token (essentially, be able to do anything the Grohe app can to your installation until the refresh token expires).