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

Added plugin ActivatePrusaHostTimer #1251

Merged
merged 1 commit into from
Dec 2, 2023
Merged

Conversation

sarusani
Copy link
Contributor

@sarusani sarusani commented Dec 1, 2023

This plugin "pings" the printer every x seconds with a "M79 S"OP"". (The interval can be configured in the settings page, default is 20 seconds)

This ping is needed to activate the print host capabilities of Prusa printers and is expected at least every 30 seconds.
See prusa3d/Prusa-Firmware#4520 for more information.

@jneilliii
Copy link
Contributor

Why was the timer check implemented in the firmware in the first place? I just reviewed your plugin and don't really see anything wrong technically with your plugin.

I think I should point out that your implementation of the solution to send commands on a set interval however will only work if the web interface is loaded and logged into on a client computer. You might want to look into moving that repeat logic to the python side so it doesn't matter if the UI is loaded or not.

Couple of pointers:
octoprint.util.RepeatedTimer
self._settings.get(["interval"])
self._printer.commands

@sarusani
Copy link
Contributor Author

sarusani commented Dec 2, 2023

Thanks for pointing that out! I totally missed that.
I moved the logic to python. Now it always registers the interval during startup. Much better 😄

I also found some more information on the why: prusa3d/Prusa-Firmware#4460

@jneilliii jneilliii merged commit 25e3b32 into OctoPrint:gh-pages Dec 2, 2023
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

2 participants