Miele@home, miele@mobile component

Hello mate i have same problem.
Do u find any clue for this?

Hello i have all sensors running but sensor for energy consumption and water consumption don’t work. Any clue how to fix that??

Most likely, the API does not provide that information for your device. (Support is really spotty and unpredictable, i.e. even some latest generation devices don’t show the consumption data.)

After update to 2023.5, the component stops working.

Fix:

In /config/custom_components/miele/ the file sensor.py needs to be updated.
In line 7, replace ‘‘import async_get_registry’’ with ‘‘import async_get’’
Restart, and there it is again…

Must be fixed in the component for future use, though.

3 Likes

Seems to be fixed in the Miele@home component update. No need to patch the sensor.py manually anymore.

Hi,

I have updated the files manually, but still get this error - really ccpied the raw files (sensor and miele_at_home) with the source from GitHub:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/setup.py", line 257, in _async_setup_component
    result = await task
  File "/config/custom_components/miele/__init__.py", line 127, in async_setup
    cache = config[DOMAIN].get(
KeyError: 'miele'

Strangely enough, for the past few days the component asks for authorization after a HA restart. I deleted the token, but still asks for auth every restart. Any ideas?

Have exactly the same problem as you do, did you find any solution?

I has the same problem with release 0.9.5. After install 0.9.4 and delete the token all is fine.

Anyone else recently having a problem with the sensor entities?

I am on v0.9.5 and HA v2023.5.4 / OS10.1 (although error started suddenly in v2023.5.3, without anything being changed).

I have deleted token and HAC, obtained new client id / secret and reinstalled. Account authorises fine and entities are populated, but all the sensor entities fail.

from log:

Unable to prepare setup for platform miele.sensor: Platform not found (Exception importing custom_components.miele.sensor).
9:28:18 AM – (ERROR) setup.py

Logger: homeassistant.setup
Source: setup.py:348
First occurred: 9:28:18 AM (1 occurrences)
Last logged: 9:28:18 AM
Unable to prepare setup for platform miele.sensor: Platform not found (Exception importing custom_components.miele.sensor).

EDIT: Potentially resolved by replacing the HACs integration with the newest one recommended in the first post (GitHub - astrandb/miele: A modern integration for Miele devices in Home Assistant)

1 Like

Just refreshed some times and suddenly it started working.

Hi all,

I recently installed the AddOn and I had no serious issues with getting it up and running.

Though, I am a little bit disappointed from what the Miele API offers. In the end it is just a state info. I did try to do something useful with my devices (dishwasher, dryer, washing machine, coffeemachine) but despite of getting the state and being able to switch on or off there is no much use in what the API offers.

Initially I was thinking to start the devices when sun is shining and power is collected or something similar. Some sort of: “Prepare device for action and use delayed start. When sun is shining, Homeassistant updates the device through API and the device starts fine…”
But I realized this seems not to be possible. :frowning:

Anyways, thanks to all the developers here. It is not your fault but with this crippled API I will only use it for state information (or as a trigger).

Greetings
/KNEBB

Put the device in smart start modus and you can start it through home assistant. And thus when you have a lot of solar power. That sure can work!

Indeed, I missed that!
Yes, is working here, too.

And yes, this makes sense as the dishwasher itself does not know if it should start.

Thanks!
/KNEBB

Hi all,
After having purchased a Miele washer/dryer, I was very interested in this custom component!
I run home assistant in a docker container, and i followed the instructions for adding the platform in configuration.yaml, and I get the notification to configure the Miele component, but there is a red text string saying: “Failed to register, please try again”.

Clicking on the link brings me into a login page, where I entered my credentials, and am then presented with a 500 internal server error.

Now I do realize the answer to this could be in the 35256626635652323 posts above this, but I didn’t find it at a cursory glance…

Many thanks in advance,
/Marcus


Make sure you use the new component and not the abandoned one from original posting.

1 Like

Thanks Kenneth!
That was a n00b mistake, I was apparently using the old plugin.
I had earlier registered for developer credentials on developer.miele.com - and for the app name I had written “HA integration” or something like that. When copying the plugin to custom components, I followed the setup guide. For the name, I put my name, and for the Oauth I put the ClientID I had obtained earlier, along with the secret.

Then I was presented with the login page again - where I put in my credentials. Back to HA - I was presented with “error” and a more useful log:

2023-07-05 10:31:39.248 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/aiohttp/web_protocol.py", line 433, in _handle_request
    resp = await request_handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/aiohttp/web_app.py", line 504, in _handle
    resp = await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/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 85, in security_filter_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 100, 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 80, in ban_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 236, in auth_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 148, in handle
    result = await handler(request, **request.match_info)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 172, in get
    return await super().get(request, flow_id)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 96, in get
    result = await self._flow_mgr.async_configure(flow_id)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 271, in async_configure
    result = await self._async_handle_step(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 367, in _async_handle_step
    result: FlowResult = await getattr(flow, method)(user_input)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/config_entry_oauth2_flow.py", line 315, in async_step_creation
    token = await self.flow_impl.async_resolve_external_data(
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/config_entry_oauth2_flow.py", line 172, in async_resolve_external_data
    return await self._token_request(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/config_entry_oauth2_flow.py", line 209, in _token_request
    resp.raise_for_status()
  File "/usr/local/lib/python3.11/site-packages/aiohttp/client_reqrep.py", line 1005, in raise_for_status
    raise ClientResponseError(
aiohttp.client_exceptions.ClientResponseError: 401, message='Unauthorized', url=URL('https://api.mcs3.miele.com/thirdparty/token')

Whenever I try to re-add the component, I get directed straight to the login screen. Anyway to “reset” the plugin so I can try entering the OAuthId and client secret again? Does the name have to match the app name provided to Miele in the developer signup?

Kind regards

You can remove the credentials at Settings->Integrations → Three-dot-meny
The entered name is just the name of your credentials entry in HA. Not used for authentication with Miele.

Hi everyone, thanks for all the amazing work on the integration!

I just got a Miele washing machine and started playing to integrate it in my HA setup. Everything seems to work, such a as reading out sensors, or remote start a program that’s preprogrammed using the app. Ideally, however, I would like to be able to also set the right settings (temperature/spinning speed/detergent type) using HA, because first preparing it in the Miele app is rather cumbersome.

I cannot figure out how to do so, however. Also in swagger I cannot manage. There at least one can start a program, but this seems to use default settings. Did anyone figure it out, or is it not possible? It’s interesting as these functions can be changed in the Miele app, so it must be possible…

There is one public API that is somewhat limited. This is the only API (== Swagger) that is available for external use. Then Miele obviously has an internal API that they use for their apps. Nothing we can do about that unfortunately.