[ST Edge] Klipper 3D Printer

Edge driver to monitor the status and issue basic commands to a 3D printer running Klipper (via Moonraker) over LAN.

Monitoring includes:

  • Online/offline status
  • Current printer state
  • Print progress
  • Extruder and bed temperatures
  • Part cooling fan speed
  • Messages via the M117 gcode

Printer commands:

  • Emergency stop
  • Pause
  • Resume
  • Cancel
  • Reboot Host (Pi)
  • Shutdown Host (Pi)

Both the status and commands can be used in routines.

Installation

  1. Enroll your SmartThings hub in the AgainTalent Release Channel: https://bestow-regional.api.smartthings.com/invite/RBlEL903Oy2E
  2. Install the Moonraker-Klipper driver
  3. Open the SmartThings app and scan for nearby devices
  4. Once the printer is ‘found’, edit its settings to configure the IP address and other fields

Limitations

  • HTTPS is untested - feedback would be appreciated if anyone’s gone to the effort
  • Only the main extruder is supported
  • Only one printer (instance) is supported
    • Multiple instances will be implemented in the future
  • Temperature values in routines are limited to -20°C - 50°C because the driver uses SmartThings’ temperatureMeasurement capability
    • You do get pretty graphs in return, however
  • Print time remaining estimate uses the metadata provided by the slicer
    • Other methods (eg. filament length) will be added in the future

Code

All code available on GitHub: GitHub - againtalent/SmartThings-Klipper: SmartThings Edge driver for Klipper 3D Printers

A huge thank you to everyone in this community who publish their code. Having the ability to see others’ solutions to problems has saved me countless hours in trial and error after trying to make sense of the poor developer documentation.

This very much a beta driver. Use at your own risk.

I only have the one printer running Klipper, so all testing has been done on this machine. I do not plan on adding any further functionality, however will do my best to fix any issues/bugs and will consider any reasonable requests.

4 Likes

@AgainTalent Hi, please can you provide how exactly integrate it? some video or pictures… Thanks

Apologies for the delay. Firstly, I’ve noticed the enrollment link in the descrtiption had stopped working for some reason, so I’ve updated it with a new one.

As for more detailed instructions on installation, please see below.

This is a custom Edge driver which first needs installing on your SmartThings hub. Follow the enrollment link (https://bestow-regional.api.smartthings.com/invite/RBlEL903Oy2E), where you’ll be prompted to sign into your Samsung account. Enroll your hub in the channel and select the driver to install.

In the SmartThings app, scan for new devices like you normally would. The printer will be ‘found’ and added to a room. In reality, the driver’s not clever enough to detect your Klipper printer on your LAN so will need configuring in its settings screen. (3 dots on the top right)

For the most part, you should only need to enter the correct IP address and API key of your printer’s host for it to work.

You can get the API key for Moonraker (Klipper’s API) from your printer’s settings page. Here it is in Fluidd but might be somewhere different in Mainsail. It should be a 32-digit hexadecimal string. Otherwise, you might have to do digging.

Hope this helps.