Moonraker API (Klipper)

Hi all

I was looking to some integration with moonraker api, to integrate my 3d printer with klipper firmware.

At the moment I have some sensors using rest, but would be great to have a specific integration with sensors and services to control 3d printers with klipper.

Moonraker API has rest endpoints and also webhook to be subscribed.

I started reading some documentation to prepare a dev environment to start developing something for this, but I never developed anything like this in python and I don’t have much time at the moment.

Thank you guys

same here…

Hi all,

Same here, I’ll like to be able to integrate my Artillery X1 printer running Klipper into HA.

take a look at: moonraker/example-home-assistant.yaml at f5f87bf08c9d8bf1ca4c2b944dd5ea428724f699 · Arksine/moonraker · GitHub

1 Like

Hi CoolDuke,

Thanks a lot, I will give it a try this weekend.

did somebody get the preview working with a picture card in lovelace?

This would be great… there are many of us running Klipper and HA.

Moonraker can be configured as a MQTT client, publishing messages when the state of selected objects change to a configurable topic. And with RPC commands through request and response topics. So the existing MQTT integration can be used. The only trouble is defining all the sensors manually in automation.yml.
Another solution would be to write a gcode marco to send a MQTT messages for sensors discovery and have it automatically run at startup. A bit more complex, but it would be easier to share and re-use for those more comfortable with klipper/moonraker than HA’s configuration.yml.

1 Like

I too would love to see a plug-n-play official integration, or at least one through HACS! So much easier that way :slight_smile:

If you want the Moonraker API implemented as an integration/component and pulled into the main branch, give this pull request a +1 / thumbs up.


This will enable mainsail, fluidd, klipper access from within Home Assistant without relying on the RESTful API.


Has anyone tried to install moonraker integration manually on hassio following the developer comment in the thread mentioned in the above comment?
I managed to correctly get all files under custom_components but no entry “Moonraker” is shown in my Integration menu.
This is the link provided by the developer until official support in HA Moonraker Component Integration

1 Like

Restart home assistant should do the trick… working great for me.

Are you using dev version of home assistant? core version? I’m on latest HassOS and rebooted several times, but nothing did the trick

I’m on OS on a Pi. I’ve had issues with custom components in the past, so you may want to look into other ways to troubleshoot that.

thank you so much, did it all from scratch on latest ha version and now working!

Late to the party, but my friend and I just made one for HACS


Even later to the party :slight_smile:

How do I add the camera?

Thanks for this Moonraker integration! Here’s my new 3D printing dashboard in HA:


Really nice @DagobahMike, If you are willing to share, I would love to add your yml/config in our doc.

Sure thing! I made a few changes to make it a bit more “generic” and uploaded the YAML as a gist (link below). Feel free to use whatever parts you’d like. This YAML assumes you name your printer “moonraker” when setting up your moonraker-home-assistant integration.

Note, this uses several HACS cards:

  • custom:mushroom-title-card (from lovelace-mushroom)
  • custom:bar-card
  • custom:button-card
  • custom:apexcharts-card