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 too slow - Moving to push mode #168

Open
marcolivierarsenault opened this issue Jul 23, 2023 · 11 comments
Open

Refresh rate too slow - Moving to push mode #168

marcolivierarsenault opened this issue Jul 23, 2023 · 11 comments
Labels
enhancement New feature or request
Milestone

Comments

@marcolivierarsenault
Copy link
Owner

Right now the integration refresh every 30 sec, which is too slow for many people.

We will be pivoting this integration in pull mode instead of push.

Temporary solution
you can lower the refresh rate

SCAN_INTERVAL = timedelta(seconds=30)

@nelsongraca
Copy link
Contributor

hey @marcolivierarsenault got any timeline for this

@marcolivierarsenault
Copy link
Owner Author

no, tbh, no bandwidth has not progressed in months.

@theclue
Copy link

theclue commented Mar 7, 2024

I have created a template switch that makes respectively an output pin from the board up or down; then, using value_template for a relevant numeric sensor I get from the board to refresh the state of the switch (this is for driving a fan)

Having 30 seconds makes the switch to temporarly revert to the older state when commuting.

Hardcoding 2 seconds solved the issue brillantly, nonetheless having this pull-based looks definitively much more elegant :)

@marcolivierarsenault marcolivierarsenault removed their assignment Apr 7, 2024
@jamincollins
Copy link

Why not simply change/update the interval when the printer becomes active?

@marcolivierarsenault
Copy link
Owner Author

yeah that makes sense. with the delay to the push mode, I will likely add a parameter to pull at a higher frequence

@marcolivierarsenault
Copy link
Owner Author

@jamincollins I have added an option to set a different timer.

details here: https://moonraker-home-assistant.readthedocs.io/en/latest/connection.html#polling-rate-configuration

make sure to download latest (main) version of the code: https://moonraker-home-assistant.readthedocs.io/en/latest/support/latest.html

@jamincollins
Copy link

Thank you

@mrlordziemniak
Copy link

where is that optin for change pooling rate?

@cf-mp
Copy link

cf-mp commented Jul 23, 2024

Under configure tab in moonraker integrations on HA

where is that optin for change pooling rate?

image

@adec
Copy link

adec commented Nov 29, 2024

Hi @marcolivierarsenault. Is there anything I can do to help move the integration toward push mode? Have you done any work or analysis on it that I can learn from? I may be overthinking it but one of my concerns is whether we want to update all attributes in Home Assistant at the same frequency that they are pushed (although I've not done any analysis as yet on how often attributes are updated). I'm happy to have a go, although I'll warn you that I'm not a developer by trade. 😀

@marcolivierarsenault
Copy link
Owner Author

no sorry, no work done here.

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

No branches or pull requests

7 participants