-
Notifications
You must be signed in to change notification settings - Fork 67
Smartthings Integration
Smartthings support is beta status right now follow the rough steps below to get it setup.
Note: Smartthings support is only available in the smartthings branch and not currently in the master branch. Switch to that branch to use it. You also will need the Smartthings device and app files from a different repo at smartthings-dsc-alarm.
-
Setup a Smartthings developer account at Smartthings Developers
-
Create a new Device Type in the IDE, call it 'DSC Panel' or whatever you like, you only need name for the device ignore all the other options and click "Create" at the bottom. Once the Code section pops up highlight all the code that was created for you and paste in the code from the file 'dscPanelDeviceSmartthings.groovy' in this repo. Click "Save" then "Publish" -> "For Me". This 'DSC Panel' device is highly configurable but only directly in the code right now. Change the zone numbers on the standardTiles to match the zones coming from AlarmServer. Two of my zones are GarageDoors, remove them or change them to the standard open/close device as needed (copy/paste the code from another standard zone).
-
Create a new Smartthings App in the IDE, call it 'DSC Integration' or whatever you like. Click "Enable OAuth in Smart App" and copy down the generated "OAuth Client ID" and the "OAuth Client Secret", you will need them later to generate an access code. Click "Create" and when the code section comes up select all the text and replace it with the code from the file 'dscAlarmIntegrationSmarththingsApp.groovy'. Click "Save" then "Publish" -> "For Me".
-
On your Smartphone or in the WebUI create a new Device call it "Alarm Panel", assign it to your location and your hub then click the dropdown menu for the devicetypes at the bottom and pick the "DSC Panel" device you created earlier (it will be at the very bottom of the deviceTypes list).
-
Now the hard part, you need to authorized any smart app you setup at least once to get a valid access_code from it and to authorize devices you can control with it. To do this follow the additional guide at this link RESTAPISetup
You MUST have a access_code for your app and have authorized at least one device to control (the device "Alarm Panel" you created above) before continuing.
-
Edit 'alarmserver.cfg' and add in the OAuth/Access Code information, adjust your zones/partitions and callback event codes as needed. Leaving them at the defaults is likely what you already want.
-
Fire up the AlarmServer, you should see your events from the server show up within 1-2 seconds on your Smartphone.
I run the AlarmServer as a background job after making sure the logfile variable in the config file is setup. You can use nohup or some other daemon control tool that you like. Example:
nohup ./alarmserver.py &