:warning: [Sep 22 2021] This repo is not actively maintained and I am not planning to add any features. I switched to Hubitat and use HubitatCommunity/hubitat_ring_integration
:loudspeaker: This is the version 3
of this application. If you are looking for older versions see the links below. No support for older versions. In case of issues, I recommend to update to the latest versions.
Note: This approach is tested using SmartThings Classic App. If you are on in new SmartThings app, let me know if this approach requires any changes. PRs are welcome!
:warning: [April 5 2020] Due to the recent changes in the Ring 2FA changes, this application was updated to support the 2FA use cases. Unfortunately, this means the support for the accounts without 2FA is no more actively supported. Please update your Ring Account with 2FA support to use this.
SmartThings - Ring Alarm v2
- :clock1: This setup is going to take 30 minutes to an hour depending on your exposure on the SmartThings app, AWS Lambda, and Go.
- :dollar: Deploying the Bridge Application in AWS as a Lambda is free but you will be charged for the use of API Gateway and Data Transfer.
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.
If you are still reading this, that means you are ready to invest at least an hour!!!
This setup requires the deployment of two different components.
As I mentioned before, the bridge application is a proxy between the SmartThings custom app and Ring Alarm. Bridge application will be deployed as an AWS Lambda function using Go. The AWS Lambda function
will be exposed to the SmartThings App via a Amazon API Gateway. To secure the api endpoint, this setup uses an api-key. This setup uses AWS CloudFormation template to automatically create the required AWS resources and deploy the lambda build
from Amazon S3 Bucket
Below diagram shows details of the AWS services you will be creating for this.
You need to have an active AWS account and the latest Lambda build from here before proceeding to the next step.
If you don't have an account, start here
Follow steps below to setup the SmartThings Ring Alarm Lambda.
You can download the latest deployment.zip
from Github Release page
If you want to build the Lambda from the source code, you can do that by cloning this repo and then executing below steps.
You have to install golang version 1.13 or higher for this.
> GOOS=linux go build -o main
> zip deployment.zip main
You need to store the deployment.zip
file in an amazon s3 bucket
so that the cloud formation template
can use that for deployment.
Follow below steps to create a bucket and upload the deployment.zip
file to that bucket.
deployment.zip
file either via Drag and Drop or by clicking on Add Files button. Leave all options as default on the upload page.You will be using AWS CloudFormation template to create the stack.
You need to have either this repository cloned or save a copy of ringalarm-gateway.yaml file on your local before proceeding.
You can watch the instruction in the GIF or read the step-by-step instructions.
ringalarm-gateway.yaml
from cloned repository or from download.st-ring-alarm
- You can use custom names if you want. apiStageName
- Leave as defaultlambdaFunctionName
- Leave as defaults3BucketName
- If you have selected any names other than st-ring-alarm
for your amazon s3 bucket
you need to update that here otherwise leave as default.In this step, you will get your API Invoke URL and API Key for SmartThings Application configuration.
<your stack name>-api
)API:<your stack name>-api
)<your stack name>-apikey
)Follow the steps here
You can add Ring Alarm to the Which alarms and sirens in the webCoRE and use like below in the pistons.
execute
if
Ring Alarm's status is 'home'
then
with
Your Device
do
Turn Off;
end with;
end if;
end execute;
SmartThings - Ring Alarmv2 is released under the MIT License.