homeassistant-growatt_server_api icon indicating copy to clipboard operation
homeassistant-growatt_server_api copied to clipboard

ENCHANCEMENT - Hard set time to get data from cloud

Open Saentist opened this issue 2 years ago • 10 comments

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 avatar Apr 13 '23 06:04 Saentist

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.

muppet3000 avatar Apr 13 '23 19:04 muppet3000

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

pheijms avatar Jan 16 '24 09:01 pheijms

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.

muppet3000 avatar Jan 16 '24 11:01 muppet3000

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.

pheijms avatar Jan 17 '24 06:01 pheijms

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)

muppet3000 avatar Jan 17 '24 06:01 muppet3000

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.

pheijms avatar Jan 19 '24 15:01 pheijms

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

muppet3000 avatar Jan 19 '24 16:01 muppet3000

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.

pheijms avatar Jan 19 '24 16:01 pheijms

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

muppet3000 avatar Jan 19 '24 16:01 muppet3000

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..

pheijms avatar Jan 19 '24 16:01 pheijms