Control your Ring Spotlight with Alexa with Smart Things

Just a quick post, but I’ve managed to get my Ring Spotlight cam light operated by my Alexa using a Custom Device type in my SmartThings hub.

 

UPDATED: June 2018, fixed authentication API changes in the github code repo, and the postman collection has the new call too.

Here is a copy of my device handler:

https://github.com/philgituser/smartthings/blob/master/devicetypes/philgituser/ring-spotlight.src/ring-spotlight.groovy

If you’ve not created a custom device type, it’s not too hard, but I recommend you start here?

https://community.smartthings.com/t/smartapp-devicetype-from-code-and-from-template/11255

There are three things you need to get it working:

  1. Your Ring.com Username
  2. Your Ring.com Password
  3. The Device ID

The device ID is the hardest part, it needs to be sourced by an API call to:
https://api.ring.com/clients_api/ring_devices?api_version=9&auth_token=auth_token

Here is a POSTMAN collection for calling this.

Updated June 6th 2018, to support the new authentication model.

Attachment

RING API Set.postman_collection.json

 

Set your environment variables to include your username and password:

Call the “Authenticate OAuth”, Then call the “Authenticate (Get Token)” and then Get Devices:
Screen Shot 2018-06-06 at 3.05.42 pm

 

 

And extract the Device ID of the relevant device.
This will then go into the device setup in smartthings:

Once you have the device working in Smartthings, it should just be a matter of adding the device to the Alexa available devices through rediscovery.

And then you can say “Alexa, Turn the Backyard Spotlight On”.

I’ll let you add the siren as a bit of fun. It’s not hard to extrapolate based on the Postman collection example.

 

23 thoughts on “Control your Ring Spotlight with Alexa with Smart Things

Add yours

  1. Thanks for the instructions and building it to make it happen! One thing though that I was wondering it could do is interface with the motion detection? So then when motion is detected, in smartthings it would then be configured to turn lights on at 100% for 5 minutes, then return back to the normal percentage of 20%???? Thanks!

    Like

    1. The motion detection portion is a bit harder to do. I’m not sure if we can/should set up the smartthings to poll the ring api looking for motion… I also have played with the brightness settings for the light – I didn’t have a spotlight cam – but rather a floodlight cam that did brightness at the time I was developing.

      Like

  2. I am interested in the steps you took to get the device id. Pasting the device handler from code was simple enough but running (or whatever is suppose to be done with it) the postman.json has left me scratching my head. Any instructions on how to go about getting this would be greatly appreciated. Thank you

    Like

  3. How do you get Smartthings to recognise your spotlight cam? It is not discovered by the app and the ring connected app won’t show it as it’s not supported. Thanks!

    Like

  4. Thanks for this info! I had a little trouble figuring out how to add the Ring Spotlight and Stickup cams as a new device, but found the “Virtual Device Creator” SmartApp, then changed the device type to use the new Device Handler in the developer portal. Seems to work great now, would love to get dimming working. Thanks again!

    Like

  5. The postman collection is giving an authentication error whereas it worked previously. Does it need to be adjusted after the authentication changes at Ring. I cannot get a new device id.

    Like

  6. Hi Philip,
    I completed all your steps and created the device w/ the device ID sourced from the API call, but when I try to turn on the light from the smartthings app nothing happens. Can you give me any troubleshooting advice? (Also, sending the PUT (Turn Light On/Turn Light Off) does not do anything. Thanks much for putting this together!

    Like

  7. When I try to run the “Get Token” in POSTMAN, I get
    “error”: “You need to sign in or sign up before continuing.”

    The first part returns an access token just fine

    Like

  8. Hi Phillip,

    thanks for all your hard work on this. I was wondering if you could help me with getting it working. I have added retrieved the device ID using your JSON script and added your device handler code into a customer device handles.

    When I try adding a device on the smartthings website, it will add it using your handler with no problem. I set the device preferences for the ring username, ring password, and device id in the device settings on the smartthings site and saved it.

    when I try to utilize the device on the smartthings app, it gives me an error saying “can’t connect to device . check device and try again” I assure you the device is on.

    For some reason, I can’t get it to show me any debugging, for this device, on the live logging section of the smartthing site.

    any advice?

    thank you,
    Peter

    Like

  9. Hi Philip
    I have managed to add the device and the on/off light works perfectly.
    can you please help me to add the on/off siren as I want to use this to work with my arm and disarm feature of the smartthing.
    Your help will be greatly appreciated

    Like

    1. I haven’t had time to get to this, but if you were feeling adventurous, you could make another device, and just change the API requests in the device handler to call the siren endpoint. I have an example of it in the postman collection.

      Like

  10. Thanks for making this! This doesn’t allow you to bring the motion detector online right? I would like to use webcore so that if it detects motion during certain days/times it turns on other lights as well as the floodlight. thanks!

    Like

  11. Thanks, Philip for the hint. I managed to get a device handler done for the siren. Please advise how I can load it here so others can benefit from it.

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

WordPress.com.

Up ↑

%d bloggers like this: