Controlling devices from mobile


(Joe Rizzo) #1

I’m trying to write a mobile application that will allow a user to control their devices. Is this link the best place to start

http://docs.smartthings.com/en/latest/smartapp-web-services-developers-guide/implementation.html#developing-an-api-access-application

Are there any samples that show how I can turn a light bulb on and off via a rest call?

Thank you.


(Joshua Lyon (SharpTools.io Dashboard)) #2

@joerizz0 that is the document I would use to get started along with: Creating a REST SmartApp

That being said, I created an app that provides Tasker plugins and Widgets for Android. If you are an Android user, SharpTools may do much of what you are looking for already:



(Joe Rizzo) #3

Thanks for the response but I am still very confused about the smartthings platform.

Does the platform have the ability for a mobile app to control anyones smarthings devices. The use case would be that the end user provides their smarthings credentials, the mobile app would then gain access to the users devices using oauth and then make rest calls to control the devices.

If this is not the appropriate place for this sort of question a pointer to the right place would be appreciated.

Thanks for your time.


(Joshua Lyon (SharpTools.io Dashboard)) #4

The page one step back from the one you linked in your original post provides an overview that should answer your questions:
http://docs.smartthings.com/en/latest/smartapp-web-services-developers-guide/overview.html

The platform doesn’t provide an out of the box API / web service… instead, you develop a SmartApp with HTTP end points that has the functionality your app needs. Using the OAuth workflow, the user authorizes your SmartApp (web service) to interact with the devices they select.

What kind of mobile app are you looking to develop? What kind of features or functionality?


(Joe Rizzo) #5

Thanks Joshua.

So that approach sounds like every user will have to publish a smarapp to their account before their devices can be controlled via a rest call. I guess that is not so bad but the real pain point is that the user would have to supply my app with the app id.

I’m trying to figure out a way where I can control any users devices without them having to go through the publishing step and/or providing me with an app id. It’s the typical oauth case where one app is trying to do something for a user that spans different services. I was hoping to add SmartThings support to my app and be able to allow the user to provide their SmarthThings accound creds and use oauth to be able to discover the devices they registered and then control them.

The intent of my app was to provide device control to non technical users.