Home Connect: alpha testers wanted

Success with my Boch Dishwasher , at least it seams I can see it and status ! :slight_smile:

1 Like

I have just got around to set up Home Connect.

Im connecting throug a NginX reverse proxy, and when doing so and setting the URI to https://ha.my-domain.dk:443/api/homeconnect I get this error when trying to link.

https://ha.my-domain.dk: works to get me to the dashboard so I guess its the right URI

{
error: “unauthorized_client”,
error_description: “client or redirection URI not authorized”,
state: “OCYBRd2YS9hUVBw9JdXsl866039bOl”
}

How do I link it behind a proxy?

Kindly

KĂ„re

Yes, in fact the on/off switch doesn’t seem to work for any of the devices so far. In the case of my dryer, when it’s off it’s disconnected and I can’t switch it on with the app either. But the power off works from the app, so this should be possible to be made to work. I added an issue (https://github.com/DavidMStraub/homeassistant-homeconnect/issues/10).

Sorry for the late reply. Can you please have a look at this issue and whether any of the solutions there work for you? I don’t think that the reverse proxy per se is a problem. Have you set the base_url in the config of the HTTP component? To quote from the Spotify component docs (where the auth code is borrowed from):

You will likely also need to set the base_url attribute of the HTTP Component. This should be set using the same base URL as the redirect URI, e.g., if you used a domain name (not local IP) in the redirect, then use the same domain name in your base_url .

So I understood correctly that to test this I need to set up ssh like this?

You mean, SSL, right? Yes, the API does not accept non-SSL redirect URIs. Your HA does not have to be accessible from remote though, so a self-signed certificate and a local IP/host (if that is what you set as base_url) should work.

Yep, I meant SSL of course. I’ll give it a try. Thanks!

Where can I find documentation on how to use the component?

The following error appears in the log:

2019-02-01 09:29:17 ERROR (Thread-3) [custom_components.homeconnect] <bound method HomeConnectAppliance.get_programs_active of HomeConnectAppliance(hc, haId='BOSCH-SMV88TX36E-********', vib='SMV88TX36E', brand='Bosch', type='Dishwasher', name='Vaatwasser', enumber='SMV88TX36E/42', connected=True)> {'description': 'There is no program active', 'key': 'SDK.Error.NoProgramActive'}

2019-02-01 09:29:17 ERROR (Thread-3) [custom_components.homeconnect] Error while executing <bound method HomeConnectAppliance.get_programs_active of HomeConnectAppliance(hc, haId='BOSCH-SMV88TX36E-********', vib='SMV88TX36E', brand='Bosch', type='Dishwasher', name='Vaatwasser', enumber='SMV88TX36E/42', connected=True)>. Retry #1

2019-02-01 09:29:18 ERROR (Thread-3) [custom_components.homeconnect] <bound method HomeConnectAppliance.get_programs_active of HomeConnectAppliance(hc, haId='BOSCH-SMV88TX36E-********', vib='SMV88TX36E', brand='Bosch', type='Dishwasher', name='Vaatwasser', enumber='SMV88TX36E/42', connected=True)> {'description': 'There is no program active', 'key': 'SDK.Error.NoProgramActive'}

2019-02-01 09:29:18 WARNING (MainThread) [homeassistant.loader] You are using a custom component for binary_sensor.homeconnect which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you do experience issues with Home Assistant.

2019-02-01 09:29:20 WARNING (MainThread) [homeassistant.loader] You are using a custom component for switch.homeconnect which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you do experience issues with Home Assistant.

2019-02-01 09:29:20 WARNING (MainThread) [homeassistant.loader] You are using a custom component for sensor.homeconnect which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you do experience issues with Home Assistant.

There is indeed no program running, but it shouldn’t produce an error in the log.

The warnings are normal for the custom component. As for the errors, I’m not sure why they appear, but for what it’s worth I get the same ones despite the component working flawlessly. The first comments in this thread address it but nothing has been done about it as of yet.

Sorry, at the moment the only documentation is the Readme of the Github repo, the Github issues, and this thread. I should really start to put together a PR to get this component into HA now that so many of you have tested it (Thanks!). Before doing this, I will also make sure to remove any unnecessary erros in the log.

1 Like

Hi everyone,
thank you for your work, at home I have 1 dishwasher and 2 ovens, I am testing the code and I found the following problem:

  1. The Switch Button Power state doesn’t work
    I’m not a developer but saw on the init.py that you create the power switch from this code (I think) :
    def get_program_switches(self):
    programs = self.get_programs_available()
    return [{‘device’: self,
    ‘program_name’: p[‘name’]} for p in programs]

I tried with Postam and maybe is better to get the information (power state) with this call:
GET “/api/homeappliances/{haid}/settings/BSH.Common.Setting.PowerState”
The value are BSH.Common.EnumType.PowerState.On
Following return value in postman:
“data”: {
“key”: “BSH.Common.Setting.PowerState”,
“value”: “BSH.Common.EnumType.PowerState.On”,
“type”: “BSH.Common.EnumType.PowerState”,

Is it possible to create more sensor or switch just to have more information about the appliance?
For example:

DISHWASHER:

Sensor ActiveProgramstate:
Call Json: GET “/api/homeappliances/{dishwasher}/programs/active”

Response:
data": {
“key”: “Dishcare.Dishwasher.Program.Auto2”}

**Sensor StartInRelative:
Call Json: GET “/api/homeappliances/{dishwasher}/programs/active/options/BSH.Common.Option.StartInRelative"

Response:
data": {
“key”: “BSH.Common.Option.StartInRelative”,
“value”: 0,
“unit”: “seconds”}

Sensor ProgramProgress: (Already implemented)
Call Json: GET “/api/homeappliances/{dishwasher}/programs/active/options/BSH.Common.Option.ProgramProgress"

Response:
“key”: “BSH.Common.Option.ProgramProgress”,
“value”: 5,
“unit”: “%”

Sensor RemainingProgramTime: (Already implemented)
Call Json: GET “/api/homeappliances/{dishwasher}/programs/active/options/BSH.Common.Option.RemainingProgramTime"

Response:
“key”: “BSH.Common.Option.RemainingProgramTime”,
“value”: 8820,
“unit”: “seconds”

Sensor EnergyForecast: (Already implemented)
Call Json: GET “/api/homeappliances/{dishwasher}/programs/active/options/BSH.Common.Option.EnergyForecast"

Response:
“key”: “BSH.Common.Option.EnergyForecast”,
“value”: 40,
“unit”: “%”

Sensor WaterForecast:
Call Json: GET “/api/homeappliances/{dishwasher}/programs/active/options/BSH.Common.Option.WaterForecast"

Response:
“key”: “BSH.Common.Option.WaterForecast”,
“value”: 48,
“unit”: “%”

Switch ExtraDry:
Call Json: GET “/api/homeappliances/{dishwasher}/programs/active/options/Dishcare.Dishwasher.Option.ExtraDry"

Response:
data": {
“key”: “Dishcare.Dishwasher.Option.ExtraDry”,
“value”: false}

Switch HygienePlus:
Call Json: GET “/api/homeappliances/{dishwasher}/programs/active/options/Dishcare.Dishwasher.Option.HygienePlus"

Response:
data": {
“key”: “Dishcare.Dishwasher.Option.HygienePlus”,
“value”: false

Switch IntensivZone:
Call Json: GET “/api/homeappliances/{dishwasher}/programs/active/options/Dishcare.Dishwasher.Option.IntensivZone"

Response:
data": {
“key”: “Dishcare.Dishwasher.Option.IntensivZone”,
“value”: false

Switch VarioSpeedPlus:
Call Json: GET “/api/homeappliances/{dishwasher}/programs/active/options/Dishcare.Dishwasher.Option.VarioSpeedPlus"

Response:
data": {
key": “Dishcare.Dishwasher.Option.VarioSpeedPlus”,
“value”: false

OVEN:

Sensor Active Program state:
Call Json: GET “/api/homeappliances/{oven}/programs/active”

Response:
data": {
“key”: “Cooking.Oven.Program.HeatingMode.GrillSmallArea”}

Sensor StartinRelative:
Call Json: GET “/api/homeappliances/{oven}/programs/active/options/BSH.Common.Option.StartInRelative"

Response:
data": {
“key”: “BSH.Common.Option.StartInRelative”,
“value”: 0,
“unit”: “seconds”}

Sensor Duration:
Call Json: GET “/api/homeappliances/{oven}/programs/active/options/BSH.Common.Option.Duration

Response:
data": {
“key”: “BSH.Common.Option.Duration”,
“value”: 0,
“unit”: “seconds”}

Sensor ElapsedProgramTime:
Call Json: GET “/api/homeappliances/{oven}/programs/active/options/BSH.Common.Option.ElapsedProgramTime

Response:
data": {
“key”: “BSH.Common.Option.ElapsedProgramTime”,
“value”: 0,
“unit”: “seconds”}

Sensor ProgramProgress: (Already implemented)
Call Json: GET “/api/homeappliances/{oven}/programs/active/options/BSH.Common.Option.ProgramProgress"

Response:
“key”: “BSH.Common.Option.ProgramProgress”,
“value”: 5,
“unit”: “%”

Sensor RemainingProgramTime: (Already implemented)
Call Json: GET “/api/homeappliances/{oven}/programs/active/options/BSH.Common.Option.RemainingProgramTime"

Response:
“key”: “BSH.Common.Option.RemainingProgramTime”,
“value”: 8820,
“unit”: “seconds”

Switch FastPreHeat:
Call Json: GET “/api/homeappliances/{oven}/programs/active/options/Cooking.Oven.Option.FastPreHeat"

Response:
data": {
“key”: “Cooking.Oven.Option.FastPreHeat”,
“value”: false}

Sensor? SteamAssistLevel:
Call Json: GET “/api/homeappliances/{oven}/programs/active/options/Cooking.Oven.Option.SteamAssistLevel"

Response:
data": {
“key”: “Cooking.Oven.Option.SteamAssistLevel”,
“value”: “Cooking.Oven.EnumType.AddedSteam.Off”
Following some possibility for Steam Assist Level:
“value”: “Cooking.Oven.EnumType.AddedSteam.low”
“value”: “Cooking.Oven.EnumType.AddedSteam.Medium”
“value”: “Cooking.Oven.EnumType.AddedSteam.High”

Sensor? Level:
Call Json: GET “/api/homeappliances/{oven}/programs/active/options/Cooking.Oven.Option.Level"

Response:
data": {
“key”: “Cooking.Oven.Option.Level”,
“value”: “Cooking.Oven.EnumType.Level.Level01” }]
Following some possibility for Level:
“value”: “Cooking.Oven.EnumType.Level.Level02”
“value”: “Cooking.Oven.EnumType.Level.Level03”

Sensor? SetpointTemperature:
Call Json: GET “/api/homeappliances/{oven}/programs/active/options/CCooking.Oven.Option.SetpointTemperature"

Response:
data": {
“key”: “Cooking.Oven.Option.SetpointTemperature”,
“value”: 180,
“unit”: “°C”

Sensor? CurrentCavityTemperature:
Call Json: GET “/api/homeappliances/{oven}/status
“key”: “Cooking.Oven.Status.CurrentCavityTemperature”,
“value”: 21,
“unit”: “°C”

I hope it can be useful,
regards

LIttle Guide to implement Home Assistant Home Connect

  1. First you need to active SSL following this guide:
    https://www.home-assistant.io/addons/duckdns/

  2. Download APP HomeConnect on your smartphone and create your account and connect your appliance (Oven, Dishwasher, ecc
)

  3. Create an account to https://developer.home-connect.com
    Register New Application


    Copy the contents of custom_components to the custom_components directory of your Home Assistant configuration directory from https://github.com/DavidMStraub/homeassistant-homeconnect
    4

  4. Add the following to your configuration.yaml:
    hc

  5. Restart Home Assistant

  6. On your home Assistant Click on the corner right

  7. Click Configure for the configurator Home Connect
    2

  8. Click on Link Home Connect account
    3

  9. After that will be open a browser and ask you credential of your account Home Connect (not developer)
    4

  10. Approve appliance to be use on home assistant
    10

  11. If everything right you will be find new sensor, switch and binary sensor.

4 Likes

@zufferli thanks a lot for the detailed explanation and thanks for the API responses - this is extremely useful. The problem with using all these GET endpoints to query the state of the appliance is that they have quite severe rate limits and it does not seem realistic to have the entities update often enough if one needs to poll the servers. Indeed the write in the docs that one should listen to the event stream instead. So what I do at the moment is to simply listen to the event stream, but I am not sure whether all of the information that you obtained with GET also shows up there.

Concerning the sensors like CurrentCavityTemperature etc., yes these could indeed be implemented fairly easily, assuming their state is updated in the event stream. Could you find out whether this is the case?

What is indeed complicated are program configuration options. I am not sure how/whether this can be implemented in a convenient way in HA. Maybe the best thing would be to at some point introduce service calls with options, so people can write automations to trigger very specific programs on their appliances.

Hi everyone!

when I click the “Link Home Connect account” the url contains the internal address of my Home Assistant server. After when I replace the internall address to public domain name I can linked it, but when I want Approve it, the following error message appear: 500 Internal Server Error
Server got itself in trouble
How can I solved this problem?

Ok, I found the solution. I add Redirect URI #2 (on the https://developer.home-connect.com/applications/
 on Your application - Edit Applications page) with the internal address of my Home Assistant server. After then, I can Linked the account and Approved it.

I’m having some trouble with this plugin. I’ve configured it as a custom_component and did all of the steps above.

However, when I’ve linked my account, I only get a blank popup afterwards. I suppose the callback is successfull since there is a “.homeconnect-token-cache” which contains “id_token”, “refresh_token”, etc. But no sensors are showing up?

Hi,

that’s strange. Are you able to access your devices with the Home Connect (phone) app? Which types of devices do you have?

Strangely after a few days, this suddenly started working. Must have been some delay with the activation of the project.

Everything is working great, too bad that remote start is disabled after 24 hours.

Is the SSL sill the only way of using this component? Now that the Cloud system has nice remote access feature :slight_smile:

I just bought a set of home connect compatible washing tower but prior this did not do extensive research regards the IOT stuff.

1 Like

It’s the Home Connect API that requires SSL. I never looked into HA cloud and have no idea if it’s possible.