signalkraft / mypyllant-component

Home Assistant component for the myVAILLANT API, controls Vaillant devices such as aroTHERM heatpumps and ecoTEC boilers
https://signalkraft.com/mypyllant-component/
MIT License
145 stars 22 forks source link

Error: API calls being exceeded #204

Open rholligan opened 2 months ago

rholligan commented 2 months ago

Before submitting a new issue

Problem description

For the last couple of days I'm getting this error relating to API calls being exceeded

Logs

This error originated from a custom integration.

Logger: custom_components.mypyllant.coordinator
Source: helpers/update_coordinator.py:386
integration: myVAILLANT (documentation, issues)
First occurred: 25 August 2024 at 22:46:20 (9 occurrences)
Last logged: 12:41:04

Error fetching myVAILLANT data: Quota Exceeded on https://api.vaillant-group.com/service-connected-control/end-user-app-api/v1/homes, skipping update of myVAILLANT data for another 10800s
Error fetching myVAILLANT data: 403, message='Forbidden', url='https://api.vaillant-group.com/service-connected-control/end-user-app-api/v1/systems/xxx/meta-info/time-zone'
Error fetching myVAILLANT data: 403, message='Forbidden', url='https://api.vaillant-group.com/service-connected-control/end-user-app-api/v1/emf/v2/xxx/currentSystem'
Error fetching myVAILLANT data: 403, message='Forbidden', url='https://api.vaillant-group.com/service-connected-control/end-user-app-api/v1/systems/xxx/tli'
Error fetching myVAILLANT data: 504, message='Gateway Time-out', url='https://api.vaillant-group.com/service-connected-control/end-user-app-api/v1/systems/xxx/tli'
rholligan commented 2 months ago

Here are my settings relating to update frequency (unchanged for several months)

Screenshot_20240826_212756_Home Assistant

Krzysztonek commented 1 month ago

Exactly same issue here.

Boeroer commented 1 month ago

I encountered the same problem yesterday. Interestingly it started after a technician finished the annual maintenance for the heat pump. But that must be a coincidence...?

janezkranjc commented 1 month ago

Started happening to me too, no technician and no update

Telejunky commented 1 month ago

I have the same problem since yesterday.

fodorg01 commented 1 month ago

I also have the same problem since yesterday (19.10.2024). The MyVaillant app works, it is able to show actual information about my system, and I can also change the configuration via that app. However, this integration stopped working yesterday. I get the "quota exceeded" error on the energy data. But the integration is apparently not able to fetch any data (all entities are unavailable). I suspect that the reason could be a Vaillant API change. (Probably also related to that they introduced this heating curve setting possibility.) By the way, the MyVaillant application is crashing when it tries to show energy data. Of course this problem is not directly relevant here. But still, it gives the hint that something is going on on Vaillant's side. Also, because of this, I accept if the integration also couldn't fetch energy consumption data. But the point is: it cannot fetch any data.

Edit 1: I also want to add that since the original "quota exceeded" log message, there aren't any log entries from this integration in the HA system log.

Edit 2: now I disabled the integration to avoid any further interference with the Vaillant service.

Edit 3: Now (~ half a day after my initial posting of this comment) the MyVaillant app is not crashing anymore when it tries to show energy data. One possibility (just guessing in the dark though) is that this integration caused the "quota exceeded" error, which also resulted in the official app also not getting these data from the server; causing it to crash. No, as I disabled the integration, this may have recovered. Now I could try again enabling the integration, but I am not sure if I would as long as there is no update provided about this issue.

Boeroer commented 1 month ago

Vaillant send an eMail today and said that they updated their myVaillant app (it crashed when looking up the consuption data). Whatever they did to the app and most likely also the api, it fixed this integration for me, too. Fingers crossed!

fodorg01 commented 1 month ago

@Boeroer : Thanks for the hint! I've just re-enabled the integration and it is now fetching the data, so it seems to be fine. Hopefully it stays like that and remains stable. Fingers crossed!🤞

Boeroer commented 4 weeks ago

My integration stopped working again. Same problem as before. The app works just fine (consumption data included). Seems like Vaillant is doing this on purpose.

hzulla commented 4 weeks ago

Same problem here.

Bildschirmfoto vom 2024-10-25 19-16-37

Error fetching myVAILLANT data: Quota Exceeded on https://api.vaillant-group.com/service-connected-control/end-user-app-api/v1/emf/v2/{id}/devices/{id}/buckets?resolution=HOUR&operationMode=COOLING&energyType=CONSUMED_ELECTRICAL_ENERGY&startDate=2024-10-24T00:00:00.000%2B02:00&endDate=2024-10-25T00:00:00.000%2B02:00, skipping update of myVAILLANT data for another 10752s
Error fetching myVAILLANT data: Quota Exceeded on https://api.vaillant-group.com/service-connected-control/end-user-app-api/v1/emf/v2/{id}/devices/{id}/buckets?resolution=HOUR&operationMode=COOLING&energyType=CONSUMED_ELECTRICAL_ENERGY&startDate=2024-10-25T00:00:00.000%2B02:00&endDate=2024-10-26T00:00:00.000%2B02:00, skipping update of myVAILLANT data for another 10800s
Error fetching myVAILLANT data: Quota Exceeded on https://api.vaillant-group.com/service-connected-control/end-user-app-api/v1/emf/v2/{id}/devices/{id}/buckets?resolution=HOUR&operationMode=COOLING&energyType=CONSUMED_ELECTRICAL_ENERGY&startDate=2024-10-25T00:00:00.000%2B02:00&endDate=2024-10-26T00:00:00.000%2B02:00, skipping update of myVAILLANT data for another 10744s
Error fetching myVAILLANT data: Quota Exceeded on https://api.vaillant-group.com/service-connected-control/end-user-app-api/v1/emf/v2/{id}/devices/{id}/buckets?resolution=HOUR&operationMode=COOLING&energyType=CONSUMED_ELECTRICAL_ENERGY&startDate=2024-10-25T00:00:00.000%2B02:00&endDate=2024-10-26T00:00:00.000%2B02:00, skipping update of myVAILLANT data for another 10726s
Error fetching myVAILLANT data: Quota Exceeded on https://api.vaillant-group.com/service-connected-control/end-user-app-api/v1/emf/v2/{id}/devices/{id}/buckets?resolution=HOUR&operationMode=COOLING&energyType=CONSUMED_ELECTRICAL_ENERGY&startDate=2024-10-25T00:00:00.000%2B02:00&endDate=2024-10-26T00:00:00.000%2B02:00, skipping update of myVAILLANT data for another 10717s
hzulla commented 3 weeks ago

Seems like Vaillant is doing this on purpose.

It's possible to write to the app's official support address at app-support@vaillant-group.com

After all, Vaillant apparently is either willfully or accidently degrading the service we bought the Sensonet for.

However, I'd recommend you contact your heating system installer (Heizungsbauer) and ask them to complain on your behalf to Vaillant. Your installer has a direct business contact relationship to Vaillant and the company is more likely to listen to customer complaints if they are reported through the installers.

(My installer gave me the contact address of his Vaillant Sales rep and the guy isn't just really helpful, he also gave me detailed technical advice when I had a problem with my Vaillant system's inclusion to my smart home setup where my installer couldn't help me. The company isn't unwilling to help nerd users like us.)

Boeroer commented 3 weeks ago

I currently only use the integration to ramp up the hot water temperature in times of plenty solar power. For that purpose I don't need to see data updates every 60 seconds (like the current default configuration suggests) because the automation is not triggered by data from the heat pump. So I set the interval to 3630 seconds and reloaded the integration - and that seems to circumvent this one problem ("Quota exceeded") for now. This is not ideal for lots of people of course, but for me it's enough atm. Because of that I won't bother my installer (yet). But I think I will still write to the app-support and lay out the whole thing. At least they were responsive enough when I asked them about the consumption data bug.

hzulla commented 3 weeks ago

I'm really happy with my heating system and it's working fine. I recommend Vaillant to others who want to replace their natural gas boiler with a heat pump like I did.

However, it's remarkably silly that after paying a five digit price tag for Vaillant gear there is no public documentation for the ebus protocol, the official ISE Vaillant ebus/KNX adapter is extremely limited in its feature set and the official app API gives me "quota exceeded" for benign 15 minute interval requests.

It's not exotic in 2024 that home owners want to integrate their heat pump to their smart home system.

Boeroer commented 3 weeks ago

Aaand it's unavailable again, even with 3630 sec intervals. This is annoying as hell.

Boeroer commented 3 weeks ago

I did a hacky workaround since reloading the integration allows to fetch data at least once: I created an automation that reloads the integration once a particular sensor of the integration becomes unavailable for more than 1 minute. I know it's a dirty solution - but at least it works for now:

- id: '1729964761593'
  alias: 'force myVaillant reload'
  description: ''
  triggers:
  - trigger: state
    entity_id:
    - sensor.flexocompact_domestic_hot_water_0_tank_temperature
    to: unavailable
    for:
      hours: 0
      minutes: 1
      seconds: 0
  conditions: []
  actions:
  - action: homeassistant.reload_config_entry
    data:
      entry_id: '{{ config_entry_id(''sensor.flexocompact_domestic_hot_water_0_tank_temperature'')
        }}'
  mode: single

Edit: Afaik Vaillant is using MS Azure for their IoT services. It could be that regular API calls will drive the cost if they are billed based on actual traffic. This could be a reason why Vaillant is actively blocking calls that don't seem to be manually triggered from the myVaillant app. I know that Haier (hosted on AWS) did the same when somebody wrote a HACS integration for their appliances. It drove up the costs for them so they intervened. They even wrote a harsh letter to the developer of the integration. After some back and forth they are now working together to find a solution that works for both HA users and Haier.

Edit2: the hacky workaround (reloading the integration as soon as the sensors become unavailable) is still functioning well. Maybe my user credentials will get banned at some point, we'll see...

rholligan commented 3 weeks ago

I only saw the issue between 26-Oct at ~12:00, and at ~10:00 image

Boeroer commented 3 weeks ago

The problem doesn't seem to be consistent. My automation I talked about above which reloads the integration once its sensors become unavailable hasn't triggered since 9 hours. Yesterday it triggered every 5 minutes (= the interval I configured to fetch new data).

rholligan commented 3 weeks ago

Yeah, almost as soon as I made the last post, my sensors became unavailable again 🥴

mgiesl2s commented 3 weeks ago

Is it possible to use an vpn or something else for home assistant or the the integration to change every request the external ip adress?

mgiesl2s commented 3 weeks ago

And why dont use this integration the local eebus protocol over tcp/ip? SMA can for example connect via eebus locally to vaillant

hzulla commented 3 weeks ago

Is it possible to use an vpn or something else for home assistant or the the integration to change every request the external ip adress?

You're using the API with your account login. If I were an API service provider, I'd use the quota per account, not per IP. Also, I'd consider actively bypassing a quota limit abusive.

As an API user, I want the API service provider to drop nonsensical quota limits instead of using clever tricks to bypass them.

And why dont use this integration the local eebus protocol over tcp/ip? SMA can for example connect via eebus locally to vaillant

The Vaillant variant ebus protocol is undocumented. ebusd has reverse-engineered much of it and there is a home assistant addon for ebusd adapters. (I'm using it in parallel to mypyllant.)

mgiesl2s commented 3 weeks ago

I doesnt wrote ebus. I wrote eebus. It is a protocol which communicates over tcp/ip. No ebusd is needet when using eebus instead. But i already doesnt find an eebus integration for home assistant. So it will be time to create one :-) who can this?

Boeroer commented 3 weeks ago

Some Vaillant communication modules like the VR 900 don't support eebus (only VR 920), although it was promised that they'd come eebus-ready. However, they work with the myVaillant app and -API.