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

Thank you for taking the time to assist me.

When you say in “ArduinoAlarmController,” you are referring to the setup in the SmartApp? Vs the Code.

I did use the same order and used the names as defined in the attribute definition from the SecurityAlarmPanel code. Should I mirror a different name from SecurityAlarmPanel? ie a display name.

Appreciate any guidance you can provide. I know this is difficult to troubleshoot remotely.

Hi, the display name does not matter, just the zone number in ArduinoAlarmController should match
the zone number in SecurityAlarmPanel.

Example,

In SecurityAlarmPanel, for the 2nd Floor Motion sensor, which is zone no 1 in my setup:

        if ( msg.substring(3, 9) == "609001" ){
            stateToDisplay = "2FM active"
            result = createEvent(name: "2ndFloorMotion", value: stateToDisplay)
            sendEvent(name: "motion", value: "active")
            **sendEvent(name: "response",  value: "r 1 active", type: "Motion Detector")**
        }

So, in ArduinoAlarmController, you should define zone 1 as the 2nd Floor Motion Detector

Regards.

This is what I have for the first zone.

// Process zone update
}
else if ( msg.substring(0, 2) == “ZN” ) {
if ( msg.substring(3, 9) == “609001” ){
stateToDisplay = "Open"
result = createEvent(name: “FrontDoor”, value: stateToDisplay)
sendEvent(name: “response”, value: “Front Door Open”, type: “Open/Closed Sensor”)
}
else if ( msg.substring(3, 9) == “610001” ){
stateToDisplay = "Closed"
result = createEvent(name: “FrontDoor”, value: stateToDisplay)
sendEvent(name: “response”, value: “Front Door Closed”, type: “Open/Closed Sensor”)
}

Interesting from Live Logging when I opened the front door and closed it. from the Arduino Alarm Controller. Seems it is trying to match up some sort of word Door. I didn’t call anything (that I am aware of “door”

d7dda88a-ff3b-40ff-93e8-e3fc7d7dc9ad 5:46:16 PM: error groovy.lang.GroovyRuntimeException: Ambiguous method overloading for method java.lang.Long#minus.
Cannot resolve which method to invoke for [null] due to overlapping prototypes between:
[class java.lang.Character]
[class java.lang.Number] @ line 283
d7dda88a-ff3b-40ff-93e8-e3fc7d7dc9ad 5:45:05 PM: debug couldn’t find device for zone Door
d7dda88a-ff3b-40ff-93e8-e3fc7d7dc9ad 5:45:05 PM: debug deviceName = zoneDoor
d7dda88a-ff3b-40ff-93e8-e3fc7d7dc9ad 5:45:05 PM: debug Front zone Door status=Closed
d7dda88a-ff3b-40ff-93e8-e3fc7d7dc9ad 5:45:05 PM: debug zonestatusChanged response Front Door Closed Open/Closed Sensor
d7dda88a-ff3b-40ff-93e8-e3fc7d7dc9ad 5:45:03 PM: debug zonestatusChanged response alarmStatus ready null

Hi,

No, you should not change the response’s value in the sendEvent… It should be set back to

sendEvent(name: “response”, value: “r 1 open”, type: “Open/Closed Sensor”)
or
sendEvent(name: “response”, value: “r 1 closed”, type: “Open/Closed Sensor”)

1 is the zone number…The number should change for each zone and matches the same zone set
in ArduinoAlarmController.
Regards.

Thank you. Looks like I got over-zealous on naming/updating the code. That did the trick. I did have to open each contact sensor for it to reset and update (as you suggested earlier). All 8 zones are reporting for duty.

Thank you so much for your work on this and helping me!!!

Hopefully my perils can be avoided by others.

My updated code for the first zone. Many thanks.

// Process zone update
}
else if ( msg.substring(0, 2) == “ZN” ) {
if ( msg.substring(3, 9) == “609001” ){
stateToDisplay = "Open"
result = createEvent(name: “FrontDoor”, value: stateToDisplay)
sendEvent(name: “response”, value: “r 1 open”, type: “Open/Closed Sensor”)
}
else if ( msg.substring(3, 9) == “610001” ){
stateToDisplay = "Closed"
result = createEvent(name: “FrontDoor”, value: stateToDisplay)
sendEvent(name: “response”, value: “r 1 closed”, type: “Open/Closed Sensor”)
}

So this has been working since Nov '15. Recently (maybe a month or so ago??? It stopped registering closed. If I open a door, it says xxxx contact is open. When I close the door, it repeats saying xxxx contact is open. I had not made any changes to Smartthings or the arduino. Was there some sort of upgrade with Smartthings that requires a code change? I went it and republished and re flashed the Arduino with no luck.

When using the serial monitor, it shows Closed when the door is closed… so I think that part is working. For some reason the connection to Smartthings is not equating to that closed status anymore. Any suggestions? Many Thanks.

I figured it out. Check out this code for the Device Type

// Process zone update
}
else if ( msg.substring(0, 2) == “ZN” ) {
if ( msg.substring(3, 9) == “609001” ){
stateToDisplay = "Open"
result = createEvent(name: “FrontDoor”, value: stateToDisplay)
sendEvent(name: “response”, value: “r 1 open”, type: “Open/Closed Sensor”)
}
else if ( msg.substring(3, 9) == “610001” ){
stateToDisplay = "Closed"
result = createEvent(name: “FrontDoor”, value: stateToDisplay)
sendEvent(name: “response”, value: “r 1 open”, type: “Open/Closed Sensor”)

Do you see the issue? Closed - value r 1 open
What!? I have not been in here changing the code. However, EVERY one of the 8 sensors has open on the closed event! How crazy is that? I changed it back to closed and it is working now. This is a little disturbing that the code was changed - and I didn’t do it.
Here is the correct code.

// Process zone update
}
else if ( msg.substring(0, 2) == “ZN” ) {
if ( msg.substring(3, 9) == “609001” ){
stateToDisplay = "Open"
result = createEvent(name: “FrontDoor”, value: stateToDisplay)
sendEvent(name: “response”, value: “r 1 open”, type: “Open/Closed Sensor”)
}
else if ( msg.substring(3, 9) == “610001” ){
stateToDisplay = "Closed"
result = createEvent(name: “FrontDoor”, value: stateToDisplay)
sendEvent(name: “response”, value: “r 1 closed”, type: “Open/Closed Sensor”)

Hi Guys,

Since SmartThings have decided to retire SmartThing Shield to Arduino. I was looking for a solution using Raspberry Pi with my DSC IT-100 interface. I didn’t found any solution available to use it so I decided to create my own. Here is the link in case you are looking for something similar: https://github.com/Welasco/NodeAlarm.

I used this amazing project as reference and replace the Arduino with a Raspberry Pi 3 using USB to Serial cable and NodeJS with Rest API.

Happy to help.

I’ve used this for many years after getting it working. But since I’ve added more zones via wireless. What do I need to change to get those zones into the smartthings as sensors.

Hi,

You need to edit SecurityAlarmPanel and add your sensors.

And,you need to also execute the Alarm controller smartapp to add your new wirlesss sensors.

If you need further assistance, please contribute to the 6-month support package at my store.

www.ecomatiqhomes.com/store.

Regards.

I have this setup and I want my DSC Alarm system to trigger the zwave siren. Does someone know how to do this?