How to Text Yourself when your DSC PC1550 Home Security System Alarms

I have a home security system that was installed when my home was built in the early 1990’s. It is, or was until I modified it, a wired perimeter system with a single wired motion detector. The system is a DSC PC1550 and originally was monitored by a well known alarm system service, a three letter acronym beginning with the letter “A”. Anyway I stopped paying for the monitoring long ago.

More recently I decided it would be nice if the system would send me a text if it went into alarm. I also wanted to capture video and send it to the web if an intruder came into my office. Here’s how to do that:

Hardware:
The design uses the output from the alarm system that sounds the siren to tell the Arduino Uno when an alarm is triggered. This is accomplished by sending the siren signal to a relay. The relay is normally open except when the siren sounds. Figure 1 below shows a schematic for the alarm system.

Figure 1. Alarm System Schematic

When the siren is activated the relay (see Figure 2. below) closes connecting the +5V Arduino output to analog input (A0). When the +5V signal is not connected a 1 K ohm pull down resistor ensures that the analog input A0 sees 0 V. The wiring diagram shown in Figure 2 below provides more details.

Figure 2. Wiring Diagram

Note: a digital input could also be used. To do that you would use the 3.3V output on the Arduino and digital input D0 instead. You’d also need to make corresponding changes to the Arduino software to read a digital input instead of an analog input.

Software
A sketch (programs in the Arduino are called sketches) in the Arduino monitors the voltage output of the relay. When the sketch sees a voltage below 1.25 volts it sends the character “F” to the linux server via the USB connection. If the signal exceeds 1.25 V, the Arduino sketch sends the character “T” to the server.

The Linux server based monitoring script
Shell scripts on the linux server monitor the serial connection from the Arduino and perform the actual texting. There are two shell scripts, the first gets input from the Arduino via the USB cable and sends an email which is then forwarded on as a text to a cell number. The shell script uses the command line program Mutt to send the email (via gmail) to the cell phone text address.

Installing and configuring Mutt
Mutt is a commandline based Mail User Agent (MUA), and was written to view mail. It was not written to retrieve, send, or filter mail. It relies on external programs to do those tasks. One approach, sends and receives emails through a Gmail account. Begin by installing mutt with this command

sudo apt-get install mutt

Next set up IMAP to use gmail. Open gedit, click the Open button and select the file .muttrc in your home folder. (Note: files whose names begin with a “.” such as .muttrc are hidden files. So, if you don’t see your hidden files simply right click on the background of the file browser you just opened and tick the Show Hidden Files box.)

After you have opened the file, you have to tell Mutt how to connect to the Gmail account. To do this, put the following in your .muttrc

set from = “yourusername@gmail.com”
set realname = “Your Real Name”

Then mutt has to know where your gmail mailbox is and what your password is.

set imap_user = “yourusername@gmail.com”
set imap_pass = “yourpassword”
After making these changes save .muttrc and exit gedit. At that point you are ready to send a test email using mutt.

mutt -s “test” recipientemailaddress < textfiletosend

When you run mutt for the first time, a certificate will be downloaded and you will be asked if you want to keep it. Just type Yes.

Texting via email
To send a text message via email, just substitute your 10-digit cell number for ‘yourcellnumber’ for each carrier below:

Finally add your script to start up applications. Assuming you are running some version of Gnome desktop, use your launcher to run “Startup Applications”. Press the Add button and add the alarm texter as shown below:

Finally press the add button on the popup and your script should start on your next reboot.

A second shell script checks once an hour to make sure the first program is running and restarts it if it is not. This is a bit of belt and suspenders, since there’s no reason the alarmtexter script should stop running. But I’m an engineer so:

And finally add your script to your list of scheduled tasks. Use your launcher to run Scheduled Tasks. Click New button then select “A Task Task That Runs Recurrently” and enter your task in the popup window. I used the default hourly schedule but there’s nothing magic about that.

Press Add and you should be finished.

Pictures below show the physical layout in my alarm box and the Arduino wired up in its case.

I did the same thing on Windows using USB->Serial and wiring the control pins from the com ports. It tells you which loop opened. The main loop for serial is below. used cygwin to send the text. Monitored how long our cat sitter stayed with the cats each day while sitting on St Croix for a week…

Here is the com port worker thread. Could put some GUI to configure ports and name pins…

The model number of the security system is in the title. It’s a DSC PC1550.

Communication between the arduino and my Linux server is via usb cable. In order to install the program on the arduino and establish communication with the arduino, you need to download the Arduino IDE program. It’s available to download from the Web at no cost for linux/windows/mac.

The monitoring program I show is a Bash script which is a linux command line script (sort of similar to a windows bat file). On my server the port for the arduino is on /dev/ttys0. Not sure what it will be on another system particularly if it’s not Ubuntu Linux based.

It’s similar to what I will make. I will make it out of a Raspberry Pi.
I might steal your relay schematic ;-)

I want to make it distinguish between double beep/switch, single, and an alarm. I need to run a script to enable/disable the motion detection when arming / disarming on my Foscam cameras via CGI. Dont want it recording into the cloud when im at home. That part should be easy.

To bad the DSC alarm systems were encrypted / proprietary crap.. Would think it would be easy to wire an embedded device to pull data a lot easier without buying an expensive communicator. I have a T-Link 250 and spend way to much time trying to get it to communicate correctly. The closest I got was being able to ping it.

.Thanks for the reply, sorry about the model ,I should have seen that.

It’s similar to what I will make. I will make it out of a Raspberry Pi.
I might steal your relay schematic ;-)

I want to make it distinguish between double beep/switch, single, and an alarm. I need to run a script to enable/disable the motion detection when arming / disarming on my Foscam cameras via CGI. Dont want it recording into the cloud when im at home. That part should be easy.

To bad the DSC alarm systems were encrypted / proprietary crap.. Would think it would be easy to wire an embedded device to pull data a lot easier without buying an expensive communicator. I have a T-Link 250 and spend way to much time trying to get it to communicate correctly. The closest I got was being able to ping it.

The Raspberry Pi wasn’t out when I did this or I probably wouldn’t have bothered with the Arduino. On the other hand, programming the arduino from a linux server is probably easier than setting up the Pi as a headless server.

Also, I’m not sure what you are planning, but I don’t use the webcam to detect motion to create an alarm. I’ve tried it and it’s extremely difficult to eliminate false alarms. Shadows caused by wind in trees outside are one big problem. I just activate the webcam if there is an alarm to capture pictures of whoever broke in.