Skip to content

WiehanAu/Moonraker-Home-Assistant

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

55 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Moonraker For Home Assistant

Integration between Moonraker and Home Assistant

image

Setup

Requirements

HACS Install

SSH into your Docker host and navigate to the folder location where you have the Home Assistant /config volume.

Run the command below.

wget -O - https://get.hacs.xyz | bash -

The files will now be downloaded and put into the directory where the Home Assistant volume is mapped.

Restart the docker

sudo docker restart homeassistant

Log in to Home Assistant.

After Home Assistant connects, select Settings, then Devices & Services.

Make a folder in your home assistant directory

In the bottom right, select Add Integration.

Search for HACS and select it.

If you agree with everything, select all options and then Submit.

Copy the code that Home Assistant provides and then select the link to sign into GitHub.

Sign in to GitHub, and then paste in the code from the previous step.

If you’d like to proceed, select Authorize HACS.

HACS is now installed! It’s best to reboot your Docker host at this point.

sudo docker restart homeassistant

After Home Assistant loads back up, HACS will be fully configured and ready to use!

HA Packages Configuration

mkdir homeassistant/config/packages

Add packages directory to configuration.yaml

homeassistant:
  packages: !include_dir_named packages

Put the moonraker.yaml in

cp moonraker.yaml homeassistant/config/packages/moonraker.yaml

Replace with your 3D Printer IP in the moonraker.yaml file.

sed -i 's/<moonraker-ip-address>/10.0.0.69/g' homeassistant/config/packages/moonraker.yaml

Restart Home Assistant through the WebUI then you should see the entities of your 3D Printer show up.

Install HACS Items

Click HACS on the left column -> Frontend -> + Explore & Download Repositories

Search at the top for card-mod and mini-graph-card and then install them.

In your configurations.yaml add this for card-mod

frontend:
  extra_module_url:
    - /community/lovelace-card-mod/card-mod.js

Add The MJPEG Camera

Click Settings -> Devices and Services -> + Add Integration

Type MJPEG IP Camera and click it.

Name: 3d printer camera

MJPEG URL: <moonraker-ip-address>/webcam/?action=stream

Still Image URL: <moonraker-ip-address>/webcam/?action=snapshot

Uncheck Verify SSL certificate.

Click SUBMIT.

If you need to flip your camera uncomment this section in the yaml

#    card_mod:
#      style: |
#        ha-card {
#          transition: transform 0s;
#          transform: rotate(180deg);
#        }

Add The Thumbnail

Thumbnail will be added properly now with the grid.yaml paste snippet.

Lovelace cards

Click Edit Dashboard

Click + Add Card

Scroll to the bottom and click Manual

Paste the yaml content below into the Manual cards.

Grid Card

Showing model preview window with file name, live camera and buttons to stop, FW reset, pause, resume and cancel. Card code

Glance Card (Info and Sonoff Power Plug)

Showing info and button to turn on and off the Sonoff S26 Power Plug. Card code

Gauge Card (printing progress)

Showing currently % of printing progress. Changes color depending on % of progress Code card

Temperature Graph (hotend and bed)

Using mini-graph-card component, to show graph of hotend and bed temp. Code card

Thank you!

This is comprised of all three of these code bases below

Few added tweaks

  • Added more directions to readme and updated picture.
  • Larger quality thumbnails.
  • BTT Smart Filament Runout Sensor.
  • Chamber Temperature.
  • Flipped Webcam.
  • Removed synthwave theme.

About

Integration between Moonraker and Home Assistant

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published