Skip to content

Commit

Permalink
Updated README and included Travis release
Browse files Browse the repository at this point in the history
  • Loading branch information
asishrs committed Sep 2, 2018
1 parent 0fcf850 commit 0c42232
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 11 deletions.
12 changes: 10 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
language: java
install: true
jdk:
- oraclejdk8
- oraclejdk8
script:
- ./gradlew build -x test
- "./gradlew build -x test"
deploy:
provider: releases
api_key:
secure: walrKwu84C27fJ5M9f5YbR35+POZkczxl6MiZXmJ1wUzBaUrgfcqj0djcDBvqUcFN8CIX7aS8/Yjs6G9bPAU57RTR5IyBM/8EDWLAaxtSafqDLLojffSUgspaTHs2nbEdQpbe2KqEC8f0wuWpHMma3ka0S1u05I4Hi4MuGXqcA+umes0/OsvV3VEB2Lv5oYydpac76TPEqOVK59KWcxGcfBmjCeYHHq3I5lGIw1Wsuh9PnTqlz5qCAzyWdI8y35pkfmf4EYt/vzTsiJuGr412umXqYDzaVdzeDORzNDq3GurkJiRkwdL4keZipO5n3a5OIXLzS+mqGDvydpXDQTXM7AOGRJu1dm16EX+CwzoiuGYaJtcMFADuIyc2coEdb5eBHtCpn5SGY1eFITbfBDpasUPwzVYbV/PwEQ/dN97QS7poejskdBFh5xd5niSmd6kAxiMhm6w95GBdvOX5MMvLjkmq3kxwRBY+S1t4uIdx5MhNp68EfZnhgEG3grT14f/KKJNA1pEMeZXBDrJSsVVb7e4Vl12FjZvw/5YxOqN3LWowi7n9POr99BzWzyAUsBn8gjtMCpyy+9vheIaPVgNTp0CJHMK1Y1reo1rYU1YqYcu6v8A7yU2Dv2PcSRXqNp3OQzN5XquxwYJX9eQDeVtBorB2CfDy+9yYwAjj2/5n6A=
file: build/distributions/ring-alarm-1.0-SNAPSHOT.zip
skip_cleanup: true
on:
repo: asishrs/smartthings-ringalarm
20 changes: 11 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#SmartThings - Ring Alarm
# SmartThings - Ring Alarm

==Warning== This setup is going to take an hour to few hours depending on your exposure on the SmartThings app, AWS Lambda, and Java.
**Warning** - This setup is going to take an hour to few hours depending on your exposure on the SmartThings app, AWS Lambda, and Java.

This page explains, how to set up Ring Alarm as a virtual device on your SmartThings. Ring Alarm uses WebSockets to communicate to ring server for checking Alarm Status and Status changes. Unfortunately, SmartThings app does not support WebSockets, and we have to create a bridge application which accepts HTTP calls from SmartThings and communicate to Ring Alarm via WebSockets. Below diagram explains the flow.

Expand All @@ -12,14 +12,16 @@ If you are still reading this, that means you are ready to invest at least an h

This setup requires the deployment of two different components.

##Bridge Application
## Bridge Application
As I mentioned before, the bridge application is a proxy between the SmartThings custom app and Ring Alarm. For ease of deployment, I created this as an [AWS Lambda function](https://aws.amazon.com/lambda/) using Java.

You need to install this Lambda in AWS and set up an API gateway to communicate to that. This approach is using the API with Lambda integration using API Gateway. This code also requires an API authentication token. If you are already familiar with setting Lambda with API token, you can skip to the SmartThings Device Handler and Smart App.

Follow the below steps to install and setup Lambda in AWS. You need to have AWS account before proceeding to next step. If you don't have an account, start [here](https://aws.amazon.com/account/)

###Deploy a lambda in AWS?
Build The lam

### Deploy a lambda in AWS?
- Open https://console.aws.amazon.com/lambda/home?region=us-east-1#/functions
- Click on **Create Function** and provide below details
* **Name** - a name for your lambda (Example: Ring-Alarm)
Expand Down Expand Up @@ -67,10 +69,10 @@ Follow the below steps to install and setup Lambda in AWS. You need to have AWS
* Click on **Show** link on the API key
* Save API Key for SmartThings Application configuration.

####Get Ring Location Id and ZID
#### et Ring Location Id and ZID
Ring Alarm requires to pass location id and zid of your alarm as part the web sockets call. Though this can achieve via API calls, we don't want to do that as this increases the total number of calls to make before actual web sockets call. You can get those values from the network panel of your browser. Follow below steps to get those.

#####Location Id
##### Location Id
- Open your **chrome network panel** (*Option + Command + I in Mac*) and login to Ring Alarm.
- In the network panel, search for **locations**.
- Click on the location API call on the left side.
Expand Down Expand Up @@ -108,7 +110,7 @@ Ring Alarm requires to pass location id and zid of your alarm as part the web so
```
## SmartThings Device Handler and Smart App
You need to install the device handler and smart app using the SmartThings ID to use the Lambda API calls.
###Install SmartThings Device Handler
### Install SmartThings Device Handler
- Login at http://graph.api.smartthings.com
- Select **My Locations**, select the location you want to use.
- Select **My Device Handlers**
Expand All @@ -119,7 +121,7 @@ You need to install the device handler and smart app using the SmartThings ID to
- Click the blue **Save** button above the editor window.
- Click the **Publish** button next to it and select **For Me**. You have now self-published your Device Handler

###Install SmartThings App
### Install SmartThings App
- *(optional)* Login at http://graph.api.smartthings.com
- *(optional)* Select **My Locations**, select the location you want to use.
- Select **My SmartApps**
Expand All @@ -130,7 +132,7 @@ You need to install the device handler and smart app using the SmartThings ID to
- Click the blue **Save** button above the editor window.
- Click the **Publish** button next to it and select **For Me**. You have now self-published your SmartApp

##Setup your SmartThings App
## Setup your SmartThings App
- Open your SmartThings app and go to **My Home**
- Tap on the Ring Alarm and then tap on the **settings** (*gear icon*).
- Add below
Expand Down

0 comments on commit 0c42232

Please sign in to comment.