marcolivierarsenault / moonraker-home-assistant

Home Assistant integration for Moonraker, Klipper and Mainsail
https://moonraker-home-assistant.readthedocs.io
MIT License
225 stars 25 forks source link

Refresh rate too slow - Moving to push mode #168

Open marcolivierarsenault opened 1 year ago

marcolivierarsenault commented 1 year ago

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 https://github.com/marcolivierarsenault/moonraker-home-assistant/blob/ca5c81fcf24264f6bf3a7910cbb274829c15e9be/custom_components/moonraker/__init__.py#L29

nelsongraca commented 9 months ago

hey @marcolivierarsenault got any timeline for this

marcolivierarsenault commented 9 months ago

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

theclue commented 5 months ago

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 :)

jamincollins commented 4 months ago

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

marcolivierarsenault commented 4 months ago

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

marcolivierarsenault commented 4 months ago

@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 commented 4 months ago

Thank you

mrlordziemniak commented 3 months ago

where is that optin for change pooling rate?

cf-mp commented 1 month ago

Under configure tab in moonraker integrations on HA

where is that optin for change pooling rate?

image