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

[FR] Polling rate adjustment #30

Open
jhlchu opened this issue Jan 5, 2025 · 4 comments
Open

[FR] Polling rate adjustment #30

jhlchu opened this issue Jan 5, 2025 · 4 comments
Assignees
Milestone

Comments

@jhlchu
Copy link

jhlchu commented Jan 5, 2025

The problem

I got disconnected in both HA and the Vesync app after leaving on Levoit humidifier overnight. Vesync app modal message appears telling me I exceeded the request rate, and I'd have to wait a day. If I had to guess, it's the constant polling of humidity data. Looking for a way to adjust this so I don't get rate limited again.

1000003703

What version of this integration has the issue?

1.3.3

What version of Home Assistant Core has the issue?

2024.12.5

Diagnostics

N/A

Home Assistant log

N/A

Additional information

No response

@ewelin34
Copy link

ewelin34 commented Jan 6, 2025

I've had this happen to me. The current polling rate is every 30 seconds and that's too frequent if you have several devices. I adjusted this manually by changing line 77 of init.py. to

update_interval=timedelta(seconds=60),

I'd do a PR but I've never done one before and don't really have the time to explore how to.

@gdgib
Copy link
Collaborator

gdgib commented Jan 6, 2025

I'm hoping to get a PR from @RobertD502 which would make this configurable in the UI.

@gdgib gdgib added this to the v1.4.0 milestone Jan 6, 2025
@gdgib gdgib self-assigned this Jan 6, 2025
@ewelin34
Copy link

ewelin34 commented Jan 7, 2025

I'm hoping to get a PR from @RobertD502 which would make this configurable in the UI.

Just read about his changes, looks good! Great work on all of the fixes today, looking forward to installing it later tonight.

@jhlchu
Copy link
Author

jhlchu commented Jan 7, 2025

Seems like limit is 3200 + 1500 * user owned device number.
home-assistant/core#122620
Custom polling via automation makes the device report Unavailable instead. I'll use @ewelin34 's method and manually adjust it for now so I can keep using the device.

There's a PR in the vesync integration that drops polling to 60 seconds.
home-assistant/core#134087

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

No branches or pull requests

3 participants