Notify on Filament Runout?

Hi, I have a filament runout switch connected to my printer board andconfigured on marlin latest release version. It works great.. the filament runs out, the firmware beeps, I feed more in and resume.

However, I would like to get notified when the filament runs out.. I am using the octoprint API to send push notifications by updating config.yaml.. I get notifications when the print finishes, but I can't find an event for filament runout. I tried PrintPaused but it doesn't fire on filament runout. Is there a way to configure Octoprint to fire an event when the filament runs out?

1 Like

connect it to the pi and use https://github.com/kontakt/Octoprint-Filament-Reloaded

That plugin doesn't mention anything about notification or API under features.. will it help?

Shouldn't it be possible to solve this without a hardware change by adding some message to the filament runout script in marlin and have octoprint catch it and fire a filament runout event?

you could connect the printer and octoprint parallel
and use the octoprint side only for notifications.

or maybe it is possible that marlin could send a message to octoprint

I'm about ready to install a Marlin FW based run out sensor too. How does Octoprint handle the FW based runout alarm?

Also, does Marlin throw a G-Code that Octoprint can trigger off of?

i'm having the same problem here, i'd love some pop up message on the octoprint interface and on the tft screen as well.

Firmwares just need to support action commands on filament runout, possibly ones targeting the bundled Action Command Prompty plugin.

Is it possible to use the action command plugin to trigger shell scripts or to send push notifications via Pushover, etc. ? That could be really powerful.

With a plugin, yes, easily.

I found this: Action Commands Plugin
I think I can get mobline phone notification of filament runout working with this.

Hi,

You can use the Pushover plugin for Octoprint. For more info: Pushover

Hi,

I ordered one. I will let you know when it works.

I just wrote up a guide on how to set up SMS notification on filament runout (twilio not necessary). I figure runout is an important enough scenario that I'd want to know right away. SMS does the job.

The TLDR is:

  • Use ssmtp + mail command on your pi to send a text message via email
  • Set the filament runout plugin to pause on filament runout
  • Fire some M118 action commands on pause action
  • Configure the pause action to execute the shell command to send you a SMS

http://paniquejazz.com/blog/octoprint-sms-notification-on-filament-runout/

1 Like

vdub6127:

SSMTP is no longer supported, and I could not get it to work. I found it has been replaced by MSMTP.

To install that you need to run this command:

sudo apt-get install msmtp msmtp-mta

Followed by:

sudo nano /etc/msmtprc

That file doesn’t exist so all you get is an empty file. You populate it with these lines:

account username@gmail.com
host smtp.gmail.com
port 587
tls on
tls_starttls on
tls_trust_file /etc/ssl/certs/ca-certificates.crt
auth on
user username
password password
from username@gmail.com
account default : username@gmail.com

This example is using Gmail. I couldn’t get this to work using my normal email address, which is an office.com account, and I do have a secondary Gmail account so I took the path of least resistance and used it.

You do have to make a setting change in Gmail. You go to Settings > Google Account > Security, scroll down and turn on “Less secure app access”

You should then be able to test the system using any working email address, or better yet the text from email address listed in your set of instructions thus:

echo 'Test' | msmtp 1234567890@txt.att.net