E-Mail Waiting Light

From NYC Resistor Wiki
Jump to: navigation, search


What It Is

An LED to alert you to unread e-mails!

SLED v1.1 USB LED Lamp
The E-Mail Waiting Light is there to remind you that you have not reached INBOX ZERO! A blood red reminder of your shortcoming as an elite e-mail warrior, unable to filter your way out of a torrent of new and unwanted attention sucking diatribes from the ether!

The E-Mail Waiting Light is a simple Python script that, when run, will enable you to signal to a serial port device that you have mail, or that you have reached INBOX ZERO, in which case you should probably get out of the basement and meet more people. - wwward

Parts List

  • Bring your own serial controlled instrument or...
  • Build one from my earlier SLED project post at NYC Resistor
  • One Python-friendly computer

Python Script

Download the script from http://files.me.com/wwward/12ta1r

Theory of Operation

The script employs the IMAP module to retrieve all the mail in the INBOX folder, looking for "UNSEEN" flags. The count of those messages is stored to a variable. If the variable is not zero, the script uses the PySerial module to write a string to the serial port. The SLED uses simple RGB values to represent LED colors. In this case, the script sets the color to RED, and off when all mail has been read.

Future Plans

  • Evolve an applet that can hook more events than just e-mail and represent them on the SLED
  • Clean up the code so passwords are retrieved from a secure repository
  • Exception handling!
  • Something that runs in the tray in windows, or in the menubar on mac os, or in the various UI's of Linux variants.

Questions or comments should be directed to wwward@pobox.com