Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ACCESS_FREQUENCY_IS_TOO_HIGH still not fixed #29

Closed
mkosmida2 opened this issue Dec 22, 2022 · 24 comments · Fixed by #35
Closed

ACCESS_FREQUENCY_IS_TOO_HIGH still not fixed #29

mkosmida2 opened this issue Dec 22, 2022 · 24 comments · Fixed by #35

Comments

@mkosmida2
Copy link

Logger: custom_components.fusion_solar.device_real_kpi_coordinator
Source: helpers/update_coordinator.py:168
Integration: FusionSolar (documentation, issues)
First occurred: 21 grudnia 2022 11:52:41 (149 occurrences)
Last logged: 10:59:46

Error fetching FusionSolarOpenAPIDeviceRealKpiType data: Error fetching data: Access frequency to high. failCode: 407, message: ACCESS_FREQUENCY_IS_TOO_HIGH

while I can see the Skipped call due to rate limiting in action my entities are still becoming unavailable...

Unexpected error fetching FusionSolarOpenAPIStationYearKpi data: Access frequency to high. failCode: 407, message: ACCESS_FREQUENCY_IS_TOO_HIGH

@tijsverkoyen
Copy link
Owner

Hm. Weird. Are there other integrations that use the same credentials?

@mkosmida2
Copy link
Author

nope

@mkosmida2
Copy link
Author

image

@mkosmida2
Copy link
Author

I also have one with "Kiosk mode".. so it should not cause OpenAPI issues

@tijsverkoyen
Copy link
Owner

Are you willing to share your OpenAPI credentials? If so: mail them to fusionsolar[at]verkoyen.eu

@mkosmida2
Copy link
Author

send an email
please reply if You need anything else?
perhaps stopping the integration?

@tijsverkoyen
Copy link
Owner

Idd, please stop/disable the integration. I will try to debug it next week if I find the time

@mkosmida2
Copy link
Author

It's stopped

@mkosmida2
Copy link
Author

let me know when You have some more information

@tijsverkoyen
Copy link
Owner

I won't have time this week, sorry.
You could increase the interval that is used to something more then 1 minute

@mkosmida2
Copy link
Author

where would I set that?

@mkosmida2
Copy link
Author

updated update_interval=timedelta(minutes=5) and dont see any errors showing up

@mkosmida2
Copy link
Author

that did not help with
Unexpected error fetching FusionSolarOpenAPIStationYearKpi data: Access frequency to high. failCode: 407, message: ACCESS_FREQUENCY_IS_TOO_HIGH :(

@tijsverkoyen
Copy link
Owner

are you 100% sure you have version 2.2.0 installed?

@benztanji
Copy link

Hi tijsverkoyen,
I'm sure the version 2.2.0 is installed.
Trying a few minutes ago, still got Error fetching FusionSolarOpenAPIDeviceRealKpiType data: Error fetching data: Access frequency to high. failCode: 407, message: ACCESS_FREQUENCY_IS_TOO_HIGH

and found new warnings below
FusionSolarOpenAPIDeviceRealKpiType Skipped call due to rate limiting. Wait for 120.0 seconds. 1/2
FusionSolarOpenAPIDeviceRealKpiType Skipped call due to rate limiting. Wait for 60.0 seconds. 2/2
FusionSolarOpenAPIDeviceRealKpiType Skipped call due to rate limiting. Wait for 0.0 seconds. 3/2

@tijsverkoyen
Copy link
Owner

@mkosmida2 As I see it correctly you have a dongle and a string inverter in your setup, correct?

Only the string inverter (device type ID: 1) calls the endpoint getDevRealKpi. Which can be accessed once per minute.

The 2.2.0 version has code in it to loop over the different device types and only does the call every minute (interval) per type. This to prevent reaching the rate limiting. So in essence something like:

  • Minute 1: do call getDevRealKpi for devices with type 1
  • Minute 2: do call getDevRealKpi for devices with type 10
  • Minute 3: do call getDevRealKpi for devices with type 17
  • ...

But you only have a string inverter (type 1), so every minute the data is requested. As there are no other types.

As you said you have altered the code to use an interval of 5 minutes. I don't see any reason why the rate limit can be reached.

I think you should contact the Fusion Solar support team and ask them if there is any other rate limiting applied to your station or what could be the issue.

@tijsverkoyen
Copy link
Owner

@benztanji And the entities are never updated?
As it is normal to see the error and the warnings in the logs. After Wait for 0.0 seconds is shown in the logs the rate limiting should be cleared and the entities should get updated again.

@benztanji
Copy link

I have 2 strings and 1 meters.

First, a meter shows up values while 2 strings show unknown values. A minute later, the values of meter change to unknown but the values of 2 strings show up instead.

So for, each of them update every two minutes which contains a minute of unknown and another minute of updated values.

Error 407 still occur in system log, which might be the API limits number of fetch only one type of device per minute

@tijsverkoyen
Copy link
Owner

I have created a new release with a fix. See https://github.com/tijsverkoyen/HomeAssistant-FusionSolar/releases/tag/v2.3.0

@Karakth
Copy link

Karakth commented Jan 15, 2023

Still getting ACCESS_FREQUENCY_TOO_HIGH error despite being on version 2.3.1
I have 5 devices with 153 entities total, maybe that's the issue?

@tijsverkoyen
Copy link
Owner

@Karakth are the entities unknown or unavailable?
The message ACCESS_FREQUENCY_TOO_HIGH will appear in the logs, but the previous value should be shown

@Karakth
Copy link

Karakth commented Jan 16, 2023

Showing as Unknown, both for battery and for power sensor. The plant entities though like total daily energy are updating without issues.

@tijsverkoyen
Copy link
Owner

Weird, because there is a system in place that rotates over the different type of devices.
Can you mail your OpenAPI credentials to fusionsolar [at] Verkoyen.eu? Then I will try to debug

@tijsverkoyen tijsverkoyen reopened this Jan 16, 2023
@tijsverkoyen
Copy link
Owner

@Karakth I suspect your name is Chris?
If so I have tested your credentials.

You have 4 devices linked to your plant (5 devices in Home Assistant):

  • a dongle
  • a string inverter
  • a power sensor
  • a battery

The code does a call per device type, in this case 4 calls. But only for the string inverter the data is returned. For the other devices no data is returned.

I think it would be best if you contact eu_inverter_support@huawei.com and ask them why the following call does not return any data

curl --location --request POST 'https://eu5.fusionsolar.huawei.com/thirdData/getDevRealKpi' \
--header 'XSRF-TOKEN: x-REDACTED \
--header 'Content-Type: application/json' \
--data-raw '{
  "devIds": "1000000035146267",
  "devTypeId": "39"
}'

For the string inverter it returns data, but not for the dongle, power sensor nor the battery.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants