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
71.11k stars 29.79k forks source link

Integration Home Connect Sensors of Devices incomplete #103368

Open eddy099876 opened 10 months ago

eddy099876 commented 10 months ago

The problem

I connected Homeassistant to my Homeconnect Account, as I was doing it with OpenHab. I found that not all of the Sensors which I was able to use in OpenHab are shown in Homeassistant.

ie. in Coffee Maker DripTray full, WaterTank empty and BeanContainer empty or in Washingmachine, iDos Level 01 and 02 is missing in Homeassistant

What version of Home Assistant Core has the issue?

core-2023.11.0

What was the last working version of Home Assistant Core?

it never worked

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?

No response

Additional information

No response

home-assistant[bot] commented 10 months ago

Hey there @davidmstraub, 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.

(message by CodeOwnersMention)


home_connect documentation home_connect source (message by IssueLinks)

eyk107 commented 8 months ago

also different sensors in my dishwasher?! Is this a known issue?

boergegrunicke commented 7 months ago

I would also like to have the information for drip tray, water tank and bean container. In addition to this, I noticed that there is a switch for all the default coffee products, but I am also using a few favorites. Having controls to prepare these would also be very helpful to me.

eyk107 commented 7 months ago

It seems like the public API doesn't serve the same information as the private API

boergegrunicke commented 7 months ago

Not quite sure about the specific API, but I know that the ioBroker integration does report the states for bean container, water tank and drip tray, as well as salt and rinse aid for dishwashers. I would expect that both are using the same API.

eyk107 commented 7 months ago

Ah okay, wasn't aware of that. Got the information in a forum, but maybe the entry was a kind of old

eddy099876 commented 7 months ago

Maybe this helps, the Openhab Items for the Coffemaker are called that way:

homeconnect:CoffeeMaker: ID :coffeemaker_drip_tray_full_state homeconnect:CoffeeMaker: ID :coffeemaker_water_tank_empty_state homeconnect:CoffeeMaker: ID ::coffeemaker_bean_container_empty_state

These are all switches

boergegrunicke commented 7 months ago

Also, it would be very helpful to get the actual value that is reported from the API as current active program. Why? This also reports values like cleaning programs or turn off flushing. For my automations, I need this information because I have a few things based on the coffee machine progress. As the Operational state also goes to "Run", when the machine is cleaned, and the progress is showing the progress, I have no other option to get the information, if this is actual coffee or cleaning or whatever. Also, I cannot loop through all coffee products to check, if one is enabled because favorites and "coffee world" products also do not appear as switches that could be enabled or disabled.

issue-triage-workflows[bot] commented 4 months ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

boergegrunicke commented 4 months ago

The situation is still unchanged!

ItRainsSmiles commented 4 months ago

Also some oven sensors are not transferred to the HA integration. "Brotbackstufe" and "Gärstufe" are two examples.

issue-triage-workflows[bot] commented 1 month ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

boergegrunicke commented 1 month ago

The situation is still unchanged!

beastie29a commented 4 weeks ago

@boergegrunicke, I'm trying to see if the event for BeanContainer comes in through the home-connect simulator and am unable to replicate it. Would you be able to enable debugging in the integration and then perform any of the actions that should create the state change (DripTray full, WaterTank empty, etc.)? I'm looking to see how the event populates the status data of the device to see if a sensor could be created for it.

boergegrunicke commented 4 weeks ago

Hi @beastie29a, thanks for taking care, I enabled the debug logging and will post updates when an event happens.

boergegrunicke commented 3 weeks ago

@beastie29a I just ran into a WaterAlmostEmpty Event but cannot see anything from the homeconnect integration, inside the downloaded log. The only thing, that looks related to events is the following:


2024-08-12 16:36:28.193 ERROR (Thread-6 (_listen)) [root] Uncaught thread exception
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 758, in _update_chunk_length
    line = self._fp.fp.readline()
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/socket.py", line 708, in readinto
    return self._sock.recv_into(b)
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/ssl.py", line 1252, in recv_into
    return self.read(nbytes, buffer)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/ssl.py", line 1104, in read
    return self._sslobj.read(len, buffer)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TimeoutError: The read operation timed out

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 449, in _error_catcher
    raise ReadTimeoutError(self._pool, None, "Read timed out.")
urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='api.home-connect.com', port=443): Read timed out.

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 826, in generate
    raise ConnectionError(e)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='api.home-connect.com', port=443): Read timed out.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/urllib3/connection.py", line 174, in _new_conn
    conn = connection.create_connection(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/urllib3/util/connection.py", line 72, in create_connection
    for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/socket.py", line 964, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
socket.gaierror: [Errno -3] Try again

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/urllib3/connectionpool.py", line 715, in urlopen
    httplib_response = self._make_request(
                       ^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/urllib3/connectionpool.py", line 404, in _make_request
    self._validate_conn(conn)
  File "/usr/local/lib/python3.12/site-packages/urllib3/connectionpool.py", line 1060, in _validate_conn
    conn.connect()
  File "/usr/local/lib/python3.12/site-packages/urllib3/connection.py", line 363, in connect
    self.sock = conn = self._new_conn()
                       ^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/urllib3/connection.py", line 186, in _new_conn
    raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPSConnection object at 0x7efe0a484320>: Failed to establish a new connection: [Errno -3] Try again

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/requests/adapters.py", line 667, in send
    resp = conn.urlopen(
           ^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/urllib3/connectionpool.py", line 829, in urlopen
    return self.urlopen(
           ^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/urllib3/connectionpool.py", line 801, in urlopen
    retries = retries.increment(
              ^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/urllib3/util/retry.py", line 594, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='api.home-connect.com', port=443): Max retries exceeded with url: /api/homeappliances/events (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7efe0a484320>: Failed to establish a new connection: [Errno -3] Try again'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.12/threading.py", line 1073, in _bootstrap_inner
    self.run()
  File "/usr/local/lib/python3.12/threading.py", line 1010, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/local/lib/python3.12/site-packages/homeconnect/api.py", line 178, in _listen
    for event in sse:
  File "/usr/local/lib/python3.12/site-packages/homeconnect/sseclient.py", line 92, in __next__
    self._connect()
  File "/usr/local/lib/python3.12/site-packages/homeconnect/sseclient.py", line 55, in _connect
    self.resp = requester.get(self.url, stream=True, **self.requests_kwargs)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/requests/sessions.py", line 602, in get
    return self.request("GET", url, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/requests_oauthlib/oauth2_session.py", line 521, in request
    return super(OAuth2Session, self).request(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/requests/sessions.py", line 589, in request
    resp = self.send(prep, **send_kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/requests/sessions.py", line 703, in send
    r = adapter.send(request, **kwargs)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/requests/adapters.py", line 700, in send
    raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='api.home-connect.com', port=443): Max retries exceeded with url: /api/homeappliances/events (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7efe0a484320>: Failed to establish a new connection: [Errno -3] Try again'))```

To get more details about the events: I could probably set up the demo implementation of the python library on a long-running machine and collect the output there.
sajikur commented 1 week ago

Hi all, I've an error when try to configure integration. I've follow the guide in developer web site but, when I try to add integration, I've this error on redirect page, without any possibilities to change configuration on ha

{ "error": "unauthorized_client", "error_description": "request rejected by client authorization authority (developer portal)", "state": "eyJhbGciOiJIUzI1NiIsInRxxxxxxxxxxxxxyJmbG93X2lkIjoiMDFKNlk4MzRTUzZLU1g1OEYxRDdNWFlUVEciLCJyZWRpcmVjdF91cmkiOiJodHRwczovL2JhbGF1cy5kdWNrZG5zLm9yZzo4MTIzL2F1dGgvZXh0ZXJuYWwvY2Fxxxxxxxxx.STIi8lPT6PUGouiq3bnz_2QAESbdPgH_mT4wJ4WFbsM" }

Need help

thank you