[Teil 1] Spoolman – track your filament… hab ich noch grünes PETG?

English below:

Neulich bin ich durch Zufall im Discord vom Mainsail-Projekt auf “Spoolman” gestoßen. Ein Klipper-Plugin, von dem ich bis dato noch nie was gehört habe, welches dazu gedacht ist endlich ein wenig Ordnung in sein vorhandenes Filament zu bringen.

In einer Datenbank werden Hersteller, Farbe, Art und Gewicht Deiner Filamente getrackt und mit Hilfe des Klipper-Plugins wird der Verbrauch direkt subtrahiert. So kannst Du weitestgehend genau sagen, wie viel Du noch von Filament X hast und kannst entscheiden, ob Dein nächster Druck damit noch möglich ist oder ob Du lieber nachbestellen solltest oder eben in einer anderen Farbe drucken möchtest.

Das Projekt findest Du hier: https://github.com/Donkie/Spoolman
… und es lässt sich sehr leicht anhand der Anleitung dort installieren.

Ich habe es als Docker-Version installiert, da ich auf einem meiner Hosts eh mehrere Docker-Projekte laufen habe.

Und so sieht die docker-compose.yml aus:

version: '3.8'
services:
  spoolman:
    image: ghcr.io/donkie/spoolman:latest
    restart: unless-stopped
    volumes:
      # Mount the host machine's ./data directory into the container's /home/ap>
      - type: bind
        source: ./data # This is where the data will be stored locally. Could a>
        target: /home/app/.local/share/spoolman # Do NOT change this line
    ports:
      # Map the host machine's port 7912 to the container's port 8000
      - "7912:8000"
    environment:
      - TZ=Europe/Berlin # Optional, defaults to UTC

Wenn man alles also eingerichtet hat, beginnt man damit seine Filamente zu erfassen.

Ich rate dazu zunächst mit den Herstellern anzufangen und sich dann über die einzelnen Filamentsorten bis hin zur einzelnen Spule zu arbeiten.

Um auch die Dichte der jeweiligen Filamentsorten richtig zu erfassen, emofehle ich diese Webseite:
https://www.simplify3d.com/resources/materials-guide/properties-table/

Dort steht unter Density für die jeweilige Sorte auch der entsprechend richtige Wert. Bei PLA wäre das zum Beispiel: 1,24 g/cm³

Am Ende sieht es dann in etwa so aus:

Und wie man sehen kann, habe ich überhaupt kein grünes PETG Filament. 😀

Im nächsten Teil werden wir dann mal sehen, wie das Ganze dann in Klipper integriert wird und wie einfach es dann ist selbst bei einem Filamentwechsel während des Drucks die entsprechenden Spulen auszuwählen.

English:

[Part 1] Spoolman – track your filament… do I still have some green PETG left?

I recently came across “Spoolman” by chance in the Mainsail project’s Discord. A Klipper plugin that I had never heard of before, which is designed to finally bring some order to your existing filament.

The manufacturer, color, type and weight of your filaments are tracked in a database and the consumption is subtracted directly with the help of the Klipper plugin. This way you can tell exactly how much of filament X you have left and can decide whether your next print is still possible with it or whether you should rather reorder or print in a different color.

You can find the project here: https://github.com/Donkie/Spoolman
… and it is very easy to install using the instructions there.

I installed it as a Docker container because I have several Docker projects running on one of my hosts anyway.

And this is what docker-compose.yml looks like:

version: '3.8'
services:
  spoolman:
    image: ghcr.io/donkie/spoolman:latest
    restart: unless-stopped
    volumes:
      # Mount the host machine's ./data directory into the container's /home/ap>
      - type: bind
        source: ./data # This is where the data will be stored locally. Could a>
        target: /home/app/.local/share/spoolman # Do NOT change this line
    ports:
      # Map the host machine's port 7912 to the container's port 8000
      - "7912:8000"
    environment:
      - TZ=Europe/Berlin # Optional, defaults to UTC

Once you have set everything up, you can start to record your filaments.

I recommend starting with the manufacturers first and then working your way through the individual filament types right down to the individual spools.

To correctly record the density of the respective filament types, I recommend this website:
https://www.simplify3d.com/resources/materials-guide/properties-table/

There, under Density, you will also find the correct value for the respective type. For PLA, for example, this would be: 1.24 g/cm³

In the end, it looks something like this:


And as you can see, I do not have any green PETG filament at all. 😀

In the next part, we will see how the whole thing is integrated into Klipper and how easy it is to select the appropriate spools even when changing filament during printing.

Z-Offset Mystery

In our group chat we were just discussing about Z-Offset settings and that Klipper supports preset for different print bed sheets with their individual Z-Offsets.

“individual Z-Offsets” !? What nonsense is that?

According to the Klipper documentation1 the Z-Offset is:

The z_offset is the distance between the nozzle and bed when the probe triggers

Klipper Online Documentation

For me, that is distance between the print nozzle and the tip of the probe. The probe is usually mounted directly to the print head as close to the nozzle as possible. That distance between nozzle and probe tip should not change under normal circumstances. Thus the Z-Offset would usually be static and only configured once.

But my fellow print nerds had apparently a use case for bed specific Z-Offset settings.

Voodoo

The secret is the different types of Z-Probes. I am using a CR-Touch2 on my Creality Ender 3 V2. That is a mechanical probe using a thin metal needle and optical sensor3 to measure the distance between probe and bed surface.

A detail of the print head of a Creality Ender 3 V2 3D-printer. In the middle of the picture once can see a square tube mounted at the print head. There is a cable going into the tube from the top and a purple light is glowing insight. At the bottom the top of the metail probe needle can be seen.
The CR-Touch probe with purple LED inside mounted on the side of the print head

The Prusa printers are usually using a PINDA/SuperPINDA probe4. Which is an inductive probe thats using a magnetic field5 to detect the distance to a metal surface.

And here you might already smell the source of the confusion. Print bed surfaces can differ. My Ender came with a glass plate as print surface. I added a magnetic sheet with PEI srping metal printing beds. The glas plate and the PEI metal sheets vary several millimeters in their thickness. Still I don’t have to change any settings on my printer when changing the print bed sheet. Because my probe is mechanical, it always measures the correct distance between bed surface and probe tip.

A PINDA probe however would struggle to detect the glas bed. Because it’s not conductive. The PINDA probe would “see” right through the glas bed and measure the distance towards the underlying metal heat bed and likely crash your nozzle into the glas bed if you don’t compensate for this.

Lessons learnt: if your Z-Probe is relying on metal on the bed to detect the distance you want to adjust your Z-Offset when using different print bed materials than metal.

Footnotes
  1. Klipper documentation about Z-Offset: https://www.klipper3d.org/Probe_Calibrate.html#calibrating-probe-z-offset ↩︎
  2. Creality CR-Touch Probe: https://www.creality3dofficial.com/products/creality-cr-touch ↩︎
  3. CR-Touch function principle: https://www.creality3dofficial.com/blogs/unboxing-product-comparison/creality-bl-touch-firmware ↩︎
  4. Prusa Documentation about PINDA Probe: https://help.prusa3d.com/article/p-i-n-d-a-superpinda-sensor-testing_2091 ↩︎
  5. Prusa Forum about the physics behind the PINDA probes: https://forum.prusa3d.com/forum/original-prusa-i3-mk3s-mk3-general-discussion-announcements-and-releases/what-are-the-physics-behind-the-pinda/ ↩︎

klipper-backup | save your config @ github

English below:

Wenn man immer mal wieder an den Einstellungen bei Klipper in den Konfigurationen herum spielt, dann wäre es doch toll, wenn es regelmäßige Backups gibt, die extern gespeichert werden.

Auf der Suche nach einer einfachen Lösung bin ich über folgende Seite gestolpert:
https://github.com/Staubgeborener/klipper-backup

Als erstes installiert man sich auf dem Raspberry oder direkt auf einem Drucker, wie in meinem Fall einem Neptune 4 Plus, git.

sudo apt update
sudo apt install git

Und jetzt schon fast das Wichtigste:

git config --global credential.helper store

Denn mit diesem Befehl wird der Token, den wir im Laufe der weiteren Installation erstellen werden, auch lokal zur Autentifizierung dient, gespeichert.
(Das war auch der Grund, warum ich immer wieder Fehlermeldungen beim Ausführen des Skripts erhalten habe.)

Also falls ihr so etwas wie “remote: Invalid username or password.” oder ähnliches bei der Ausführung des Scripts erhaltet, dann liegt es daran, dass git zumindest auf dem Elegoo Neptune 4 Board nicht direkt das Passwort speichert.

Wir erstellen uns bei Github ein neues Repository und einen Personal Access Token, dem wir Schreibrechte usw. geben.

Dann beginnen wir mit der eigentlichen Installation:

git clone https://github.com/Staubgeborener/klipper-backup.git && chmod +x ./klipper-backup/script.sh && cp ./klipper-backup/.env.example ./klipper-backup/.env

als nächstes bearbeiten wir die .env Datei mit einem Editor (z.B.) vim / nano etc.

nano klipper-backup/.env

Den frisch erstellten Github-Token kopieren wir an die Stelle “github_token=”, schreiben unseren Github-Benutzernamen an die enspechenden Stelle und tragen natürlich auch unser Github Repository ein.

Dann sieht es in etwa so aus:

github_token=ghp_xxx
github_username=noccis-github
github_repository=elegoo_neptune4backup
branch_name=main
commit_username="mks"
commit_email=""

# Indivdual file syntax:
#  Note: script.sh starts its search in $HOME which is /home/{username}/
# Using below example the script will search for: /home/{username}/printer_data/config/printer.cfg

path_printercfg=klipper_config/printer.cfg

# Backup folder syntax:
#  Note: script.sh starts its search in $HOME which is /home/{username}/
# Using below example the script will search for: /home/{username}/printer_data/config/*
# `/*` should always be at the end of the path when backing up a folder so that the files inside of the folder are prop$
#path_klipperdata=printer_data/config/*
path_klipperdata=klipper_config/*

Hier ist wir erstemal soweit fertig und wenden uns der moonraker.conf in Klipper zu.

Hier fügen wir folgendes hinzu und speichern die Datei:

[update_manager klipper-backup]
type: git_repo
path: ~/klipper-backup
origin: https://github.com/Staubgeborener/klipper-backup.git
managed_services: moonraker
primary_branch: main

Aber wir wollen das ganze ja auch noch ein wenig automatisieren:
Und deshalb erstellen wir einen neuen Service:

sudo nano /etc/systemd/system/klipper-backup.service

und dorthin kopieren wir:

[Unit]
Description=Klipper Backup Service
#Uncomment below lines if using network manager
#After=NetworkManager-wait-online.service
#Wants=NetworkManager-wait-online.service
#Uncomment below lines if not using network manager
#After=network-online.target
#Wants=network-online.target

[Service]
User={replace with your username}
Type=oneshot
ExecStart=/bin/bash -c '/home/mks/klipper-backup/script.sh "New Backup on boot $(date +%%D)"'

[Install]
WantedBy=default.target

Denkt bitte daran, die entsprechenden Werte und Pfade auf Euer Umfeld anzupassen.

Wir reloaden den Deamon und starten dann den Service:

sudo systemctl daemon-reload
sudo systemctl enable klipper-backup.service
sudo systemctl start klipper-backup.service

Optional kann man natürlich noch einen Cron installieren, der dann beispielsweise alle 4 Stunden ein Backup macht.

crontab -e

und hier wird dann folgendes eingefügt:

 */4 * * * $HOME/klipper-backup/script.sh

Aber via Mainsail oder Fluid ein Update anzustoßen wäre ja auch irgendwie praktisch. Also machen wir das in der printer.cfg möglich:

[gcode_macro update_git]
gcode:
    RUN_SHELL_COMMAND CMD=update_git_script

[gcode_shell_command update_git_script]
command: bash -c "bash $HOME/klipper-backup/script.sh"
timeout: 90.0
verbose: True

Fertig!

Und in Fuidd sieht das dann so aus:

Um sicher zu gehen, dass auch alles richtig funktioniert, könnt Ihr dann das Script direkt im Terminal einmal ausführen:

bash $HOME/klipper-backup/script.sh

Falls dort eine Passwortabfrage kommen sollte, dann einfach den Token, den Ihr Euch auf Github erstellt habt, nutzen und so sollte auch keine weitere Abfrage mehr kommen.

Viel Spaß!

English Version:

If you play around with the Klipper settings in the configurations from time to time, then it would be great if there were regular backups that are saved externally.

While looking for a simple solution, I stumbled across the following page:
https://github.com/Staubgeborener/klipper-backup

The first step is to install git on the Raspberry or directly on a printer, such as a Neptune 4 Plus in my case.

sudo apt update
sudo apt install git

And now almost the most important thing:

git config --global credential.helper store

This is because this command is used to save the token that we will create during the rest of the installation, which is also used locally for authentication.
(This was also the reason why I kept getting error messages when running the script).

So if you get something like “remote: Invalid username or password.” or something similar when running the script, it’s because git doesn’t save the password directly, at least on the Elegoo Neptune 4 board.

We create a new repository at Github and a personal access token, which we give write permissions etc. to.

Then we start with the actual installation:

git clone https://github.com/Staubgeborener/klipper-backup.git && chmod +x ./klipper-backup/script.sh && cp ./klipper-backup/.env.example ./klipper-backup/.env

Next, we edit the .env file with an editor (e.g. vim / nano etc.)

nano klipper-backup/.env

We copy the newly created Github token to the place “github_token=”, write our Github user name in the appropriate place and of course enter our Github repository.

Then it looks something like this:

github_token=ghp_xxx
github_username=noccis-github
github_repository=elegoo_neptune4backup
branch_name=main
commit_username="mks"
commit_email=""

# Indivdual file syntax:
#  Note: script.sh starts its search in $HOME which is /home/{username}/
# Using below example the script will search for: /home/{username}/printer_data/config/printer.cfg

path_printercfg=klipper_config/printer.cfg

# Backup folder syntax:
#  Note: script.sh starts its search in $HOME which is /home/{username}/
# Using below example the script will search for: /home/{username}/printer_data/config/*
# `/*` should always be at the end of the path when backing up a folder so that the files inside of the folder are prop$
#path_klipperdata=printer_data/config/*
path_klipperdata=klipper_config/*

Here we are ready for the first time and turn to the moonraker.conf in Klipper.
Here we add the following and save the file:

[update_manager klipper-backup]
type: git_repo
path: ~/klipper-backup
origin: https://github.com/Staubgeborener/klipper-backup.git
managed_services: moonraker
primary_branch: main

But we also want to automate the whole thing a little:
And that’s why we’re creating a new service:

sudo nano /etc/systemd/system/klipper-backup.service

and that’s where we copy:

[Unit]
Description=Klipper Backup Service
#Uncomment below lines if using network manager
#After=NetworkManager-wait-online.service
#Wants=NetworkManager-wait-online.service
#Uncomment below lines if not using network manager
#After=network-online.target
#Wants=network-online.target

[Service]
User={replace with your username}
Type=oneshot
ExecStart=/bin/bash -c '/home/mks/klipper-backup/script.sh "New Backup on boot $(date +%%D)"'

[Install]
WantedBy=default.target

Please remember to adapt the corresponding values and paths to your environment.

We will reload the Deamon and then start the service:

sudo systemctl daemon-reload
sudo systemctl enable klipper-backup.service
sudo systemctl start klipper-backup.service

Optionally, you can of course install a cron, which then makes a backup every 4 hours, for example.

crontab -e

and the following will be inserted here:

 */4 * * * $HOME/klipper-backup/script.sh

But triggering an update via Mainsail or Fluid would also be somewhat practical. So we make this possible in the printer.cfg:

[gcode_macro update_git]
gcode:
    RUN_SHELL_COMMAND CMD=update_git_script

[gcode_shell_command update_git_script]
command: bash -c "bash $HOME/klipper-backup/script.sh"
timeout: 90.0
verbose: True

Done!

And in Fuidd it looks like this:

To make sure that everything is working properly, you can run the script directly in the terminal:

bash $HOME/klipper-backup/script.sh

If you are asked for a password, just use the token you created on Github and you should not be asked for another one.
Have fun!

The Liquid Soap Hack

English below.

Ich mag Flüssigseife und ich mag kontaktlose Seifenspender. Das Problem, es ist weder besonders nachhaltig, noch günstig die Seife in Kunststoffkartuschen zu kaufen. Ähnlich wie bei Druckerpatronen, ist man auch hier an den jeweiligen Hersteller des Spenders gebunden, um neue Seife zu kaufen.

Es ist jedoch sehr einfach diese Behälter zu verändern, um sie selbst nachfüllen zu können: Loch bohren, Deckel drauf, fertig!

Um im (leeren) Behälter ein Loch zu bohren eignet sich besonders gut ein Forstnerbohrer oder eine kleine Lochkreissäge. Um die Öffnung wieder zu verschließen, kann zum Beispiel ein passender Dichtstopfen im Baumarkt oder online besorgt werden. Falls ein 3D-Drucker verfügbar ist, lässt sich ein geeigneter Deckel schnell drucken, zum Beispiel mit diesem variablen OpenSCAD Modell: Thingiverse Link.

Der Stopfen muss nicht wirklich dicht sitzen, er dient hauptsächlich als Staubschutz. Nun kann eine beliebige Flüssigseife nachgefüllt werden. Nachhaltiger und / oder günstiger: in größeren Gebinden gekauft, im Unverpackt-Laden selbst abgefüllt, oder aus fester Seife selbst gemacht.

In English:

I like liquid soap and automatic soap dispensers. Unfortunately, it’s not very sustainable and cheap to buy liquid soap in those small plastic containers, which can only be used once. Similar to printer cartridges you are tied to the brand of the dispenser manufacturer, to buy new soap.

But there is a very simple solution to the problem, so you can refill these containers by yourself: drill a hole, print a lid for it – finished.

Most suitable to drill a hole in an (empty) container is an Forstner drill, but you can use any tool you want to. To close the new hole, you can buy a cap with the right diameter in a hardware store – or print one. With this 3D model you can customize a cap for almost every hole shape in OpenSCAD: Thingiverse Link

The cap doesn’t have to seal the hole tightly, the main purpose is to protect the soap from dust and dirt. Now you can refill the container with any liquid soap you like. More sustainable or cheaper one, soap form big packages, in a store without packaging where you can buy products to fill them into your own containers, or homemade from solid soap.

Igniting the 3D Printing Spark

Reviving Blogs in the Age of Filaments and Firmware

Welcome to our digital workshop, where we’re here to boldly declare that the blog is not just alive; it’s buzzing with the energy of extruders, bed leveling, and firmware updates!

In a world saturated with fleeting trends, our corner of the internet is dedicated to exploring the dynamic universe of 3D printing and all things filamentous.

Amidst the sea of social media snippets, we’ve carved out a space to delve deep into the intricacies of Klipper, Filaments, HueForge, and the diverse array of printers gracing our creative landscapes – from the iconic Ender and precision-driven Prusa to the innovative Elegoo.

This isn’t just a revival; it’s a celebration of the resounding hum of 3D printers, the aroma of freshly loaded filaments, and the heart wrenching suspension of firmware upgrades.

As we unravel the mysteries of Klipper, traverse the vivid palette of filaments, and navigate the ever-expanding galaxy of 3D printers, our blog emerges as a haven for enthusiasts seeking more than just cursory glances at the latest prints.

Join us in this renaissance of blogging, where pixels and layers intertwine to weave a narrative of precision and passion. This is not merely a proclamation; it’s an invitation to explore the nuanced world of 3D printing, where each filament strand and firmware tweak contributes to our collective odyssey.

Stay tuned as we embark on a journey through the interconnected realms of technology and creativity. The blog is not just a vessel of expression; it’s a thriving ecosystem where Klipper codes dance, filaments unfurl, and printers hum in harmony.

The adventure begins, and the 3D printing saga unfolds before your digital eyes.