by 96bcaa76-0f27-45e7-9aa3-65c535e53a05

Prusa Out of Filament

Prusa XL printer does not issue an alert to octoprint when the filament sensor goes off. It will just beep and beep as it sits and waits for me to come and reload the filament. This has lead me to some failed prints and juge slow down.

I use octoprint and home assistant to manage my printer. Octoprint has a great plugin for mqtt that shoots over positionUpdates to home assistant. I can use that to detect when the printer is waiting for me to load more filament as it moves the tool head to a set x,y far off to the front and left. There is a great plugin that takes advantage of this called OctoPrint-PrusaFilamentRunoutMonitor . Unfortunately this did not work for me as it currently only allows you to set one x,y position to alert on. The prusa xl parks each tool head at a slightly different position. I worked around this like this.

mqtt:
  binary_sensor:
    - name: "Printer Out of Filament"
      state_topic: "octoprint/event/PositionUpdate"
      value_template: "{%if value_json.z | float > 0.2 and value_json.y | float  < -4.0 %}ON{%- else -%}OFF{%-endif%}"
      unique_id: "printer_out_filament"
      device:
        identifiers:
          - "OctoPrint"
        name: "OctoPrint"

This binary sensor fires off anytime the print head is in the negative space off the bed, if we arent on the first line. We have to do this because the printer moves to the same region when It does its initial purge at the beginning of the print.

After setting this all up I did some test prints to ensure the switch set to on when a filament event occurred. I then wired this into an automation to send me an sms along with a snapshot from the camera to me over signal.