anoved / OctoPrint-EmailNotifier

Receive email notifications when OctoPrint jobs are complete. Currently broken. Please fork and fix!
GNU Affero General Public License v3.0
16 stars 35 forks source link

I fixed some issue, so... #45

Open ericli1018 opened 6 years ago

ericli1018 commented 6 years ago

before author update this plugin, you can install my fixed one on my github. just install with command

/home/pi/oprint/bin/python -m pip install https://github.com/ericli1018/OctoPrint-EmailNotifier/archive/master.zip

I add using tls, ssl, port number option in config page. have fun~

if you want to use google smtp send mail

please follow step below:

  1. pip install --upgrade setuptools

  2. use pip command install fork project on my github

  3. if you have double account auth. Get app password by link https://security.google.com/settings/security/apppasswords

  4. install keyring #thanks jeffgolden remind /home/pi/oprint/bin/python -m pip install keyring

open python command

import yagmail yagmail.register('ericli1018@gmail.com','your app password') quit()

  1. restart service

  2. enter config page, checked use tls, port =587, server=smtp.gmail.com, user=your gmail full address, then save config.

  3. open config again, and enter config page to touch send test mail

  4. wait to received email

jeffgolden commented 6 years ago

Thanks for posting this -- I recently had to re-do my setup and used your package and this guide to get back up and running. Worked like a charm. Only one thing you might want to add to the instructions above (if you don't already have it installed) is to run: /home/pi/oprint/bin/python -m pip install keyring

before your step 3

anoved commented 6 years ago

Thanks @ericli1018! I'm glad people find this plugin useful but regret that I have been unable to maintain it. I realize this has resulted in frustration for some users. So, I appreciate the effort you have put in to posting fixes.

Stady234 commented 6 years ago

I dont know how to "maintain" this... but i got it working under the 0.15.1 with little effort... your core plugin is hidden from the plugin list.

ScottWell1 commented 5 years ago

Thanks to @anoved for original plugin -- wish you had time to maintain it (but I understand). :-( Thanks to @ericli1018 for the updates!

For others arriving here because they are having trouble installing, I just did a fresh install starting with Octopi 0.15.1, and here's the sequence that worked for me:

  1. Installed Octopi 0.15.1 per instructions.
  2. SSH'd and updated OS (i.e., 'sudo apt-get update" and 'sudo apt-get dist-ugprade')
  3. Updated Octoprint to current version (1.3.9 at moment).
  4. Installed Email Notifier via Octorprint plugin UI, using master.zip provided by @ericli1018: https://github.com/ericli1018/OctoPrint-EmailNotifier/archive/master.zip
  5. SSH'd and run following commands at prompt:
    source ~/oprint/bin/activate
    pip install yagmail
    pip install keyring              (note: be patient, this takes a while....)
    pip install keyrings.alt
    python
    >>> import yagmail
    >>> yagmail.register('my.email','my.password')
    >>> ctrl-D to exit
    sudo shutdown -r now

After restarting, Email Notifier was able to successfully send email. Hooray!

I put off upgrading my pi to a pi3b+ for a long time, because I was concerned I wouldn't be able to get this plugin working. Sure hope someone with the necessary skills will be able to step up and fully take over maintenance -- would be nice to see keyrings.alt eliminated, and to perhaps see a better installation process or at least official installation instructions for the yagmail/keyrings/register stuff.