DSC Alarm system integration with Arduino Mega/Shield/RS-232


(Yves Racine) #1

Well, I’ve just finished integrating smartthings with my DSC Alarm system via an Arduino Shield.

That was quite a project, but it’s well worth it.

I changed a little bit the code from obycode to make it more responsive. I significantly increased the baud rate from 9600 over the RS-232 serial port (I haven’t seen this kind of port since the late '80!).

I implemented system status checks in the driver to be able to report any error messages up to the Smartthings UI. For example, if I have a wireless sensor’s low battery error, I will able to see it in Smartthings.

Thnx to all previous developers who made that system integration much easier to bear (amongst others: obycode and vassilis)

Now, I can use all my wired and wireless sensors for my future home automation projects!

N.B. During the integration process, I encountered some Smartthings UI issues related to sensors’ updates (android 4.4). I submitted the issue to support. Still waiting for an answer…


(Yves Racine) #2

Hello again, for those who are interested, here is the github repository with my latest changes:

Regards.


(Lonny Barry) #3

Yves,

Have you seen this integration work with the pc5010 aka Power 832? I’ve searched and found no definitive indications.

Thanks in advance,

Lonny


(Yves Racine) #4

Well, if you mean the pc 1832, than it should be compatible as specified in this thread:

Regards


(Yves Racine) #5

Actually, after double checking, it is compatible with the PC5010 as specified here:

cms.dsc.com/download.php?t=1&id=14523

Bye for now.


(Joseph Commisso) #6

Hi,
I have an old Powerseries 832 (PC5010) that I would like to do this with. I chose this way because I don’t want to run anything on my computer and I have some experience with Arduino. I have a few questions. How easy was this project? Do you get all your motion sensors and door sensors individually in Smartthings? Can you control sirens? Thanks!


Routine command affects more than one Ecobee tstat
(Yves Racine) #7

See this thread:

Good luck!


(Brice; SmartRulesApp.com) #8

It looks a little scary because there’s wiring, Arduino, etc. but its really not too bad, especially if you’ve already got some experience with Arduinos. I would definitely suggest going for it. It’s easily my favorite integration in my SmartThings setup. You get a bunch of “free” sensors, you still have the reliable, hard-wired alarm, but also the benefits of smart sensors, and now you can arm/disarm/check status from anywhere.


(cslee) #9

Will this work with PC5401 instead of IT-100 ?


(Yves Racine) #10

You have to compare the 2 manuals and see if the codes are similar:

http://cms.dsc.com/download2.php?t=1&id=16196

There is a good chance that it will work as the IT-100 replaces the PC 5401 as indicated here:

However, I cannot guarantee you that it will work.

Regards.


(cslee) #11

Do you know if this setup can be powered off the alarm panel?


(cslee) #12

Another question, what type of RS232 cable to connect the shield to IT-100. Is it a cross-over? pins 2-3,3-2 or straight through?


(Yves Racine) #13

@cslee,

Here are the answers to your questions

(1) The setup can be powered from the alarm panel (if you have at least 9v available)

(2) Null modem RS-232 cable is required.

Please read this thread if you have any questions about the setup:

Regards.


(Rfg81) #14

Hi there! I have a DSC 1555 and I don’t know if it’s compatible with IT-100. I saw there is another model, the DSC 1555MX, that I don’t know if it’s the same model as I have (as the MX it’s not specified as you can see in the picture). Anyone would know if my model is compatible? Btw, this is the manual http://cms.dsc.com/download.php?t=1&id=13792


(Yves Racine) #15

It does not look as this panel is compatible…

http://www.dsc.com/alarm-security-products/IT-100%20-%20PowerSeries%20Integration%20Module/22

Regards.


(Rfg81) #16

By looking at this http://cms.dsc.com/download.php?t=1&id=14523 it says it’s compatible with Power632™ (PC1555MX). But it doesn’t say anything about PC1555. I don’t know if I could assume they are kind the same…


(Smart Cosas) #17

Hi. I am walking through this setup and I am having some trouble. It seems I have everything connected and installed as specified. I can see the system in SmartThings. I can click on any of the alarm buttons or refresh and the RS232 TX and RX lights flash briefly. It seems all of that is stacked and programmed correctly. I then have the Null modem RS232 cable connecting the RS232 board to the IT100. The IT100 is connected to the alarm panel. I have redone this part 4 times now. The IT 100 has a green light that continuously flashes. No other lights seem to light up. When I press a button in Smart Things when it makes the RX and TX lights flash on the RS232 board, it does not change the lights/make them flash differently then the continuous steady green flash.

My conclusion is that something is up between the IT 100 and the DSC 5010 panel. Again, I have checked the wires several times and it seems it is connected, but does anyone have any suggestions for me?

Thank you.


(Yves Racine) #18

@benvlug, this integration is very difficult to debug remotely as there are many parts that can
go wrong.

You need to check if you receive anything from the IT-100 using the Serial Monitor.

In the Serial Monitor (included with the Arduino tool), you should see something similar to the following:

received:
90100032 Date Time JUL 23/15 7:12p25
processing cmd

LCD update
90100032 Date Time JUL 23/15 7:12p25

32B
processing cmd

unsupported message
32B

610016100242D
processing cmd

Zone 016 closed

6100352F
processing cmd

Zone 035 closed

61004631
processing cmd

Zone 046 closed

05733
processing cmd

In ST live logging, the messages would be similar to:

Parse returned Arduino DSC Alarm received 'ping’
13674729-9d2c-4b14-8e92-860da3a46a6d 8:06:06 PM: debug Received ping
13674729-9d2c-4b14-8e92-860da3a46a6d 8:06:06 PM: debug catchall: 0104 0000 01 01 0140 00 8BDE 00 00 0000 0A 00 0A70696E67
13674729-9d2c-4b14-8e92-860da3a46a6d 8:06:01 PM: debug Parse returned Arduino DSC Alarm front motion is FM inactive
13674729-9d2c-4b14-8e92-860da3a46a6d 8:06:01 PM: debug Received ZN:610004
13674729-9d2c-4b14-8e92-860da3a46a6d 8:06:01 PM: debug catchall: 0104 0000 01 01 0140 00 8BDE 00 00 0000 0A 00 0A5A4E3A363130303034
13674729-9d2c-4b14-8e92-860da3a46a6d 8:05:58 PM: debug Parse returned Arduino DSC Alarm front motion is FM active

In order to receive debug information, you have to uncomment the following:

// setup debug port
#ifdef DEBUG_ENABLE

You may also have to change the speed:

// setup IT-100 serial port
Serial1.begin(19200); => Try changing baud rate here from 9600 to 19200

Serial.begin(9600);
Serial.println(“Ready”);
#endif
// initialize variables
bufferIdx = 0;
readyStatus = true;
armed = ‘0’;
alarm = false;

// Now increase the baud rate
alarmSetBaudRate(19200);

Also, in Serial Monitor, please make sure that your baud rate for listening to your port is set to 9600 as this is the default speed set in the sketch (you can change the baud rate usually at the bottom right corner).

If it works, then you can increase the speed up to 115200 (if you want) or leave it at 19200 (refer to alarmSetBaudRate() call)

When done with your debugging, you should comment out the DEBUG_ENABLE flag as you don’t want to do this kind of tracing normally, and upload the sketch again.

Good luck.

P.S. In order to test the code properly, use a nearby motion sensor and wave at it to see if the zone status will be changed.

Also, did you look at the following thread?

Many ST users have the same questions about this setup, and you can find some answers in the thread.
Regards.


(Smart Cosas) #20

Thank you. I did miss that thread. Your comments here and that thread was helpful.
My issue was the RS232 required 19200. Also, my RS232 shield is a combo and includes RS485. I missed the switch as it defaulted to RS485. Also, this RS232 board had a switch between UART and Softserial. It was on SoftSerial. I switched it to UART. These three combined fixed the communication issues.
I can now arm/disarm and see the status of the system.

i spent a lot of time understanding the code and can see each of my 8 zones work in the “recently” under the Home Security Thing.
What isn’t working is setting up each zone as its own thing. I’ll keep reading/re-reading to understand where I am in error. Right now, each thing that comes in through the Smartthings app just shows open. Somehow I am missing the connection between the zone and the “thing.” imported.


(Yves Racine) #21

@benvlug,

Each of your zones defined in SecurityAlarmPanel must then be created in the same order in ArduinoAlarmController, so that there is a match in the zone event processing.

Now, you may also need to open/close each zone to reset the Thing’s state.

Regards.