fustom / ariston-remotethermo-home-assistant-v3

Ariston NET remotethermo integration for Home Assistant based on API
MIT License
167 stars 38 forks source link

[BUG] Requests are blocked for xx seconds #362

Open smarthomedesign opened 2 months ago

smarthomedesign commented 2 months ago

First of all please check my wikipage: https://github.com/fustom/ariston-remotethermo-home-assistant-v3/wiki and the previous issues (included the closed ones) before you create a new one.

Describe the bug I m getting blocked by api because of an error

Expected behavior

Screenshots This error originated from a custom integration. Logger: custom_components.ariston.coordinator Source: helpers/update_coordinator.py:312 integration: Ariston (documentation, issues) First occurred: September 23, 2024 at 3:37:24 PM (130 occurrences) Last logged: 12:11:37 AM

Unexpected error fetching ariston-WaterHeater-coordinator data Unexpected error fetching ariston-WaterHeater-bus_errors_coordinator data Unexpected error fetching ariston-WaterHeater-energy_coordinator data Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 312, in _async_refresh self.data = await self._async_update_data() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 268, in _async_update_data return await self.update_method() ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/ariston/galevo_device.py", line 105, in async_update_state (self.data, self.menu_items) = await asyncio.gather( ^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/ariston/ariston_api.py", line 637, in async_get_menu_items items = await self._async_get( ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/ariston/ariston_api.py", line 930, in _async_get return await self.async_request("GET", path, params, None) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/ariston/ariston_api.py", line 906, in async_request raise Exception(response.status, content) Exception: (429, b'Requests are blocked for 66 seconds')

Environment (please complete the following information):

Additional context, debug log Add any other context about the problem here.

ZsBT commented 2 months ago

429, b'Requests are blocked for 66 seconds' - Ariston has blocked your IP address as they limit the request rate. Already discussed: https://github.com/fustom/ariston-remotethermo-home-assistant-v3/issues/332

ilgio commented 1 month ago

ariston answered me like this:

Gentile utente,

il problema è causato dall'utilizzo delle API per un software di terze parti. E' necessario evitare di utilizzarlo.

Cordialmente,

Support TEam

Oneshotblu commented 1 month ago

Same problem here ilgio.. did you find any solution? Also the mobile app is not working..

Ho lo stesso problema.. ma anche l'app da cellualare non va nonotante abbia disattivapo l'integrazione da giorni, ancora non si collega.

ilgio commented 1 month ago

turn off the boiler for an hour, then turn it back on

ilgio commented 1 month ago
Screenshot 2024-10-14 alle 13 54 23
ilgio commented 1 month ago

from what I understand it seems that they can see that the bees are requested by an unauthorized APP, the authorized ones are apple homekit, google home and amazon alexa. I tried to disable the integration for a week and then reactivate it with 400/60/800, the ariston app on the phone works, but the integration continues to skip

Screenshot 2024-10-14 alle 17 01 31
volkans80 commented 1 month ago

Same problem. remote thermo web page is working but mobile app and homeassistant integration not working.

tanganellilore commented 2 weeks ago

Someone try to use some specific user-agent o python request to "emulate" a browser o similar?

Probably in that way we can avoid to have ip blocked for non standard user agent. (with python request is very easy to implementat it)

shvirik commented 2 weeks ago

Same (from Spain). Failure date: 8 Nov 2024 (midnight)

Meister1977 commented 2 weeks ago

I think, this issue should be raised to Ariston, becaus if they start to decline Home Assistant, then I will never buy again Ariston products.

tanganellilore commented 2 weeks ago

Aristo not support today and will not support home Assistant, as already shared in all reply email present in this issue and other. The only way to avoid 'ban' of ip is PR approve some third part application from ariston side or emulate the traffic create by website or google/home kit.

jmlt commented 2 weeks ago

Same (from Spain). Failure date: 8 Nov 2024 (midnight)

same here (portugal). My ariston app also says "device online but cannot retrieve info"

Edit: Ariston support was useless but I managed to get it working, I disabled ariston integration on HA, unplugged my Velis wifi from the wall, waited all night, turned on this morning, activated the integration and it's now working normally.

I belive my ip was indeed blocked due too many requests.

santibolin commented 1 week ago

It is not a blocked IP, it seems that it is a user block because if you change your public IP it does not work. You must stop the HA integration for a while and then start it again. I bought Ariston because I could integrate with HA but it is not compatible with Ariston... The support has a prototype answer... "only with official APP, Google, Alexa..."

tanganellilore commented 1 week ago

If i change my ip at home and stop the integration, all thing Return to works as expected.

Now I'm testing a "custom" user agent inside the python library used by thin integration, manually change the python conde. If all works, i will propose a PR on the library to allow us to use custom user agent and also a PR on this library to integrate the usage of custom user agent.