Need help making a door alarm that triggers actions on my computer.

What I'm trying to do is make a door alarm that would be connected to my computer and triggers a wav or mp3 and also sends a text message to my phone. I was thinking of maybe using an arduino that I have. I need a script or program that would monitor serial ports and call up a program. I'm am not sure how to go about doing this. If anyone has any experience with this sort of thing your help would be greatly appreciated.

sort by: active | newest | oldest
gmxx7 years ago
mac or pc?
purpulhaze (author)  gmxx7 years ago
Windows machine but I would like to be able to get this working on my linux server in the near future.
gmxx purpulhaze7 years ago
ok...

im thinking you will need a magnetic reed switch for the door...

look into http://processing.org

this coding is similar to the ardion and would act as the computer side of the software.

For mp3:
http://processing.org/discourse/yabb2/YaBB.pl?num=1159134611

For email:
http://www.javaworld.com/javaworld/jw-10-2001/jw-1026-javamail.html
http://java.sun.com/products/javamail/
http://www.shiffman.net/2007/11/13/e-mail-processing/

Note: the link im going to give you next would be easily modifiable to do what you want.

http://github.com/kenlim/GuardianRobot/tree/master

this site has all the code for the arduino to read buttons, and control servos. it also has the corresponding code to talk to the arduino over usb using the processing language. you would need to add the bots to make an mp3 play, but that should not be too difficult. The code autoatically sends tweets to twitter, so you could have your doorbell twitter. This would make it easy to have emails sent or txts sent to your phone.
gmxx gmxx7 years ago
i looked over your comment to purpulhaze...

this system would be great if you used the guardian robot code.

also, if you get the:
http://www.ladyada.net/make/waveshield/
http://www.ladyada.net/make/eshield/

shields, you could make the arduino completely separate from any computer. you would need to write your own code.
gmxx7 years ago
the language is based on c/c++ and wiring. it doesnt have a super easy ability (imo) way to run external programs. it requires to create a serial console app or use processing to create a desktop connection to other apps.
Re-design7 years ago
Take an old mouse. Tap into the two push buttons that work the r/l clicks. They are just regular normal off. Attach a standard normal off alarm switch to the door. Run wire between them. Write a VB program to do what ever you want your computer do do when the door opens. Mouse clicks are easy to detect in almost all computer languages. Good luck.
purpulhaze (author)  Re-design7 years ago
I'm sorry I don't think I made it really clear what I'm trying to do. I'm trying to build a home automation system and this would be a small part of the over all system. I've thought of some ways to accomplish what I'm trying to do but I'm finding out that the easier ways aren't really scalable. What I need is a system that I could check the status, arm or disarm from a remote location and would alert me with a text message when it has been set off.
That's not really what I got from your question but anyway, you need to read over this guys site
http://www.aaroncake.net/circuits/crombuld.asp
I think he's done what you want to do and he gives some of the details.
Good luck.
orksecurity7 years ago
I'd suggest using a parallel port instead if you have one; you could just about plug the switch directly into the computer. (I know folks have also used the status bits on serial ports as simple on/off input lines.) The rest of it is all programming. I'd suggest you go looking for those pieces one at a time and grow this in stages, rather than trying to do it all immediately.