- Attach the smartthings sheild to the arduino Note: Match up the pin labels between the two boards.
- Setup the alternate serial pins jumper pin 2 -> 14 (tx3) jumper pin 3 -> 15 (rx3) set switch on shield to D2/D3 Note: This allows you to troubleshoot using the serial monitor also this is the only way i've gotten everything to work
-
Download the ST_anything project
git clone git@github.com:DanielOgorchock/ST_Anything.git
-
Copy the Skectes and Libraries folders from the project in othe Arduino directory
-
Open the Arduino App and load the ST_Anything Sketch Arduino/Sketches/ST_Anything_Doors_Windows/ST_Anything_Doors_Windows.ino
-
complile the sketch (The check icon)
-
Upload the compiled sketch to the arduino
- Power on the arduion with sheild attached
- In the App go into pairing mode looking for a device
- Hit the "switch" button on the St sheild
- Should pair as an Arduion ThingSheild
- Login to the smarthings api https://graph.api.smartthings.com/login/auth
- Click on "My Device Handlers"
- Click on "+ New Device Handler"
- Select "From Code" Tab
- Paste code from Groovy/ST_Anything_Doors_Windows.groovy file in the repo
- Click on "Create"
- Click on "Save"
- Click on "Publich" -> "For Me"
- Click on "My Devices"
- Select your "Arduino ThingShield"
- Click on Edit
- Change type to "St_Anything" Note: It's at the bottom of the list
- Click on Update button
- Relogin to app on phone
- Click on the "Arduino thingShield" thing You should now see a bunch of tiles
- Open up the arduino serial monitor You should see a bunch of "Sending" events. If not check the jumpers from 2/3 to 14/15
- In the API
- select "MySmartApps
- Select "+New SmartApp
- Click on Code tab
- Paste the Groovy/ST_Anything_Doors_Windows/ST_Anything_doors_Windows_Multiplexer.smartapp.groovy
- Click on "Create"
- Click on "Save"
- Click on "Public" -> "For Me"
- Select "My Device Handlers"
- Select "+Create New Device Handler"
- Select "From Code"
- Paste the Groovy/VirtualDevices/VirtualContactSensor.device.groovy
- Click on "Create"
- Click on "Save"
- Click on "Public" -> "For Me"
- Repeat for: "VirtualMotionSensor.device.groovy" "VirtualDoorControl.device.groovy"
Type is
Continue here www.kindrickcoleman.com/index.php/Tech-Blog/total-noob-guide-to-move-your-old-wired-security-system-to-smartthings.html
Create virtual devices for each
- Edit the schetch change the variables to match your zones