Miele@home, miele@mobile component

With the update to Home Assistant 2022.7 the following warnings appeared in the log:

Logger: homeassistant.components.number
Source: components/number/__init__.py:220
Integration: Nummer (documentation, issues)
First occurred: 07:36:35 (1 occurrences)
Last logged: 07:36:35

custom_components.miele.number::MieleNumber 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.

and

Logger: homeassistant.components.number
Source: components/number/__init__.py:152
Integration: Nummer (documentation, issues)
First occurred: 07:36:35 (5 occurrences)
Last logged: 07:36:35

custom_components.miele.number is setting deprecated attributes on an instance of NumberEntityDescription, this is not valid and will be unsupported from Home Assistant 2022.10. Please report it to the custom component author.

Thank you for reporting this. It s just a warning that certain functions will stop working from october 2022. It is already fixed in development and the message will dissapear in next release of the integration.

2 Likes

@astrandb Iā€˜m using your integration for a dishwasher. Power on/off works with HA. But the door state is not reported: always closed. Even when powered on and open. In the Miele App its reported correctly.
Do you have any clues?

Iā€™m having the same issue with my G7316 dishwasher. Door status is always reported to ā€œOFFā€.

Also, the latest version of the Miele@home app can also track consumables (detergent, salt, etc). Anyway of getting this exposed to HA too ?

@neuhausf @MikeQ Please make a diagnostic download from the dishwasher device page. Look for the value of signalDoor. The public API from Miele is only a subset of what they are using internally for the app. E.g. levels for consumables are not exposed in the public API.

Iā€™ve have this component working for a while now for my disherwasher. I just added a new washing machine, it is in the miele app, but not showing up in HA. Do I need to reinstall?

The new device should appear after a restart of HA.

Thanks for the hint. I downloaded the diagnostics from the Miele device. signalDoor is always false. I guess, signalDoor isnā€™t supported for dishwashers at all:

Also I think itā€™s meaning is also different: signalDoor would be true, if a warning about the door is displayed on screen (close door to start program).

My experience is that this capability matrix is incomplete and somewhat incorrect. E.g. statusDoor is handled differently in different models of dishwashers.

I thought I tried that, but maybe second time lucky. It worked. Thanks.

As @astrandb has remarked, the matrix is often incorrect. The API did provide useful signalDoor values at least for some dishwashers (i.e. mine) in the past, but Iā€™ve just checked and it is now always false. This might be a temporary glitch in the API or an intentional change by Miele. Unfortunately, as always they donā€™t provide useful changelogs for the API servers.

Thanks for the additional info. I just wrote Miele and asked them if they could support a useful door-state for dishwashers. Lets see what (or if) they answer :wink:

1 Like

Hi
I am new to HA but have had my Miele API working
But now it suddenly doesnā€™t work anymore
Is there anyone willing to help me get it working
Preferably online
BR Tommy

Please Call *4521431223
Thanks

A few days ago I had to restore my HA from backup because the USB Stick I used crashed after month and HA was ā€œbrokenā€.
Since restoring I am not able to use the Miele Integration any longer ā€¦ :frowning:
I get an error message on every startup of HA (see below).
Any ideas for solving that problem?!

Thanks in advance!!


 This error originated from a custom integration.

Logger: homeassistant.setup
Source: custom_components/miele/miele_at_home.py:174
Integration: miele (documentation, issues)
First occurred: 09:51:24 (1 occurrences)
Last logged: 09:51:24
Error during setup of component miele
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/setup.py", line 235, in _async_setup_component
    result = await task
  File "/config/custom_components/miele/__init__.py", line 419, in async_setup
    data_get_devices = await client.get_devices(lang)
  File "/config/custom_components/miele/miele_at_home.py", line 48, in get_devices
    home_devices = await self._get_devices_raw(lang)
  File "/config/custom_components/miele/miele_at_home.py", line 32, in _get_devices_raw
    if await self._session.refresh_token(self.hass):
  File "/config/custom_components/miele/miele_at_home.py", line 165, in refresh_token
    self._token = await hass.async_add_executor_job(
  File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/miele/miele_at_home.py", line 174, in sync_refresh_token
    return self._session.refresh_token(
  File "/usr/local/lib/python3.9/site-packages/requests_oauthlib/oauth2_session.py", line 452, in refresh_token
    self.token = self._client.parse_request_body_response(r.text, scope=self.scope)
  File "/usr/local/lib/python3.9/site-packages/oauthlib/oauth2/rfc6749/clients/base.py", line 448, in parse_request_body_response
    self.token = parse_token_response(body, scope=scope)
  File "/usr/local/lib/python3.9/site-packages/oauthlib/oauth2/rfc6749/parameters.py", line 441, in parse_token_response
    validate_token_parameters(params)
  File "/usr/local/lib/python3.9/site-packages/oauthlib/oauth2/rfc6749/parameters.py", line 448, in validate_token_parameters
    raise_from_error(params.get('error'), params)
  File "/usr/local/lib/python3.9/site-packages/oauthlib/oauth2/rfc6749/errors.py", line 399, in raise_from_error
    raise cls(**kwargs)
oauthlib.oauth2.rfc6749.errors.InvalidGrantError: (invalid_grant) 

Shut down HA and delete the file ā€˜.miele-token-cacheā€™ in the ā€˜.storageā€™ directory.
Then restart HA and enter your Miele credentials.

1 Like

Great - That fixed it!! Thanks!! :slight_smile:

Hi All,

After update a few things in Home Assistant my Miele intergration donā€™t work anymore. I have restart, uninstalled and installed it again. Anyone have a solution?

Schermafbeelding 2022-08-05 090049

Without seeing the error logs, no one will be able to help you.

After looking in Home Assistant I have found the problemā€¦

For the people with the same problem:

In entities there is a new way to link your account. When a account is not linked there is an enititie created ā€˜Miele connectā€™. Click on this and then settings. From here you must klik the first option, login with your Miele account and when done klik on ā€˜Authorizeā€™.

Iā€™m having trouble with the new integration on 2022.6.6

2022-08-07 09:26:00 ERROR (MainThread) [homeassistant.setup] Error during setup of component miele
File "/config/custom_components/miele/__init__.py", line 152, in async_setup
File "/config/custom_components/miele/miele_at_home.py", line 48, in get_devices
File "/config/custom_components/miele/miele_at_home.py", line 32, in _get_devices_raw
File "/config/custom_components/miele/miele_at_home.py", line 165, in refresh_token
File "/config/custom_components/miele/miele_at_home.py", line 174, in sync_refresh_token

Iā€™ve tried deleting the existing entities, removing the integration entirely, deleting the token cache and reinstalling and it still pops up with this error. Any ideas?

EDIT: ok answered above. Need the different repo: https://github.com/astrandb/miele