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

ENCHANCEMENT - Hard set time to get data from cloud #31

Open
Saentist opened this issue Apr 13, 2023 · 10 comments
Open

ENCHANCEMENT - Hard set time to get data from cloud #31

Saentist opened this issue Apr 13, 2023 · 10 comments
Labels
enhancement New feature or request triage Needs to be triaged to determine if it's an issue

Comments

@Saentist
Copy link
Contributor

Is your feature request related to a problem? Please describe.
Let's reduce cloud ban, by set fixed data get time.

Describe the solution you'd like
On integration install time to be created hard set time with will not allow to get data "Before" next scheduled time frame,
no mater system restarted, rebooted or integration reloaded etc.

Describe alternatives you've considered
Example"
Install and configured time: 15:24h
next pool time : +60min (or any other acceptable time in configuration 2h 3h etc.)
If reboot, hard No to take data until next allowed time frame.

Additional context
This solution is 100% needed to avoid "cloud ban"
If possible to see somewhere in integration to have:
countdown clock to the next data pool

@Saentist Saentist added enhancement New feature or request triage Needs to be triaged to determine if it's an issue labels Apr 13, 2023
@Saentist Saentist changed the title ENCHANCEMENT - [Hard set time to get data from cloud ENCHANCEMENT - Hard set time to get data from cloud Apr 13, 2023
@muppet3000
Copy link
Owner

Given that I'm winding down support for this integration I'm not going to spend time trying to work out how to do this. There is the ability to disable the polling altogether and then set up an automation to only poll when you want, so people can use that instead.
I'll leave this ticket open for now but when the new Grott integration takes over I'll be closing anything that isn't essential in this repo.

@pheijms
Copy link

pheijms commented Jan 16, 2024

Given that I'm winding down support for this integration I'm not going to spend time trying to work out how to do this. There is the ability to disable the polling altogether and then set up an automation to only poll when you want, so people can use that instead. I'll leave this ticket open for now but when the new Grott integration takes over I'll be closing anything that isn't essential in this repo.

Hi Muppet,

How can I disable the polling? And can you tell how I can set up an automation to poll the data?

Cheers,
Pieter

@muppet3000
Copy link
Owner

This is how you can set up an automation to poll the data (copied from my old HA automation for it):
image

What I remember how to disable polling I'll post it here.

@pheijms
Copy link

pheijms commented Jan 17, 2024

This is how you can set up an automation to poll the data (copied from my old HA automation for it):

What I remember how to disable polling I'll post it here.

Thanks Muppet!

Please let me know how I can disable polling.

@muppet3000
Copy link
Owner

FYI I did a little more digging, I'm not 100% certain, but I think the above screenshot that I posted also overrides the default polling interval, so you don't need to disable polling directly (I might be wrong though)

@pheijms
Copy link

pheijms commented Jan 19, 2024

FYI I did a little more digging, I'm not 100% certain, but I think the above screenshot that I posted also overrides the default polling interval, so you don't need to disable polling directly (I might be wrong though)

Thanks!

I think I found it in the code, there is:

SCAN_INTERVAL = datetime.timedelta(minutes=5)
THROTTLE = datetime.timedelta(minutes=1)

I can set the scan_interval to more minutes. I hope this fixes my to much API requests.
I only don't understand what Throttle means.

@muppet3000
Copy link
Owner

You don't need to change anything there at all.

There's some nice documentation on it here for the ping integration: https://www.home-assistant.io/integrations/ping/

You can just do exactly the same for this integration, no need to go tweaking the code

@pheijms
Copy link

pheijms commented Jan 19, 2024

You don't need to change anything there at all.

There's some nice documentation on it here for the ping integration: https://www.home-assistant.io/integrations/ping/

You can just do exactly the same for this integration, no need to go tweaking the code

Ah it will override the default, didn't know.
Thanks again.

@muppet3000
Copy link
Owner

No, it won't override the default, that's what disabling polling does. Then the automation polls only at the frequency you require.

@pheijms
Copy link

pheijms commented Jan 19, 2024

No, it won't override the default, that's what disabling polling does. Then the automation polls only at the frequency you require.

I see it now, it will disable the default polling..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request triage Needs to be triaged to determine if it's an issue
Projects
None yet
Development

No branches or pull requests

3 participants