Great. Thanks. Appreciate it.
By the way, I think I just figured out that I don’t need to check status in advance for all the Tasker profiles I’ve created. For example, I check if garage doors are open during the night and if they are close them. I just figured out that if I send a close command to the door and it’s already closed, nothing happens. However, I will need to check the status of the Hub because I terminate my Tasker task if the Hub is in Pause mode. A small victory I guess for not having to be able to check everything first, just some things.
Edit: Also, I started looking at all this because I was going to move rules out of Tasker because my phone quit working, which meant my routines weren’t running, so I thought it would be better if they were on a Hub or SharpTools instead…
@RichB what devices are you wanting to control. I am almost done building the tasker tasks.
I currently have tasks for
Turn on/off device
Turn on dimmer and set level
Get Devices
Get Device info(on, off, open, closed, ect)
Lock/unlock a lock.
Open/close Garage Door.
Well, not to be greedy, but I do all those things and all tasks would be helpful. Thanks!
Am I missing anything? Is there a specific device you want to control that I haven’t listed.
I don’t think so. I don’t have all that many different types of devices that interface with SmartThings. I have several light bulbs, several switches (like GE or Inovelli outdoor plug in receptacles), several wall switches (e.g., Inovelli Black and GE/Jasco), three Kwikset locks, and two garage doors. I wish I could still interface with my SimpliSafe security system, but that integration went by the wayside several months ago (even for Hubitat). Thanks.
@RichB here is the TaskerNet link to the SmartThings Rest API tasks.
You will need a copy of your Bearer Token on setup or copy it into the %Bearer variable.
You will you the task Build Database first.
Then you can use the tasks.
Get Device Info
Get Device Status
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 code.
Edit:
Get Location IDs
Get Location IDs Task
Get Location Mode
Get Location Mode Task
You will need to run the “Get Location IDs” task first.
Hi, this is great news, I’ve just signed up to b
eta, hopefully the update will update soon
Hi, just tried, when I create a task and run it, each time it ask to manual put device and on or off in, how do I store this operation in the task?
Great. Thanks! I will check them out later today.
Open the Turn Device On or Off
Then Select
Scroll down to this.
You can change the %Command to on or off
You can also change the %deviceId to the actual is number and just run the HTTP Request.
I have to say this is a great initiative. I’m so thankful you managed to find a work around once groovy ends. Is it possible to react to a mode change? For example putting phone on silent when hub mode changes to night. I’m not too certain on how to do that via the profile section on tasker.
This is really quite helpful as an introduction to using the SmartThings API on Tasker. If you do create a separate thread on this subject, on this forum or elsewhere, please drop a link here.
Sharptools is a terrific tool to use with Tasker, especially when I want to pass non-device related parameters to a rule, but there are instances where it makes sense to “eliminate the middleman” and make requests directly to SmartThings.
I spent a little time yesterday trying to build on your example to send a setGroupVolume command to one of my Sonos speakers, but I haven’t quite got the body syntax quite right yet. (Edit: NVM, figured it out)
I keep getting a 401 Authorization Error. Does that mean my PAT might be wrong in the %Bearer variable? I copied it from my storage location but I suppose it could still be wrong. I might just create another one to test.
Edit. NVM. That was it. I must have written down an old token. Works now. Thanks.
Could you please share your body text so, I and someone else can use it.
Sure…
{ “commands”: [ {
“component”: “main”,
“capability”: “mediaGroup”,
“command”: “setGroupVolume”,
“arguments”: [5]
} ] }
Here’s the one to modify the volume of an individual Sonos speaker (or stereo pair). I assume this would work for many other audio devices as well.
{ “commands”: [ {
“component”: “main”,
“capability”: “audioVolume”,
“command”: “setVolume”,
“arguments”: [5]
} ] }
In Tasker itself, of course, the argument (in this case “5”) is replaced by a variable. It was just easier to copy the body from the Rester profile on my desktop, where I often do initial testing.
Thanks I added it to my Code Snippets post on my thread and gave you credit for it.
Hello.
Sorry for using this thread to ask this question, but I cannot find a better place among the other threads.
I’ve been using the SharpTools Android App for quite a while now to turn on and off different devices (TP-Link plugs and lights mostly) based on some Tasker rules and that’s all.
Will that specific functionality go away as well after the groovy API shutdown?
I don’t use the more advanced functions that SharpTools offers.
Thank you for assistance.