Grohe Sense (Ondus)

Hi!

Works great! I set it up last week so that when we all leave from home, the water is turned off. When someone comes home, the water is turned on.

However, I noticed that when I just restarted Home Assistant I got a notice that the device could not be setup. I had to go through the procedure again for getting the refresh token. The new one I got was different from the old and swapping them out fixed the problem (after another restart of hass of course).

Was this a fluke, or do I need to get a new refresh token every time I restart hass in the future?

Cheers!

After 2020.12.0 the integration no longer works. In the log I get:

2020-12-16 07:45:51 WARNING (MainThread) [homeassistant.bootstrap] Waiting on integrations to complete setup: grohe_sense
2020-12-16 07:46:20 DEBUG (MainThread) [custom_components.grohe_sense] Exception for http post request to https://idp-apigw.cloud.grohe.com/v3/iot/oidc/refresh, verify=False: 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)

Hi!

Glad you like it. Grohe refresh tokens last a few months, so that behaviour is unfortunately expected to re-occur every few months (but thankfully not every restart at least). Itā€™s annoying, but unfortunately, only Grohe can change that. Hopefully, some day, Grohe might create a more official API with better support.

Thanks for the ping here. Iā€™ve been busy, so didnā€™t have time to update my home assistant or fix this until now. The latest version should fix this.

I would strongly advice against turning off SSL verification - that removes important security properties. If someone intercepted your network traffic with SSL verification off, they can now essentially control everything you can with your Grohe installation until the refresh token times out.

What happened was that Groheā€™s TLS certificate was signed by an old CA which was deprecated. Eventually, support for that CA was removed from a lot of places, including home assistant. Grohe had set up a new server, with a new TLS certificate signed by a better CA, so by re-pointing there, things work fine again.

Thanks a lot for your efforts! It is very much appreciated! I will fetch the new version.

1 Like

Just wondering if this integration still works? I got stuck at the very beginning, i.e. the address for login is not working at all at least for me.

Iā€™m using it with my Grohe Sense Guard setup - and it works fine. I can shut the mains water off, monitor and log water pressure, temperature and flow.

What part of the login are you having trouble with?

Good to hear that itā€™s working.

Iā€™m treferring to this address https://idp2-apigw.cloud.grohe.com/v3/iot/oidc/login, which seems not to work. Firefox gives ā€˜The address wasnā€™t understoodā€™, Chrome doesnā€™t do anything. Must be something simple Iā€™m missingā€¦

Let me double-check how I got the refresh token - and Iā€™ll come back to you

1 Like

Youā€™re right, the link on Chrome doesnā€™t do anything - however, it does work on Edge and you can login and then continue following the instructions as listed

1 Like

Thanks! Was able to get the refresh token, normally never use Edge.

Now need to figure out the rest of the installation. Really hoping to get this working.

Another question: should this work with HA OS?
When adding ā€˜grohe_sense:ā€™ the to configuration.yaml, this error message comes up:
Component error: grohe_sense - Integration ā€˜grohe_senseā€™ not found.
Canā€™t figure this out.

Yes, it works with HA perfectly well.

Three things to ensure:

Firstly, the only thing that ā€œconfiguration.yamlā€ needs is the refresh token i.e:

grohe_sense:
  refresh_token: 
  "VERY_LONG_TOKEN"

Secondly, make sure that the integration is in your ā€œcustom_componentsā€ directory in a folder named ā€œgrohe_senseā€

Thirdly, you might need to add a version number to the ā€˜manifest.jsonā€™ file - because later versions of HA need this to validate an integration. Here is a generic version of the file for you.

{
	"domain": "grohe_sense",
	"name": "Grohe Sense",
	"documentation": "https://github.com/gkreitz/homeassistant-grohe_sense",
	"dependencies": [],
	"requirements": [],
	"codeowners": ["@gkreitz"],
        "version": "1.0.0"
}
1 Like

Thank You. Since Iā€™m using HA OS, I thought that it is more restricted. Iā€™ve tried the installation according to the instructions multiple times (and days :-D). The problem remains that somehow the whole grohe_sense directory is not recognized in the custom_components dir. Go figure.

Iā€™ll follow this thread and will report if I get it at some point.

Is the missing custom component integration message the only thing in the logs? Also, it is case sensitive so that really matters.

Correct, nothing else in the logs related to this.
From the Home Assistant docs check_config - Home Assistant I found the configuration checker ā€“ at least in my system the command hass in not availableā€¦ feels like HA OS is not meant for these sort of integrations?
Could try to install another instance to a spare RPI to play with.

Just to be clear - did you create the custom_components directory yourself? and is it as the same level at the configuration.yaml file?

Also, did you add the version number to the manifest.json - the component will not be recognised otherwise, and it is not included in the code on github.

Finally, did you reboot the whole instance rather than just restarting the HA server component?

Thanks again isujosh. Yes, yes and yes to all of those :upside_down_face:
Restarting the HA server component is not possible since the configuration.yaml does not pass the validity test. Thought that rebooting makes no difference, did it already earlier. BUT it did now, Grohe items are populated on the UI(!).
I get the correct water consumption value, temperatures etc. Wonā€™t just mention, that the valve switch does nothing :sweat_smile:.
Happy with this now, only a bit shame that took your time.

Thatā€™s great newsā€¦ and I have had the problem with the valve switch not working intermittently (just what you need when youā€™re relying on it to shut off your water!)

I found that if I used the HA app on my phone - it would start working - but not if I was trying through the web UI on my main computerā€¦ go figure that one out! I have a feeling it is a wifi issue. So do try it on the phone app and see if this works.