How to Receive Email Message INTO HA System?

wmahvd

Member
Hello, I have an Elk M1 with M1XEP, an ISY99i, and an attached webcontrol board, all up and running on my LAN and working well, but like many of you here I am continuously upgrading/adding/enhancing. What I would like to do next is add a feature whereby I can install another webcontrol at my Dad's house, along with a couple of contact-closure motion sensors, and have his webcontrol send an email to my system on motion detect. Then somewhere in my system these emails will be monitored, and if I don't receive an email for some period of time (during the day) then the system will notify me that I need to call my Dad to make sure he's OK, since he has stopped moving around his house. Yes, I could just call him every day - maybe this says something about how good of a son I am! But for the sake of a home automation discussion, how can I do this? I have three components in my system that can send emails to me, but no way that I know of for an email to be received into the system. Ideally, I would like the capability to actually parse the email message so I could define more than one, but at the very least this "thing" would need to output a contact closure when the email is received, so that I can monitor the frequency with Elk rules or webcontrol programming. Whatever is receiving the email would also need to qualify it with a port ID that I would map through my router (so it wouldn't just receive any email sent to my home IP address). Does anyone know how I can do this? It would also be nice if it didn't cost too much - sort of a webcontrol in reverse (receives email instead of sending it) would be great. It doesn't need to be a full email client, it just has to recognize the packet(s) and parse them a bit. I'm thinking that others would be interested in this as well, since there's certainly more applications than just my "Dad monitor"....
 
A friend of mine actually created this monitoring system for that very purpose and has several hundred in his basement! It was a project/company that went sour when the economy took a tank and a major retailer reneged on the purchase order. I'll reach out to him - perhaps we can move some of these units for him!
 
Thanks for the replies. I ran across Elve in my search, but what I'm looking for is something small and low power that I can just wire up to a webcontrol or Elk input. I don't want to involve software running on a PC or smartphone, that would have to always be on and running the app. On the other hand, the "devices in the basement" sounds intriguing....
 
Misterhouse has the ability to respond to emails. Similar to Elve it runs on PC hardware but Misterhouse is free. Elve is most likely easier to use but doesn't meet your cost target. If you don't want a full PC you could probably get Misterhouse or parts of it to run on a dd-wrt router. Set up an email address just for this.
 
Can you just program WebControl so that when there is no activity for certain time, then send you an email? Since you monitor him for some time, so you probably already know how often his move being detected by motion detector. Each time when a motion detected, you can have PLC code to increase a counter. This counter is cleared every hour (or every half hour). If the activity counts below certain number, then send you an email to your phone txt message.

You can also define in your PLC code that during which time period you expect to receive how many activity trigger from motion detector. So that during his sleep hour, you don't get alert for not enough activities.
 
Hi, yes, thanks, the programming of the webcontrol response I know how to do - the problem is how to inform the webcontrol that an email has been received in the first place. Since neither the webcontrol, the Elk, or the ISY99 is able to receive (and report receipt) of an email - please enlighten me if I'm wrong - I need something to actually receive the email message from the remote site (my Dad's house). A suggestion above regarding a ddwrt-hacked router may be a solution, but so far I haven't found info on how ddwrt can be configured to process a received email message and to output something on a router serial port (still searching). Again, what would be perfect would be a webcontrol in reverse (receives email on a specific port instead of sending), and (he states longingly) for the same price!
 
For ddwrt handling of email how about perl? There are some examples using perl for email around (but not under ddwrt). I want to do something like this for simple email messages but it will be on a linux PC. Here is one I found on setting up perl on ddwrt. The rest, as they say, is left as an exercise for the reader...

http://community.cosm.com/node/873

Looks like this could turn into a whole 'nother hobby .... :)

Keep us posted. It's an interesting project!
 
Hi, yes, thanks, the programming of the webcontrol response I know how to do - the problem is how to inform the webcontrol that an email has been received in the first place. Since neither the webcontrol, the Elk, or the ISY99 is able to receive (and report receipt) of an email - please enlighten me if I'm wrong - I need something to actually receive the email message from the remote site (my Dad's house). A suggestion above regarding a ddwrt-hacked router may be a solution, but so far I haven't found info on how ddwrt can be configured to process a received email message and to output something on a router serial port (still searching). Again, what would be perfect would be a webcontrol in reverse (receives email on a specific port instead of sending), and (he states longingly) for the same price!

I don't get why you can't just send the e-mail to your address? You don't check your e-mail every day? This is what CAI_Support was saying. The webcontrol can do the "if motion is not detected for xxx time then notify" part so why does it need to connect to another system? You're over engineering it.
 
Well, I actually am an Engineer :). az1324 is correct - I could simply have the webcontrol at my Dad's house do the processing of the motion detects and email me only when they stop. I guess this would be my fall-back if I can't do what I really want to do. But there's a couple of reasons that I want to do rmail processing in my home system....

I actually don't check my email all the time (and I get emails frequently, and on multiple accounts) so it could be awhile before I see the "important - no motion at Dads house" email. Again, the whole idea is that I don't have to remember to check anything - I am notified. Also, I already have some events set up in my system to email me on my phone, such as multiple outdoor motion detects triggered while I'm not home, temp sensor in an outdoor camera is getting too hot, etc. I want the "Dad alert" to be separate from these. I also use the existing email capabilities of my system for debugging new stuff that I add - so sometimes I'm getting LOTS of emails as I'm testing something. And when I'm actually home, I tend to ignore some of these email alerts since (in the case of outside motion) I can just look out the window. Adding a whole new email account wouldn't really get around this, because my one cell phone would still be alerting me about an email (I have gmail push on an iphone), presently I often just turn off the alert (jailbroken phone - don't even have to unlock it), and I would have to go into the email screens every time to see which email account was alerting me (also not sure if I could have gmail push on two accounts....)

What I'd like to do is have my system (that's receiving the emails from Dad's) make voice announcements when the "lack of motion threshold" is reached when I'm home (system not armed) and to call me on my cell when I'm not home. A phone call on my cell from my home number (aka the Elk) always gets my attention very quickly, and when I am home it's hard to miss the Elk lady's coice. And of course, once the "event" is in my system I can do anything else I want - flash lights, turn on a siren, etc.

The other attraction is that if I can actually add the capability to parse the email message, then other opportunities are opened up, since I could define multiple email message contents with different actions (no idea what right now, but I'm sure I'll come up with something).

Thanks everyone, for the suggestions - still searching, so far it appears that if I want to do this I'm going to have to figure out how to write some fancy scripts/programs on a hacked router or something, and even then I'm not sure I'll be able to actually get into an individual email message and evaluate the text.
 
I actually don't check my email all the time (and I get emails frequently, and on multiple accounts) so it could be awhile before I see the "important - no motion at Dads house" email. Again, the whole idea is that I don't have to remember to check anything - I am notified. Also, I already have some events set up in my system to email me on my phone, such as multiple outdoor motion detects triggered while I'm not home, temp sensor in an outdoor camera is getting too hot, etc. I want the "Dad alert" to be separate from these. I also use the existing email capabilities of my system for debugging new stuff that I add - so sometimes I'm getting LOTS of emails as I'm testing something. And when I'm actually home, I tend to ignore some of these email alerts since (in the case of outside motion) I can just look out the window. Adding a whole new email account wouldn't really get around this, because my one cell phone would still be alerting me about an email (I have gmail push on an iphone), presently I often just turn off the alert (jailbroken phone - don't even have to unlock it), and I would have to go into the email screens every time to see which email account was alerting me (also not sure if I could have gmail push on two accounts....)
A couple thoughts here...

First - you can email the SMS address for your phone - so it'll show up as a text message and not an email - this will alert differently.

Second - yes, you can have multiple Gmail push accounts - I have like 5 in my iPhone. They can be set up either as gmail accounts or as exchange accounts.

Third - The next iOS update will allow you to set special notifications for certain people - so [email protected] could have a different notification action as a super important email (usually for emails from the boss, etc).

Not what you're ultimately going for, but options nonetheless. Since you want something custom AND low powered without a full-time PC, I'll again throw in my recommendation to do something custom on a Raspberry Pi or a SheevaPlug or Dockstar, or one of those options. Otherwise, suck it up and get a program that does what you want and put it on a PC. I'm sure you could find some help if it gets out of your comfort areas. Also, I think the Pi has some GPIO contacts you could access if feeling really creative.
 
If you don't need to look at the body of the email but just the subject you could do something like this:
http://www.techrepublic.com/article/code-an-application-to-read-pop3-mailboxes-with-perl/6060855

Seems like you could put quite a bit of information into the subject line but if you need to process the message itself the misterhouse code might be a place to start. Not sure how difficult it would be to make the code work without the rest of misterhouse.

http://misterhouse.sourceforge.net/faq.html#2_12__can_do_i_send_mh_comands_via_email

For getting a signal out of the router you could switch one of the LEDs or use an Arduino or Webcontrol.
 
I would say use webcontrol to send an email to ifttt and set it so that when an e-mail is received it would call you and be done with it. But you could also presumably use the dropbox fetch URL task on ifttt to access a URL that points to a DynDNS address for your ISY that updates a variable that runs a program that ...
 
Back
Top