home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
73.9k stars 30.97k forks source link

Home Connect Dishwasher Salt nearly empty is not working #130681

Open GSzabados opened 1 week ago

GSzabados commented 1 week ago

The problem

Last evening the dishwasher already showed on the screen salt empty icon, and this morning the application has sent the push message as well, but somehow HA has not picked it up. Likely it has failed at some point with an error.

What version of Home Assistant Core has the issue?

core-2024.11.1

What was the last working version of Home Assistant Core?

N/A

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Home Connect

Link to integration documentation on our website

https://www.home-assistant.io/integrations/home_connect/

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Logger: homeconnect.sseclient
Source: /usr/local/lib/python3.12/site-packages/homeconnect/sseclient.py:90
First occurred: 06:23:00 (1 occurrences)
Last logged: 06:23:00

Exception while reading event:
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/urllib3/response.py", line 761, in _update_chunk_length
    self.chunk_left = int(line, 16)
                      ^^^^^^^^^^^^^
ValueError: invalid literal for int() with base 16: b''

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/urllib3/response.py", line 444, in _error_catcher
    yield
  File "/usr/local/lib/python3.12/site-packages/urllib3/response.py", line 828, in read_chunked
    self._update_chunk_length()
  File "/usr/local/lib/python3.12/site-packages/urllib3/response.py", line 765, in _update_chunk_length
    raise InvalidChunkLength(self, line)
urllib3.exceptions.InvalidChunkLength: InvalidChunkLength(got length b'', 0 bytes read)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/requests/models.py", line 820, in generate
    yield from self.raw.stream(chunk_size, decode_content=True)
  File "/usr/local/lib/python3.12/site-packages/urllib3/response.py", line 624, in stream
    for line in self.read_chunked(amt, decode_content=decode_content):
  File "/usr/local/lib/python3.12/site-packages/urllib3/response.py", line 816, in read_chunked
    with self._error_catcher():
  File "/usr/local/lib/python3.12/contextlib.py", line 158, in __exit__
    self.gen.throw(value)
  File "/usr/local/lib/python3.12/site-packages/urllib3/response.py", line 461, in _error_catcher
    raise ProtocolError("Connection broken: %r" % e, e)
urllib3.exceptions.ProtocolError: ("Connection broken: InvalidChunkLength(got length b'', 0 bytes read)", InvalidChunkLength(got length b'', 0 bytes read))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/homeconnect/sseclient.py", line 82, in __next__
    next_chunk = next(self.resp_iterator)
                 ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/requests/models.py", line 822, in generate
    raise ChunkedEncodingError(e)
requests.exceptions.ChunkedEncodingError: ("Connection broken: InvalidChunkLength(got length b'', 0 bytes read)", InvalidChunkLength(got length b'', 0 bytes read))

Additional information

I know that the Home Connect server is playing up recently. And the dishwasher has received a new firmware as well a few days ago. Might be the error related to something else, but generally the Salt nearly empty sendor has not turned to Present, neither to Confirmed. Previously the Rinse Aid nearly empty sensor worked (a few days or a week ago), but this is the first time with the Salt sensor. Tried to reload the integration but no success on the sensor.

home-assistant[bot] commented 1 week ago

Hey there @davidmstraub, @diegorro98, mind taking a look at this issue as it has been labeled with an integration (home_connect) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `home_connect` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign home_connect` Removes the current integration label and assignees on the issue, add the integration domain after the command. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue. - `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


home_connect documentation home_connect source (message by IssueLinks)

Diegorro98 commented 1 week ago

Hi! These sensors are event based sensors. AFAIK right now (I would like to investigate more about events), events cannot be fetched, they are sent by the server only once, so if there is any problem and the event cannot be delivered to the Home Assistant instance, you will not know the current status of the sensor.

GSzabados commented 1 week ago

Then how the confirmed state can be reached?

I understand that they are events, I have dug into the API documentation and find that absolutely ridiculous, especially that it is a state of the dishwasher, which is cleared once you fulfill the Salt tank.

Diegorro98 commented 1 week ago

See Event Present State Enumeration

GSzabados commented 1 week ago

I read that, but where the Event has to be confirmed? What to confirm on an even when the oven reaches 200C? It just doesn't make any sense. There is no option to confirm an event, unless it meant that the even notification has been received. But where is should be confirmed? In the app? On the machine? It makes no sense. Unless it is for specific events.

Diegorro98 commented 1 week ago

About the functionality of the events feature I can't give you more info because I don't have that information, I'm sorry

Maybe @beastie29a can answer your questions about events as he was the one that first added event sensors.

beastie29a commented 1 week ago

I read that, but where the Event has to be confirmed? What to confirm on an even when the oven reaches 200C? It just doesn't make any sense. There is no option to confirm an event, unless it meant that the even notification has been received. But where is should be confirmed? In the app? On the machine? It makes no sense. Unless it is for specific events.

The work I did on the events was focused mostly on FridgeFreezer since that's the only appliance I had to work with and the simulator doesn't simulate events well. For the oven reaching 200 though, I wonder if that would be a program finished event? If that's the case then we should be able to add a button utilizing the command api. I'll try a few things on my fridge to see if there's a way to acknowledge an event from the API and not just the appliance or app.

GSzabados commented 1 week ago

The example with the oven was just the example from the documentation.

My main problem that the salt is nearly empty has not triggered, has not managed to reach confirmed state, but it stayed all the way as off.

The Rinse aid was working a week ago.