homeassistant-mods / home-assistant-miele Goto Github PK
View Code? Open in Web Editor NEWMiele integration for Home assistant
Miele integration for Home assistant
After about a month integration failed to start with error message in the log about access token expiration. Is it possible to add automatic token renewal? This probably can help Miele API Token refresh and Logout.
When trying to change the light of a Miele cooker hood this error occurs:
Error executing service: <ServiceCall miele.action (c:): device_id=000xxxxxxxx, body=light=2>
Error executing service: <ServiceCall miele.action (c: device_id=000xxxxxxxxx, body=light=1>
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/core.py", line 1496, in catch_exceptions
await coro_or_task
File "/usr/src/homeassistant/homeassistant/core.py", line 1515, in _execute_service
await handler.job.target(service_call)
File "/config/custom_components/miele/__init__.py", line 211, in _action_service
await _apply_service(service, MieleDevice.action, body)
File "/config/custom_components/miele/__init__.py", line 206, in _apply_service
await service_func(device, *service_func_args)
File "/config/custom_components/miele/__init__.py", line 336, in action
await self._client.action(self.unique_id, action)
File "/config/custom_components/miele/miele_at_home.py", line 71, in action
result = await self._session._session.put(
File "/usr/local/lib/python3.8/site-packages/requests/sessions.py", line 602, in put
return self.request('PUT', url, data=data, **kwargs)
File "/usr/local/lib/python3.8/site-packages/requests_oauthlib/oauth2_session.py", line 515, in request
return super(OAuth2Session, self).request(
File "/usr/local/lib/python3.8/site-packages/requests/sessions.py", line 542, in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/lib/python3.8/site-packages/requests/sessions.py", line 655, in send
r = adapter.send(request, **kwargs)
File "/usr/local/lib/python3.8/site-packages/requests/adapters.py", line 439, in send
resp = conn.urlopen(
File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 699, in urlopen
httplib_response = self._make_request(
File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 394, in _make_request
conn.request(method, url, **httplib_request_kw)
File "/usr/local/lib/python3.8/site-packages/urllib3/connection.py", line 234, in request
super(HTTPConnection, self).request(method, url, body=body, headers=headers)
File "/usr/local/lib/python3.8/http/client.py", line 1255, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/usr/local/lib/python3.8/http/client.py", line 1266, in _send_request
self.putrequest(method, url, **skips)
File "/usr/local/lib/python3.8/site-packages/urllib3/connection.py", line 214, in putrequest
return _HTTPConnection.putrequest(self, method, url, *args, **kwargs)
File "/usr/src/homeassistant/homeassistant/util/async_.py", line 150, in protected_loop_func
check_loop()
File "/usr/src/homeassistant/homeassistant/util/async_.py", line 139, in check_loop
raise RuntimeError(
RuntimeError: I/O must be done in the executor; Use `await hass.async_add_executor_job()` at custom_components/miele/miele_at_home.py, line 71: result = await self._session._session.put(
So, when I try to use the Miele integration it won't work and I get the error down below. I'm still new to HA so I would appreciate some help to get this solved.
Source: helpers/network.py:123
First occurred: 22:33:24 (1 occurrences)
Last logged: 22:33:24
Error during setup of component miele
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/setup.py", line 255, in _async_setup_component
result = await task
File "/config/custom_components/miele/__init__.py", line 121, in async_setup
callback_url = "{}{}".format(get_url(hass), AUTH_CALLBACK_PATH)
File "/usr/src/homeassistant/homeassistant/helpers/network.py", line 83, in get_url
request_host = _get_request_host()
File "/usr/src/homeassistant/homeassistant/helpers/network.py", line 123, in _get_request_host
raise NoURLAvailableError
homeassistant.helpers.network.NoURLAvailableError```
After authentication through Miele Website and going back to HA (with token), HA gives Error 500 (with no further information).
Any clues?
Would it be possible to add sensors for consumables?
For example in the app the percent status displayed for the Miele UltraPhase 1 and 2 detergent levels is shown:
It would be great to have these in Home Assistant because combined with state history, it could be seen the actual consumption over time, something the original app doesn't have.
Hi there,
I tried the new integration, but I don’t get entites for the remaining time.
Is there something wront or am I looking at the wrong spot…?
here is the dishwasher:
{
"000105104xxx": {
"ident": {
"type": {
"key_localized": "Gerätetyp",
"value_raw": 7,
"value_localized": "Geschirrspüler"
},
"deviceName": "",
"deviceIdentLabel": {
"fabNumber": "000105104xxx",
"fabIndex": "64",
"techType": "G7565",
"matNumber": "10992350",
"swids": [
"4921",
"20492",
"25166",
"4465",
"25318",
"4928",
"20475",
"25266",
"4875",
"20366",
"20462"
]
},
"xkmIdentLabel": {
"techType": "EK037",
"releaseVersion": "03.65"
}
},
"state": {
"ProgramID": {
"value_raw": 1,
"value_localized": "Intensiv",
"key_localized": "Programmbezeichnung"
},
"status": {
"value_raw": 5,
"value_localized": "In Betrieb",
"key_localized": "Status"
},
"programType": {
"value_raw": 0,
"value_localized": "Programm",
"key_localized": "Programmart"
},
"programPhase": {
"value_raw": 1795,
"value_localized": "Reinigen",
"key_localized": "Programmphase"
},
"remainingTime": [***
2,
24
],
"startTime": [
0,
0
],
"targetTemperature": [
{
"value_raw": -32768,
"value_localized": null,
"unit": "Celsius"
},
{
"value_raw": -32768,
"value_localized": null,
"unit": "Celsius"
},
{
"value_raw": -32768,
"value_localized": null,
"unit": "Celsius"
}
],
"temperature": [
{
"value_raw": -32768,
"value_localized": null,
"unit": "Celsius"
},
{
"value_raw": -32768,
"value_localized": null,
"unit": "Celsius"
},
{
"value_raw": -32768,
"value_localized": null,
"unit": "Celsius"
}
],
"signalInfo": false,
"signalFailure": false,
"signalDoor": false,
"remoteEnable": {
"fullRemoteControl": true,
"smartGrid": false,
"mobileStart": true
},
"light": 2,
"elapsedTime": [
0,
0
],
"spinningSpeed": {
"unit": "U/min",
"value_raw": null,
"value_localized": null,
"key_localized": "Schleuderdrehzahl"
},
"dryingStep": {
"value_raw": null,
"value_localized": "",
"key_localized": "Trockenstufe"
},
"ventilationStep": {
"value_raw": null,
"value_localized": "",
"key_localized": "Lüfterstufe"
},
"plateStep": [],
"ecoFeedback": {
"currentWaterConsumption": {
"unit": "l",
"value": 4
},
"currentEnergyConsumption": {
"unit": "kWh",
"value": 0.3
},
"waterForecast": 0.5,
"energyForecast": 0.7
},
"batteryLevel": null
}
}
...
configuration.yaml:
miele:
client_id: 7cc5649a-af44-4ee3-bf74-b0axxxxxxxxx
client_secret: pZdgX2qXQo2MmXExL3aDSR7bTTxxxxxxxxx
language: de
Log:
2020-11-30 15:21:34 INFO (MainThread) [custom_components.miele.config_flow] Successfully authenticated
2020-11-30 15:21:34 INFO (MainThread) [homeassistant.components.sensor] Setting up sensor.miele
2020-11-30 15:21:34 INFO (MainThread) [homeassistant.components.binary_sensor] Setting up binary_sensor.miele
2020-11-30 15:21:34 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new sensor.miele entity: sensor.dishwasher_000105104XXX_program_id
2020-11-30 15:21:34 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new sensor.miele entity: sensor.dishwasher_000105104XXX_elapsed
2020-11-30 15:21:34 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new sensor.miele entity: sensor.dishwasher_000105104XXX_finish_time
2020-11-30 15:21:34 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new sensor.miele entity: sensor.dishwasher_000105104XXX_light
2020-11-30 15:21:34 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new sensor.miele entity: sensor.dishwasher_000105104XXX_program_phase
2020-11-30 15:21:34 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new sensor.miele entity: sensor.dishwasher_000105104XXX_program_type
2020-11-30 15:21:34 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new sensor.miele entity: sensor.dishwasher_000105104XXX_spinning_speed
2020-11-30 15:21:34 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new sensor.miele entity: sensor.dishwasher_000105104XXX_start
2020-11-30 15:21:34 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new sensor.miele entity: sensor.dishwasher_000105104XXX
2020-11-30 15:21:35 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new binary_sensor.miele entity: binary_sensor.dishwasher_000105104XXX_full_remote_control
2020-11-30 15:21:35 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new binary_sensor.miele entity: binary_sensor.dishwasher_000105104XXX_signal_door
2020-11-30 15:21:35 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new binary_sensor.miele entity: binary_sensor.dishwasher_000105104XXX_signal_failure
2020-11-30 15:21:35 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new binary_sensor.miele entity: binary_sensor.dishwasher_000105104XXX_signal_info
As you can see the remainint time is there in Miele API, but the integration doesn't create an entity for it.
I have no clue...
Maybe you could look into that problem.
Thx
Sebastian
Description | Value |
---|---|
Installation method | Supervisor |
Home Assistant version | core-2021.9.1 & core-2021.8.1 |
Supervisor version | supervisor-2021.08.1 |
I am unable to install the integration using HACS. It is not part of the HACS selection/integration list.
Line 71 in miele_at_home.py keeps throwing issues.
This is a follow-up on #31
I get this when calling a miele
service (eg. starting washer from HA):
[2737078224] I/O must be done in the executor; Use `await hass.async_add_executor_job()` at custom_components/miele/miele_at_home.py, line 71: result = await self._session._session.put(
Also see https://developers.home-assistant.io/docs/asyncio_working_with_async/
It is currently 20:58 and I've just set my Miele H6860BP oven to come on at 7AM in the morning to preheat ready to bake bread when I get up.
sensor.oven_start_time
is currently 10:02
So this field is clearly the time until the program starts, not the time at which the program starts.
On home assistant startup this error occurs for my Miele cooker hood:
Error adding entities for domain fan with platform miele
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 322, in async_add_entities
await asyncio.gather(*tasks)
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 429, in _async_add_entity
capabilities=entity.capability_attributes,
File "/usr/src/homeassistant/homeassistant/components/fan/__init__.py", line 512, in capability_attributes
attrs[ATTR_PRESET_MODES] = self.preset_modes
File "/usr/src/homeassistant/homeassistant/components/fan/__init__.py", line 637, in preset_modes
return preset_modes_from_speed_list(self.speed_list)
File "/usr/src/homeassistant/homeassistant/components/fan/__init__.py", line 683, in preset_modes_from_speed_list
return [
File "/usr/src/homeassistant/homeassistant/components/fan/__init__.py", line 686, in <listcomp>
if speed.lower() in _NOT_SPEEDS_FILTER and speed.lower() != SPEED_OFF
AttributeError: 'int' object has no attribute 'lower'
I think this is supposed to make the cooker hood fan a fan entity, however no entity seems to be created.
Also, the Miele.Action service for the fan doesn't seem to work. It worked fine before 2021.4.*
I don't think it is a connection failure, because the Cooker Hood sensors work fine.
On startup also this message occurs, i don't know if it is related:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 285, in async_update_ha_state
raise NoEntitySpecifiedError(
homeassistant.exceptions.NoEntitySpecifiedError: No entity id specified for entity Cooker hood
Logger: homeassistant.setup
Source: custom_components/miele/miele_at_home.py:28
First occurred: 10:34:18 AM (1 occurrences)
Last logged: 10:34:18 AM
Error during setup of component miele
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/requests_oauthlib/oauth2_session.py", line 477, in request
url, headers, data = self._client.add_token(
File "/usr/local/lib/python3.8/site-packages/oauthlib/oauth2/rfc6749/clients/base.py", line 198, in add_token
raise TokenExpiredError()
oauthlib.oauth2.rfc6749.errors.TokenExpiredError: (token_expired)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/setup.py", line 213, in _async_setup_component
result = await task
File "/config/custom_components/miele/init.py", line 145, in async_setup
data_get_devices = await client.get_devices(lang)
File "/config/custom_components/miele/miele_at_home.py", line 47, in get_devices
home_devices = await self._get_devices_raw(lang)
File "/config/custom_components/miele/miele_at_home.py", line 28, in _get_devices_raw
devices = await self.hass.async_add_executor_job(func)
File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/local/lib/python3.8/site-packages/requests/sessions.py", line 555, in get
return self.request('GET', url, **kwargs)
File "/usr/local/lib/python3.8/site-packages/requests_oauthlib/oauth2_session.py", line 496, in request
token = self.refresh_token(
File "/usr/local/lib/python3.8/site-packages/requests_oauthlib/oauth2_session.py", line 446, in refresh_token
self.token = self._client.parse_request_body_response(r.text, scope=self.scope)
File "/usr/local/lib/python3.8/site-packages/oauthlib/oauth2/rfc6749/clients/base.py", line 421, in parse_request_body_response
self.token = parse_token_response(body, scope=scope)
File "/usr/local/lib/python3.8/site-packages/oauthlib/oauth2/rfc6749/parameters.py", line 431, in parse_token_response
validate_token_parameters(params)
File "/usr/local/lib/python3.8/site-packages/oauthlib/oauth2/rfc6749/parameters.py", line 441, in validate_token_parameters
raise MissingTokenError(description="Missing access token parameter.")
oauthlib.oauth2.rfc6749.errors.MissingTokenError: (missing_token) Missing access token parameter.
This would be a really useful information, especially for automation, e.g. Alexa making an announcement when the dishwasher is finished.
When our washing machine is started/running, this warning occurs.
Seems to be related to async:
Detected I/O inside the event loop. This is causing stability issues. Please report issue to the custom component author for miele doing I/O at custom_components/miele/miele_at_home.py, line 71
Great component, thank you!
When there's any internet connection problem, the log of Home Assistant starts to fill with task exceptions.
I am not using debug mode. It should be handled to mute these kinds of errors from the log, one single informative line would be enough, something like "timed out connecting to miele servers"
2021-03-12 19:46:04 ERROR (MainThread) [custom_components.miele.miele_at_home] Failed to retrieve Miele devices: HTTPSConnectionPool(host='api.mcs3.miele.com', port=443): Max retries exceeded with url: /v1/devices?language=en (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f4f1ac80ac0>: Failed to establish a new connection: [Errno 110] Operation timed out'))
2021-03-12 19:46:04 ERROR (MainThread) [custom_components.miele] Did not receive Miele devices
2021-03-12 19:46:08 ERROR (MainThread) [custom_components.miele.miele_at_home] Failed to retrieve Miele devices: HTTPSConnectionPool(host='api.mcs3.miele.com', port=443): Max retries exceeded with url: /v1/devices?language=en (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f4f1a67f730>: Failed to establish a new connection: [Errno 110] Operation timed out'))
2021-03-12 19:46:08 ERROR (MainThread) [custom_components.miele] Did not receive Miele devices
2021-03-12 20:00:16 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 445, in _make_request
six.raise_from(e, None)
File "<string>", line 3, in raise_from
File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 440, in _make_request
httplib_response = conn.getresponse()
File "/usr/local/lib/python3.8/http/client.py", line 1347, in getresponse
response.begin()
File "/usr/local/lib/python3.8/http/client.py", line 307, in begin
version, status, reason = self._read_status()
File "/usr/local/lib/python3.8/http/client.py", line 268, in _read_status
line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
File "/usr/local/lib/python3.8/socket.py", line 669, in readinto
return self._sock.recv_into(b)
File "/usr/local/lib/python3.8/ssl.py", line 1241, in recv_into
return self.read(nbytes, buffer)
File "/usr/local/lib/python3.8/ssl.py", line 1099, in read
return self._sslobj.read(len, buffer)
TimeoutError: [Errno 110] Operation timed out
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/requests/adapters.py", line 439, in send
resp = conn.urlopen(
File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 755, in urlopen
retries = retries.increment(
File "/usr/local/lib/python3.8/site-packages/urllib3/util/retry.py", line 531, in increment
raise six.reraise(type(error), error, _stacktrace)
File "/usr/local/lib/python3.8/site-packages/urllib3/packages/six.py", line 735, in reraise
raise value
File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 699, in urlopen
httplib_response = self._make_request(
File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 447, in _make_request
self._raise_timeout(err=e, url=url, timeout_value=read_timeout)
File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 353, in _raise_timeout
raise ReadTimeoutError(
urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='api.mcs3.miele.com', port=443): Read timed out. (read timeout=None)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/config/custom_components/miele/__init__.py", line 161, in refresh_devices
device_state = await client.get_devices(lang)
File "/config/custom_components/miele/miele_at_home.py", line 47, in get_devices
home_devices = await self._get_devices_raw(lang)
File "/config/custom_components/miele/miele_at_home.py", line 28, in _get_devices_raw
devices = await self.hass.async_add_executor_job(func)
File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/local/lib/python3.8/site-packages/requests/sessions.py", line 555, in get
return self.request('GET', url, **kwargs)
File "/usr/local/lib/python3.8/site-packages/requests_oauthlib/oauth2_session.py", line 515, in request
return super(OAuth2Session, self).request(
File "/usr/local/lib/python3.8/site-packages/requests/sessions.py", line 542, in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/lib/python3.8/site-packages/requests/sessions.py", line 655, in send
r = adapter.send(request, **kwargs)
File "/usr/local/lib/python3.8/site-packages/requests/adapters.py", line 529, in send
raise ReadTimeout(e, request=request)
requests.exceptions.ReadTimeout: HTTPSConnectionPool(host='api.mcs3.miele.com', port=443): Read timed out. (read timeout=None)
So our washing machine is reporting to start at 4:45am in the HA interface but there is in fact no starting time set and the device is completely turned off. This issue seams to be similar to the one I reported here a few days ago.
It would be nice if I could see / use the AutoDos fill levels for my washing machine / dishwasher, so that I won't have to use the Miele App for that.
I've got an WSG 633 washing machine which has two containers for detergents. Would be perhaps be possible to include the status of these?
With the update c2ae8a6 info about warming drawer (Temperature, target temperature, starting time, elapsed time) is gone.
According to the API, a device name can be set. For example (Upper machine
or First floor machine
).
This integration seems to support miele.action
, and according to the table of actions, it should be possible to set the name of the device like this:
{
'entity_id': 'miele.clothes_dryer',
'body': {'deviceName': 'Villő'}
}
Tried that in Home Assistant, no error and no log entry - but I don't see the name anywhere appearing (restarted HA after running the action). Could it be possible that the deviceName
field from the API is not being parsed?
Version
core-2021.4.0
supervisor-2021.03.9
Operating System : Home Assistant OS 5.13
Config:
miele:
client_id: xxxxx
client_secret: xxxx
Trying to set up first time, and receive 500 Internal Server Error with the call back. http://10.1.1.100:8123/api/miele/callback?code=US_xxxx&state=login
There is no token sitting in the root.
Tested the clientid and secret in the api swagger, and authorizes fine.
Raw Logs:
2021-04-08 13:12:07 WARNING (MainThread) [homeassistant.util.async_] Detected I/O inside the event loop. This is causing stability issues. Please report issue to the custom component author for miele doing I/O at custom_components/miele/miele_at_home.py, line 141: token = self._session.fetch_token(
2021-04-08 13:12:07 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/aiohttp/web_protocol.py", line 422, in _handle_request
resp = await self._request_handler(request)
File "/usr/local/lib/python3.8/site-packages/aiohttp/web_app.py", line 499, in _handle
resp = await handler(request)
File "/usr/local/lib/python3.8/site-packages/aiohttp/web_middlewares.py", line 119, in impl
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 56, in security_filter_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 18, in request_context_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 74, in ban_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 129, in auth_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 128, in handle
result = handler(request, **request.match_info)
File "/config/custom_components/miele/__init__.py", line 241, in get
result = self.oauth.get_access_token(request.query["code"])
File "/config/custom_components/miele/miele_at_home.py", line 141, in get_access_token
token = self._session.fetch_token(
File "/usr/local/lib/python3.8/site-packages/requests_oauthlib/oauth2_session.py", line 336, in fetch_token
r = self.request(
File "/usr/local/lib/python3.8/site-packages/requests_oauthlib/oauth2_session.py", line 515, in request
return super(OAuth2Session, self).request(
File "/usr/local/lib/python3.8/site-packages/requests/sessions.py", line 542, in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/lib/python3.8/site-packages/requests/sessions.py", line 655, in send
r = adapter.send(request, **kwargs)
File "/usr/local/lib/python3.8/site-packages/requests/adapters.py", line 439, in send
resp = conn.urlopen(
File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 699, in urlopen
httplib_response = self._make_request(
File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 394, in _make_request
conn.request(method, url, **httplib_request_kw)
File "/usr/local/lib/python3.8/site-packages/urllib3/connection.py", line 234, in request
super(HTTPConnection, self).request(method, url, body=body, headers=headers)
File "/usr/local/lib/python3.8/http/client.py", line 1255, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/usr/local/lib/python3.8/http/client.py", line 1266, in _send_request
self.putrequest(method, url, **skips)
File "/usr/local/lib/python3.8/site-packages/urllib3/connection.py", line 214, in putrequest
return _HTTPConnection.putrequest(self, method, url, *args, **kwargs)
File "/usr/src/homeassistant/homeassistant/util/async_.py", line 150, in protected_loop_func
check_loop()
File "/usr/src/homeassistant/homeassistant/util/async_.py", line 139, in check_loop
raise RuntimeError(
RuntimeError: I/O must be done in the executor; Use `await hass.async_add_executor_job()` at custom_components/miele/miele_at_home.py, line 141: token = self._session.fetch_token(
In the config, there is: lang: <optional. en=english, de=german>
. Are these only two supported?
Where should I look for to add translation for other language?
Hi,
According to the API docs ovens and combi ovens should support the light action.
I tried to modify light.py to add the device type and HA now gets the light entity for the appliance. It even shows the correct status if the light is on or off when toggled on the appliance itself but pressing it in HA does not work.
Have you fiddled around with this yourself? Any clues?
Hi, I can't seem to get the integration working. I have deleted the .miele-token-cache but I don't get a pup-up to set everything up again. Any advise? Thanks.
Error during setup of component miele
Traceback (most recent call last):
File "/srv/homeassistant/lib/python3.8/site-packages/homeassistant/setup.py", line 213, in _async_setup_component
result = await task
File "/home/homeassistant/.homeassistant/custom_components/miele/init.py", line 120, in async_setup
callback_url = "{}{}".format(get_url(hass), AUTH_CALLBACK_PATH)
File "/srv/homeassistant/lib/python3.8/site-packages/homeassistant/helpers/network.py", line 84, in get_url
request_host = _get_request_host()
File "/srv/homeassistant/lib/python3.8/site-packages/homeassistant/helpers/network.py", line 124, in _get_request_host
raise NoURLAvailableError
homeassistant.helpers.network.NoURLAvailableError
Integration provides 4 binary sensors with device class problem:
Is it possible to add message attribute to these sensors which will shows that machines shows at screen?
Currently, the server is polled every 5 seconds:
home-assistant-miele/custom_components/miele/__init__.py
Lines 159 to 176 in e9d94d8
As of v.1.0.3 of the Miele API introduced in August 2020, server-sent events are supported:
https://www.miele.com/developer/eventing.html
Try this:
curl -X GET "https://api.mcs3.miele.com/v1/devices/all/events" -H "accept: */*" -H "Authorization: Bearer DE_xxxx"
Since I updated to the new Home Assistant Core Version (core-2021.4.6), I get following error massage.
Logger: custom_components.miele
Source: custom_components/miele/init.py:167
Integration: Miele@home (documentation, issues)
First occurred: 6:23:21 (1 occurrences)
Last logged: 6:23:21
Cheers
Vic
I'm getting the following error every few seconds in the logs and I no longer see the cooker hood fan.
File "/srv/homeassistant/lib/python3.8/site-packages/homeassistant/helpers/entity.py", line 270, in async_update_ha_state
raise NoEntitySpecifiedError(homeassistant.exceptions.NoEntitySpecifiedError: No entity id specified for entity Cooker hood ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
I think (but I can't be sure) this started happening after updating from Python 2 to 3 - so maybe I broke something.
I've tried remove the addon, deleting the entities and installing again, but I get the same error.
Any ideas? Thanks
Error during startup:
Logger: homeassistant.bootstrap
Source: bootstrap.py:392
First occurred: 13:27:51 (1 occurrences)
Last logged: 13:27:51
Waiting on integrations to complete setup: miele
and
Logger: homeassistant.bootstrap
Source: bootstrap.py:392
First occurred: 13:27:51 (1 occurrences)
Last logged: 13:27:51
Waiting on integrations to complete setup: miele
Error during runtime:
Logger: homeassistant
Source: helpers/entity.py:455
First occurred: 13:29:14 (62 occurrences)
Last logged: 13:33:45
Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/config/custom_components/miele/__init__.py", line 174, in refresh_devices
platform.update_device_state()
File "/config/custom_components/miele/binary_sensor.py", line 49, in update_device_state
device.async_schedule_update_ha_state(True)
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 455, in async_schedule_update_ha_state
self.hass.async_create_task(self.async_update_ha_state(force_refresh))
AttributeError: 'NoneType' object has no attribute 'async_create_task'
Hello,
after my update from core 2021.5.5 -> 2021.7.4 my Miele integration has trouble.
But I still get his error message:
Logger: homeassistant.setup
Source: custom_components/miele/miele_at_home.py:28
Integration: miele (documentation, issues)
First occurred: 15:21:52 (1 occurrences)
Last logged: 15:21:52
Error during setup of component miele
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/requests_oauthlib/oauth2_session.py", line 477, in request
url, headers, data = self._client.add_token(
File "/usr/local/lib/python3.9/site-packages/oauthlib/oauth2/rfc6749/clients/base.py", line 198, in add_token
raise TokenExpiredError()
oauthlib.oauth2.rfc6749.errors.TokenExpiredError: (token_expired)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/setup.py", line 249, in _async_setup_component
result = await task
File "/config/custom_components/miele/__init__.py", line 146, in async_setup
data_get_devices = await client.get_devices(lang)
File "/config/custom_components/miele/miele_at_home.py", line 47, in get_devices
home_devices = await self._get_devices_raw(lang)
File "/config/custom_components/miele/miele_at_home.py", line 28, in _get_devices_raw
devices = await self.hass.async_add_executor_job(func)
File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 52, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/local/lib/python3.9/site-packages/requests/sessions.py", line 555, in get
return self.request('GET', url, **kwargs)
File "/usr/local/lib/python3.9/site-packages/requests_oauthlib/oauth2_session.py", line 496, in request
token = self.refresh_token(
File "/usr/local/lib/python3.9/site-packages/requests_oauthlib/oauth2_session.py", line 446, 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 429, 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 425, in parse_token_response
validate_token_parameters(params)
File "/usr/local/lib/python3.9/site-packages/oauthlib/oauth2/rfc6749/parameters.py", line 435, in validate_token_parameters
raise MissingTokenError(description="Missing access token parameter.")
oauthlib.oauth2.rfc6749.errors.MissingTokenError: (missing_token) Missing access token parameter.
Any hints what this is about?
thx for this excellent Miele integration ;-)
While setting up my lovelance UI for my Miele G6865 Dishwasher I observed that the following entities are available in Home Assistant:
In addition these attributes are available:
the following entities
do not get any data, every:
sensor.geschirrspuler_target_temperature_0
sensor.geschirrspuler_temperature_0
sensor.geschirrspuler_temperature_1
sensor.geschirrspuler_temperature_2
which is consistent with the official Miele API documentation
Looks like the Home Assistant Miele integration should not set up sensor
for these temperature
in this case.
In addition, I observed that some Miele dishwashers report energy (german: energie) and water (german: wasser) usage. With additional sensors
sensor.geschirrspuler_wasser
sensor.geschirrspuler_energie
My dishwasher collects the same information and shows this on the dishwasher display. But it does not show up in the official Miele API description neither in the Home Assistant integration.
Any idea how we can correct this?
For a long time now, the error below shows up frequently in HA.
Would it be an option to:
Logger: custom_components.miele
Source: custom_components/miele/__init__.py:171
Integration: Miele@home (documentation, issues)
First occurred: October 14, 2021, 14:18:43 (4 occurrences)
Last logged: October 14, 2021, 18:50:55
Did not receive Miele devices
Sorry for not following the issue template
If you want, I can add some advanced CI to your repo in a PR. Let me know if you want that.
After upgrading to 2021.4.3 i had issues with the Miele add'on. After som trial and error i uninstalled the addon completely. Now i am unable to link the addon again at Miele. I have renewed the client activation, but every time when i link fro HA I end up with the "500 Internal Server Error". Any good ideas?
Washing machines, Tumbly dryers, dishwashers etc. support ProgramID.
"state": {
"ProgramID": {
"value_raw": 28,
"value_localized": "Economy",
"key_localized": "Program Id"
},
The value of „value_localized“ can also be „SaniPlus“, „Sensor Wash“, „Pots & Pans“, „QuickPowerWash“, „China & Crystal“, „Normal“, „Extra Quiet“ etc., so that‘s more interesting than the „programType“ property, which always has „Automatic Program“.
Hello, please excuse me, I know the error has already been edited here. However, I do not get this fixed. I have already tested my account through here: https://www.miele.com/developer/swagger-ui/swagger.html# I get my devices displayed. What else could it be?
Am grateful for any help.
Kind regards
Logger: homeassistant.setup
Source: helpers/network.py:123
First occurred: 18:25:14 (1 occurrences)
Last logged: 18:25:14
Error during setup of component miele
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/setup.py", line 249, in _async_setup_component
result = await task
File "/config/custom_components/miele/__init__.py", line 121, in async_setup
callback_url = "{}{}".format(get_url(hass), AUTH_CALLBACK_PATH)
File "/usr/src/homeassistant/homeassistant/helpers/network.py", line 83, in get_url
request_host = _get_request_host()
File "/usr/src/homeassistant/homeassistant/helpers/network.py", line 123, in _get_request_host
raise NoURLAvailableError
homeassistant.helpers.network.NoURLAvailableError
Hi,
A while ago I made an issue with the exact same problem. I have seen that it should be solved, so I updated it but I still can't get it to work. I have a feeling that I'm doing something wrong. Does anyone have any advice for me to get it working? Many thanks.
Logger: homeassistant.setup
Source: helpers/network.py:123
First occurred: 15:55:24 (1 occurrences)
Last logged: 15:55:24
Error during setup of component miele
Traceback (most recent call last):
File "/srv/homeassistant/lib/python3.8/site-packages/homeassistant/setup.py", line 248, in _async_setup_component
result = await task
File "/home/homeassistant/.homeassistant/custom_components/miele/init.py", line 121, in async_setup
callback_url = "{}{}".format(get_url(hass), AUTH_CALLBACK_PATH)
File "/srv/homeassistant/lib/python3.8/site-packages/homeassistant/helpers/network.py", line 83, in get_url
request_host = _get_request_host()
File "/srv/homeassistant/lib/python3.8/site-packages/homeassistant/helpers/network.py", line 123, in _get_request_host
raise NoURLAvailableError
homeassistant.helpers.network.NoURLAvailableError
Some washing machine models have consumables for the Auto-DOS feature
It would be great to see those sensors pulled into HA, so you can set alerts when the Ultraphase liquids are getting low.
These stats are available in the Miele app
Thanks for your work on this integration!
ahh. there we go again:
Assertion error returned in version 5973df2
I have the following problem, since the update I get this error message.
I reinstall the module, delete the cache, check DuckDNS,
nothing helped
Since the update, the entitys remaning time, starttime. etc. are also gone.
I reinstall the module x times. Test with beta version 0.9.1 also doesnt work´.
Error message:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/setup.py", line 248, in _async_setup_component
result = await task
File "/config/custom_components/miele/init.py", line 150, in async_setup
data_get_devices = await client.get_devices(lang)
File "/config/custom_components/miele/miele_at_home.py", line 52, in get_devices
for home_device in home_devices:
TypeError: 'coroutine' object is not iterable
When I update to 2021.4.x my Home Assistant , the Miele integration not work, this is the error log:
Logger: homeassistant.setup
Source: custom_components/miele/miele_at_home.py:52
First occurred: 6:51:41 (1 occurrences)
Last logged: 6:51:41
Error during setup of component miele
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/setup.py", line 240, in _async_setup_component
result = await task
File "/config/custom_components/miele/init.py", line 145, in async_setup
data_get_devices = await client.get_devices(lang)
File "/config/custom_components/miele/miele_at_home.py", line 52, in get_devices
for home_device in home_devices:
TypeError: 'coroutine' object is not iterable
I've just installed the component according to the instructions and added my credentials.
A token is generated and stored, so that works fine.
When initializing the integration, the error log lists:
'''
Error during setup of component miele
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/setup.py", line 213, in _async_setup_component
result = await task
File "/config/custom_components/miele/init.py", line 145, in async_setup
data_get_devices = await client.get_devices(lang)
File "/config/custom_components/miele/miele_at_home.py", line 53, in get_devices
for home_device in home_devices:
TypeError: 'coroutine' object is not iterable
'''
So as the title says our Miele dishwasher is reporting a remaining time of 03:35h even though, it is turned off.
I have tried installing the component via HACS.
After rebooting, I see a notification in HA with a link to Miele.
I have to enter my Miele credentials for miele@home, but I always got a german error.
After removing the integration and reinstalling it, I dont get the notification to login to Miele anymore.
Also no entity or what so ever is present in HA.
Performing a manual installation gives me the same result.
(I have the miele client id and secret setup in configuration.yaml)
Do you have any tips how to install the integration?
Thanks heaps for the integration!
I have a miele dishwasher that has support for remote control start. I can get the dishwasher to start fine from the miele@home app when the machine is in the remote start mode.
I have tried to call the miele.action with the following service data, but can't get it to work. I also can't see anything in the logs.
{
'entity_id': 'miele.dishwasher',
'body': { "processAction": 1 }
}
I'm sure im missing something silly!
Cheers.
Dave.
Once setup is complete I can see entities added, but no real devices are assembled from the entities.
Is this OK and I should build devices manually out of entities?
I have this working with a Miele dishwasher; however, when I added a dryer in the app I can’t get HA to see it (works fine in the app). What do I need to do to see this appliance?
Some strings are hardcoded, like
home-assistant-miele/custom_components/miele/binary_sensor.py
Lines 17 to 23 in df86ba0
home-assistant-miele/custom_components/miele/sensor.py
Lines 17 to 33 in df86ba0
Could be nice enabling an energy sensor compatible with the new Home assistant Energy dashboard.
Miele Api provides energy information under the "ecoFeedback" json object.
the ecoFeedback object returns the amount of water and energy used by the current running program up to the present moment. Furthermore it returns a forecast for water and energy consumption for a selected program.
To keep things organized please move access token into Home Assistant storage folder if cache_path not specified.
For more info please check here
Thanks in advance.
See https://www.home-assistant.io/blog/2019/10/26/rip-hassbian/
Could you change the installation instructions from hassbian to hass.io?
Seb
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.