Hello all,
This is my first post here and about my third day reading deeper into the world of Arduino than I ever have before. My background is primarily in computer networking with forays into coding anytime I feel like I can make a program run better than myself, as well as with analog automotive electronics (light bars for safety vehicles, entertainment systems, etc.) and one time I helped a much more skilled individual install a MegaSquirt setup, which is probably about the closest I've gotten to all of this. That said...
The Premise:
My new boss recently approached me with this: We get automated emails any time a new job enters a processing queue. We'd like for a "Woot-Off" style light to turn on when there is a job in queue and to turn off when it has been claimed and there are no other jobs in the queue. This seems very straightforward, but I just need help hashing this out before I go tell the Big Boss it's A-OK and sink well over $100 and hours of time into this.
Part 1: Queue Tracking:
When an automated email comes in, it will be BCC'd or retransmitted to arduino@example.com, a POP3-enabled internal email account. At the time of BCC or upon our request to the vendor sending automated emails, the subject line will be stamped with something "unique enough" - a timestamp or something. The Arduino, querying its inbox every 5 seconds or so, will see and open a new message, extract the UID, delete the message, and then add the UID to an array with a LightsOn and LightsOff flag per UID. If number of LightsOn > LightsOff, turn lights on. If LightsOn = LightsOff, turn lights off. If LightsOff > LightsOn, uh... do something to indicate an error. Will worry about that later.
Part 2: Light Deactivation:
The purpose of this light is to drive a group of employees toward completing an action. Assume a very, very high-trust environment where outside of technical errors, users can be expected to behave and follow rules always. What I need is a way for users to turn the lights off, very preferably without involving a physical action (button). I'm thinking if the BCC'd/Retransmitted message to arduino@example.com was actually done as a new email to arduino@example.com with all employees BCC'd, the employees could simply reply to the "New Job" message with a blank email and the Arduino could use some trait of that response (the From:, "Re:" in the subject line, either, etc.), plus the original UID, to modify the LightsOn/Off Table accordingly.
I'm also pondering a web interface to de-activate... I assume it would be possible to have a simple text page with a couple input boxes for user's initials/the job UID and a submit button that would be able to interact with Arduino's system data/variables? My users are obedient, but not very tolerant, and the easier I can make this the better. If I'm already figuring out POP3 integration, it might just be worth it to go the "blank reply to incoming mail" route.
Part 3: The Hardware
This is where I drown. There's just so much info, and ordinarily I wouldn't mind buying the wrong thing, because I'd throw it in "the box" and use it some time later... but this is for work, and I'd rather this just go as smoothly as these things can. So I'm thinking of getting this https://www.sparkfun.com/products/11361 with SparkFun's FTDI Breakout (https://www.sparkfun.com/products/9716) and connecting the two with some jumpers for programming. And that's just about everything aside from actually turning the light on... which should be the easiest part once everything else is figured out (right?).
In Summary
So is this possible/feasible? An Arduino constantly checking a POP3 mailbox and extracting strings from returned data to maintain an On/Off table, and turning a light on or off accordingly? And am I on the right track for hardware (I know incidentals will pop up - bits of wire, maybe a couple little components, that relay I mentioned if necessary)?
I apologize for what I recognize may be a wall of text with very little good information in it... I just wanted to provide as much information as possible for all the relative experts here, without looking too foolish.
Thank you.