Giter VIP home page Giter VIP logo

home-connect-hass's Introduction

Alternative Home Connect Integration for Home Assistant

This project is an alternative integration for Home Connect enabled home appliances manufactured by BSH under the Bosch, Siemens, Constructa and Neff brands.

If you're using this integration please star it on Github


Table of contents

Main features

Home Assistant already has a built-in integration for Home Connect, however, it is quite basic, generates entities that are not always supported by the connected appliances and tends to stop getting status updates after a while. This integration attempts to address those issues and has the following features:

  • All the entities are dynamically read from the API and reflect true capabilities of the appliance.
  • The integration exposes entities that provide complete control over programs, program options, and global settings. These entities are dynamically read from API and therefore are specifically applicable to the connected appliances.
  • Configurable options and settings are exposed for easy selection using "Select", "Switch" or "Number" entities, as appropriate.
  • Read only status values, as well as some selectable options are also made available either using "Sensor" or "Binary Sensor" entities for easier use when only wanting to display them.
  • Status events that are published by the Home Connect service are exposed as Home Assistant events.
  • "Program Started" and "Program Finished" events are exposed as triggers for easier building of automation scripts.
  • A "Start Program" Button entity is provided to start the operation of the selected program.
  • Program and option selections are also available as a service for easier integration in scripts.
  • The state of all entities is updated in real time with a cloud push type integration.
  • Clean handling of appliances disconnecting and reconnecting from the cloud.
  • Clean handling of new appliances being added or removed from the service.
  • All the names support translation, but currently only the English translation is provided.
  • Using pure async implementation for reduced load on the platform.

Installation instructions

Creating a Home Connect developer app

Before installing the integration you need to create an "application" in the Home Connect developers website. Note that if you have an existing appliacation, that was created before July 2022 you will most likely have to update the redirect URI to the one specified below. It can take a few hours for the changes to existing applications to apply, so be patiant.

  1. Navigate to the "Applications" page on the Home Connect developers website. You'll be prompted to create an account or sign in if you already have one.
    ➠ NOTE: You MUST use ONLY lowercase letters in the email addresses of both your regular user account and developer account or the integration won't work!
  2. Click the "Register Application" link.
  3. Fill in the application creation form:
    Application ID: A unique ID for the application, can be home-connect-alt, or whatever you like.
    OAuth Flow: Authorization Code Grant Flow
    Home Connect User Account for Testing: Leave blank
    Redirect URI: https://my.home-assistant.io/redirect/oauth
    Add additional redirect URIs: Leave unchecked
    Enable One Time Token Mode: Leave unchecked
  4. Click "Save" then copy the Client ID and Client Secret and save them for use in the next step.

Installing the integration

Pre-installation steps

  1. Navigate to https://my.home-assistant.io/ and make sure the Home Assistant Instance is configured correctly to point to your local Home Assistant instance.
  2. Power on all your appliances.
  3. Turn OFF the wifi on your phone and make sure all the appliances are operational in the Home Connect mobile app.
  4. If this is not the first time you are installing the integration and anything changed with your credentials you should go the the Settings -> Devices & Services page on Home Assistant, then click the three-dot-menu on the top righthand corner and select "Application credentials". Locate the previous credentials row for this integration and delete it.

Installation

  1. The esiest way to install the integration is using HACS. Just click the button bellow and follow the instructions: Open your Home Assistant instance and open a repository inside the Home Assistant Community Store.
    Alternatively, go to Settings -> Devices & Services in Home Assistance and click the "Add Integration" button. Search for "Home Connect Alt" and install it.

  2. A dialog box will popup asking you to select your preferred Home Connect server. Select "China" if you are located in China and "Default" for any other location. api_host dialog

  3. Next you will be asked to provide the Home Connect developer app credentials you created erlier. Give these credetials set a name that will make it easy for you to reference them in the Home Assistant credentials manager : api_host dialog

  4. Finnaly, a new window will popup where you will be asked to login to to your Home Connect account and allow Home Assistant to access your appliances. After you approve that you will be redirected back to Home Assistant, continue as instructed.

  5. Congratulations, you're done!
    Home Connect Alt will now start downloading the data for your appliances and will add the entities for them to Home Assistant.
    Note that the integration dynamically discoveres entities as they are made available by the API, so expect new entities to be added in the first few uses of the appliances.

Configuration options

Starting with version 0.7.0 the integration supports the UI configuration flow for most configuration options. Existing config values will be read however, once the options are saved in the UI they will override the values from the config file.

Options settable in the UI

Regular options

These options will show up for all users.

  • Language (optional - default = "en") - Indicates the language to use for entity names and values. The translation is automatically loaded from the Home Connect service and must be one of its supported languages.

  • Translation Mode - Indicates how sensor values and select boxes should be translated to friendly names:

    • Local - The integration will use the raw ENUM values documented in the Home Connect documentation for sensors with string values. In that case the integration relies on the Home Assistant translation mechanism and translation files to translate these values into friendly names. The benefit of this approach is that the values used by the integration are language independent and match the values documented in the Home Connect API.
    • Server - Sensor values are translated to friendly names using the Home Connect service. In this mode the internal values of string sensors will be translated and the translated values must be used in scripts referring to those sensors.
  • Delayed start behavior (experimental) - Sets the behavior of the delayed start UI.
    By default the integration will use the standard delay method supported by the appliance. Typically this would be the delay time until the start of the program for dish washers and the delay time until the end of the program for washing machines and dryers. However, it can be annoying to have to work out the time to set instead of just setting and absolute time when the program should finish.
    Setting this option to "Absolute time" will replace the delay entity with a time entity that will always show the expected end time of the selected program. The value of this entity can be changed to set the desired end time for the program. Notes:

    • The time will always be interpreted as a future time so anything earlier than "now" will be interpreted as tomorrow.
    • The time can't be set for something closer than the duration of the selected program.
    • Remote start has to be enabled for this feature to work.
    • This feature is still experimental and may have issues

Advanced options

These options will only show up when the user has enablde "Advanced mode" in the user profile.

  • Name Template - Defines the template used for rendering entity names. The following placeholders are supported and will be replaced dynamically when rendering the name:
    $brand - The brand name of the appliance ("Bosch", "Siemens", etc.)
    $appliance - The type of the appliance ("Washing machine", "Dishwasher", etc.)
    $name - The name of the entity
    The default template is "$brand $appliance - $name"

  • Log mode - Defines the log verbosity level. Should normally be set to 0. Don't change this unless asked to do so while working on a bug you reported.

  • SSE Timeout -
    Define the timeout, in minutes, to renew the event stream connection with the HC server.
    The default value of 15 minutes is designed to prevent situations of zombie streams that appear to be connected but don't receive events from HC.

The following very advanced options can only be defined using YAML. Generally you should not change them unless you really know what you're doing.

  • appliance_settings (optional) - Overrides some settings for specific appliances.
    This setting requires specifying the identifier (HAID) of the appliance. The easiest way to find it is to look at the entity ID of the "Connected" sensor of the appliance. This would look something like binary_sensor.bosch_wat286h0gb_68a64f51deb_connected, and the ID in this case is bosch_wat286h0gb_68a64f51deb.

    Currently supported settings:
    name_template - override the global name_template setting
    disabled - set to true to disable loading the specified appliance (default=false)

    For example:

    bosch_wat286h0gb_68a64f51deb:
      name_template: My appliance $name
      disabled: false
    
  • entity_settings (optional) - Overrides internal entity settings.
    Currently supported settings to override are:
    unit: The units to use for numeric values
    icon: The Material Design icon to use for the entity in the format "mdi:<icon name>
    class: The Home Assistant class of the entity (must be a class which is already supported for that entity type) For example:

    ConsumerProducts.CoffeeMaker.Status.BeverageCounterCoffee:
      unit: cups
      icon: mdi:coffee
    

After the integration is configured READ THE FAQ then add it from the Home-Assistant UI.


Automation Notes

Integration state

  • There is a special sensor called Home Connect Status which shows the status of the integration. It has the following values:
    • INIT - The integration is initializing
    • RUNNING - The integration has started running
    • LOADED - The integration finished loading the initial data from the Home Connect service
    • READY - The integration has successfully subscribed to real time updates from the cloud service and is now fully functional.
    • BLOCKED - The Home Connect service has blocked additional API calls for a period of time due to exceeding the service rate limits It may take up to one minute to go from LOADED to READY

Services

The following services are available for use with automations:
select_program - Selects a program and optionally set its options
start_program - Starts a program and optionally set its options
stop_program - Stops the active program
pause_program - Pauses the active program (if and when supported by the appliance)
resume_program - Resumes a paused program (if and when supported by the appliance)
set_program_option - Sets an option on the active program if one exists or on the selected program otherwise
apply_setting - Applies the sepecified setting on an appliance
run_command - Runs the specified command on an appliance

Events

The integration exposes the events fired by the service as Home Assistant events under the name: "home_connect_alt_event"
The published events values are:

  • BSH.Common.Status.OperationState
  • All the events with the keyword "Event" in their names

Triggers

The integration exposes two triggers for easy automation:

  • program_started
  • program_finished

Local vs. Server translation

The default behavior of this integration is to use "local" value translation. That means that all string sensors keep their internal value in a raw, language independant format. Those values are "translated" in the UI to a human friendly text by using local translation files.
This method is different than most other Home Assistant integration but it has three important benefits:

  1. It makes automation code language independent. As a developer I strongly believe that code shouldn't relay on the specific human language currently selected by the user.
  2. It allows users to look up possible values in the Home Connect developer documentation. So you can know in advance which values to epxect for a given sensor.
  3. It allows add translation for languages which are not supported by the Home COnnect API.

In contrast, setting sensor_value_translation: server will override this behavior and use translations provided by the Home Connect API. This is limited to languages supported by the API but it does make sensor have the actual textual values displayed in the UI. So you can use that if you prefer,


Troubleshooting and FAQ

  • I don't get the installation dialogs mentioned in the Installation section above
    These dialogs will only show up the first time you install the integration and only if you do not have the client_id and client_secret configured in your configuration.yaml file. The make it appear again make sure the integration is uninstlled, then go to the Settings -> Devices & Services page on Home Assistant, then click the three-dot-menu on the top righthand corner and select "Application credentials". Locate the previous credentials row for this integration and delete it.

  • I get errors on the browser window that pops-up after installing the integration for the first time
    This popup window is trying to log you into the Home Connect website to establish a connection with the integration. If you get an error at this stage it means you didn't follow the setup instuctions carefully enough, so make sure that you do. Also make sure that you open https://my.home-assistant.io/ and configure the URL of your Home-Assistant server.
    NOTE: If you are modifying an existing Home-Connect App then it may take up to 2 hours for the changes to take effect, so make sure you wait long enough.

  • Some of my appliances are not showing up after I added the integration
    This is most commonly caused by two reasons:

    1. The appliance must be powered on and connected to the Home Connect service to be discovered. Once the missing devices are turned on and connected, they will automatically be discovered and added by the integration. This can be verified in the Home Connect mobile app but only while the wifi on the phone is turned OFF. If some devices still do not show app in the integration, restart them (power cycle/unplug power cord, do not just turn them off and on). If the devices are active in the mobile app while the phone's wifi is turned off then please open an issue with a debug log to report it.
    2. Due to some unreasonable rate limits set by BSH, there is a limit of about 5 appliances loaded per minute. If you have more, expect the initial load to take longer. The integration will wait for the service to become available and continue loading the rest of the appliances. You may have to refresh your screen to see them in Home Assistant after they were added. See more details in the next item.
  • The Home Connect Status sensor is showing the value BLOCKED and nothing works
    Congratulations, you've hit one of Home Connects annoying API rate limits. It will get automatically lifted anytime between a few minutes and 24 hours. If you have many appliances and hitting this issue frequently then see the Dealing with API rate limits section below.

  • The Home Connect mobile app has some controls/data/events that are missing in Home Assistant
    This integration doesn't know anything about any specific appliance, it is using the official Home Connect API to explore the available options for each appliance and automatically exposes them as appropriate Home Assistant entities. The type of entities is automatically determined by information received from the API. The Home Connect mobile app is using a private API that is not available to the public and has more capabilities than those in the official API. Therefor it is expected that there will be some data, controls or events that are available in the app but not in the integration, this is NOT a problem with the integration but a limitation of the API.
    DO NOT open bugs or feature requests related to such issues unless you can demonstrate that the missing item is actually available in the API

  • I've restarted Home Assistant a few times and now all my appliances are unavailable
    This is, again, related to the Home Connect rate limits. Every time you restart Home Assistant the integration makes a few API calls to the service and if that happens too often it may block for up to 24 hours. The best way to fix this is to wait a day and restart Home Assistant again.

  • I select a program or option but nothing happens on the appliance
    Make sure the appliance is turned on. Typically the integration will automatically detect appliances that are turned off or disconnected from the network and disable them in Home Assistant but it may happen that it fails to detect that and then attempting make any changes to setting will fail.

  • I try to start the selected program by pressing the button but nothing happens
    Make sure Remote Start is enabled on the appliance

  • Sensor related to program progress are showing up as unavailable
    These sensors only become available when the appliance is running a program.

  • All the program, option and settings selection boxes, switches and numbers are disabled
    Make sure that Remote Control is allowed on the appliance. It is typically enabled by default but gets temporarily disabled when changing setting on the appliance itself.

  • The Start button is disabled
    Make sure that Remote Control Start is allowed on the appliance, it's disabled by default.

  • Sensor values or select boxes have values like BSH.Common.EnumType.PowerState.Off
    Start by reading where these values are coming from in the explanation of the sensor_value_translation config param above. You can also set that parameter as a workaround for missing translations in sensor values. Regardless if you decide to use the language parameter or not it would be great if you can report these values so they can be properly translated. Ideally, if you know how, please update the translation files directly (at least the English ones) and create a PR. If you don't know how then you can add them to issue #26 and I will add them to the translation files.

    Note: It is expected to see these values in sensor history data. This is currently a limitation/bug in Home Assistant which doesn't translate these values.

  • Home Assistant display "Error" popup after installing the integration and completing the login flow to Home Connect
    When this issue occurs the log file will show a "Bad Request" "400" error.
    Make sure the email address you used when registereting your Home Connect account has ONLY lowercase letters.


Dealing with API rate limits

If you have more than 5 appliances you may occasionaly hit the Home Connect API rate limit which only allows up to 1000 daily API calls, regardless of how many appliances you own. This limit ends up hurting their best customers and it doesn't make any sense, it should be adjusted based on the number of appliances in the account. If you hit that limit then I strongly enourage you to reach out to Home Connect and protest. Until hey listen there is an annoying workaround:

  1. Create a second developer app in the Home COnnect developers portal with exactly the same settings you used for the first one.
  2. In Home Assistant go to Settings -> Devices & services then click the three dot menu at the top right and select "Application credentials" and then click the "Add Application Credential" button at the button right corner.
  3. In the popup dialog select "Home Connect Alt" as the integration, give your credentials some useful name, like "Home Connect 2" and then copy and paste the client ID and client secret for the second app you created in step 1.
  4. Go back to the Integrations page and click on "Home Connect Alt". Under "Integrations entries" click on "ADD ENTRY".
  5. This will start a new login flow to Home Connect. Complete the flow and you should now have two instances of the integration running in parallel.
  6. Now you must use the "CONFIGURE" button of each entry to change the Application settings advanced options so that half of your appliances are disabled in each entry. See details above how to do that.
  7. If you've reached this far then you should now have two instances running, using different Home Connect apps and each one responsible for half of your appliances. If it still getting rate limit then just add a third one.

Known Issues

See the FAQ above.

Reporting Issues and Bugs

CAREFULLY Read the FAQ before submitting a bug report or opening a feature request, a lot of common issues are already covered there.

DO NOT open bugs or feature requests on missing data, controls or events, unless you can show, either in the logs or in the API documentation that the missing item is actually available. Read the FAQ section for more details on this.

Bug report requirements

All non trivial issues require:

  • A click on the Home Connect Debug Info button that the intgration is adding to the Home Assistant default "Overview" dashboard. This will dump some critical state information to the log.
  • A full debug log. See next section for instructions how to enable debug logging.
  • In some cases, while working on an issue, I will ask you to set a specific Log Mode, see below how to do that.

Enabling debug logging

Use one of these two methods enable debug logging:

  • In Home Assistant navigate to Settings → Devices & Services → Home Connect Alt and click on "Enable debug logging".
    If you are using this method you can click "*Disable debug logging" when you're done to download the log file which you'll have to attach to your bug report.

    -OR-

  • Add the following to your configuration.yaml file then restart HA:

    logger:
      default: warn
      logs:
        home_connect_async: debug
        home_connect_alt: debug
        custom_components.home_connect_alt: debug
    

    If you're using this method you will have to download the log directly from the Home Assistant server in order to attach it to the bug report.

Setting Log Mode

If while analyzing an issue you reported you are requested to set a specific Log Mode:

  1. Make sure that "Advanced mode" is enabled in your Home Assistant profile.
  2. In Home Assistant navigate to Settings → Devices & Services → Home Connect Alt
  3. Press the "CONFIGURE" button and set the required log mode.

Beta Releases

Major changes will be released in beta versions to reduce the impact on existing users. It is strongly advised not to install the beta version unless you are a part of an issue that specifically calls for installing one and when you are, you should only install the specified version (as there may be several issues handled in separate beta versions at the same time). To install a beta version go to the HACS dashboard in the Home Assistant UI:

  • Click on Integrations locat the "Home Connect Alt" integration.
  • Click on the three dot menu for the integration and select "Redownload".
  • In the popup dialog make sure "Show beta versions" is enabled and then select the version you need to install.

Contributing Translations

You are welcome to create PRs for new language translations or updates to existing ones however please note the following requirements:

  • To add a new language translation always start by copying the English translation file and edit it.
  • New ENUM value translations will not be accepted if they are not added to the English translation file first.
  • Translations MUST be added and modified ONLY under the "entity.sensor" node of the translation file because those values will also be used to automatically overwrite the values under the "enity.select" node.
  • The translated ENUM values must be added in the correct section (programs/options/settings/statuses)

Legal Notice

This integration is not built, maintained, provided or associated with BSH in any way.

home-connect-hass's People

Contributors

ajediiam avatar cap-team avatar chpego avatar christophcaina avatar d0np3p3 avatar dagobert avatar danbayliss avatar dennypage avatar dickesw avatar eddyk69 avatar ekutner avatar emufan avatar freddy1020 avatar ghuser238490 avatar kenni avatar krocko avatar margriko avatar matthewhadley avatar mhuijgen avatar michaelkmoch avatar mitch73-2 avatar n3rdix avatar ooii avatar sesthan avatar skythes avatar steve-hodgkiss avatar xkill avatar yuvalabou avatar z-vrba avatar zerwin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

home-connect-hass's Issues

Received invalid command: hacs/subscribe

Before I had the regular home_connect.
I installed HACS,
in the configuration.yall I made a copy of the home_connect section to home_connect_alt
then I installed home connect alt from HACS and restarted all.
I cannot find any entity, and all the logs say is:

2022-05-31 09:49:00 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [1803442688] Received invalid command: hacs/subscribe
2022-05-31 09:49:00 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [1803442688] Received invalid command: hacs/subscribe
2022-05-31 09:49:00 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [1803442688] Received invalid command: hacs/subscribe
2022-05-31 09:49:00 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [1803442688] Received invalid command: hacs/subscribe
2022-05-31 09:49:00 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [1803442688] Received invalid command: hacs/subscribe
2022-05-31 09:49:00 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [1803442688] Received invalid command: hacs/subscribe
2022-05-31 09:49:00 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [1803442688] Received invalid command: hacs/subscribe
2022-05-31 09:49:00 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [1803442688] Received invalid command: hacs/subscribe
2022-05-31 09:49:00 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [1803442688] Received invalid command: hacs/subscribe
2022-05-31 09:49:00 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [1803442688] Received invalid command: hacs/subscribe
2022-05-31 09:49:00 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [1803442688] Received invalid command: hacs/subscribe
2022-05-31 09:49:00 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [1803442688] Received invalid command: hacs/subscribe
2022-05-31 09:49:00 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [1803442688] Received invalid command: hacs/subscribe
2022-05-31 09:49:00 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [1803442688] Received invalid command: hacs/subscribe
2022-05-31 09:49:00 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [1803442688] Received invalid command: hacs/subscribe
2022-05-31 09:49:00 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [1803442688] Received invalid command: hacs/subscribe
2022-05-31 09:49:00 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [1803442688] Received invalid command: hacs/subscribe

OptionNumber is overriding deprecated methods on an instance of NumberEntity

Got this warning after update HA to beta version 2022.7.0b3

Logger: homeassistant.components.number
Source: components/number/init.py:220
Integration: Nummer (documentation, issues)
First occurred: 16:47:22 (2 occurrences)
Last logged: 16:47:22

custom_components.home_connect_alt.number::OptionNumber is overriding deprecated methods on an instance of NumberEntity, this is not valid and will be unsupported from Home Assistant 2022.10. Please report it to the custom component author.

Versie | core-2022.7.0b3
Type installatie | Home Assistant Supervised
Running Raspberry P4b

Unable to authorise client

Hi,

I've tried setting up this integration out of curiosity to see how it compares with the one included in HA Core - so far I wasn't able to authorise it against the new app I created for it in HC Developer portal. I've seen the one already closed issue where the redirect was incorrect, but in my case the App ID, client secret and redirect URL are correct, and the BSH API still says no.
HCA-2
HCA-1
HCA-3

Any ideas?

Device sometimes/often not updated

Version of the custom_component

v0.5.0-b2

Configuration

home_connect_alt:
  client_id: !secret home_connect_alt_client_id
  client_secret: !secret home_connect_alt_client_secret
  language: de-DE
  sensor_value_translation: local

Add your logs here.

2022-06-10 18:15:49 ERROR (MainThread) [aiohttp_sse_client.client] fetch https://api.home-connect.com/api/homeappliances/events failed: 401
2022-06-11 15:02:11 ERROR (MainThread) [aiohttp_sse_client.client] fetch https://api.home-connect.com/api/homeappliances/events failed: 429

Describe the bug

The above logs are there, but not correlated to the missing status of my appliances, here example dishwasher.

In 2 of 3 times, if I start and run a program, the integration does not show anything about it. Only if I restart the integration, the new/running status is correct again.

image

Here the morning, everything was o.k. Status "Run" in cyan and every other entity was right and got updated during runtime. Then the noon. I switched on the dishwasher at 12:57. Correct. But started 2-3 seconds afterwards. But the entity didn't go to "Run", nor did this change until now (in the meantime finished and off) and nor any other entity got updated.

It was finished at 15:14 (HC App) so this isn't correlated to the timestamp from the error log above either.

Debug log

Enabled now, but have to restart and wait until the next behavior like this one.

Searched already in the closed issues, but didn't find a 1:1 one. Known behavior? With the core integration, I never had this before. This was 100% stable in this regards.

Setup Issue - Error handling request

I can't seem to get this custom integration to see any of my devices. I've had the inbuilt Home Connect integration working fine for some time now but when I try and set this up it just creates the 3 built in entities (Debug, Refresh & Status). When setting up it takes me to the Home Connect portal and when I click approve it takes me back to my HA instance but the page is completely blank. If I refresh the bank page it gives me a "500 Internal Server Error"

My logs show the following errors

22-05-29 14:06:48 INFO (MainThread) [custom_components.home_connect_alt.config_flow] Successfully authenticated
2022-05-29 14:06:48 DEBUG (MainThread) [home_connect_async.api] HTTP get /api/homeappliances (code=200  count=1)
2022-05-29 14:06:48 DEBUG (MainThread) [home_connect_async.homeconnect] Connecting to SSE stream
2022-05-29 14:06:52 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/aiohttp/web_protocol.py", line 435, in _handle_request
    resp = await request_handler(request)
  File "/usr/local/lib/python3.9/site-packages/aiohttp/web_app.py", line 504, in _handle
    resp = await handler(request)
  File "/usr/local/lib/python3.9/site-packages/aiohttp/web_middlewares.py", line 117, in impl
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 60, in security_filter_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 222, in forwarded_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 28, in request_context_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 79, in ban_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 219, in auth_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 137, in handle
    result = await result
  File "/usr/src/homeassistant/homeassistant/helpers/config_entry_oauth2_flow.py", line 409, in get
    await hass.config_entries.flow.async_configure(
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 246, in async_configure
    raise UnknownFlow
homeassistant.data_entry_flow.UnknownFlow

When I press the debug button I get

2022-05-29 14:06:59 ERROR (MainThread) [custom_components.home_connect_alt.button] {
  "appliances": {}
}

I've tried waiting 24 hours in case the issue was with rate limiting but i'm still seeing the same. Any ideas?

v145 All entitities are not available

Hello.
After the update to v145, the entities of all my BSH devices are no longer available. I then reinstalled the integration. No more devices are displayed, although they are all visible in the direct access to Home Connect as before. The sensor "sensor.home_connect_status" shows "LOADING" forever.
The parallel Home Connect Core installation continues to work reliably.
Is there any idea where I can look for the error?
Greetings,
Eckart Severing

Sensors or Select boxes are shoing raw enum values looking something like BSH.Common.Program.XXX

These values are used by the Home connect API and exposed by the integration for scripting and event publishing. The integration is using these values so they match the Home Connect API documentation.
Since these enum values are not very user friendly the integration relies on the Home Assistant translation capabilities to translate them into friendly names in supported languages. All the documented values have already been translated however there seem to be some undocumented values that can only be translated when users report them because until that happens there is no way to know they even exist. In the comments to this issue you can report on untranslated values to be added to the integration.
Please do NOT share screenshots, only text values of these enum values will be considered.

Important Note

The Home Assistant translation doesn't seem work for the sensor history display, so please don't report on their existence in there.

Authentication feedback not working

Hello,
I would like to reopen the unautorized_client issue. Maybe it is due to a breaking change but I cannot use the oauth since my setup is local only.

I have My Home Assistant and my setup is not reachable via external url.
So I need to use
http://192.168.0.2:8123/auth/external/callback
instead of
https://my.home-assistant.io/redirect/oauth

When I make the change manually in the error screen
"error": "unauthorized_client", "error_description": "client or redirection URI not authorized",
then I am routed to home connect and can approve the access. But then I am returned to HA and I just see "error" in the integration screen.

P.S.: Log is empty despite logger set to debug

unauthorized client

Hello, i receive error:

{
"error": "unauthorized_client",
"error_description": "client or redirection URI not authorized",
"state": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJmbG93X2lkIjoiNmFkMThhYzAwYmMwYzEyMzg4YWQ3NDA1NDE4MWI1YzgiLCJyZWRpcmVjdF91cmkiOiJodHRwczovL215LmhvbWUtYXNzaXN0YW50LmlvL3JlZGlyZWN0L29hdXRoIn0.ZiDlxa2a5lWG6R1Lef2BvwITFKPVv5xmofzVhPUSaIc"
}

can you help me?

How to see events

The documentation states that events are exposed as 'home_connect_alt_event' but I can't seem to find them in the logs or as event listener in the developer tools. How can I see the events so that I can build an automation? For starters to actually see what it contains. The Home Connect mobile app sends push messages like the door is open, dishwasher needs cleaning, etc. I'm hoping this is exposed as these events so I can build automations from them. An example would also be nice in the documentation. 😉 In stead of only asking I must say that I love the integration. Seeing what and how it exposes the entities. Much better than the native one in every aspect! 👌🏼

misleading status "LOADING"

I'm usung the latest integration version (v0.5.0-b1) with default config. I've noticed that sensor.home_connect_status can return value "LOADING" for many hours (of course, during this phase HomeConnect devices can not be used in HA). The problem is releated to API call limit, because official HomeConnect integration shows something like this in the log:
homeconnect.api.HomeConnectError: {'key': '429', 'description': 'The rate limit "1000 calls in 1 day" was reached. Requests are blocked during the remaining period of 11914 seconds.'}

Could you return more suitable status value in such cases (e.g. "BLOCKED'")? Besides (as seen above) the API returns the reason and the time when the lock will be released. It would be great if the information about the reason (in this case the limit of 1000 queries per day was exceeded) and the date+time when the blockade will end was also returned. Such additional information could be returned via additional entities or even as "properties" of home_connect_status sensor. What do you think?

too long names

Currently, entity names ("friendly names") consist of manufacturer name + device name (given by the user in the mobile app) + parameter name. As a result, such names are not fully visible at dashboard, so each of them has to be "manually" changed (shortened). Why not to leave only the parameter names (as it is in the official integration)? It would help a lot.

change from this:

image

to this:

image

bsh_common_status_operationstate not updating

The plugin is working correctly and respond fast to changes on my dischwacher.

except bsh_common_status_operationstate does not receive the updates except when I click reload the add in. especially the status run, finished seems to work a lot better (strange) but this was not the case a couple of days ago. then every state change was direct.

I do not have the official plugin and a reload fixes the issue, so I don't think it is related to the number of requests. Door closed and so is sending the status directly, just not the operation state.

I use the operation state to count every time the dishwacher is starting.

Remaining program time incorrectly displays as 2022 seconds instead of a timestamp

Version of the custom_component

Configuration

home_connect_alt:
  client_id: ***************
  client_secret: *****************
  name_template: $brand $appliance - $name
  language: fr  
  # sensor_value_translation: <server | local>  

Describe the bug

The bsh_common_option_remainingprogramtimes sensor contains a timestamp (for instance: 2022-07-04T20:54:49+00:00) but displays as a float always equal to 2022.0 seconds.

The reason seems to be that the sensor's attributes (as found in the HA database) erroneously contain a unit of measurement (in my case: {"unit_of_measurement":"seconds","device_class":"timestamp","icon":"mdi:office-building-cog","friendly_name":"Bosch Lave-vaisselle - Dur\u00e9e restante "}).

Similar, but correctly working, sensors from other integrations do not have the "unit_of_measurement":"seconds" part.

Debug log

image

sensor.home_connect_status (loading)

Hi, many thanks for your integration, I like it.
I’m currently testing with 5 home connect devices (2 hoven, 1 caffe machine, 1 cooking_hob and 1 dishwasher) but often I have “sensor.home_connect_status” to loading, see the log below:
2022-02-18 16:07:33 DEBUG (MainThread) [home_connect_async.api] HTTP Error 429 - Too Many Requests. Sleeping for 56605 seconds and will retry
Any suggestion?
Many thanks

EnumType in history

Version of the custom_component

v0.4.5

Configuration

home_connect_alt:
  client_id: !secret homeconnectid
  client_secret: !secret homeconnectsecret

Describe the bug

When looking at the history of for example, Operation State, it shows the EnumTypes.
image

Debug log


Nothing in the log

After upgrading to version 0.5.1 "common setting powerstate" not available

Hi.
After upgrading to
0.5.1 "select.011100517384019627_bsh_common_setting_powerstate" not available in the dishwasher.
My configuration:

home_connect_alt:
  client_id: !secret home_connect_alt_client_id
  client_secret: !secret home_connect_alt_client_secret
  language: pl

Home Assistant Core 2022.6.7
Home Assistant Supervisor 2022.05.3
Home Assistant OS 8.2

Error: unauthorized client

Hi,

I tried to install the Homeconnect alternative, but fail already.

The Core Varainte from HC has worked so far. I deactivated it, registered a new application on the Homeconnect page and entered its data in configuration.yaml under "home_connect_alt:" and restarted.

When I then want to add the program to my integrations and the access to the homeconnect page is done, the following error message is displayed:

{
"error": "unauthorized_client",
"error_description": "client or redirection URI not authorized",
"state": "### cryptic key ###"
}

I have now:

  • Used the code from the classic homeconnect app
  • waited 24 hrs in case the server blocks because of too many requests

But all this did not help.

Greetings, Eckart

"soft" reloading of the integration (without polling HomeConnect server)

I would like to work on translations, but for tests I need to do restarts. Unfortunately every restart generates a lot of queries to HomeConnect server, which very quickly results in a blockade for 24 hours.
Could you add e.g. a service that will perform such a "soft" restart, please?

International character in the device name is incorrect

Version of the custom_component

v0.4.5

Configuration

home_connect_alt:
  client_id: !secret homeconnectid
  client_secret: !secret homeconnectsecret

Describe the bug

After the component added one of my devices that has an international character is named wrong. Tvättmaskin should be Tvättmaskin.
image

Debug log


Nothing in the log

Wrong encoding used for device names

Version of the custom_component

0.4.5

Configuration

home_connect_alt:
  client_id: !secret homeconnect_client_id
  client_secret: !secret homeconnect_client_secret
  language: de

Describe the bug

My dishwasher is named "Geschirrspüler" (German for dishwasher). The imported device is named "GeschirrspĆ¼ler".

There seems to be a worng encoding used at some point. The Home Connect app shows the name correctly.

New config value sensor_value_translation is not accepted as valid

Version of the custom_component

0.4.7

Configuration

home_connect_alt:
client_id: !secret HOME_CONNECT_CLIENT
client_secret: !secret HOME_CONNECT_SECRET
language: en-GB
sensor_value_translation: server

Describe the bug

If you add sensor_value_translation Home Assistant refuses to restart or does not set up the addon as the sensor_value_translation is reported as invalid.

Invalid config for [home_connect_alt]: [sensor_value_translation] is an invalid option for [home_connect_alt]. Check: home_connect_alt->home_connect_alt->sensor_value_translation. (See /config/configuration.yaml, line 110).

Debug log

I can enable debug logs if required.

Missing Unit Option in Start Program Service

Version of the custom_component 0.4.7

I believe the integration is missing a handler for the unit option of the data.

For example if I use the following value in the service options box

[{"key":"Cooking.Oven.Option.SetpointTemperature","value":"230","unit": "°C"},
{"key":"BSH.Common.Option.Duration","value":1200},"unit": "seconds"]

I get the following error and log

2022-06-02 18:31:38 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140564796667744] Error handling message: extra keys not allowed @ data['options'][0]['unit']. Got None (invalid_format)

This format is outlined in the below section of the home connect API documentation
https://apiclient.home-connect.com/#/programs/start_program

Add diagnostics support

Is your feature request related to a problem? Please describe.
Add support for diagnostics to help further improve the integration

Can not set alarm timer on oven

First off, many thanks for a great component. Much improvement over the stock version.

I am not able to set an alarm timer on my Bosch oven. When trying to do so, I get an error thus;

 '<' not supported between instances of 'float' and 'NoneType'

I think you can see where this is going...

Version of the custom_component

Latest master as of last night.

Describe the bug

This is because the AlarmClock information returned from the Home Connect contains null values for the min and max allowable values. As a result, the number component is created with null min/max values. Thus when attempting to check that the entered value for the alarm is in range, the check fails with this error.

The result of this failure is that the alarm is not set.

Debug log

Here's full details of the error occuring

2022-06-24 17:25:19 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140465629030384] '<' not supported between instances of 'float' and 'NoneType'
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 193, in handle_call_service
await hass.services.async_call(
File "/usr/src/homeassistant/homeassistant/core.py", line 1704, in async_call
task.result()
File "/usr/src/homeassistant/homeassistant/core.py", line 1741, in _execute_service
await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 204, in handle_service
await service.entity_service_call(
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 680, in entity_service_call
future.result() # pop exception if have
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 964, in async_request_call
await coro
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 717, in _handle_entity_call
await result
File "/usr/src/homeassistant/homeassistant/components/number/__init__.py", line 71, in async_set_value
if value < entity.min_value or value > entity.max_value:
TypeError: '<' not supported between instances of 'float' and 'NoneType'

Here's the start of the log showing the my oven device if that's important/useful

"BOSCH-HBG5585S6B-68A40E681870-001": {
"name": "Oven",
"brand": "Bosch",
"vib": "HBG5585S6B",
"connected": true,
"type": "Oven",
"enumber": "HBG5585S6B/60",
"haId": "BOSCH-HBG5585S6B-68A40E681870-001",
"uri": "/api/homeappliances/BOSCH-HBG5585S6B-68A40E681870-001",
"available_programs":

Here's an extract from the debug log showing the relevant entry for the AlarmClock

"BSH.Common.Setting.AlarmClock": {
"key": "BSH.Common.Setting.AlarmClock",
"value": 0,
"type": "Int",
"name": null,
"unit": "seconds",
"displayvalue": null,
"min": null,
"max": null,
"stepsize": null,
"allowedvalues": null,
"execution": null,
"liveupdate": null,
"access": "readWrite"
}

Display remaining program time

We got all information but seems the remaining program time is missing (as well as program progress)

The sensor should show how much time is left till the end of the program or a time that will be finished (then it can be recalculated) Also I use it for automation.

I'm using original integration which it serves remaining_program_time sensor the shows time in state "2022-05-25T15:56:45+00:00" that is used to recalculate remaining time
image
image

No devices loaded

Version of the custom_component

0.5.3

Configuration

Logging set to:

logger:
  default: info
  logs:
    home_connect_async: debug
    home_connect_alt: debug
    custom_components.home_connect_alt: debug

And here is the configuration of custom component:

home_connect_alt:
  client_id: !secret homeconnect_clientid
  client_secret: !secret homeconnect_clientsecret
  name_template: $brand $appliance - $name

Describe the bug

Downloaded the custom component via HACS, restarted HA. On bosch developer account, I have created just to be sure new app as instructed (I had one previously, used with built-in integration that is not working at all).

image

After installing component via HACS and restart, I added new integration - followed on screen prompt to authenticate on bosch site, and added device BSH.
image

No matter what I do, if I turn on or off my dryer, it is visible in official Home Connect android app, but gets never "discovered" in HA. I have tried pressing debug button, refresh button, but it makes no difference. Here is how it looks:

image

Debug log

[core-ssh config]$ more home-assistant.log | grep connect
2022-07-07 00:09:21 WARNING (SyncWorker_5) [homeassistant.loader] We found a custom integration home_connect_alt which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2022-07-07 00:09:38 WARNING (MainThread) [homeassistant.components.number] custom_components.home_connect_alt.number::OptionNumber is overriding deprecated methods on an instance of NumberEntity, this is not valid and will be unsupported from Home Assistant 2022.10. Please report it to the custom component author.
2022-07-07 00:09:38 WARNING (MainThread) [homeassistant.components.number] custom_components.home_connect_alt.number::SettingsNumber is overriding deprecated methods on an instance of NumberEntity, this is not valid and will be unsupported from Home Assistant 2022.10. Please report it to the custom component author.
2022-07-07 00:14:14 ERROR (MainThread) [custom_components.home_connect_alt.button] {

Cooker Hood - Program Select

When I try and select the program for my cooker hood I get an error message. In additional when the hood is running the program select is greyed out so I can't switch to delayed shut down (which is possible with the official integration)

Dashboard

2xuSO2g

Log


2022-05-31 19:44:01 DEBUG (MainThread) [home_connect_async.homeconnect] Received event from SSE stream: MessageEvent(type='KEEP-ALIVE', message='KEEP-ALIVE', data='', origin='https://api.home-connect.com', last_event_id='BOSCH-DWK98PR60B-XXXXX')
2022-05-31 19:44:34 DEBUG (MainThread) [home_connect_async.appliance] Calling /api/homeappliances/BOSCH-DWK98PR60B-XXXXX/programs/selected with:
{
  "data": {
    "key": "Cooking.Common.Program.Hood.Venting",
    "options": []
  }
}
2022-05-31 19:44:34 DEBUG (MainThread) [home_connect_async.api] HTTP put /api/homeappliances/BOSCH-DWK98PR60B-XXXXX/programs/selected (code=409  count=339)
2022-05-31 19:44:34 DEBUG (MainThread) [home_connect_async.api] API call failed with code=409 error=SDK.Error.ProgramNotWritable
2022-05-31 19:44:34 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140603455320992] Failed to set the selected program: Program can currently not be written (409 - None=Cooking.Common.Program.Hood.Venting)
Traceback (most recent call last):
  File "/config/custom_components/home_connect_alt/select.py", line 102, in async_select_option
    await self._appliance.async_select_program(key=option)
  File "/usr/local/lib/python3.9/site-packages/home_connect_async/appliance.py", line 219, in async_select_program
    res = await self._async_set_program(key, options, 'selected')
  File "/usr/local/lib/python3.9/site-packages/home_connect_async/appliance.py", line 368, in _async_set_program
    raise HomeConnectError(response.error_description, response=response)
home_connect_async.common.HomeConnectError: ('Program can currently not be written', None, 'SDK.Error.ProgramNotWritable', 'Program can currently not be written', None)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 189, in handle_call_service
    await hass.services.async_call(
  File "/usr/src/homeassistant/homeassistant/core.py", line 1627, in async_call
    task.result()
  File "/usr/src/homeassistant/homeassistant/core.py", line 1664, in _execute_service
    await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 204, in handle_service
    await service.entity_service_call(
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 677, in entity_service_call
    future.result()  # pop exception if have
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 964, in async_request_call
    await coro
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 714, in _handle_entity_call
    await result
  File "/usr/src/homeassistant/homeassistant/components/select/__init__.py", line 54, in async_select_option
    await entity.async_select_option(option)
  File "/config/custom_components/home_connect_alt/select.py", line 105, in async_select_option
    raise HomeAssistantError(f"Failed to set the selected program: {ex.error_description} ({ex.code} - {self._key}={option})")
homeassistant.exceptions.HomeAssistantError: Failed to set the selected program: Program can currently not be written (409 - None=Cooking.Common.Program.Hood.Venting)



Add service for API call programs​/active​/options​/{optionkey}

Version of the custom_component 0.4.9

Would it be possible to add a service for the API call below, primarily for use with an oven

​/homeappliances​/{haId}​/programs​/active​/options​/{optionkey}

The existing start program service seems to use the ​/homeappliances​/{haId}​/programs​/active which works fine if the oven is off. However in the case of an oven, any automation would probably require the oven pre heated first before starting the actual cooking. In my mind this would start with the /homeappliances​/{haId}​/programs​/active "service" to pre heat the oven followed by a change to the active timer and or temperature once the oven is ready which would require the ​/homeappliances​/{haId}​/programs​/active​/options​/{optionkey} service.

Is there a way to pause a Washing machine / Dishwasher program?

Hi, within the phase of heating water there is always the chance the photovoltaic system does not produce enaught energy because of clouds and extra energy has to be imported. But pausing/waiting a few minutes would make the washing program 100% solar.

Is there a possibility within this integration to "pause" the current program?

I know there is a way to cut off the energy via a smart plug for most of the BSH Devices and they resume the program when rebooting but this seems to be way to "harsh" for me.

Bug when Pausing my washing machine

When pausing the program of my dishwasher and resuming the program i cannot pause the program again.

The Button/Icon will stay at the "resume" position until i reload the integration. Then i can pause and resume one more time.

This is the position where the integration got stuck after pausing and resuming the program:
Bildschirmfoto 2022-06-23 um 18 55 13

This is the position where the integration stands afer reloading the integration after it got stuck. With this i can pause the program again (one more time). See, the Icon changed:
Bildschirmfoto 2022-06-23 um 18 59 01

Can i help with further logs or descriptions?

PS: It seems the icon changes based on the possible options. Is it also possible to change the Text from "Start" to "Pause" when the corresponding option is possible?

home_connect_alt:
client_id: ID
client_secret: SECRET
language: de
sensor_value_translation: local

Newest Version

Active Program Sensor values missing

Version of the custom_component

v0.4.9

Configuration


home_connect_alt:
  client_id: ***
  client_secret: ***
  language: en
  sensor_value_translation: local

Describe the bug

When my oven (Neff B5ACH7AH0B) is running a program (locally controlled), selected_program is None, but active_program is reported and available in the debug logs. This seems to result in the active program sensor values not being available.

I'm particularly interested in Cooking.Oven.Option.SetpointTemperature, which is an option in active_program and contains the correct data in the debug logs. Lines 37-42 of sensor.py look like they'd provide this information from active_program, but the code works on the assumption that selected_program will be set - and it isn't on my appliance.

I'm not familiar enough with the logic and structure of the integration to understand quite what the distinction between "selected_program" and "active_program" is. In the debug log below, the oven is set to "fan" using the selector on the front panel.

Debug log


2022-06-06 17:51:06 ERROR (MainThread) [custom_components.home_connect_alt.button] {
  "appliances": {
    "NEFF-B5ACH7AH0B-************-001": {
      "name": "Oven",
      "brand": "Neff",
      "vib": "B5ACH7AH0B",
      "connected": true,
      "type": "Oven",
      "enumber": "B5ACH7AH0B/52",
      "haId": "NEFF-B5ACH7AH0B-************-001",
      "uri": "/api/homeappliances/NEFF-B5ACH7AH0B-************-001",
      "available_programs": {
        "Cooking.Oven.Program.HeatingMode.PreHeating": {
          "key": "Cooking.Oven.Program.HeatingMode.PreHeating",
          "name": "Preheat",
          "options": null,
          "execution": "selectandstart",
          "active": false
        },
        "Cooking.Oven.Program.HeatingMode.PizzaSetting": {
          "key": "Cooking.Oven.Program.HeatingMode.PizzaSetting",
          "name": "Circotherm intensive",
          "options": null,
          "execution": "selectandstart",
          "active": false
        },
        "Cooking.Oven.Program.HeatingMode.BottomHeating": {
          "key": "Cooking.Oven.Program.HeatingMode.BottomHeating",
          "name": "Bottom heating",
          "options": null,
          "execution": "selectandstart",
          "active": false
        },
        "Cooking.Oven.Program.HeatingMode.HotAirGrilling": {
          "key": "Cooking.Oven.Program.HeatingMode.HotAirGrilling",
          "name": "Circo-roasting",
          "options": null,
          "execution": "selectandstart",
          "active": false
        },
        "Cooking.Oven.Program.HeatingMode.TopBottomHeating": {
          "key": "Cooking.Oven.Program.HeatingMode.TopBottomHeating",
          "name": "Top/bottom heating",
          "options": null,
          "execution": "selectandstart",
          "active": false
        },
        "Cooking.Oven.Program.HeatingMode.HotAir": {
          "key": "Cooking.Oven.Program.HeatingMode.HotAir",
          "name": "3D hot air",
          "options": {},
          "execution": "selectandstart",
          "active": false
        }
      },
      "active_program": {
        "key": "Cooking.Oven.Program.HeatingMode.HotAir",
        "name": "3D hot air",
        "options": {
          "Cooking.Oven.Option.SetpointTemperature": {
            "key": "Cooking.Oven.Option.SetpointTemperature",
            "value": 160,
            "type": null,
            "name": "Target temperature for the cavity",
            "unit": "\u00b0C",
            "displayvalue": null,
            "min": null,
            "max": null,
            "stepsize": null,
            "allowedvalues": null,
            "execution": null
          },
          "Cooking.Oven.Option.HeatupProgress": {
            "key": "Cooking.Oven.Option.HeatupProgress",
            "value": 0,
            "type": null,
            "name": "Heatup progress",
            "unit": "%",
            "displayvalue": null,
            "min": null,
            "max": null,
            "stepsize": null,
            "allowedvalues": null,
            "execution": null
          },
          "Cooking.Oven.Option.FastPreHeat": {
            "key": "Cooking.Oven.Option.FastPreHeat",
            "value": false,
            "type": null,
            "name": "Rapid heating",
            "unit": null,
            "displayvalue": null,
            "min": null,
            "max": null,
            "stepsize": null,
            "allowedvalues": null,
            "execution": null
          },
          "BSH.Common.Option.ProgramProgress": {
            "key": "BSH.Common.Option.ProgramProgress",
            "value": 0,
            "type": null,
            "name": "Current programme progress",
            "unit": "%",
            "displayvalue": null,
            "min": null,
            "max": null,
            "stepsize": null,
            "allowedvalues": null,
            "execution": null
          },
          "BSH.Common.Option.ElapsedProgramTime": {
            "key": "BSH.Common.Option.ElapsedProgramTime",
            "value": 108,
            "type": null,
            "name": "Programme running time",
            "unit": "seconds",
            "displayvalue": null,
            "min": null,
            "max": null,
            "stepsize": null,
            "allowedvalues": null,
            "execution": null
          },
          "Cooking.Oven.Option.CavitySelector": {
            "key": "Cooking.Oven.Option.CavitySelector",
            "value": "Cooking.Oven.EnumType.CavitySelector.Main",
            "type": null,
            "name": null,
            "unit": null,
            "displayvalue": "Cavity",
            "min": null,
            "max": null,
            "stepsize": null,
            "allowedvalues": null,
            "execution": null
          }
        },
        "execution": null,
        "active": false
      },
      "selected_program": null,
      "status": {
        "BSH.Common.Status.OperationState": {
          "key": "BSH.Common.Status.OperationState",
          "value": "BSH.Common.EnumType.OperationState.Run",
          "name": "Operation state",
          "displayvalue": "Running"
        },
        "BSH.Common.Status.LocalControlActive": {
          "key": "BSH.Common.Status.LocalControlActive",
          "value": true,
          "name": "Local operation active",
          "displayvalue": null
        },
        "BSH.Common.Status.DoorState": {
          "key": "BSH.Common.Status.DoorState",
          "value": "BSH.Common.EnumType.DoorState.Closed",
          "name": "Door",
          "displayvalue": "Closed"
        },
        "BSH.Common.Status.RemoteControlStartAllowed": {
          "key": "BSH.Common.Status.RemoteControlStartAllowed",
          "value": false,
          "name": "Remote Start",
          "displayvalue": null
        },
        "BSH.Common.Status.RemoteControlActive": {
          "key": "BSH.Common.Status.RemoteControlActive",
          "value": false,
          "name": "Remote Control",
          "displayvalue": null
        },
        "Cooking.Oven.Status.CurrentCavityTemperature": {
          "key": "Cooking.Oven.Status.CurrentCavityTemperature",
          "value": 121,
          "name": null,
          "displayvalue": null
        }
      },
      "settings": {
        "BSH.Common.Setting.ChildLock": {
          "key": "BSH.Common.Setting.ChildLock",
          "value": false,
          "type": "Boolean",
          "name": "Childproof lock",
          "unit": null,
          "displayvalue": null,
          "min": null,
          "max": null,
          "stepsize": null,
          "allowedvalues": null,
          "execution": null
        },
        "BSH.Common.Setting.PowerState": {
          "key": "BSH.Common.Setting.PowerState",
          "value": "BSH.Common.EnumType.PowerState.Standby",
          "type": "BSH.Common.EnumType.PowerState",
          "name": "Power status",
          "unit": null,
          "displayvalue": "Standby",
          "min": null,
          "max": null,
          "stepsize": null,
          "allowedvalues": [
            "BSH.Common.EnumType.PowerState.On",
            "BSH.Common.EnumType.PowerState.Standby"
          ],
          "execution": null
        },
        "Cooking.Oven.Setting.SabbathMode": {
          "key": "Cooking.Oven.Setting.SabbathMode",
          "value": false,
          "type": "Boolean",
          "name": "Sabbath mode",
          "unit": null,
          "displayvalue": null,
          "min": null,
          "max": null,
          "stepsize": null,
          "allowedvalues": null,
          "execution": null
        },
        "BSH.Common.Setting.AlarmClock": {
          "key": "BSH.Common.Setting.AlarmClock",
          "value": 0,
          "type": "Int",
          "name": "Alarm",
          "unit": "seconds",
          "displayvalue": null,
          "min": null,
          "max": null,
          "stepsize": null,
          "allowedvalues": null,
          "execution": null
        }
      },
      "commands": {},
      "start_options": null
    }
  }
}


Cooker Hood - Failed to set the selected program: Program can currently not be written

When I select a cooker hood program it doesn't seem to work. The cooker hood is connected to WiFi and visible on the Home Connect App and this integration can turn it on/off as well as the light on/off but I cannot select a program

Configuration

2022-06-02 21:57:54 DEBUG (MainThread) [home_connect_async.homeconnect] Received event from SSE stream: MessageEvent(type='KEEP-ALIVE', message='KEEP-ALIVE', data='', origin='https://api.home-connect.com', last_event_id='BOSCH-DWK98PR60B-68A40E691C39')
2022-06-02 21:58:10 DEBUG (MainThread) [home_connect_async.appliance] Calling /api/homeappliances/BOSCH-DWK98PR60B-68A40E691C39/programs/selected with:
{
  "data": {
    "key": "Cooking.Common.Program.Hood.Automatic",
    "options": []
  }
}
2022-06-02 21:58:10 DEBUG (MainThread) [home_connect_async.api] HTTP put /api/homeappliances/BOSCH-DWK98PR60B-68A40E691C39/programs/selected (code=409  count=46)
2022-06-02 21:58:10 DEBUG (MainThread) [home_connect_async.api] API call failed with code=409 error=SDK.Error.ProgramNotWritable
2022-06-02 21:58:10 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140460186318448] Failed to set the selected program: Program can currently not be written (409 - None=Cooking.Common.Program.Hood.Automatic)
Traceback (most recent call last):
  File "/config/custom_components/home_connect_alt/select.py", line 102, in async_select_option
    await self._appliance.async_select_program(key=option)
  File "/usr/local/lib/python3.9/site-packages/home_connect_async/appliance.py", line 219, in async_select_program
    res = await self._async_set_program(key, options, 'selected')
  File "/usr/local/lib/python3.9/site-packages/home_connect_async/appliance.py", line 368, in _async_set_program
    raise HomeConnectError(response.error_description, response=response)
home_connect_async.common.HomeConnectError: ('Program can currently not be written', None, 'SDK.Error.ProgramNotWritable', 'Program can currently not be written', None)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 193, in handle_call_service
    await hass.services.async_call(
  File "/usr/src/homeassistant/homeassistant/core.py", line 1704, in async_call
    task.result()
  File "/usr/src/homeassistant/homeassistant/core.py", line 1741, in _execute_service
    await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 204, in handle_service
    await service.entity_service_call(
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 680, in entity_service_call
    future.result()  # pop exception if have
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 964, in async_request_call
    await coro
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 717, in _handle_entity_call
    await result
  File "/usr/src/homeassistant/homeassistant/components/select/__init__.py", line 54, in async_select_option
    await entity.async_select_option(option)
  File "/config/custom_components/home_connect_alt/select.py", line 105, in async_select_option
    raise HomeAssistantError(f"Failed to set the selected program: {ex.error_description} ({ex.code} - {self._key}={option})")
homeassistant.exceptions.HomeAssistantError: Failed to set the selected program: Program can currently not be written (409 - None=Cooking.Common.Program.Hood.Automatic)
2022-06-02 21:58:12 DEBUG (MainThread) [home_connect_async.appliance] Calling /api/homeappliances/BOSCH-DWK98PR60B-68A40E691C39/programs/selected with:
{
  "data": {
    "key": "Cooking.Common.Program.Hood.Venting",
    "options": []
  }
}
2022-06-02 21:58:12 DEBUG (MainThread) [home_connect_async.api] HTTP put /api/homeappliances/BOSCH-DWK98PR60B-68A40E691C39/programs/selected (code=409  count=47)
2022-06-02 21:58:12 DEBUG (MainThread) [home_connect_async.api] API call failed with code=409 error=SDK.Error.ProgramNotWritable
2022-06-02 21:58:12 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140460186318448] Failed to set the selected program: Program can currently not be written (409 - None=Cooking.Common.Program.Hood.Venting)
Traceback (most recent call last):
  File "/config/custom_components/home_connect_alt/select.py", line 102, in async_select_option
    await self._appliance.async_select_program(key=option)
  File "/usr/local/lib/python3.9/site-packages/home_connect_async/appliance.py", line 219, in async_select_program
    res = await self._async_set_program(key, options, 'selected')
  File "/usr/local/lib/python3.9/site-packages/home_connect_async/appliance.py", line 368, in _async_set_program
    raise HomeConnectError(response.error_description, response=response)
home_connect_async.common.HomeConnectError: ('Program can currently not be written', None, 'SDK.Error.ProgramNotWritable', 'Program can currently not be written', None)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 193, in handle_call_service
    await hass.services.async_call(
  File "/usr/src/homeassistant/homeassistant/core.py", line 1704, in async_call
    task.result()
  File "/usr/src/homeassistant/homeassistant/core.py", line 1741, in _execute_service
    await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 204, in handle_service
    await service.entity_service_call(
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 680, in entity_service_call
    future.result()  # pop exception if have
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 964, in async_request_call
    await coro
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 717, in _handle_entity_call
    await result
  File "/usr/src/homeassistant/homeassistant/components/select/__init__.py", line 54, in async_select_option
    await entity.async_select_option(option)
  File "/config/custom_components/home_connect_alt/select.py", line 105, in async_select_option
    raise HomeAssistantError(f"Failed to set the selected program: {ex.error_description} ({ex.code} - {self._key}={option})")
homeassistant.exceptions.HomeAssistantError: Failed to set the selected program: Program can currently not be written (409 - None=Cooking.Common.Program.Hood.Venting)
2022-06-02 21:58:14 DEBUG (MainThread) [home_connect_async.appliance] Calling /api/homeappliances/BOSCH-DWK98PR60B-68A40E691C39/programs/selected with:
{
  "data": {
    "key": "Cooking.Common.Program.Hood.DelayedShutOff",
    "options": []
  }
}
2022-06-02 21:58:14 DEBUG (MainThread) [home_connect_async.api] HTTP put /api/homeappliances/BOSCH-DWK98PR60B-68A40E691C39/programs/selected (code=409  count=48)
2022-06-02 21:58:14 DEBUG (MainThread) [home_connect_async.api] API call failed with code=409 error=SDK.Error.ProgramNotWritable
2022-06-02 21:58:14 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140460186318448] Failed to set the selected program: Program can currently not be written (409 - None=Cooking.Common.Program.Hood.DelayedShutOff)
Traceback (most recent call last):
  File "/config/custom_components/home_connect_alt/select.py", line 102, in async_select_option
    await self._appliance.async_select_program(key=option)
  File "/usr/local/lib/python3.9/site-packages/home_connect_async/appliance.py", line 219, in async_select_program
    res = await self._async_set_program(key, options, 'selected')
  File "/usr/local/lib/python3.9/site-packages/home_connect_async/appliance.py", line 368, in _async_set_program
    raise HomeConnectError(response.error_description, response=response)
home_connect_async.common.HomeConnectError: ('Program can currently not be written', None, 'SDK.Error.ProgramNotWritable', 'Program can currently not be written', None)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 193, in handle_call_service
    await hass.services.async_call(
  File "/usr/src/homeassistant/homeassistant/core.py", line 1704, in async_call
    task.result()
  File "/usr/src/homeassistant/homeassistant/core.py", line 1741, in _execute_service
    await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 204, in handle_service
    await service.entity_service_call(
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 680, in entity_service_call
    future.result()  # pop exception if have
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 964, in async_request_call
    await coro
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 717, in _handle_entity_call
    await result
  File "/usr/src/homeassistant/homeassistant/components/select/__init__.py", line 54, in async_select_option
    await entity.async_select_option(option)
  File "/config/custom_components/home_connect_alt/select.py", line 105, in async_select_option
    raise HomeAssistantError(f"Failed to set the selected program: {ex.error_description} ({ex.code} - {self._key}={option})")
homeassistant.exceptions.HomeAssistantError: Failed to set the selected program: Program can currently not be written (409 - None=Cooking.Common.Program.Hood.DelayedShutOff)

If I select the programs in the Home Connect App I get the following in the log files

2022-06-02 22:03:09 DEBUG (MainThread) [home_connect_async.homeconnect] Received event from SSE stream: MessageEvent(type='NOTIFY', message='NOTIFY', data='{"items":[{"timestamp":1654203789,"handling":"none","uri":"/api/homeappliances/BOSCH-DWK98PR60B-68A40E691C39/settings/BSH.Common.Setting.PowerState","key":"BSH.Common.Setting.PowerState","value":"BSH.Common.EnumType.PowerState.On","level":"hint"},{"timestamp":1654203789,"handling":"none","uri":"/api/homeappliances/BOSCH-DWK98PR60B-68A40E691C39/programs/active","key":"BSH.Common.Root.ActiveProgram","value":"Cooking.Common.Program.Hood.Automatic","level":"hint"},{"timestamp":1654203789,"handling":"none","uri":"/api/homeappliances/BOSCH-DWK98PR60B-68A40E691C39/programs/active/options/Cooking.Common.Option.Hood.VentingLevel","key":"Cooking.Common.Option.Hood.VentingLevel","value":"Cooking.Hood.EnumType.Stage.FanStage01","level":"hint"},{"timestamp":1654203789,"handling":"none","uri":"/api/homeappliances/BOSCH-DWK98PR60B-68A40E691C39/programs/active/options/Cooking.Common.Option.Hood.IntensiveLevel","key":"Cooking.Common.Option.Hood.IntensiveLevel","value":"Cooking.Hood.EnumType.IntensiveStage.IntensiveStageOff","level":"hint"},{"timestamp":1654203789,"handling":"none","uri":"/api/homeappliances/BOSCH-DWK98PR60B-68A40E691C39/programs/active/options/BSH.Common.Option.ElapsedProgramTime","key":"BSH.Common.Option.ElapsedProgramTime","unit":"seconds","value":0,"level":"hint"}],"haId":"BOSCH-DWK98PR60B-68A40E691C39"}', origin='https://api.home-connect.com', last_event_id='BOSCH-DWK98PR60B-68A40E691C39')
2022-06-02 22:03:09 DEBUG (MainThread) [home_connect_async.callback_registery] Broadcasting event: BSH.Common.Setting.PowerState = BSH.Common.EnumType.PowerState.On
2022-06-02 22:03:09 DEBUG (MainThread) [home_connect_async.api] HTTP get /api/homeappliances/BOSCH-DWK98PR60B-68A40E691C39/programs/active (code=200  count=76)
2022-06-02 22:03:09 DEBUG (MainThread) [home_connect_async.appliance] Loaded 4 Options for active/Cooking.Common.Program.Hood.Automatic
2022-06-02 22:03:09 DEBUG (MainThread) [home_connect_async.appliance] Loaded data for active Program
2022-06-02 22:03:09 DEBUG (MainThread) [home_connect_async.api] HTTP get /api/homeappliances/BOSCH-DWK98PR60B-68A40E691C39/commands (code=200  count=77)
2022-06-02 22:03:09 DEBUG (MainThread) [home_connect_async.appliance] Loaded 0 Commands
2022-06-02 22:03:09 DEBUG (MainThread) [home_connect_async.callback_registery] Broadcasting event: Events.PROGRAM_STARTED = None
2022-06-02 22:03:09 DEBUG (MainThread) [home_connect_async.callback_registery] Broadcasting event: Events.DATA_CHANGED = None
2022-06-02 22:03:09 DEBUG (MainThread) [home_connect_async.callback_registery] Broadcasting event: BSH.Common.Root.ActiveProgram = Cooking.Common.Program.Hood.Automatic
2022-06-02 22:03:09 DEBUG (MainThread) [home_connect_async.callback_registery] Broadcasting event: Cooking.Common.Option.Hood.VentingLevel = Cooking.Hood.EnumType.Stage.FanStage01
2022-06-02 22:03:09 DEBUG (MainThread) [home_connect_async.callback_registery] Broadcasting event: Cooking.Common.Option.Hood.IntensiveLevel = Cooking.Hood.EnumType.IntensiveStage.IntensiveStageOff
2022-06-02 22:03:09 DEBUG (MainThread) [home_connect_async.callback_registery] Broadcasting event: BSH.Common.Option.ElapsedProgramTime = 0
2022-06-02 22:03:09 DEBUG (MainThread) [home_connect_async.homeconnect] Received event from SSE stream: MessageEvent(type='STATUS', message='STATUS', data='{"items":[{"timestamp":1654203789,"handling":"none","uri":"/api/homeappliances/BOSCH-DWK98PR60B-68A40E691C39/status/BSH.Common.Status.OperationState","key":"BSH.Common.Status.OperationState","value":"BSH.Common.EnumType.OperationState.Run","level":"hint"}],"haId":"BOSCH-DWK98PR60B-68A40E691C39"}', origin='https://api.home-connect.com', last_event_id='BOSCH-DWK98PR60B-68A40E691C39')
2022-06-02 22:03:09 DEBUG (MainThread) [home_connect_async.appliance] Starting to load appliance data for Hood (BOSCH-DWK98PR60B-68A40E691C39)
2022-06-02 22:03:09 DEBUG (MainThread) [home_connect_async.api] HTTP get /api/homeappliances/BOSCH-DWK98PR60B-68A40E691C39/programs/selected (code=404  count=78)
2022-06-02 22:03:09 DEBUG (MainThread) [home_connect_async.api] API call failed with code=404 error=SDK.Error.NoProgramSelected
2022-06-02 22:03:09 DEBUG (MainThread) [home_connect_async.appliance] Failed to load selected programs with error code=404 key=SDK.Error.NoProgramSelected
2022-06-02 22:03:09 DEBUG (MainThread) [home_connect_async.api] HTTP get /api/homeappliances/BOSCH-DWK98PR60B-68A40E691C39/programs/active (code=200  count=79)
2022-06-02 22:03:09 DEBUG (MainThread) [home_connect_async.appliance] Loaded 4 Options for active/Cooking.Common.Program.Hood.Automatic
2022-06-02 22:03:09 DEBUG (MainThread) [home_connect_async.appliance] Loaded data for active Program
2022-06-02 22:03:09 DEBUG (MainThread) [home_connect_async.api] HTTP get /api/homeappliances/BOSCH-DWK98PR60B-68A40E691C39/settings (code=200  count=80)
2022-06-02 22:03:09 DEBUG (MainThread) [home_connect_async.api] HTTP get /api/homeappliances/BOSCH-DWK98PR60B-68A40E691C39/settings/BSH.Common.Setting.PowerState (code=200  count=81)
2022-06-02 22:03:09 DEBUG (MainThread) [home_connect_async.api] HTTP get /api/homeappliances/BOSCH-DWK98PR60B-68A40E691C39/settings/Cooking.Common.Setting.Lighting (code=200  count=82)
2022-06-02 22:03:09 DEBUG (MainThread) [home_connect_async.api] HTTP get /api/homeappliances/BOSCH-DWK98PR60B-68A40E691C39/settings/Cooking.Common.Setting.LightingBrightness (code=200  count=83)
2022-06-02 22:03:09 DEBUG (MainThread) [home_connect_async.appliance] Loaded 3 Settings
2022-06-02 22:03:09 DEBUG (MainThread) [home_connect_async.api] HTTP get /api/homeappliances/BOSCH-DWK98PR60B-68A40E691C39/status (code=200  count=84)
2022-06-02 22:03:09 DEBUG (MainThread) [home_connect_async.appliance] Loaded 4 Statuses
2022-06-02 22:03:09 DEBUG (MainThread) [home_connect_async.api] HTTP get /api/homeappliances/BOSCH-DWK98PR60B-68A40E691C39/commands (code=200  count=85)
2022-06-02 22:03:09 DEBUG (MainThread) [home_connect_async.appliance] Loaded 0 Commands
2022-06-02 22:03:09 DEBUG (MainThread) [home_connect_async.api] HTTP get /api/homeappliances/BOSCH-DWK98PR60B-68A40E691C39/programs/available (code=200  count=86)
2022-06-02 22:03:09 DEBUG (MainThread) [home_connect_async.api] HTTP get /api/homeappliances/BOSCH-DWK98PR60B-68A40E691C39/programs/available/Cooking.Common.Program.Hood.Automatic (code=200  count=87)
2022-06-02 22:03:09 DEBUG (MainThread) [home_connect_async.appliance] Loaded 0 Options for available/Cooking.Common.Program.Hood.Automatic
2022-06-02 22:03:09 DEBUG (MainThread) [home_connect_async.appliance] Loaded 3 available Programs
2022-06-02 22:03:09 DEBUG (MainThread) [home_connect_async.appliance] Finished loading appliance data for Hood (BOSCH-DWK98PR60B-68A40E691C39)
2022-06-02 22:03:09 DEBUG (MainThread) [home_connect_async.callback_registery] Broadcasting event: Events.DATA_CHANGED = None
2022-06-02 22:03:09 DEBUG (MainThread) [home_connect_async.callback_registery] Broadcasting event: Events.DATA_CHANGED = None
2022-06-02 22:03:09 DEBUG (MainThread) [home_connect_async.callback_registery] Broadcasting event: BSH.Common.Status.OperationState = BSH.Common.EnumType.OperationState.Run
2022-06-02 22:03:09 DEBUG (MainThread) [custom_components.home_connect_alt] Published event to Home Assistant event bus: BSH.Common.Status.OperationState = BSH.Common.EnumType.OperationState.Run
2022-06-02 22:03:12 DEBUG (MainThread) [home_connect_async.homeconnect] Received event from SSE stream: MessageEvent(type='NOTIFY', message='NOTIFY', data='{"items":[{"timestamp":1654203792,"handling":"none","uri":"/api/homeappliances/BOSCH-DWK98PR60B-68A40E691C39/programs/active/options/Cooking.Common.Option.Hood.VentingLevel","key":"Cooking.Common.Option.Hood.VentingLevel","value":"Cooking.Hood.EnumType.Stage.FanOff","level":"hint"},{"timestamp":1654203792,"handling":"none","uri":"/api/homeappliances/BOSCH-DWK98PR60B-68A40E691C39/programs/active/options/Cooking.Common.Option.Hood.IntensiveLevel","key":"Cooking.Common.Option.Hood.IntensiveLevel","value":"Cooking.Hood.EnumType.IntensiveStage.IntensiveStage2","level":"hint"},{"timestamp":1654203792,"handling":"none","uri":"/api/homeappliances/BOSCH-DWK98PR60B-68A40E691C39/programs/active/options/BSH.Common.Option.ElapsedProgramTime","key":"BSH.Common.Option.ElapsedProgramTime","unit":"seconds","value":3,"level":"hint"}],"haId":"BOSCH-DWK98PR60B-68A40E691C39"}', origin='https://api.home-connect.com', last_event_id='BOSCH-DWK98PR60B-68A40E691C39')
2022-06-02 22:03:12 DEBUG (MainThread) [home_connect_async.callback_registery] Broadcasting event: Cooking.Common.Option.Hood.VentingLevel = Cooking.Hood.EnumType.Stage.FanOff
2022-06-02 22:03:12 DEBUG (MainThread) [home_connect_async.callback_registery] Broadcasting event: Cooking.Common.Option.Hood.IntensiveLevel = Cooking.Hood.EnumType.IntensiveStage.IntensiveStage2
2022-06-02 22:03:12 DEBUG (MainThread) [home_connect_async.callback_registery] Broadcasting event: BSH.Common.Option.ElapsedProgramTime = 3

Idea / Request: handle two HC apps

I have 4 devices which I monitor with the integration. Unfortunately, I am blocked almost every day due to reaching the 1000 API calls.

As a workaround, would it not be possible to switch the integration to another HC app (with its own client ID and secret) on a time-controlled basis (e.g. at midday) and thus have 2 x 1000 calls?

But that is really just a thought. I have no idea whether this is possible at all.

Greetings, Carsten

Translations into Polish (Poland)

@ekutner great job thank you.
Please add Polish (pl) to your translations. Below are the translations for the bosch dishwasher and oven.

"Cooking.Oven.Program.HeatingMode.SlowCook": "Powolne gotowanie"
"Cooking.Oven.Program.HeatingMode.HotAir": "4D Gorące powietrze"
"Cooking.Oven.Program.HeatingMode.TopBottomHeating": "Grzanie górne/dolne"
"Cooking.Oven.Program.HeatingMode.HotAirEco": "Gorące powietrze eco"
"Cooking.Oven.Program.HeatingMode.TopBottomHeatingEco": "Grzanie górne/dolne eco"
"Cooking.Oven.Program.HeatingMode.HotAirGrilling": "Grilowanie z termoobiegiem"
"Cooking.Oven.Program.HeatingMode.PizzaSetting": "Pizza"
"Cooking.Oven.Program.HeatingMode.IntensiveHeat": "Grzanie intensywne"
"Cooking.Oven.Program.HeatingMode.BottomHeating": "Grzanie dolne"
"Cooking.Oven.Program.HeatingMode.PreheatOvenware": "Podgrzewanie naczyń"
"Cooking.Oven.Program.HeatingMode.Desiccation": "Suszenie"
"Cooking.Oven.Program.HeatingMode.KeepWarm": "Utrzymywanie ciepła potraw"
"Cooking.Oven.EnumType.AddedSteam.Off": "Włączone"
"Cooking.Oven.EnumType.AddedSteam.On": "Wyłączone"
"Dishcare.Dishwasher.Program.Intensiv70": "Intensywny 70°C"
"Dishcare.Dishwasher.Program.Auto2": "Auto 45-65°C"
"Dishcare.Dishwasher.Program.Eco50": "Eco 50°C"
"Dishcare.Dishwasher.Program.Glas40": "Szkło 40°C"
"Dishcare.Dishwasher.Program.Quick45": "Szybki 45°C"
"Dishcare.Dishwasher.Program.PreRinse": "Płukanie wstępne"
"Dishcare.Dishwasher.Program.NightWash": "Nocny 50°C"
"Dishcare.Dishwasher.Program.Kurz60": "Szybki 60°C"
"Dishcare.Dishwasher.Program.MachineCare": "Czyszczenie zmywarki"
"BSH.Common.Root.SelectedProgram": "Wybierz program",
"BSH.Common.Root.ActiveProgram": "Aktywny Program",
"BSH.Common.Option.Duration": "Czas trwania",
"BSH.Common.EnumType.OperationState.Run": "W trakcie"
"BSH.Common.EnumType.OperationState.Ready": "Gotowy"
"BSH.Common.EnumType.OperationState.Finished": "Zakończony"
"BSH.Common.EnumType.OperationState.Inactive": "Nieaktywny"
"BSH.Common.EnumType.PowerState.Off": "Wyłączony"
"BSH.Common.EnumType.PowerState.On": "Włączony"
"BSH.Common.EnumType.PowerState.Standby": "Wyłączony"

Regards

Changing temperature on oven

Maybe I missed it.. but..

is there a way I can actually set the temp on my siemens oven?
I can turn it on.. I can choose a program.. but not set a specific temperature.

it should be available through the API:

https://api-docs.home-connect.com/programs-and-options?#oven_setpoint-temperature-option

so if it's not part of the HC alt. integration - I'd like to suggest it :-)

I have dishes where I need to change temperatures during cooking.. that'd be wonderful if I could automate.

unauthorized_client - request rejected by client authorization authority (developer portal)

I created a new application in Home Connect Dev Portal.
Added hc alt to my config and secrets yaml
reload ha
tried to add the alt intergration

it open a new tab then and i get following error:

{
"error": "unauthorized_client",
"error_description": "request rejected by client authorization authority (developer portal)",
"state": "randomChars"
}

Version of the custom_component

0.4.5

Configuration

logger:
  default: warn
  logs:
    home_connect_async: debug
    home_connect_alt: debug
    custom_components.home_connect_alt: debug
home_connect:
  client_id: !secret siemensid
  client_secret: !secret siemenssecret
home_connect_alt:
  client_id: !secret siemensidalt
  client_secret: !secret siemenssecretalt

Debug log


Beside the warning about custom integration there is nothing related

2022-05-23 07:26:07 WARNING (SyncWorker_6) [homeassistant.loader] We found a custom integration home_connect_alt which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant


Connection lost

This integration also doesn't refresh while the home connect app can show the state of the Bosch device.
It worked well for a few days.

Ver. 0.4.9

Configuration

Standard made by the integration

Add your logs here.
{ "appliances": {} }
11:50:54 – (ERROR) Home Connect Alt (custom integration)

I've found nothing in the logs regarding the integration

Edit 07.06.

Logger: custom_components.home_connect_alt.button
Source: custom_components/home_connect_alt/button.py:237
Integration: Home Connect Alt (documentation, issues)
First occurred: 19:25:30 (1 occurrences)
Last logged: 19:25:30

{ "appliances": {} }

Describe the bug

Undefined message during integration setup

Version of the custom_component

0.4.4

Describe the bug

During integration setup, the key of a message is displayed, instead of the actual message. Maybe some lookup function needs to be used?

home connect integration bug

Finishinrelative time for washing machines and dryers

Love this new integration for home_connect appliances.

I have a dryer and washing machine and due to the limitations of these appliances, options need to be specified when starting a program rather than selecting a program. The Select service allows options to be specified but the Start program service doesn't.

Example would be finishinrelative xxx seconds. API details https://api-docs.home-connect.com/programs-and-options?#washer_finish-in-relative-option

Perhaps start in relative should be a number rather than just a sensor, and the start program service references the finish in relative number?

My use case is I have a time of day electricity tariff and I tend to set start in relative using the other integration so these machines run at the cheapest electricity time.

Program progress sensor is returning a string

Version of the custom_component

0.5.2

Describe the bug

"Program progress" sensor is returning the percentage as a string and not as numeric values, hence it shows as a bar in history browser instead of graph.

Request

Hi, i have a BOSCH dishwasher.
Is it possible to change "select" to a switch to power on & off?

select.010100522145000977_bsh_common_setting_powerstate

Questions, comments, discussions - where?

I'm pretty new to this integration, but I think it's got a lot of great features and also some good potential based on the way it has been built. However, I'm struggling to understand some aspects of how it works and why it's the way it is. It seems like a big hassle for the developer if I open a new issue with every question, comment or suggestion I might have. It fills the open issue list with noise and to be sure will start to irritate people.

Personally, I could go and read the code and probably, eventually figure out the "how?" of my questions, but that probably would not address the "why?" - have my questions been asked before? is there a good reason it's the way it is? is it historical baggage? is a change in the pipeline... etc. I can't be the only one.

So, this is the context of my asking - is there somewhere we can discuss this integration? I thought of the Home Assistant forum, but it's quite noisy and hard to find what you're looking for. HA has a discord server but, right now I don't use discord (although of course I could). Perhaps, if there is nothing else, this issue could remain and be used as a discussion jumping off point?

Mainly, this is up to you @ekutner - or would you prefer to just not have this kind of thing? I've been on the receiving end of issue tracking systems and it can be demoralising if all you ever see is people asking about stuff they think doesn't work.

I'll leave it at that for now and see what people think although, as I say, I have a bunch of questions lined up....

TIA

Not an issue but a request

Variables of for example: "selected program" is showing a long variable as answer. For example:
"Dishcare.Dishwasher.Program.Auto2"
I like to show the values in my automation. In this case Auto 2.
Now I need to do a string handling to achieve this
Is this possible to change in only the activity?
Or create an attribute with that value?

(By the way, nice integration, it looks like more reliable!!)

Control with Alexa

The input.select for the programs and the button entities are really nice and clean. This is working well inside Home Assistant.
But there is no chance to control the device with Alexa.
Could you also add switches for on/off and the programs? So we can use the input.select and button with Home Assistant and can use the switches to control the device with Alexa.

Cooking.Oven.Program.HeatingMode.PreHeating Not working

I am using 0.7.0-b10 of the integration

When I use the "Home Connect Alt: Start Program service"

with the following data

data:
  device_id: dummyid
  program_key: Cooking.Oven.Program.HeatingMode.PreHeating
  options:
    - key: Cooking.Oven.Option.SetpointTemperature
      value: 200
    - key: BSH.Common.Option.Duration
      value: 6000

I get the below error message

2022-06-21 20:09:18 WARNING (MainThread) [home_connect_async.appliance] The selected program in not one of the available programs (not supported by the API)
2022-06-21 20:09:18 ERROR (MainThread) [homeassistant.components.script.oven_preheating] Oven PreHeating: Choose at step 1: choice 1: Error executing script. Error for call_service at pos 1: The specified program in not one of the available programs (not supported by the API)
2022-06-21 20:09:18 ERROR (MainThread) [homeassistant.components.script.oven_preheating] Oven PreHeating: Error executing script. Error for choose at pos 1: The specified program in not one of the available programs (not supported by the API)
2022-06-21 20:09:18 ERROR (MainThread) [homeassistant.components.script.oven_pizza2] Oven Pizza 2: Error executing script. Error for call_service at pos 1: The specified program in not one of the available programs (not supported by the API)
2022-06-21 20:09:18 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140161139232480] The specified program in not one of the available programs (not supported by the API)
Traceback (most recent call last):
  File "/config/custom_components/home_connect_alt/services.py", line 35, in async_start_program
    await appliance.async_start_program(program_key, options)
  File "/usr/local/lib/python3.9/site-packages/home_connect_async/appliance.py", line 320, in async_start_program
    raise HomeConnectError("The specified program in not one of the available programs (not supported by the API)")
home_connect_async.common.HomeConnectError: ('The specified program in not one of the available programs (not supported by the API)', None, None, None, None)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 193, in handle_call_service
    await hass.services.async_call(
  File "/usr/src/homeassistant/homeassistant/core.py", line 1704, in async_call
    task.result()
  File "/usr/src/homeassistant/homeassistant/core.py", line 1741, in _execute_service
    await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
  File "/usr/src/homeassistant/homeassistant/components/script/__init__.py", line 290, in service_handler
    await script_entity.async_turn_on(
  File "/usr/src/homeassistant/homeassistant/components/script/__init__.py", line 398, in async_turn_on
    await coro
  File "/usr/src/homeassistant/homeassistant/components/script/__init__.py", line 428, in _async_run
    return await self.script.async_run(script_vars, context)
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 1513, in async_run
    await asyncio.shield(run.async_run())
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 405, in async_run
    await self._async_step(log_exceptions=False)
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 449, in _async_step
    self._handle_exception(
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 472, in _handle_exception
    raise exception
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 447, in _async_step
    await getattr(self, handler)()
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 683, in _async_call_service_step
    await self._async_run_long_action(service_task)
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 644, in _async_run_long_action
    long_task.result()
  File "/usr/src/homeassistant/homeassistant/core.py", line 1704, in async_call
    task.result()
  File "/usr/src/homeassistant/homeassistant/core.py", line 1741, in _execute_service
    await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
  File "/usr/src/homeassistant/homeassistant/components/script/__init__.py", line 290, in service_handler
    await script_entity.async_turn_on(
  File "/usr/src/homeassistant/homeassistant/components/script/__init__.py", line 398, in async_turn_on
    await coro
  File "/usr/src/homeassistant/homeassistant/components/script/__init__.py", line 428, in _async_run
    return await self.script.async_run(script_vars, context)
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 1513, in async_run
    await asyncio.shield(run.async_run())
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 405, in async_run
    await self._async_step(log_exceptions=False)
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 449, in _async_step
    self._handle_exception(
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 472, in _handle_exception
    raise exception
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 447, in _async_step
    await getattr(self, handler)()
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 892, in _async_choose_step
    await self._async_run_script(script)
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 1025, in _async_run_script
    await self._async_run_long_action(
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 644, in _async_run_long_action
    long_task.result()
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 1513, in async_run
    await asyncio.shield(run.async_run())
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 405, in async_run
    await self._async_step(log_exceptions=False)
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 449, in _async_step
    self._handle_exception(
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 472, in _handle_exception
    raise exception
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 447, in _async_step
    await getattr(self, handler)()
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 680, in _async_call_service_step
    await service_task
  File "/usr/src/homeassistant/homeassistant/core.py", line 1704, in async_call
    task.result()
  File "/usr/src/homeassistant/homeassistant/core.py", line 1741, in _execute_service
    await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
  File "/config/custom_components/home_connect_alt/services.py", line 37, in async_start_program
    raise HomeAssistantError(ex.error_description if ex.error_description else ex.msg)
homeassistant.exceptions.HomeAssistantError: The specified program in not one of the available programs (not supported by the API)

I have confirmed the function works via https://apiclient.home-connect.com. I suspect maybe as your integration is only allowing cooking functions support by the device and maybe the preheating mode isn't reported as supported, not sure why, maybe it is a default function supported by all ovens or maybe there is an error with the code used to pull these modes? Let me know if there is any further troubleshooting I can do to assist.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.