AD2SmartThings

I merged your Git fork. Sorry bout that variable issue, I personally keep my alarm code compiled in my Arduino sketch versus storing it in the device handler. Prefer it to not transmit over the wire and I forgot to update that one line of code. Regardless it’s back to Stans version based off your edit.

No worries, just updating for anyone else that may pull from it. I’m new to Git, so I’m still learning. I don’t think I submitted the latest edit correctly. I think I need to submit the pull request after the fork edit ?!?

Believe you did submit the pull request since it showed up in my view.

There’s more. :slight_smile:

Official support for SmartThings using our WebApp REST API, no longer need arduino etc.

The one minute refresh interval kills it for me.

Not sure if anyone shows there board setup. I finalized my stack today…



2 Likes

Yeah, ST doesn’t like when you make requests faster than that due to traffic apparently… not our limitation, but a rule imposed by ST using web api’s. “If your … runs more often than once per minute it, will be limited to a 1 minute interval.” But, that’s why we left the “refresh” button in so you can force it to update by issuing a different request.

Ah gotcha. I feel like the current setup refreshes faster than that… but could be me.
Would free up an Arduino though! :slight_smile:

Great job guys, so far it’s looking good. I am not sure if the refresh button is doing anything. There’s no indication that it detected my push. Do you know if you Are going to have the same 1 min limits on the zwave device when it’s released. Thanks again.

No limitations on zwave as far as I’m aware.

@jscongdon nice work! what is the little board on top of the ad2pi? Please confirm so you are drawing power from the panel and passing that to the Arduino? Also how does the ad2pi stay on the ThingShield?

The board on top of the AD2Pi is a Buck Converter. http://amzn.com/B00SY37S00 The 2 pair wire leads directly from the panel to the AD2Pi and the converter is plugged into the power side of the AD2Pi connector. The buck converter is providing a 5V power supply for the Arduino itself. According to the AD2Pi spec, it doesn’t need the 3.3v supply from the Arduino itself, it rather can be power from the TTL line or a 5v source. With the TTL line you can control when the AD2Pi is up or down. I instead wired the AD2Pi directly to the 5V source from the Arduino and added in a control in the Device handler that allows me to reboot the AD2Pi board if needed / desired.
The AD2Pi board is mounted to the ST Shield via headers. I utilized the development area of the ST Shield to install two 6 pin headers that coincidentally lined up with the alternate connector locations on the AD2Pi. I traced the connector lines, I believe it is marked as Connector 3, on the AD2Pi board and found that the four lines that was specced to run into the main connector are also mapped to Connector 3. Because of the way the AD2Pi board would be mounted - the primary connector is blocked. So I utilized the mounting header to interface with the Connector 3 port for the power and IO lines ( orange / yellow / green / blue wire set ).
I then used some hot melt to mount the buck converter to the AD2Pi, utilizing enough to maintain a stable connection point while keeping the converter well away from any of the components.
The Mega is mounted to a 3D printed ‘Modular Support Case’ I found on Thingiverse. http://www.thingiverse.com/thing:754078
I haven’t yet, but plan on boring out and installing some neodymium magnets into the case to allow the stack to mount to the wall of the panel box. Right now it sits nicely on the ‘floor’ of the panel box.
I can get more pictures of the headers that are installed and their locations, if so desired.

Are there any benefits to going with the audrino-less version?

I have been away for a few weeks… chemo has been kicking my butt.

It would appear I have missed a lot

I have tried to follow all the instruction and I am having an issue. Where is says: “You can connect the Arduino Mega to your computer via an USB cable, create a new sketch, paste the code from github into the Arduino IDE and then transfer to the ArduinoMEGA. Be sure to go to the tools menu, select and then select the ArduinoMega 2560 so that the code will compile correctly and not time out during transfer.” I do not see a ‘transfer’ option? I tried to ‘upload’ it and I get the following error:

Sketch uses 14,234 bytes (5%) of program storage space. Maximum is 253,952 bytes. Global variables use 1,834 bytes (22%) of dynamic memory, leaving 6,358 bytes for local variables. Maximum is 8,192 bytes. avrdude: stk500v2_recv(): checksum error avrdude: stk500v2_recv(): checksum error avrdude: verification error, first mismatch at byte 0x2374 0xea != 0xff avrdude: verification error; content mismatch

I have made sure I have selected the correct board and I have the correct COM port selected.

Any guidance as to what I may be doing wrong would be greatly appreciated. Thanks.

@scottma61,

To me, this looks like a communication error. You might try uploading just a simple app link Blink just to be sure the communications, etc… are set up.

Note: Upload is the correct operation. Transfer is not an option but rather some sloppy documentation on my part.

I’m using your Alarm Thing code but only see only new thing being created - the Dining Motion. Do you have a smartapp per zone? My first attempt I only created the Dining Motion Zone - Zone 5. I updated your code for 12 zones.

Also anyone have any idea what device type would typically be associated with a Smoke Detector?

I’m seeing the messages in the logs like it should be updated - Any Ideas?

41ad6a20-dbfa-44bc-bf9d-8cd0149285ff 6:17:54 AM: debug Parse returned [Home Security msg is "DISARMED Ready to Arm ", Home Security system is disarmed, Home Security motion is inactive, Home Security zone one is inactive, Home Security zone two is inactive, Home Security zone three is inactive, Home Security zone four is inactive, Home Security zone five is inactive, Home Security zone six is inactive, Home Security zone seven is inactive, Home Security zone eight is inactive, Home Security zone nine is inactive, Home Security zone ten is inactive, Home Security zone eleven is inactive, Home Security zone twelve is inactive, Home Security chime is chimeOff]
41ad6a20-dbfa-44bc-bf9d-8cd0149285ff 6:17:25 AM: debug Parse returned [Home Security msg is ping, Home Security chime is chimeOff]
4ef0ea7c-3396-4d19-ac0f-b5132f2a9af8 6:17:04 AM: debug Updated with settings: [theAlarm:Home Security, theHub:physicalgraph.app.HubWrapper@6d5d4e79, zoneName1:Front Door, zoneType1:Contact Sensor, zoneName2:Hallway Back Door, zoneType2:Contact Sensor, zoneName3:Kitchen Door, zoneType3:Contact Sensor, zoneName4:Basement Door, zoneType4:Contact Sensor, zoneName5:Dining Motion, zoneType5:Motion Sensor, zoneName6:Den Window, zoneType6:Glass Break Sensor, zoneName7:Living Room Window, zoneType7:Glass Break Sensor, zoneName8:Back Bedroom Window, zoneType8:Glass Break Sensor, zoneName9:Sunroom Door, zoneType9:Contact Sensor, zoneName10:Garage Door, zoneType10:Contact Sensor, zoneName11:Side Foyer Motion1, zoneType11:Motion Sensor, zoneName12:Hall Smoke, zoneType12:Glass Break Sensor]

I never went down the audrino path so I can’t comment on what that gives you but using the smartthings app/device types is working great for me. I changed a bit of the code to use the zones as open/close contacts vs on/off but the concept works great. I have rule machine disarming in the morning and can use the contacts for other logic. I see no benefit of the audrino but again I don’t know what else it gives you or what I am missing.

I have the communication to the Adruino/Thing Shield now working (had wrong pin location before). I am confident that I got the sketch loaded and it does appear to be communicating with the SmartThing Device. However, the Arduino/Shield does not appear to be communicating with the Alarm Panel. I have set the keypad address on both the AD2PI and the Alarm Panel and input the alarm panel Master Code into the Device configuration. You call it a ‘Homeowners Alarm Access Code’? I’m not sure what that means? It is the Alarm Panel Master Code, The Alarm Panel Installer Code, any one of the valid Alarm Panel User Codes, or something else?

Anything else that I should look for to troubleshoot? Thanks for your help. I think I am close…

@scottma61,
For the Device Handler, you enter the same code you would typically use on your keypad to arm/disarm the panel. The code is needed in order to send a command to the alarm panel. Does the AD2Pi have a blinking led (a couple times a sec)? Even without the code, you should see communication from the alarm panel (in the message tile of the device handler and the zone tiles), assuming all the wiring is correct between Arduino, the AD2Pi and the alarm panel.