Skip to content

Configuration Overrides

Jason Pell edited this page Aug 30, 2024 · 12 revisions

Configuration Overrides

The /usr/data/pellcorp-overrides stores custom cfg and conf files as well as customisations you have made to some of the core config files such as printer.cfg. The following core config files can have overrides saved for them:

  • printer.cfg
  • SENSORLESS_PARAMS variables in sensorless.cfg
  • bltouch-k1.cfg
  • bltouch-k1m.cfg
  • microprobe-k1.cfg
  • microprobe-k1m.cfg
  • cartographer.cfg
  • cartographer-k1.cfg
  • cartographer-k1m.cfg
  • btteddy.cfg
  • btteddy-k1.cfg
  • btteddy-k1m.cfg
  • KAMP_Settings.cfg
  • moonraker.conf

Please note the following files can not have customisations saved:

  • start_end.cfg
  • guppyscreen.cfg
  • useful_macros.cfg
  • fan_control.cfg
  • Any config other than SENSORLESS_PARAMS variables in sensorless.cfg

You cannot override any core gcode macros or the macros in sensorless.cfg. In addition Config Overrides will ignore the deletion of any section that is not an include.

When you factory reset your printer or use the --update or --reinstall options to the installer.sh, your customisations are overriden, to avoid this being a problem there is a CONFIG_OVERRIDES macro which can be used to save these customisations so that they can be automatically reapplied the next time you have to factory reset or run an --update or --reinstall. You can also save this stuff to a pellcorp-overrides repository on github.

This is a recently added feature and it requires you to have factory reset against a recent release (27th June 2024 onwards).

IMPORTANT: You should run the CONFIG_OVERRIDES macro every time you make any chanages to either your own custom cfg or conf files, or make changes to any core config files. There is no process monitoring your config directory for changes, this is Simple AF after all, and automatically doing stuff is not simple af!

Note: The first step in both a /usr/data/pellcorp/k1/installer.sh --update or /usr/data/pellcorp/k1/installer.sh --reinstall is to backup your config-overrides, so that they can be reapplied, but they will be lost if you do a factory reset.

Refer to Git Backups for Configuration Overrides

Git Backups for Configuration Overrides

If the /usr/data/pellcorp-overrides is a git repo, calling the CONFIG_OVERRIDES or /usr/data/pellcorp/k1/config-overrides.sh will generate a new git commit and push it to origin if any files are changed.

Create repository

Create a new pellcorp-overrides repository on your github account:

image

Note: You don't actually have to call it pellcorp-overrides, you can call it whatever you want, but it should be a repository dedicated to just doing backups for this project. Currently config-overrides.sh --repo only supports a single configuration, hopefully soon I will add the ability to specify a branch so you can store multiple configurations in the same repository.

Create a personal access token

Click here to create a fine grained personal access token. Create a fine grained token and limit its access to just your pellcorp-overrides repository. Make sure that Contents read and write access.

image

Make sure you limit it to just the new repository you created:

image

Source: https://guilouz.github.io/Creality-Helper-Script-Wiki/helper-script/git-backup/

Create Local Repo

You will need 3 pieces of information for this process to succeed:

  1. Your github username
  2. Your email address
  3. The github token you just created

Ssh into your k1 and run the following:

export GITHUB_USERNAME=myusername
export [email protected]
export GITHUB_TOKEN="The token I just created"
export GITHUB_REPO=pellcorp-overrides
/usr/data/pellcorp/k1/config-overrides.sh --repo

If you want to setup the repository locally ignoring any local files in /usr/data/pellcorp-overrides, you can use the --clean-repo argument, instead of the --repo argument, which will rebase the local changes on top of the repo.

Examples

An example of what the config overrides might look like:

/usr/data/pellcorp-overrides/printer.cfg
[stepper_x]
rotation_distance: 40
position_endstop: 304
position_min: 0.5
position_max: 304

[tmc2209 stepper_x] interpolate: False run_current:1.4

[stepper_y] rotation_distance: 40 position_max: 284

[tmc2209 stepper_y] interpolate: False run_current: 1.4

[extruder] rotation_distance: 4.637

[tmc2209 extruder] run_current: 0.7

[heater_bed] sensor_type: Generic 3950

/usr/data/pellcorp-overrides/fan_control.cfg
[output_pin Bento_Air_Scrubbers]
pin: PA0
pwm: True
cycle_time: 0.0100
hardware_pwm: false
value: 0.00
scale: 255
shutdown_value: 0.0

[output_pin bed_fans] pin: PB2 pwm: True cycle_time: 0.0100 hardware_pwm: false value: 0.00 scale: 255 shutdown_value: 0.0

[controller_fan mcu] action: DELETED

Delete a Section

To delete a section to specify the special __action__: DELETED entry under the section name such as:

[section name]
__action__: DELETED

Delete a Section Value

If you want to delete a value in a section you specify the special __DELETED__ value, so for example to delete homing_retract_dist from the [stepper_z] section:

[stepper_z]
homing_retract_dist: __DELETED__

Add or Replace Section Value

To add or replace an existing value in a section, just specify the new value, the installer will correctly add or replace it.

Simple AF

Simple AF Cartographer

Simple AF Beacon EXPERIMENTAL

Simple AF BTT Eddy

Simple AF Microprobe

Simple AF Bltouch, CrTouch and 3dTouch

Simple AF Klicky COMING SOON

Donations

If you are looking for a way to support the project, and its entirely optional, this is my preferred approach. I am conducting a fundraiser to purchase a K1M printer, just so I can push out fixes and new features a bit faster, but also specifically test the K1M as well as the K1.

If you can't donate via go fund me directly, I have also added a kofi account.

Clone this wiki locally