DSCAlarmSmartThings Guide?

Hello @yvesracine ,

Thank you for the serial monitor suggestion. I pinpointed the problem to be the connection between the arduino and the ST shield. I have no idea what could be the cause. I tried connecting the shield to pins 15 & 16 and changing &Serial2 in the constructor to &Serial3 and still no go. The only thing I could think of is the switch on the ST shield. Mine came with it set to D2/D3. Should it be D0/D1 instead?

Thank you so much for helping

@kevdliu, as stated in my readme file:

Make sure that the SmartThings shield serial port selection switch is set to pins 1,2. By default the RS232 shield will also use pins 1 &2.

See detailed instructions:

Regards.

2 Likes

@yvesracine, first of all, many thanks for providing your DSC integration guide and codes! I have successfully integrated my current DSC alarm following your instructions and am now able to arm/disarm and monitor my zones. One question I have is while the alarm is in the ‘ready’ state, by pressing the away or stay tile, should it armAway or armStay the system? Currently, I am only able to arm by pressing the main alarm tile. However, if the alarm is in the ‘arm’ state, pressing the away or stay tile will disarm. I may have missed something but any help is appreciated. Thanks

@snguyen428, if you created a SecurityAlarmPanel device type and did a copy and paste of this code from github:

You should be able to press ‘away’ or ‘stay’ to properly set your alarm panel to the correct mode accordingly.

I use this code every day w/o any issue.

To see what’s going on, activate the live logging in the IDE:

https://graph.api.smartthings.com/ide/logs

And, add some debug instructions when needed.
P.S. You still need to customize this code for your own zones.
Regards.

1 Like

@yvesracine, live logging shows the disarm command is being sent instead of armAway or armStay. I think the current state may not be showing correctly so it’s sending the wrong command. I am completely new to coding and have copied the device type below. Do you have any suggestions?

/**

  • SecurityAlarmPanel
  • Author: ObyCode
  • based on work by Josh Foshee
  • Modified by Yves Racine to include system statuses
  • Date: 2014-06-10https://graph.api.smartthings.com/ide/devices
    */

metadata {
// Automatically generated. Make future change here.
definition (name: “SecurityAlarmPanel”, author: "brice@obycode.com") {
capability "Alarm"
capability "Switch"
capability "Motion Sensor"
capability "Contact Sensor"
capability “Refresh”

    attribute "alarmStatus", "string"
    attribute "entranceDoor", "string"
    attribute "garageSideDoor", "string"
    attribute "familyWindows", "string"        
    attribute "patioDoor", "string"
    attribute "diningWindows", "string"
    attribute "frontMotion", "string"
    attribute "switchAway", "string"
    attribute "switchStay", "string"
    attribute "panic", "string"
    attribute "systemStatus", "string"
    attribute "response", "string"


    command "armAway"
    command "armStay"
    command "disarm"
    command "clear"
    command "update"
    command "chimeToggle"
    command "panic"
    command "away"
}

    // Simulator metadata
simulator {
        // status messages
        status "ping": "catchall: 0104 0000 01 01 0040 00 6A67 00 00 0000 0A 00 0A70696E67"
        status "hello": "catchall: 0104 0000 01 01 0040 00 0A21 00 00 0000 0A 00 0A48656c6c6f20576f726c6421"
}

    // UI tile definitions
tiles {
    
            standardTile("alarmStatus", "device.alarmStatus", width: 2, height: 2, canChangeIcon: false, canChangeBackground: false) {
                    state "ready", label: 'Ready', action: "armStay", icon: "st.Home.home2", backgroundColor: "#ffffff"
                    state "disarmed", label: 'Ready', action: "armAway", icon: "st.Home.home2", backgroundColor: "#ffffff"
                    state "notready", label: 'Not Ready', icon: "st.Home.home2", backgroundColor: "#ffa81e"
                    state "away", label: 'Away', action: "disarm", icon: "st.Home.home3", backgroundColor: "#add8e6"
                    state "stay", label: 'Stay', action: "disarm", icon: "st.Home.home4", backgroundColor: "#f1d801"
                    state "arming", label: 'Arming', action: "disarm", icon: "st.Home.home2", backgroundColor: "#B8B8B8"
                    state "alarm", label: 'Alarm', action: "clear", icon: "st.Home.home2", backgroundColor: "#ff0000"
            }
            standardTile("away", "device.awaySwitch", width: 1, height: 1, canChangeIcon: false, canChangeBackground: false) {
                    state "on", label: "Away", action: "disarm", icon: "st.Home.home3", backgroundColor: "#add8e6"
                    state "off", label: "Away", action: "armAway",icon: "st.Home.home3", backgroundColor: "#ffffff"
            }
            standardTile("stay", "device.staySwitch", width: 1, height: 1, canChangeIcon: false, canChangeBackground: false) {
                    state "on", label: "Stay", action: "disarm", icon: "st.Home.home4", backgroundColor: "#f1d801"
                    state "off", label: "Stay", action: "armStay",icon: "st.Home.home4", backgroundColor: "#ffffff"
            }
            
            // For the moment, each sensor has its own states due to a smartthings UI framework issue on android.
            // To be fixed later: states should be 'open', 'closed', 'active', 'inactive'
            
            standardTile("entranceDoor", "device.entranceDoor",width: 1, height: 1, canChangeIcon: false, canChangeBackground: true) {
                    state "ED open", label:'entrance\nDoor', icon: "st.contact.contact.open", backgroundColor: "#ffa81e"
                    state "ED closed", label:'entrance\nDoor', icon: "st.contact.contact.closed", backgroundColor: "#79b821"
            }
            standardTile("garageSideDoor", "device.garageSideDoor", width: 1, height: 1,inactiveLabel: false, canChangeIcon: true, canChangeBackground: true) {
                    state "GSD open", label:'garage\nSide Door', icon: "st.contact.contact.open", backgroundColor: "#ffa81e"
                    state "GSD closed", label:'garage\nSide Door', icon: "st.contact.contact.closed", backgroundColor: "#79b821"
            }
            standardTile("familyWindows", "device.familyWindows", width: 1, height: 1,inactiveLabel: false, canChangeIcon: true, canChangeBackground: true) {
                    state "FW open", label:'family\nFamily Window', icon: "st.contact.contact.open", backgroundColor: "#ffa81e"
                    state "FW closed", label:'family\nFamily Window', icon: "st.contact.contact.closed", backgroundColor: "#79b821"
            }                
            standardTile("patioDoor", "device.patioDoor", width: 1, height: 1,inactiveLabel: false,canChangeIcon:true, canChangeBackground: true) {
                    state "PD open", label:'patio\nDoor', icon: "st.contact.contact.open", backgroundColor: "#ffa81e"
                    state "PD closed", label:'patio\nDoor', icon: "st.contact.contact.closed", backgroundColor: "#79b821"
            }
            standardTile("diningWindows", "device.diningWindows", width: 1, height: 1,inactiveLabel: false, canChangeIcon: true, canChangeBackground: true) {
                    state "DW open", label:'dining\nDining Window', icon: "st.contact.contact.open", backgroundColor: "#ffa81e"
                    state "DW closed", label:'dining\nDining Window', icon: "st.contact.contact.closed", backgroundColor: "#79b821"
            } 
            standardTile("frontMotion", "device.frontMotion", width: 1, height: 1, inactiveLabel: false,canChangeIcon:true, canChangeBackground: true) {
                    state "FM active", label:'motion\nMotion', icon: "st.motion.motion.active", backgroundColor: "#ffa81e"
                    state "FM inactive", label:'motion\nMotion', icon: "st.motion.motion.inactive", backgroundColor: "#79b821"
            }
            
            
            standardTile("chime", "device.chime", width:1, height: 1, canChangeIcon: false, canChangeBackground: false) {
                    state "chimeOff", label:'Chime', action:'chimeToggle', icon:"st.secondary.off", backgroundColor: "#ffffff"
                    state "chimeOn", label:'', action:'chimeToggle', icon:"st.secondary.beep", backgroundColor: "#ffffff"
            }
            standardTile("panic", "device.panic", width: 1, height: 1, canChangeIcon: false, canChangeBackground: true) {
                    state "panic", label:'Panic', action:"panic", icon:"st.alarm.alarm.alarm", backgroundColor:"#ff0000"
            }
	        valueTile("systemStatus", "device.systemStatus", inactiveLabel: false,
	 	               decoration: "flat", width: 3, height: 1) {
		               state "default", label: '${currentValue}'
	        }
            standardTile("refresh", "device.refresh", inactiveLabel: false, width: 1, height: 1, canChangeIcon: false, canChangeBackground: false) {
                    state "default", action:"refresh", icon:"st.secondary.refresh"
            }
            main(["alarmStatus"])
            details(["alarmStatus","away","stay","entranceDoor","garageSideDoor","familyWindows","patioDoor","diningWindows","frontMotion","chime","systemStatus","refresh","panic"])
    }

}

// Parse incoming device messages to generate events
def parse(String description) {

log.debug description
def stateToDisplay

def msg = zigbee.parse(description)?.text
log.debug "Received ${msg}"
def result

if (!msg || msg.trim() == "ping") {
    result = createEvent(name: null, value: msg)

// update()
} else if ( msg.length() >= 4 ) {
if ( msg.substring(0, 2) == “RD” ) {
if (msg[3] == “0”) {
result = createEvent(name: “alarmStatus”, value: “notready”)
// When status is “Not Ready” we cannot arm
//createEvent(name: “away”, value: “off”)
//createEvent(name: “stay”, value: “off”)
sendEvent(name: “switchAway”, value: “off”)
sendEvent(name: “switchStay”, value: “off”)
sendEvent(name: “contact”, value: “open”)
sendEvent(name: “response”, value: “alarmStatus notready”, type: alarmStatus)

        }
        else {
            result = createEvent(name: "alarmStatus", value: "ready")
            // When status is "Ready" we can arm
            //createEvent(name: "away", value: "on")
            //createEvent(name: "stay", value: "on")
            sendEvent(name: "switchAway", value: "on")
            sendEvent(name: "switchStay", value: "on")
            sendEvent(name: "switch", value: "off")
            sendEvent(name: "panic", value: "off")
            sendEvent(name: "contact", value: "open")
            sendEvent(name: "systemStatus", value: "System Status:No events")
            sendEvent(name: "response",  value: "alarmStatus ready", type: alarmStatus)

        }
    // Process arm update
    } else if ( msg.substring(0, 2) == "AR" ) {
        if (msg[3] == "0") {
            result = createEvent(name: "alarmStatus", value: "disarmed") 
            sendEvent(name: "switch", value: "off")
            sendEvent(name: "contact", value: "open")
            sendEvent(name: "response",  value: "alarmStatus disarmed", type: alarmStatus)
        }
        else if (msg[3] == "1") {
            if (msg[4] == "0" | msg[4] == "2") {
                result = createEvent(name: "alarmStatus", value: "away")
                sendEvent(name: "switch", value: "on")
                sendEvent(name: "contact", value: "closed")
                sendEvent(name: "response",  value: "alarmStatus away", type: alarmStatus)
            }
            else if (msg[4] == "1" | msg[4] == "3") {
                result = createEvent(name: "alarmStatus", value: "stay")
                sendEvent(name: "switch", value: "on")
                sendEvent(name: "contact", value: "closed")
                sendEvent(name: "response",  value: "alarmStatus stay", type: alarmStatus)
            }
        }
        else if (msg[3] == "2") {
            result = createEvent(name: "alarmStatus", value: "arming")
            sendEvent(name: "switch", value: "on")
            sendEvent(name: "response",  value: "alarmStatus arming", type: alarmStatus)
        }
    } else if ( msg.substring(0, 2) == "SY" ) {
     // Process various system statuses
        if ( msg.substring(3, 3) == "658")  {
        
            result = createEvent(name: "systemStatus", value: "System Status\nKeypad Lockout")
        
        }
        else if ( msg.substring(3, 3) == "670")  {
        
            result = createEvent(name: "systemStatus", value: "System Status\nInvalid Access Code")
        
        }
        else if ( msg.substring(3, 3) == "672")  {
        
            result = createEvent(name: "systemStatus", value: "System Status\nFailed to arm")
        
        }
        else if ( msg.substring(3, 3) == "802")  {

            
            result = createEvent(name: "systemStatus", value: "System Status\nPanel AC Trouble")

        }
        else if ( msg.substring(3, 3) == "803")  {

            
            result = createEvent(name: "systemStatus", value: "System Status\nPanel AC Trouble Rest")

        }
        else if ( msg.substring(3, 3) == "806")  {

            
            result = createEvent(name: "systemStatus", value: "System Status\nSystem Bell Trouble")

        }
        else if ( msg.substring(3, 3) == "807")  {

            
            result = createEvent(name: "systemStatus", value: "System Status\nSystem Bell Trouble Rest")

        }
        else if ( msg.substring(3, 3) == "810")  {

            
            result = createEvent(name: "systemStatus", value: "System Status\nTLM line 1 Trouble")

        }
        else if ( msg.substring(3, 3) == "811")  {

            
            result = createEvent(name: "systemStatus", value: "System Status\nTLM line 1 Trouble Rest")

        }
        else if ( msg.substring(3, 3) == "812")  {

            
            result = createEvent(name: "systemStatus", value: "System Status\nTLM line 2 Trouble")

        }
        else if ( msg.substring(3, 3) == "813")  {

            
            result = createEvent(name: "systemStatus", value: "System Status\nTLM line 2 Trouble Rest")

        }
        else if ( msg.substring(3, 3) == "821")  {

            
            result = createEvent(name: "systemStatus", value: "System Status\nLow Battery at " + substring(6,3))

        }
        else if ( msg.substring(3, 3) == "822")  {

            
            result = createEvent(name: "systemStatus", value: "System Status\nLow Battery Rest at " + substring(6,3))

        }
        else if ( msg.substring(3, 3) == "829")  {

            result = createEvent(name: "systemStatus", value: "System Status\nSystem Tamper")

        }
        else if ( msg.substring(3, 3) == "830")  {

            result = createEvent(name: "systemStatus", value: "System Status\nSystem Tamper Rest")

        }
        else if ( msg.substring(3, 3) == "840")  {

            result = createEvent(name: "systemStatus", value: "System Status\nTrouble Status(LCD)")

        }
        else if ( msg.substring(3, 3) == "841")  {

            result = createEvent(name: "systemStatus", value: "System Status\nTrouble Status Rest")

        }
        else if ( msg.substring(3, 3) == "896")  {

            result = createEvent(name: "systemStatus", value: "System Status\nKeybus fault")

        }
        else if ( msg.substring(3, 3) == "897")  {

            result = createEvent(name: "systemStatus", value: "System Status\nKeybus Fault Rest")

        }
     
    // Process alarm update
    } else if ( msg.substring(0, 2) == "AL" ) {
        if (msg[3] == "1") {
            result = createEvent(name: "alarmStatus", value: "alarm")
            sendEvent(name: "response",  value: "alarmStatus alarm", type: alarmStatus)
}
    // Process chime update
    } else if ( msg.substring(0, 2) == "CH" ) {
        if (msg[3] == "1") {
            result = createEvent(name: "chime", value: "chimeOn")
        } else {
            result = createEvent(name: "chime", value: "chimeOff")
        }    
    // Process zone update
    } else if ( msg.substring(0, 2) == "ZN" ) {
        if ( msg.substring(3, 9) == "609001" ){
            stateToDisplay = "ED open"
            result = createEvent(name: "entranceDoor", value: stateToDisplay)
            sendEvent(name: "response",  value: "r 1 open", type: "Open/Closed Sensor")                  
        }
        else if ( msg.substring(3, 9) == "610001" ){
            stateToDisplay = "ED closed"
            result = createEvent(name: "entranceDoor", value: stateToDisplay)
            sendEvent(name: "response",  value: "r 1 closed", type: "Open/Closed Sensor")   
        }
        else if ( msg.substring(3, 9) == "609002" ){
            stateToDisplay = "GSD open"
            result = createEvent(name: "garageSideDoor", value: stateToDisplay)
            sendEvent(name: "response",  value: "r 2 open", type: "Open/Closed Sensor")                  
        }
        else if ( msg.substring(3, 9) == "610002" ){
            stateToDisplay = "GSD closed"
            result = createEvent(name: "garageSideDoor", value: stateToDisplay)
            sendEvent(name: "response",  value: "r 2 closed", type: "Open/Closed Sensor")            
        }
        else if ( msg.substring(3, 9) == "609003" ){
            stateToDisplay = "FW open"
            result = createEvent(name: "familyWindows", value: stateToDisplay)
            sendEvent(name: "response",  value: "r 3 open", type: "Open/Closed Sensor")                  
        }
        else if ( msg.substring(3, 9) == "610003" ){
            stateToDisplay = "FW closed"
            result = createEvent(name: "familyWindows", value: stateToDisplay)
            sendEvent(name: "response",  value: "r 3 closed", type: "Open/Closed Sensor")            
        }
        else if ( msg.substring(3, 9) == "609004" ){
            stateToDisplay = "PD open"
            result = createEvent(name: "patioDoor", value: stateToDisplay)
            sendEvent(name: "response",  value: "r 4 open", type: "Open/Closed Sensor")            
        }
        else if ( msg.substring(3, 9) == "610004" ){
            stateToDisplay = "PD closed"
            result = createEvent(name: "patioDoor", value: stateToDisplay)
            sendEvent(name: "response",  value: "r 4 closed", type: "Open/Closed Sensor")            
        }   
        else if ( msg.substring(3, 9) == "609005" ){
            stateToDisplay = "DW open"
            result = createEvent(name: "diningWindows", value: stateToDisplay)
            sendEvent(name: "response",  value: "r 5 open", type: "Open/Closed Sensor")                  
        }
        else if ( msg.substring(3, 9) == "610005" ){
            stateToDisplay = "DW closed"
            result = createEvent(name: "diningWindows", value: stateToDisplay)
            sendEvent(name: "response",  value: "r 5 closed", type: "Open/Closed Sensor")            
        }
        else if ( msg.substring(3, 9) == "609006" ){
            stateToDisplay = "FM active"
            result = createEvent(name: "frontMotion", value: stateToDisplay)
            sendEvent(name: "motion", value:  "active")
            sendEvent(name: "response",  value: "r 6 active", type: "Motion Detector")            
        }
        else if ( msg.substring(3, 9) == "610006" ){
            stateToDisplay = "FM inactive"
            result = createEvent(name: "frontMotion", value: stateToDisplay)
            sendEvent(name: "response",  value: "r 6 inactive", type: "Motion Detector")            
        }
        else {
            log.debug "Unhandled zone: " + msg
        }
    }
}

log.debug "Parse returned ${result?.descriptionText}"
return result

}

// Implement “switch” (turn alarm on/off)
def on() {
armStay()
}

def off() {
disarm()
}

def away() {
armAway()
}

// Commands sent to the device
def armAway() {
log.debug "Sending arm command"
zigbee.smartShield(text: “armAway”).format()
}

def armStay() {
log.debug "Sending arm command"
zigbee.smartShield(text: “armStay”).format()
}

def disarm() {
log.debug "Sending disarm command"
zigbee.smartShield(text: “disarm”).format()
}

def strobe() {
panic()
}

def siren() {
panic()
}

def both() {
panic()
}

def chimeToggle() {
log.debug "Toggling chime"
zigbee.smartShield(text: “chimeOn”).format()
}

def panic() {
log.debug "Sending panic command"
zigbee.smartShield(text: “panic”).format()
}

// TODO: Need to send off, on, off with a few secs in between to stop and clear the alarm
def clear() {
disarm()
}

def refresh() {
update()
}

def update() {
log.debug "Sending update command"
zigbee.smartShield(text: “update”).format()
}

def configure() {
update()
}

Hello @snguyen428, did you save and publish your device type in the IDE?

Please look at

https://graph.api.smartthings.com/ide/devices

and see if your Security Alarm Panel device type is saved and ‘published’. Any smartapp related to
the security panel should also be ‘published’ (ex. Arduino Alarm Controller).

Otherwise, you may have to contact ST support about your environment. There maybe other issues
that I’m not aware of, and it’s kind of difficult for me to investigate remotely as I don’t have access to
your environment. ST support does.

Regards.

P.S. If you toogle the ‘stay’ and ‘away’ tiles, you should see different commands sent to your device type…If not, you could try to clear your cache (android) or uninstall and reinstall the smartThings app (iOS). That’s the only thing you can try before contacting support.

P.S.2 You need to customize the device type code to reflect your own zones. The code that I provided in my github is a template for your own security alarm setup.

@yvesracine, unfortunately my device type is saved and published. But I’ll take your advice and contact ST support after I play around with this a bit more. Thanks again for your help!

Best,
Sean

@snguyen428, as I wrote earlier, you can try to clear your cache (Android) or uninstall and reinstall the SmartThings app (iOS) on your device(s). That’s the only thing you can try before contacting support.

Bye And good luck.

Hello Sean,

Tonight, I compared my running SecurityAlarmPanel code with the one stored at github and found some differences… So, I did a check in with my latest code at github.

Please retry again. This may solve your state issues.

Regards.

Hi Yves,

The changes worked like a charm! The ‘Away’ and ‘Stay’ tiles are now functioning perfectly. I am very appreciative of your work and support. Thank you very much!

Yves, et al
I’ve a couple questions, you may be able to offer some guidance.

DSC PC 5010
IT100

  • connected Green/Yellow to Green/Yellow on DSC
  • connected Red/Black to Aux+/Aux- on DSC
  • flashes 2 times per second indicating normal operation

LinkSprite RS232 v2

  • Jumper 1 bridging MRX J2 J3
  • Jumper 2 bridging MTX J1 J2
  • Null Modem Cable with male to male DB9P Serial Coupler on each end, connecting to IT100
  • Pin 0 (MRX) removed and jumped to Arduino Mega pin 19 using breadboard jumper
  • Pin 1 (MTX) removed and jumped to Arduino Mega pin 18 using breadboard jumper

SmartThings Shield

  • Serial Selector set to 0,1 instead of default 2,3
  • Pin 0 RX bent and jumped to Arduino Mega pin 17 using breadboard jumper
  • Pin 1 TX bent and jumped to Arduino Mega pin 16 using breadboard jumper

Arduino Mega 2650

  • SmartThingsDSCAlarm.ino (from commit ~ July 17) loaded
    • replaced with Alarm User Code in 3 places as per comments

When I run the Serial Monitor, click refresh on the ST tile, I see
received: update
< 5 digit numeric code >
< 2 lines of nonprintable characters with a few interspersed printables>
received:

When I run the armStay I see
received: armStay
< 6 character Alpha and Numeric code >
< 3 lines of nonprintable characters with a few interspersed printables>
received:

I have verified that my user code can arm / disarm the system at the wallmounted keypad. If I try to arm the system using the wall mounted keypad while running a Serial Monitor, I see a long line of nonprintables with a couple interspersed characters. Likewise if I disarm using the wallmounted keypad. No statuses are viewable by the ST tiles. The ST app is unable to arm / disarm the system.

I’m at a loss as to where to continue my debugging. If you need photographs for insight https://goo.gl/photos/e9uT72rFiWhXDtYu8.

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

The good news is that you’re receiving something from the IT-100. However, the types of messages you should see using the Serial Monitor should be 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

unsupported message
05733

61

received:

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


I suspect that your IT-100’s baud rate has already been ugraded to 19200, so please try the following:

In SmartThingsDSCAlarm.ino

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

// setup debug port
#ifdef DEBUG_ENABLE
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.

Regards.

1 Like

Yves,

Your recommendation fixed it (between my first and second cups of coffee this morning).
Thank you very much.

So, I’ve installed the Arduino code, the Device Type, the SmartApp, added sendPush preference / functions to the SmartApp for Arm/Disarm Responses. All are working perfect.

One question I do have -

I tied the Device Type to a “Hello Home” action. Sending power-on to the Arduino controller. The controller put the alarm in Stay mode. I’ve looked and cannot see where that is a default action. Perhaps I’m missing it.

On the plus side, sending a power-off from a “Hello Home” action definitely disarms the alarm.

@lbarry,

See the following lines of code (around line 727) in the Security Alarm Panel device type:

// Implement “switch” (turn alarm on/off)
def on() {
armStay()
}

Regards.

Thank you for your patience.
Found it and adjusted to my preferences.
Kudos on your design!

FYI, it appears that the Arduino/SmarThings/RS232 boards can all be powered from the same AUX+/AUX- as the IT-100. I just cut the AC plug off the end of the 2.1mm plug, soldered the stranded wire to make it thicker/stiffer and keep it from fraying. Used a multi meter to identify positive and then screwed the soldered ends into the PC5010 AUX ports.

Particularly handy as the entire rest of the ST implementation is on battery backup and I needed this independent of a 120v power failure.

Booyah! Project Complete.

1 Like

Is there a way to bypass zones from the app

Is there a way to bypass zones from the app

Hi, Bypass requires a series of commands to be done in a specific order using a virtual keypad. This process becomes more complicated than doing it at the physical keypad. So, it’s not implemented.