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

Refresh Rate #3

Open
mmiller7 opened this issue Jul 21, 2021 · 10 comments
Open

Refresh Rate #3

mmiller7 opened this issue Jul 21, 2021 · 10 comments

Comments

@mmiller7
Copy link

Is there a way to increase the refresh rate, say 10 or 15 seconds?

@gtdiehl
Copy link
Owner

gtdiehl commented Jul 21, 2021

@mmiller7 I believe the default polling period is 30seconds. Do you want a way to increase it to poll say every 45-60seconds?

@mmiller7
Copy link
Author

mmiller7 commented Jul 26, 2021

I was thinking more like 5-10 seconds (so 6x or 12x per minute) - I'd like to have HomeAssistant monitor some things that are much shorter duration or trigger more events more quickly after they start happening.

@polyfaces
Copy link

It is easy to do so. Just fork this respository and change the value in the "const.py" file. I have already done this.

polyfaces@4d65ef9

@stepir
Copy link

stepir commented Oct 23, 2021

hi @polyfaces the current version of https://github.com/gtdiehl/iotawatt_ha/blob/main/custom_components/iotawatt/const.py does not include such constant anymore - I tried your suggested solution and added it myself but the integration seems to ignore it?

@mmiller7
Copy link
Author

mmiller7 commented Jan 9, 2022

It is easy to do so. Just fork this respository and change the value in the "const.py" file. I have already done this.

polyfaces@4d65ef9

Just tried updating and discovered this no longer seems to exist.

How do we adjust the refresh rate in the new version?

@tasranson
Copy link

I would love to be able to do this too. Ideally only for one or two specific measurements (entities in HA) coming off the iotawatt that are more time critical, but would be happy to suck up the pain if it had to apply to all measurements (entities in HA). I can where 30 seconds is set in the code in GitHub, but I dont really want to revert from using the core version of the integration to a custom one unless that is the only way to do this.

@zunnnn
Copy link

zunnnn commented Jan 23, 2022

same problem, i would like to set custom refresh rate because 30 second is a lot of time when i have to turn off some items. i suffer disconnection from the grid because this integration is too slow to trigger events

@rigorm
Copy link

rigorm commented Mar 2, 2022

try this line :

update_interval=timedelta(seconds=30),

@stepir
Copy link

stepir commented Mar 7, 2022

Thank you!!

@mmiller7
Copy link
Author

Anyone getting this error in the log with a higher refresh rate?

2022-03-19 11:40:50 WARNING (MainThread) [iotawattpy.iotawatt] Nothing to query, update() called too soon, must wait {timespan}

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

7 participants