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

@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.

1 Like