Home Connect: alpha testers wanted

I found the following Home Connect Dryer integration of gkreitz and it works great!

I forked it and adopted it for Home Connect Washer:

I wasn’t able to adopt it for the dishwasher and oven yet… HA doesn’t start anymore with my current versions of the script adopted for those devices. But washer and dryer works like a charm.
I love this solution as there is no need for your HA-instance to be reachable from the outside.

Good to see there are other approaches to this, in particular using a different SSE library that might be more stable than the one I’m using.

But just to avoid any misunderstandings,

there is no need for your HA-instance to be reachable from the outside.

this is not necessary for the integration discussed in this thread either as clearly stated in the Readme.

Sorry David… I wasn’t aware of this as it was necessary in an early stage? but I might be wrong… Thanks anyway for all your efforts as well!

I am still struggling adopting the python code for the dishwasher & oven. HC doesn’t start anymore… The devices seems to use the same states according Home connect specifications… Where can I find additional information when HA doesn’t start anymore beside the homeassistant.log?

I am only using http and don’t want to enable https locally, can I just use the nabu casa link… I also don’t want to set the base url to anything…

It doesn’t work with http simply because the Home Connect developer portal won’t accept a redirect URI that doesn’t start with https. There’s nothing we can do about it.

Not sure what you mean by “Nabu Casa link”, but a cloud solution (which indeed would be nice) depends on the integration being merged into the official HA repository first. (I am working on this but don’t have as much time as I would like to in order to finish it.)

I was able to add my http url to the portal last night when setting up redirect urls!

Hello and thank you for your work. I have been working on it for a while, but unfortunately SSL is not an option for me either. At BSH there is the possibility to work without https (device flow). I would also be very happy if this option will be available here in the future. Then I would use it too.
Best wishes

I was able to add my http url to the portal last night when setting up redirect urls!

Interesting! Then apparently they dropped this requirement. :+1:

1 Like

Hello and thank you for your work. I have been working on it for a while, but unfortunately SSL is not an option for me either. At BSH there is the possibility to work without https (device flow). I would also be very happy if this option will be available here in the future. Then I would use it too.

I investigated device flow and didn’t find a suitable Python library. I think the way forward is to use Home Assistant OAuth with HA Cloud once the integration is merged.

Hello David

I have a strange behavoir: The bosch dishwasher works perfect with home assistant. then if I some days do not use it, suddenly HA loses the connection to the dishwasher. There is no other way than restart HA. I have the newest version of your component.
What I have observed:

  • I changed to debug in configuration.yaml: homeassistant.custom_components.homeconnect: debug -> I see nothing special in the error log.
  • It loses the connection not always at the same time. Even during washing, in the middle it stopped and did not actualize.
  • If I theck the app: the dishwasher is connected to the server
  • If I switch the dishwasher daily on/off from HA I think I do not lose the connection so fast.

Do you have an idea, what the problem is? Or do you have an idea what I should test?

Thanks
Gilbert

1 Like

Hi,

I think it’s this bug:

Unfortunately I still have no idea why it happens or how to resolve it…

1 Like

Oh yes, this is exaclty my problem. Damn. I will check switch on/off if the connection is lost. And I will enable debug mode during that. Hope to give you a hint…

In the near future I wanted to buy a dryer and washing mashine from bosch. Do they have the same issue, or is this behavoir only for dishwashers?

1 Like

No, the issue is generic unfortunately.

Damn it, is it generic for all manufacturer (bosch, siemens…) or only for bosch?
I am trying now an automation script (every hour set the dishwasher on/off). Did you try that?

Hi David.
I just went through the installation process. it works so far that all items of the dishwasher are now in HA.
I did not use the HTTPS in the redirect URL, but plain HTTP. this works fine now.

It took a couple of attempts to finaly understand how to read the instructions. Could you make the instructions a little bit more explicit? There is a lot of info in bullet 2.

  • 2 Register a new application with the Redirect URI https://YOUR_HOMEASSISTANT_BASE_URL:PORT/auth/external/callback (it will not work without https, but your Home Assistant instance does not have to be accessible from the internet and a self-signed certificate will do)

Go to https://developer.home-connect.com/ and log in.
Click on Applications > Register Application
FIll name: (i.e. HomeAssistant), your useraccount
The redirect URL: https://YOUR_HOMEASSISTANT_BASE_URL:PORT/auth/external/callback,
HTTP and HTTPS is possible now.
the rest as is.
anyway.

I will have a look how it works, what I see :slight_smile: Issues, or none.
Thank you for this work so far. Great stuff.

Hi,

could you please modify the instructions yourself? I think you know better which parts are misleading or not clear enough. It’s all on Github. Thanks!

Hi
Need some 3rd party looking at my config.

Home connect app with redirect account as follows:

  • https://reinasserver.fritz.box/api/homeconnect/auth/external/callback

token and client id same on bosch site and in secrets.yaml

configuration.yaml:

# Uncomment this if you are using SSL/TLS, running in Docker container, etc.
# http:
#   base_url: example.duckdns.org:8123
http:
#  api_password: !secret hasspass
  base_url: https://thereinas.it:443

nginx reverse as follows;

server {
    listen       443 ssl;
    server_name  thereinas.it;

    ssl on;
    ssl_certificate /etc/letsencrypt/live/thereinas.it/fullchain.pem; # managed by Certbot
    ssl_certificate_key /etc/letsencrypt/live/thereinas.it/privkey.pem; # managed by Certbot
    ssl_prefer_server_ciphers on;

    location / {
        proxy_pass http://127.0.0.1:8123;
        proxy_set_header Host $host;

        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
    }

    location /api/websocket {
        proxy_pass http://127.0.0.1:8123/api/websocket;
        proxy_set_header Host $host;

        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";

    }

When I try to setup the integration:

I have the following:

{
“error”: “unauthorized_client”,
“error_description”: “client or redirection URI not authorized”,
“state”: “eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJmbG93X2lkIjoiNWVhODQ4OTdmYzM3NDAyMDllOGIxM2NmNzllMzRkYzYifQ.KO5nK75ujQz04M6H5ies_RWKpiJTU5Xzze0lzwxB0yA”
}

Getting mad. Also because in the past I had it working

  • Remove the api/homeconnect/ part of the redirect URI
  • The base_url should be exactly the same as the part of the redirect URI before /auth.... Why do you have a different host there? And in one case with explicit port, other case not.
1 Like

Will try tomorrow tx

worked. stupid typo on my side!
tx