OctoprintKlipperPlugin
OctoprintKlipperPlugin copied to clipboard
Feature request: Klipper toggle
I would like a more convenient way to switch between marlin and klipper based printers. Currently I ssh onto the pi to sudo service klipper stop
and disable the OctoKlipper plugin in the Settings if I want to try a marlin config. Maybe a toggle in OctoKlippers connection panel that hides/shows the OctoKlipper UI and stops/starts the klipper service.
You can disable the simplification of OctoPrints connection panel in the plugins settings ("Settings/OctoKlipper/Basic/Replace Connection Panel") there should be no need to disable the plugin. You need to restart OctopPrint and refresh your browser for a change in this setting to take effect. To control the klipper service from inside OctoPrint is not that simple as "sudo" is required. I need to check how OctoPrint handles that for the OctoPrint service.
I can always set a sticky bit on a script or binary - that should be no problem. Unchecking replace connection panel made no visible difference but I thought I've restarted the server, will retry with Ctrl+F5 after the next print is finished :)
Ctrl+F5 should do it. Octoprint does some pretty heavy caching.
To control the klipper service from inside OctoPrint is not that simple as "sudo" is required. I need to check how OctoPrint handles that for the OctoPrint service.
On raspbian/octopi, the user pi
can use sudo without providing a password, so octopi just uses commands like sudo service octoprint restart
. If you disable that, you can always configure sudo to allow specific commands without a password by adding lines like this to /etc/sudoers
:
pi ALL=NOPASSWD:/usr/sbin/service klipper start
pi ALL=NOPASSWD:/usr/sbin/service klipper stop
pi ALL=NOPASSWD:/usr/sbin/service klipper restart
you could also set the SUID bit on your binary I guess...
Yes, this feature would be very helpful!