Hello everyone,
Are you tired of coming back to a “spaghetti monster” after a long 3D print? I’m excited to share my simple, yet powerful, Blueprint for an AI-powered 3D Printer Watchdog. This automation uses artificial intelligence to monitor your prints for common failures like spaghetti, warping, or excess plastic, giving you peace of mind.
How the Blueprint Works
The automation takes a snapshot of your ongoing print at regular intervals and sends it for analysis to the AI of your choice (e.g., Google Gemini). The AI rates the print quality on a scale of 1 (very poor) to 10 (excellent).
To prevent false alarms, the blueprint uses an intelligent two-step check. If the first rating falls below your set alert threshold, the automation waits 30 seconds and performs a second, confirming check. Only if the error is confirmed a second time will the blueprint trigger the action you’ve defined, such as pausing the printer or sending a notification.
Requirements
- A 3D printer with a camera.
- Home Assistant version 2025.8.0 or newer.
- A camera entity for your 3D printer in Home Assistant.
- An AI integration configured for image analysis (for example, the Google Gemini Integration).
Give the blueprint a try and let me know your feedback! I hope it helps you make your prints more reliable and stress-free.
blueprint:
name: AI 3D Printer Watchdog
description: Monitors a running 3D print for common failures like spaghetti, warping, or excess plastic using AI image analysis and do something if failure detected.
domain: automation
author: Nico93
homeassistant:
min_version: 2025.8.0
input:
minutes_pattern:
name: Time pattern for triggering the Automation
description: The frequency at which the automation should run (e.g. '/1' for every minute, '/5' for every 5 minutes).
default: "/5"
selector:
text:
conditions:
name: conditions
description: Select the conditions under which this automation should run. For example, '3D printer is turned on.'
selector:
condition: {}
printer_camera:
name: 3D Printer Camera
description: The camera entity providing the image of the ongoing print.
selector:
entity:
domain: camera
ai_task_entity:
name: AI Task
description: The entity for the AI task service (e.g., Google AI ).
selector:
entity:
domain: ai_task
language:
name: Language of AI answeres
description: In which language should the AI answere?
default: "English"
selector:
text:
alert_threshold:
name: Alert threshold
description: The rating at which an alarm should be triggered (e.g. 7 or less)
default: 7
selector:
number:
min: 1
max: 10
mode: slider
unit_of_measurement: threshold
action:
name: Action when alert is triggered
description: >
What should happen, when the alert value is reached? For example, pause the printer.
You can use the follwing variables:
{{quality_description}}: The description of the first analysis/check.
{{quality_rating}}: The scale (1-10) of the first analysis/check.
{{quality_description_second_check}}: The description of the second analysis/check.
{{quality_rating_second_check}}: The scale (1-10) of the first analysis/check.
selector:
action:
variables:
camera_entity_id: !input printer_camera
alert_threshold: !input alert_threshold
language: !input language
trigger:
- platform: time_pattern
minutes: !input minutes_pattern
condition: !input conditions
action:
- alias: "AI Analysis of Print Image"
service: ai_task.generate_data
data:
entity_id: !input ai_task_entity
attachments:
media_content_id: >-
media-source://camera/{{ camera_entity_id }}
media_content_type: image/jpeg
instructions: >
Please evaluate the 3D print quality in the provided photo. Are there
any errors such as spaghetti, warping, or excess plastic? Rate the print on
a scale of 1 (poor) to 10 (excellent). If no issues are visible, provide a
rating of 10. Also, please provide a short description in the Language: {{language}}.
structure:
scale:
description: Scale from 1 to 10 about the 3d print quality
required: true
selector:
number:
description:
description: A short description about the 3d print quality
required: true
selector:
text:
task_name: 3d print quality report
response_variable: quality_3d_printer
- variables:
quality_description: "{{ quality_3d_printer.data.description }}"
quality_rating: "{{ quality_3d_printer.data.scale }}"
- if:
- condition: template
value_template: "{{ quality_rating < alert_threshold }}"
then:
- alias: "Wait for a short time before re-evaluating"
delay: "00:00:30"
- alias: "Second AI Analysis of Print Image"
service: ai_task.generate_data
data:
entity_id: !input ai_task_entity
attachments:
media_content_id: >-
media-source://camera/{{ camera_entity_id }}
media_content_type: image/jpeg
instructions: >
Please evaluate the 3D print quality in the provided photo. Are there
any errors such as spaghetti, warping, or excess plastic? Rate the print on
a scale of 1 (poor) to 10 (excellent). If no issues are visible, provide a
rating of 10. Also, please provide a short description in the Language: {{language}}.
structure:
scale:
description: Scale from 1 to 10 about the 3d print quality
required: true
selector:
number:
description:
description: A short description about the 3d print quality
required: true
selector:
text:
task_name: 3d print quality report
response_variable: quality_3d_printer_second_check
- variables:
quality_description_second_check: "{{ quality_3d_printer_second_check.data.description }}"
quality_rating_second_check: "{{ quality_3d_printer_second_check.data.scale }}"
- if:
- condition: template
value_template: "{{ quality_rating_second_check < alert_threshold }}"
then: !input action
