core icon indicating copy to clipboard operation
core copied to clipboard

Add support for ASIN AQUA Home 11013784x

Open innubili opened this issue 3 years ago • 16 comments

The problem

the integration has been working fine for over a month and since the 17-Apr it became unavailable. I've deleted the integration and added it again (to go through the configuration again and it worked fine for ~10 min. but suddendly it became unavailable again, and still is (unavailable).

What version of Home Assistant Core has the issue?

core-2022.4.6

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

Aseko Pool Live

Link to integration documentation on our website

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

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 335, in async_setup
    result = await component.async_setup_entry(hass, self)
  File "/usr/src/homeassistant/homeassistant/components/aseko_pool_live/__init__.py", line 30, in async_setup_entry
    units = await account.get_units()
  File "/usr/local/lib/python3.9/site-packages/aioaseko/mobile.py", line 93, in get_units
    resp = await self._request("get", "units")
  File "/usr/local/lib/python3.9/site-packages/aioaseko/mobile.py", line 66, in _request
    raise InvalidAuthCredentials
aioaseko.exceptions.InvalidAuthCredential

Additional information

innubili avatar Apr 23 '22 21:04 innubili

Hey there @milanmeu, mind taking a look at this issue as it has been labeled with an integration (aseko_pool_live) you are listed as a code owner for? Thanks! (message by CodeOwnersMention)

I've got the same issue. A short while after re-adding the integration the error message about invalid authentication comes back.

robpow avatar May 01 '22 21:05 robpow

Now when you log in on their web console at pool.aseko.com the response body contains a timestamp, e.g.: "expiresAt": 1651473760000 Which works out to exactly 15 mins from the point of the login.

So assuming that this is the cause of the problem the integration would have to detect the login token expiration and re-authenticate.

robpow avatar May 02 '22 06:05 robpow

I've got the same issue. A short while after re-adding the integration the error message about invalid authentication comes back.

same issue here

Vinni1982 avatar May 18 '22 09:05 Vinni1982

@robpow The token indeed expires after 15 minutes. They must have changed that, since I tested the integration for more than a month before release without any issues, and the repose login didn't have an expiresAt and refreshToken. I'm not sure what the endpoint is to refresh the token, but will try to figure it out asap. Note that the integration uses the same API as their (Android) app, which is different from the web API, also these tokens now expire after 15 minutes.

milanmeu avatar May 18 '22 20:05 milanmeu

@milanmeu Are you already working on it? Is a fix to be expected anytime soon? Thnx for the feedback

innubili avatar May 20 '22 14:05 innubili

I fixed the issue on my local dev instance, also added a reauth_flow, so HA will ask you to login again. But I first have to push a new version of the library, and write/adjust some tests before I can create PR.

milanmeu avatar Jun 02 '22 03:06 milanmeu

I am experiencing the same issue. Any update on the fixing version? Thanks!

stefkoch09 avatar Jul 12 '22 18:07 stefkoch09

Hi, I have same problem (ASIN AQUA Salt). I'll be happy to help with testing/debugging.

coolex avatar Aug 05 '22 16:08 coolex

I'm having the same issue as described

I fixed the issue on my local dev instance, also added a reauth_flow, so HA will ask you to login again. But I first have to push a new version of the library, and write/adjust some tests before I can create PR.

Thanks for your hard work.

Any update on a PR?

jappish84 avatar Aug 11 '22 07:08 jappish84

Same here. Also happy to help with debugging/testing. Great work!

Lockzi avatar Aug 14 '22 08:08 Lockzi

same here, hope it will be fixed...I choose aseko because of this integration

stixpunk avatar Aug 22 '22 12:08 stixpunk

Is there any update on this? what's holding back a PR and if PR is problematic, is there any other way to update?

jappish84 avatar Jan 02 '23 11:01 jappish84

Any update on the reauth_flow add-on to be able to use the integration, or did anybody find another work around, is there a way to re-install an integration every 10 minutes? Any help appreciated. 🙏

cms1236 avatar Mar 18 '23 09:03 cms1236

Hi

A workaround working for me:

I am using Athom Homey as a Z-wave/zigbee hub and because Homey often works well with devices not supported by HAssio, in this case as well.

You can buy a Athom Homey Bridge, and download the Aseko app on it, which works flawless with Aseko Asin products (i use it with my Aseko Watersens NET). Then use mqtt to communicate between hassio and homey and control your Aseko device via Hassio.

Kind regards,

Dwayne Peeters

D2543A4D-1F52-436A-9275-52C77FD73488 2454EE1C-5D44-4D5E-85F8-BDBA6B878A8D D6A328A2-B1AB-401A-B956-FBDCA8304813

dwaynepeeters avatar Mar 20 '23 16:03 dwaynepeeters

Hi Dwayne,

Thank you for sharing the workaround and setup! Looks like a great solution. Will look into Homey, might solve some other challenges es well.

Regards, Christian Stewart

cms1236 avatar Mar 21 '23 06:03 cms1236

Hey guys,

I am having the same issue here, and it looks like the root cause of the problem is a change in the auth flow of the underline API and the library providing the API client being outdated.

Since the maintainer (@milanmeu ) has abandoned both the integration and the library I suggest either someone forking and updating the lib and then changing the lib's source for the integration or updating/creating a new one the integration to local utilising aseko's unit's build-in serial to network client by rerouting the data stream from pool.aseko.com:47524 to HA endpoint handled by the integration.

Hope I didn't repeat someone else's suggestions

buekliev avatar Mar 27 '23 09:03 buekliev

Thank you buekliev,

appreciate, maybe one day I will be able to, but technically I am currently not, one thing I did not know before. The local connection runs on a (the) standard password and the link/config seems customizable. Screenshots attached. Screenshot 2023-03-27 at 13 50 23

Screenshot 2023-03-27 at 13 49 38

Rerouting seems like an "easy" fix if knowing how to setup HA to deal with the stream, is where I don't know how.

Hope this helps, kind regards, Christian Stewart

cms1236 avatar Mar 27 '23 11:03 cms1236

Hi all,

did anyone of you try to solve it with screenscraping from the web page https://pool.aseko.com ? Values are all there.

I did try it with the multiscrape custom component, but did not get it working. It looks like I did not get past the login page ...

Any ideas or experiences on that approach?

Thanks and best regards, Stefan

stefkoch09 avatar Mar 27 '23 17:03 stefkoch09

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.