7 easy steps to set up OctoPrint on Raspberry Pi

A reduced to the max step-by-step guide to quickly set up OctoPrint on a Raspberry Pi. If you just need the facts, read this guide!

If you want to remotely control your 3D printer, OctoPrint might be your choice. This is a very, very short seven-step instruction to show, how OctoPrint is set up on a Raspberry Pi. No pictures, no videos, just the plain vanilla facts.

  1. Download Octoprint from octoprint.org.
  2. Flash Octoprint image Use, e.g., Etcher from balena to flash the Octoprint image on a micro SD card. Do not format the SD card even if your operating system asks you to do so. Just flash the Octoprint image on the SD card.
  3. Setup Wifi Re-insert the SD card in your SD card reader. Edit the file octopi-wpa-supplicant.txt in the boot/ directory. Use an appropriate editor to do this. There is a plethora of information out there that explains why this is important; in case of doubt please use a search engine.
    There are two sections in the file that are relevant:

    ### WPA/WPA2 secured
    #network={
    #  ssid=""
    #  psk=""
    #}
    
    # Uncomment the country your Pi is in ...
    #country=GB # United Kingdom
    #country=CA # Canada
    #country=DE # Germany
    #country=FR # France
    country=US # United States
    

    Take care that you uncomment the country you’re living in and comment out the one that was previously uncommented. Take even more care that you do not only enter the ssid and your password in the WPA/WPA2 section but that you also uncomment the lines starting from network down to and including the line with the single closing brace.

  4. Enable SSH To log into your Pi via SSH you may need to enable it first. Do this bei putting an empty file named ssh (without any extension) in the boot/ directory (if it does not exist already, of course). A simple way to create an empty file is to use the following command touch ssh.
  5. Fire up the Octopi Put the SD card into your Pi, connect a power source and fire it up! Wait approx. 90 seconds until the boot process is completed.
  6. Log in using SSH Use ssh to remotely log into your Pi*. The Octopi will be reachable either by using its IP address (that you will have to find out, e.g., by looking into your router’s attached devices section) or via octopi.local. The latter requires Bonjour to run properly on your computer. Assumed you know the IP address, use this terminal command to log in:
    SSH pi@<ip-address>
    You will be asked to confirm a certificate. Type ‘yes’ followed by a return. Then enter the password. The standard password is raspberry.
    (*Mac users will usually use terminal, Windoze users may want to use PuTTy as a SSH-client.)
  7. Change password Change the standard password using the command passwd. You will be asked to enter the old password then twice the new one. Done.
  8. Access OctoPrint via web browser Start a web browser and enter http://octoprint.local (requires Bonjour service) or http://<ip_address>. You should see the OctoPrint interface and a setup wizard pop up. This page has a table with settings for many common 3D printers. Follow along and be sure to set up a username and password for your OctoPrint.

Now open up the connection panel on the left. With the options set to “AUTO” hit Connect. If the connection was successful congratulations – you’ve successfully set up OctoPrint!

Optional steps.

  1. Static IP Out-of-the-box, your Pi will receive a dynamic IP address. I prefer to have a static IP address.
    When the Pi is booted and you are logged in, use the following command on the command line to edit the dhcpcd.conf file:
    sudo nano /etc/dhcpcd.conf
    Go to the section that looks similar to the following lines…

    interface wlan0
    static ip_address=
    static routers=
    static domain_name_servers=8.8.4.4 8.8.8.8
    

    …and enter your desired IP address, your router’s IP address, and, optionally, your preferred domain name server(s). The ones above are the Google DNSs. Use sudo reboot to reboot the Pi.

  2. Full upgrade Consider a full upgrade of your intallation by issuing the following command on your terminal.
    sudo apt update && sudo apt full-upgrade -y
    

    That could take quite some time.

MacOS Finder: Spaltenreihenfolge dauerhaft ändern

Reihenfolge der Spalten im MacOS Finder dauerhaft ändern. Hier eine Schritt-für-Schritt-Anleitung, wie man die Spaltenreihenfolge geändert bekommt!

Die Reihenfolge der Spalten im MacOS Finder lässt sich einfach durch drag’n’drop den eigenen Bedürfnissen anpassen. Es ist jedoch zu beachten, dass sich die geänderte Reihenfolge stets nur auf das aktuelle Verzeichnis bezieht. Soll die aktuelle Reihenfolge für alle Ordner gelten, so ist der View Options Dialog via CMD + J zu öffnen und nach dem Ändern der Reihenfolge unten der Button “Use as Defaults” zu drücken.

Aber: Das reicht in der Regel nicht! MacOS merkt sich Ordner-spezfifische Einstellungen in der, in jedem Ordner vorhandenen, Datei .DS_Store. Und die in dieser Datei hinterlegten Einstellungen haben Vorrang vor den globalen Einstellungen, die via “Use as Defaults” eingestellt wurden (selbige werden in com.apple.finder.plist abgelegt, just for the Nerds).

Das Vorgehen, das bei mir zu dauerhaftem Erfolg geführt hat, ist wie folgt:

  1. Reihenfolge der Spalten im Finder anpassen.
  2. CMD + J und dann “Use as defaults”.
  3. Im Terminal sudo find /Users/<username>/ -name .DS_Store -delete eingeben, Return. Dies löscht alle(!) .DS_Store Dateien in allen Verzeichnissen. ACHTUNG! Eine Falscheingabe dieses Befehls kann zu ernsthaften Schäden am System führen. Wer nicht weiß, wie dieser Befehl funktioniert und was da genau passiert, BITTE LASSEN.
  4. Finder neu starten: Entweder im terminal mit killall Finder oder mit Alt + Rechtsklick auf das Finder-Icon im Dock und dort dann “Relaunch” wählen.

Hernach sollten vom Finder alle Verzeichnisse mit den Spalten in der gewünschten Reihenfolge anzeigen.

How to convert 3MF files to stl format on a Lin*x machine (including Mac)

3MF is a file format for 3D printers with inbuilt DRM. Some slicers are not able to read 3MF files. Here is a way to convert such files to STL.

If you need to convert a 3MF file to STL format you may find that there is no really simple solution. I found this very useful blog post by Zebethyal that describes how the command line tool 3mf2stl by Charles Shapiro can be compiled on a Mac to convert 3MF files to STL format. The required steps in all brevity:

  1. Install Homebrew
    Open terminal and type (all in one line)
    ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" < /dev/null 2> /dev/null
    Hit return. Homebrew is downloaded and installed.
  2. Install libzip
    Type
    brew install libzip
    After hitting return, the libzip library will be installed.
  3. Download 3mf2stl
    Enter the following URL in your browser
    https://github.com/lemgandi/3mf2stl
    and download the 3mf2stl repository (green button to the right, download as ZIP).
    Unzip the file to a directory, e.g. ~/Documents/3mf2stl/
  4. Compile 3mf2stl
    Change to this directory
    cd ~/Documents/3mf2stl/
  5. and type
    make
    Hit return. The code will be compiled.

If the compilation was successful you will have an executable named 3mf2stl in this directory.
Usage is ./3mf2stl -i <input_file.3mf> -o <output_file.stl>

Plans: Hammer Holder “Sledgehammer”

Here you get the free plans for a pretty unusual hammer holder featuring an automatic locking mechanism.

If you do not like the “standard” hammer holders then you might have come to the right place! These plans show how to build a really unusual hammer holder for your shop. It features a locking mechanism that keeps the hammers in place even in case of an earthquake (presumably).

I made a two-part-video showing how I built this thing. Here you can find part one on YouTube.

And here you can download the free plans for the hammer holder.

How to get rid of MacOS’ “one or more items can’t be changed because they are in use”

Sometimes MacOS locks files and you cannot copy, move, or delete them. Here is how to get rid of this "one or more items can't be changed because they are in use" behaviour.

MacOS can be annoying, at times. In this case I was struggling with a video file that could not be copied, moved, or deleted because MacOS persistet on telling me it “can’t be changed because [it is] in use”; cf. this screenshot of the popup message.

The Continue-Button might suggest that MacOS would perform the action if I clicked it. But after clicking continue, I was asked for my admin-password, the file would seemingly get copied (or moved etc.), and finally, the copied (or moved file etc.) would be deleted.

It took a lot of searching until I, finally, came across the solution in this thread. I did not dig into the gory details of the cause but it has something to do with the so-called extended file attributes. You can see if a file has extended file attributes when you do a ls in the terminal. If there is an @ on the right-hand side of the file permissions this file has extended attributes set. As was the case with my video file:

> ls
-rwxr-xr-x@ 1 zzz  staff  42164199 Dec 19 18:58 MAH07541.MP4

Using the -l@ flag we can see the extended attributes that are set for the file:

> ls -l@
-rwxr-xr-x@ 1 zzz  staff  42164199 Dec 19 18:58 MAH07541.MP4
	com.apple.FinderInfo	      32

So in my case it’s the com.apple.FinderInfo attribute that was causing the problem. As soon as I deleted the extended attribute using

> xattr -d com.apple.FinderInfo MAH07541.MP4

everything was back to normal and the file could be copied, moved, or deleted.

Be careful when you are fiddling with the extended attributes since they can also store resources or essential file metadata. A user in the above mentioned thread says that it is “…always safe to delete com.apple.FinderInfo”. Well, that is something you will have to decide on your own.

How to restart iPhone 8 (Plus|X) when you can’t shut down

How to force-reboot an iPhone 8 (Plus|X) that acts weird? We show the new three steps to reboot since the process has changed from previous iPhone versions.

The process of restarting your iPhone has changed with the advent of the iPhone 8, iPhone 8 Plus or iPhone X.
Such a restart, or hard reset, is necessary if your iPhone is acting weird like you are not able to shut it down by long pressing the side button or you can’t start apps etc.

The force-reboot is no longer achieved by pressing the side and home button simultaneously. Now you have to use the following sequence:

  1. Press the volume up button once.
  2. Press the volume down button once.
  3. Press and hold the side button until the Apple logo appears (approx. ten seconds).

That’s it, your iPhone should reboot. In case you protect your iPhone using a PIN, which is recommended, you will have to enter your PIN after reboot.

Webhosting (nicht nur) für echte Kommandozeilen-Nerds

Viele große und auch kleine Webhosting Massenanbieter haben gewisse Herausforderungen. Hier (m)eine Lobeshymne auf die große Ausnahme "uberspace".

Ich hab’ sie alle durch, die Massen-Web-Hosting-Anbieter. Eine nicht vollständige Liste in zufälliger Reihenfolge: Host Europe, all-inkl, Strato, Hetzner, alfashosting, goneo, GoDaddy, Celeros usw. usf. Das könnte ein langer, langer, geradezu ausgesprochen langer Rant darüber werden, was in schöner Regelmässigkeit bei denen alles nicht funktioniert bzw. funktioniert hat. Aber da muß jeder seine eigenen Erfahrungen machen. Und es ist auch gar nicht auszuschließen, dass jeder der genannten Dienstleister seine passende Zielgruppe hat, für die alles, sagen wir mal, irgendwie und gefühlt läuft.

Für mich war jeder Webhoster-Wechsel immer mit der Hoffnung verbunden, nun jemanden gefunden zu haben, der sein Geschäft im Griff hat. Aber eigentlich gab es immer nur Variationen der bekannten Ärgernisse: Support mit durchwachsener Fachkenntnis, träge Reaktionszeiten, Standardformulierungen, Geschwindigkeitsprobleme und Security Issues. Gerade der letzte Hoster setzt mit seiner technischen Inkompetenz insbesondere im Bereich des Server Hardenings dem ganzen noch einmal eine unrühmliche Krone auf. Der Name sei nicht genannt denn hier soll niemand diskreditiert werden.

Ganz im Gegenteil: Ich möchte hier einen Webhosting-Anbieter hervorheben, nein, geradezu anpreisen, der mir über die letzten zwei Jahre extrem an’s Herz gewachsen ist. Und das nicht, weil ich besonders oft den Support gebraucht hätte. Das war nur einmal der Fall und es gab innerhalb von Minuten eine fachlich extrem versierte Antwort, die konkret auf mein Anliegen einging und sofort weiterhalf. Das allein hat beim Martyrium aus IVRs, bestenfalls halb gelesenen E-Mails und Antworten, die dann nur noch auf ein Viertel des ursprünglichen Anliegens eingehen, schon extremen Seltenheitswert.

Katze aus dem Sack: Es geht um uberspace.de. Aus meiner Sicht kein klassischer One-Klick-To-Happiness-Webhoster mit Klicki-Bunti-GUI, sondern eher was für technikaffine Maker, die den Umgang mit der Kommandozeile nicht scheuen. Man muß sicher kein Web-Guru oder Un*x-Admin sein, aber schonmal in der Shell gearbeitet zu arbeiten, hilft sicherlich bei der Einrichtung des eigenen Web-Space. Allein daran sieht man schon, dass uberspace irgendwie … anders ist. Positiv anders.

Ein anderes Beispiel: Wer auf der Kommandozeile seine Domains, Mail-User oder den SpamAssassin verwalten möchte, der braucht eine Dokumentation. Die gibt es in Form eines umfangreichen WIKIs, das meiner Meinung nach kaum Wünsche offen lässt. Und noch etwas fällt sofort auf, wenn man das WIKI oder auch die Webseite durchliest: Kompetenz pur. Und Überzeugung. Beispielsweise, was die Preise/Bezahlung anbelangt. Jeder entscheidet selber, wieviel er uberspace bezahlen möchte. Auch die Abhandlungen über den Verzicht auf die Lastschrift (bezahlt wird per Überweisung) oder ganz generell immer wieder die Erläuterungen, warum das Team von uberspace die Dinge so macht, wie sie sie machen, sind absolut lesenswert.

Es gibt kaum eine Text, eine Erläuterung oder sonst eine Stelle, an der ich nicht einen Haken machen könnte. Selbst im gerade durchforsteten Impressum gibt es wieder etwas, wovon sich andere Seitenbetreiber etwas abschneiden könnten. Die meisten klicken sich ihren Impressums-Sermon bei erecht24 oder sonst wo zusammen und klatschen dann diesen Text mit mehr oder weniger Verstand auf ihre Seite. Bei uberspace finden wir aber: “[…] In Sachen Linkhaftung sparen wir uns den sonst üblichen Disclaimer, der nach Meinung der meisten Juristen ohnehin keine Rechtswirksamkeit entfaltet. […]” Ita est!

Ich bin schlichtweg begeistert von uberspace und wünsche mir inständig, dass sie im Rahmen der eigenen Ansprüche und Wünsche prosperieren und damit allen, die einen wirklich richtig guten Webhosting-Dienstleister haben möchten, lange erhalten bleiben!

I18n: nullseite.de goes zeropage.io

Not really a matter of internationalization but the Nullseite has to give way to the zeropage.

The king is dead, long live the king!

I started my private blog Nullseite BOY 2008. Since then it experienced two rebrushes and got an accompanying offspring EOY 2015 – the zeropage. There is only so much spare time one can spent on blogging (and other stuff;-) so I decided to quit trying to curate two blogs at the same time. The Nullseite will diminish as I am in the process of migrating the most worthy Nullseite-Posts to the zeropage. This requires some tedious manual labour and will, thus, take some time. Stay tuned!

How to run Netgear ProSafe Utility on MacOS

Netgear does not offer a Mac-Version for their ProSafe Plus Utility. Since it doesn't run reliably with Wine, you'll have to use virtualizers like Parallels or VirtualBox.

Netgear is offering his switch management software “ProSafe Plus” for Windows. And for Windows only. Well, they just might have not noticed that there is at least one other very popular operating system in the market. Such things happen.

To still run ProSafe on a Mac and avoid the overhead involved by installing hardware virtualizing suits like “Parallels Desktop” or “VirtualBox”, I tried to use the compatibility layer software WINE to run ProSafe.

WINE

WINE requires XQuartz first, then Wine for MacOS can be installed. After that you can right click an arbitrary Windoze *.exe file and “open with…” Wine. Unfortunately, the ProSafe Plus Utility did not install smoothly. Had to restart the installation process a couple of times but could start the ProSafe Utility only once. Digging into Wine’s website winehq.org you will find that other users already reported about problems with the installation of ProSafe. To sum it up: No easy way this time. Let’s do it the hard way.

VirtualBox

The hard way means that you will have to use a hardware virtualizer like VirtualBox or Parallels Desktop. And, apparently, you will need Windoze. Luckily, I had an old Windoze 7 installation CD lying around. The first step is to install the free virtualizer VirtualBox by Oracle. The installation process is pretty straightforward and to just run the ProSafe Utility you should be fine with the standard settings suggested by the installer.

You will, most likely, have assigned an ISO-Image of your copy of Windoze during installation. After VirtualBox has been installed, start the Windoze Virtual Machine and get your copy of Windoze installed in the Virtual Machine. That might take some time. After successful installation of Windoze you can reboot, log into your Windoze account and install Netgear’s ProSafe Utility.

After installation of the ProSafe Utility fire it up and, if all went well, you might see a screen similar to the following one. The ProSafe utility scans the network and will list all discovered switches. My switch, a GS108PEv3, hast been found and I am, finally and after all that hassle, ready to configure the switch.