DSCAlarmSmartThings Guide?

@pbhangle, just try to open and close the contacts…

Sometimes, the states are not in sync.

And, use Live logging to see the logs

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

The events list for your DSC alarm panel device should look like this when you open/close a contact:

2015-09-25 6:59:39.212 PM EDT
moments ago DEVICE alarmStatus notready Arduino DSC Alarm alarm status is notready
2015-09-25 6:59:39.186 PM EDT
moments ago DEVICE /Open/Closed Sensor response r 6 open Arduino DSC Alarm response is r 6 open
2015-09-25 6:59:39.135 PM EDT
moments ago DEVICE patioDoor PD open Arduino DSC Alarm patio door is PD open
2015-09-25 6:59:37.957 PM EDT
moments ago DEVICE /Open/Closed Sensor response r 6 closed Arduino DSC Alarm response is r 6 closed

Notice the response attribute which indicates the zone and the status (open, closed).

P.S. Make sure that your zones defined in the Arduino Alarm Controller match the ones defined
in SecurityAlarmPanel otherwise, it won’t work.
Regards.

A simple solution that worked so well, once again thanks for all your help and everything you have done here, now I’m going to fix the dent where I was banging my head

Hi,
I’m in the thick of implementing this with PC5401. However, I’m getting issues with communications over the RS232. Shown here is the arduino serial terminal.Since PC5401 does not have the command to change speed via software, I commented out the alarmSetBaudRate and set it to 19200 at the beginning. I matched the jumper on PC5401 to 19200. I’m getting som data but is become corrupted.

// setup IT-100 serial port
Serial1.begin(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);

alarmStatusRequest();
}

Terminal log:
Ready
00191
50000126
processing cmd

unsupported message
50000126

61000128
processing cmd

Zone 001 closed

61000229
processing cmd

Zone 002 closed

6100032A
processing cmd

Zone 003 closed

6100042B
processing cmd

Zone 004 closed

6100052C
processing cmd

Zone 005 closed

6100062D
processing cmd

Zone 006 closed

6100072E
processing cmd

Zone 007 closed

6142D
processing cmd

unsupported message
6142D

61002

I’m sorry but I don’t see the issue here, as you seem to receive information about your zones (closed status)…

Not all the commands are supported hence the unsupported messages…

Regards.

I’m not worried about the unsupported message. It’ just that the messages stop after zone 7 and then nothing else. I’m going to try increasing the BUFFER_SIZE and see if I get more mesages.BTW. can you tell me the deatils of the null-modem cable you use. I made my own and I am using all 7 wires. Maybe it’s a flow control issue?

On my side, If I remember it correctly (I need to physically look at my cable and I’m away from home),I bought a null serial modem with regular 2 male-to-male adapters…

Sorry, but I don’t have any suggestion on your issue at hand.

OK, it seems to be communication now. I think it was the switch on the Smartthings shield. Once I flipped the switch, it started working. I think everything is backing from overflow at the ST shield to the arduino and it stopped working. Now it’s flowing. I can see status. What device-type and smartapps is everyone using. I see like two versions floating around. Should I use obycode?

I’m still using that code and it works great! It is by far the most valuable part of SmartThings in my home, between all of the contact sensors and motion sensors and the arm/disarm functionality!

I believe others have also made some updates, but I haven’t followed them closely. Maybe they will also chime in here.

BTW. I’m using the PC5401. If anyone interested they are cheaper on ebay than IT-100. Only difference is the baud-rate is jumper set. It does not support the baud-rate change via the command.

obycode,
I’m using all your code. I can see I’m receiving open/close and motion events on the live logging. But only one zone device is working. I use the alarm Thing manager to configure the zones/types but it does nothing. Some how only zone001 is working. So I manually created devices for the other zones. But all the other zones are not following the alarm status. What am I doing wrong?

thanks,

Chin

@cslee, do you see any errors in the live logs (https://graph.api.smartthings.com/ide/logs) when you install the AlarmThingManager? Did you also publish all of the virtual device types?

Initially, when I installed AlarmTriggermanager and I used it to add the zones, it will give me “Unexpected Error Occured”. Not it’s okay. But it did not create any devices but zone001. So I created the other zones manually by changing the zone0** . But these other zones dont follow the alarm panel.
I’ll look out for errors in the livelog and report back.

Brice,
I have not see errors in the livelog but i saw a zone 122 close. I don’t have 122 zones. So I suspect there’s data error. Do you think you can implement CheckSum verification in the arduino code for packets received?

Chin

Brice,
I added debouncing to your motion sensor code. This mimics the standard motion sensor from smartthings shop. It will set inactive when 3 minutes have elapsed since last close.

def open() {
sendEvent(name: “motion”, value: “active”)
unschedule(close_mod)

}

def close() {
runIn(3*60, close_mod)
}

def close_mod() {
sendEvent(name: “motion”, value: “inactive”)
}

Cool. Please feel free to fork the repo and post your changes on github as well.

Do you think checking the received Checksum is necessary?
Also, I noticed I don’t receive the “ARM” status, just “ARMING” and it stays there.

I never bothered with it and I haven’t seen a problem.

That’s different. I definitely get both ARM and ARMING.

[quote=“obycode, post:97, topic:9731, full:true”]

I never bothered with it and I haven’t seen a problem.

[quote=“cslee, post:96, topic:9731”]
I saw zone 122 closing.

Likely a difference between the IT-100 and the PC-5401. I’ve never seen a corrupted message. The only thing I have seen which I haven’t had time to look into is a message that gets missed (i.e. it is never processed). That causes an occasional push notification telling me that my front door has been left open for 10 minutes, when it is actually closed. Some time, I will see if I can figure out what is going on there.

I checked the two developer documents, IT-100 has 900+ commands. Otherwise it’s identical.