So recently the SharpTools Android app that allowed you to access SmartThings via Tasker was announced that it will be reaching out end of life cycle with the shutdown of groovy.
So I decided to work on figuring out how to access the API directly using tasker. I have included a link to the TaskerNet so you can get the tasks I have created and I am still currently working on.
SmartThings Rest API tasks.
Base Tasks from TaskerNet
Tasker SmartThings Rest API
More tasks and code snippets are available below on post #3. Those tasks are dependent on you having the base Tasks imported into Tasker.
If you don’t want to use that link and or sign up for the beta you can import the project using this XML .
Once you download it it will run a setup task asking for the bearer Token( PAT(Personal Access Token) your token will be saved in the %Bearer variable.
You can go here to obtain your token. SmartThings Personal Access Token .
Please keep this safe it is used to access your devices.
Next you will need to run the Build Database task. This will pull all device names and IDs and store them in a variable to be used by the other tasks.
Then you can use the tasks.
Get Device Info (Returns info about the device Device name, make,capabilitys, ect)
Get Device Status (Returns the status. on, off, open ,closed, ect)
These should be self explanatory. When you run them it will give you a list dialog to choose which device to use the an option for what command to send.
Turn Device On or Off
Turn Dimmer On And Set Level
Turn Dimmer On And Set Color
Open Or Close Garage Door
I still have some work to do on the create lock code and delete lock codes.
Locations Tasks :
Get Location IDs (returns the id of the location you want to use when working with scenes and rules.)
Get Location Mode(Returns the current location mode the hub is set to.)
Run Scene or Execute Scene (Runs a scene that you have chosen with in the task.
Get Scene( Is used by the Run Scene task to obtain a list of scenes you have on your hub)
I have working tasks for:
Deleting A Rule
These are all still works in progress and I need to build and work out a better UI for it before it is ready to be released.
All of these are just examples. You can go into the tasks and use only the Http Request action however you want. These were just intended to examples of how to use the API calls in Tasker.
Currently I have to worked out a way to mimic the event Subscriptions that SharpTools plugin for tasker did. That would allow you to react to events in SmartThings as in a door opening or a light being turned on. From my understanding this would require a dedicated smartapp and currently that is out of my wheel house and beyond my skill set at the moment.
I will be happy to help build new tasks and help troubleshoot any problems that occur. Also if you find this helpful and you create new tasks I think it would be amazing if you shared the Http Request body text so that other can use it in their projects.
Location Mode Tasks