Success with my Boch Dishwasher , at least it seams I can see it and status !
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 yourbase_url
.
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.
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:
-
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
-
First you need to active SSL following this guide:
https://www.home-assistant.io/addons/duckdns/ -
Download APP HomeConnect on your smartphone and create your account and connect your appliance (Oven, Dishwasher, eccâŠ)
-
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
-
Add the following to your configuration.yaml:
-
Restart Home Assistant
-
On your home Assistant Click on the corner right
-
Click Configure for the configurator Home Connect
-
Click on Link Home Connect account
-
After that will be open a browser and ask you credential of your account Home Connect (not developer)
-
Approve appliance to be use on home assistant
-
If everything right you will be find new sensor, switch and binary sensor.
@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
I just bought a set of home connect compatible washing tower but prior this did not do extensive research regards the IOT stuff.
Itâs the Home Connect API that requires SSL. I never looked into HA cloud and have no idea if itâs possible.