Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to process pushed data from API #618

Open
maarten2015 opened this issue Jan 13, 2025 · 5 comments
Open

Failed to process pushed data from API #618

maarten2015 opened this issue Jan 13, 2025 · 5 comments
Labels
bug Something isn't working

Comments

@maarten2015
Copy link

The problem

I am seeing a lot of Miele related errors in my HA log recently. I have always experienced a number of logged errors / day, (like time outs etc) however now it seems l am observing ~200 errors / day. See stacktrace below.

Version of miele integration having the issue?

2025.1.0

Version of Home Assistant Core having the issue?

2025.1.2

Anything in the logs that might be useful for us?

Traceback (most recent call last):
  File "/config/custom_components/miele/__init__.py", line 260, in _callback_update_actions
    coordinator.async_set_updated_data(coordinator.data)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 514, in async_set_updated_data
    self.async_update_listeners()
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 177, in async_update_listeners
    update_callback()
    ~~~~~~~~~~~~~~~^^
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 558, in _handle_coordinator_update
    self.async_write_ha_state()
    ~~~~~~~~~~~~~~~~~~~~~~~~~^^
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1023, in async_write_ha_state
    self._async_write_ha_state()
    ~~~~~~~~~~~~~~~~~~~~~~~~~~^^
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1148, in _async_write_ha_state
    self.__async_calculate_state()
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1085, in __async_calculate_state
    state = self._stringify_state(available)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1029, in _stringify_state
    if (state := self.state) is None:
                 ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/number/__init__.py", line 359, in state
    return self.value
           ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/number/__init__.py", line 410, in value
    if (native_value := self.native_value) is None:
                        ^^^^^^^^^^^^^^^^^
  File "/config/custom_components/miele/number.py", line 186, in native_value
    return PLATE_MAP[self.coordinator.data[self._ent][self._ed.data_tag]]
           ~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 204

Additional information

No response

@maarten2015 maarten2015 added the bug Something isn't working label Jan 13, 2025
@astrandb
Copy link
Owner

Please fetch a diagnostic file from the device page of the affected device and drag it into this issue report.

@astrandb
Copy link
Owner

Thank you.
I think that Miele maps the power state differently for this model compared to other hobs.
I will make the handling of unknown values more robust and add a debug log message to aid with future reverse engineering.
In the mean time you could help by turning on different power levels or other settings an see what is logged in the diagnostic file on the line "state|plateStep":

@bipsendk
Copy link

bipsendk commented Jan 28, 2025

Seeing similar error in my log:

2025-01-28 09:42:07.307 WARNING (MainThread) [custom_components.miele] Failed to process pushed data from API
2025-01-28 09:42:07.307 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved (None)
Traceback (most recent call last):
2025-01-28 09:42:07.307 WARNING (MainThread) [custom_components.miele] Failed to process pushed data from API  File "/config/custom_components/miele/__init__.py", line 260, in _callback_update_actions
    coordinator.async_set_updated_data(coordinator.data)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 514, in async_set_updated_data
    self.async_update_listeners()
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 177, in async_update_listeners
    update_callback()
    ~~~~~~~~~~~~~~~^^
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 558, in _handle_coordinator_update
    self.async_write_ha_state()
    ~~~~~~~~~~~~~~~~~~~~~~~~~^^
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1023, in async_write_ha_state
    self._async_write_ha_state()
    ~~~~~~~~~~~~~~~~~~~~~~~~~~^^
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1148, in _async_write_ha_state
    self.__async_calculate_state()
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1084, in __async_calculate_state
    available = self.available  # only call self.available once per update cycle
                ^^^^^^^^^^^^^^
  File "/config/custom_components/miele/binary_sensor.py", line 316, in available
    return self.coordinator.data[self._ent]["state|status|value_raw"] != 255
           ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^
KeyError: '000106409926'

Diag file attached.

miele-01J5KBS4W773XRQY5CXM3BR3Y5-Dishwasher-dbc4022e51afbe7b34746728a25b151d.json

@astrandb
Copy link
Owner

@bipsendk This is a different issue. If the problem persists it is better to create a separate issue report. In any case it indicates that the Miele cloud service has dropped the connection with your dishwasher for an unknown reason.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants