Moonraker in HA

You can take the thumbnail code and paste it in Developer Tools → Template

    - name: voron_24_orange_object_thumbnails
      unique_id: "192.168.1.24059b37837-b751-4d31-98c2-516a52edf833"
      state: >
        {% set dir = states('sensor.voron_24_orange_current_print') %}
        {% set img = states.sensor.printer_3d_file_metadata.attributes["thumbnails"][1]["relative_path"] %}
        {{ (dir.split('/')[:-1] + [img]) | join('/') }}
      availability: >
        {% set items = ['sensor.printer_3d_file_metadata'] %}
        {{ expand(items)|rejectattr('state','in',['unknown','unavailable'])
          |list|count == items|count }}
      icon: mdi:image
      attributes:
        friendly_name: "Object Thumbnails"

See what error you get.

I would assume its because you renamed

  • name: voron_2.4_orange_file_metadata
    But never changed that name in the thumbnail code:
{% set img = states.sensor.printer_3d_file_metadata.attributes["thumbnails"][1]["relative_path"] %}

For anyone looking for a easier way to connect to Moonraker, we just made a HACS integration

3 Likes

@ marcolivierarsenault Thank you, works really well :slight_smile:

@marcolivierarsenault
Hi, i just installed tour integration… Great work!

Is there any way to shut down klipper via home assistant? I’ve seen the “macro” section in the documentation, but the only button that show up is the panic button

Thanks for your efforts!

This is very setup specific, In my case I have a macro that shutdown the smart switch where my printer is connected. If you build such macro in your configs, it should appear.

Ehm… Sorry for the noob question but… Do you mean in the integration configiration?
I’m not able to find a way to create a macro!
I apologize if it’s in the wiki, i honestly don’t see it.

Thanks for your answer!

EDIT: ok, the macro has to be in the moonraker configuration.yaml file.
Got it!

Tell me how to do it right I have an integration in which the following buttons are available to me:

Cancel Print
Emergency Stop
Firmware Restart
Host Restart
Macro Retract
Pause Print
Resume Print
Server Restart

But there is no button for it to reboot my orange pi zero2.
How can I arrange a reboot of the orange pizero controller itself?

Has anyone had the problem that the host simply cannot establish a connection? I can access the ip in the web browser without any problems.

@NonaSuomy Just used your config files (thx!) but ran into an issue that ‘check configuration’ returned an error which prohibited Home Assistant from restarting.
Turns out there is an incorrect indentation in the moonraker.yaml file on Github.

line 102 has two spaces too much:

  - sensor:
      - name: 3d_printer_printername

Removing those fixed the issue for me. No biggie, but some users may waste time on this.

1 Like

Fixed thank you.

How go I get the slicer thumbnail?

The solution for me was to remove Creality Web interface, you can do it from the guilouz script

1 Like

@pollinolas Sorry, I was referring to sensors within HA and the camera setup. Is it necessary to add rest sensors to get the path and filenames?

That’s what I was referring to too, I have a k1 max, and I have only managed to have the miniature camera after removing the creality server from port 80 with the guilouz script as I already said, after that (for me) it has appeared without having to create any sensor

I guess I’m still not explaining it properly. I see it fine in fluidd and mainsail, but I have a lovelace page that I would also like it to appear in and I don’t have an pre-made entity from the install for that.

I think I understood it before, at all times I was only talking about entities within HA

This worked for me for getting the thumbnail. I have a V3KE and am using the integration by @marcolivierarsenault and couldn’t get the thumbnail to show until I removed the Creality server as you said. I don’t have a camera, its just the Gcode thumbnail. All working now and I have use a combo of start-switch and conditional cards to show different things when the printer is either off, printing or has finished printing.
I have created an extra sensor that holds the amount of filament used once finished as the built in one returns to zero as soon as the print ends.

I have the Moonraker HACS integration set up and working, but can’t seem to get the camera feeds, using 192.168.1.95/webcam/?action=stream.

Pasting this same stream into my web browser works, just not in HA (running in Docker).

Any ideas please?
Thanks

Hello, I installed the Moonraker integration a couple of weeks ago but the camera integration says it is not available anymore, and although the configuration is looking ok it shows the camera as inactive. I tried the generic camera via UI but it’s not working, I guess due to the above mentioned requirements in the URL. Anyone can point me in the right direction? This is the only relevant topic I found regarding the matter

Do you guys know if there is any plan for SonicPad integration? It says in the documentation that it’s not supported because of issues.
Happy to help testing if it helps