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
69.03k stars 28.28k forks source link

Wolflink Heat pump integration #116780

Open worldstock opened 2 weeks ago

worldstock commented 2 weeks ago

The problem

Following a software update of the Wolflink APP, the wolflink integration is not working any more in HA when being accessed via the same network that HA uses. This also resulted in being unable to access the Wolflink SW via the APP when being in the home network. Trying to reproduce, it is possible to use the APP from outside but not internally. Getting in touch with WOLF, the declared that they are blocking all internal IPs when the wolflink integration or any other Smart home integration is accessing their ISM7 Module. Told them this is a severe mistake but they stated it caused security issues on their servers.

What version of Home Assistant Core has the issue?

2024.5.1

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

wolflink

Link to integration documentation on our website

No response

Diagnostics information

Traceback (most recent call last): File "/usr/local/lib/python3.12/site-packages/wolf_comm/token_auth.py", line 51, in token verification_token = elements[0] # __RequestVerificationToken


IndexError: list index out of range

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 575, in async_setup
    result = await component.async_setup_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/wolflink/__init__.py", line 52, in async_setup_entry
    parameters = await fetch_parameters_init(wolf_client, gateway_id, device_id)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/wolflink/__init__.py", line 140, in fetch_parameters_init
    return await fetch_parameters(client, gateway_id, device_id)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/wolflink/__init__.py", line 133, in fetch_parameters
    fetched_parameters = await client.fetch_parameters(gateway_id, device_id)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/wolf_comm/wolf_client.py", line 107, in fetch_parameters
    desc = await self.__request('get', 'api/portal/GetGuiDescriptionForGateway', params=payload)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/wolf_comm/wolf_client.py", line 56, in __request
    await self.__authorize_and_session()
  File "/usr/local/lib/python3.12/site-packages/wolf_comm/wolf_client.py", line 87, in __authorize_and_session
    self.tokens = await self.token_auth.token(self.client)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/wolf_comm/token_auth.py", line 111, in token
    raise InvalidAuth
wolf_comm.token_auth.InvalidAuth

### 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 1 week ago

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

Code owner commands Code owners of `wolflink` 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 wolflink` 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)


wolflink documentation wolflink source (message by IssueLinks)

mtielen commented 1 week ago

@worldstock Are you using a local connection to your ISM7? The ism7 accepts only a single connection, so you cannot use the Smartset application or mobile app while using local connection. See info also documented here: https://github.com/zivillian/ism7mqtt

To use this integration you can and Wolf's apps you need disconnect any local connection to your ISM7.

Let me know if this is the case otherwise give me a debug log file of the integration so I can see why you get this as I'm able to use this integration and at the same time the smart apps.

mtielen commented 1 week ago

@home-assistant add-label needs-more-information

sniesen commented 1 week ago

As far as I remember Wolf changed the authentication system to implement a rate limit - they talked about it in another issue. In order for this integration to work again, it has to be rewritten to implement the new authentication system.

mtielen commented 1 week ago

As far as I remember Wolf changed the authentication system to implement a rate limit - they talked about it in another issue. In order for this integration to work again, it has to be rewritten to implement the new authentication system.

Hi @sniesen This change has been done It's using OpenID now and the authentication had a rate limiting issues have been fixed in 2024.5. The polling interval is safely set to 90 seconds. now but will be revert back to the original 60 seconds in the next release. The website of Wolf itself uses even 10 seconds. The only limitation which in my tests can cause this is using a local integration like ism7mqqt. as wolf only allows one connection to it's Link device due to hardware not able to handle more which leads to Safe mode running of the Heating system.

If it is anything else please provide me more info otherwise I can't look into it and try to find a fix.