OctoprintKlipperPlugin icon indicating copy to clipboard operation
OctoprintKlipperPlugin copied to clipboard

Moonraker Compatibility - Add configurable path for printer.cfg and klippy.log

Open jalanjarosz opened this issue 3 years ago • 2 comments

Is your feature request related to a problem? Please describe. No

Describe the solution you'd like I noticed in the init.py file that the source path to both printer.cfg and klippy.log are hard coded:

            configuration=dict(
                debug_logging=False,
                config_path="~/",
                baseconfig="printer.cfg",
                logpath="/tmp/klippy.log",

In order to support Moonraker (Klipper Web API), both the printer.cfg and klippy.log file are moved to the /home/pi user directory. Moonraker suggests: ~/printer_config and ~/printer_logs while the Mainsail WebUI suggests ~/klipper_config and ~/klipper_logs.

I'd suggest making the path to these files user configurable.

Describe alternatives you've considered None

Additional context The OctoprinterKlipperPlugin could use the Moonraker API for additional enhancements, but this change would be the first step needed followed by installing Moonraker.

For reference: https://github.com/Arksine/moonraker

jalanjarosz avatar Feb 04 '22 12:02 jalanjarosz

The config path is configurable through the settings dialog of OctoPrint.

thelastWallE avatar Feb 04 '22 18:02 thelastWallE

I will add a second setting for the klippy logfile.

thelastWallE avatar Feb 04 '22 18:02 thelastWallE