Smartthings - Alexa Smart Home API

alexa
amazon'alexa'echo
amazon
api

(Jack) #1

Hi,
I am trying to make a Smartthings - Alexa Smart Home API, which requires Account linking, therefore requiring a client ID & secret from my Smartthings account. I am trying to make this skill without the need of a smartapp. However, I can’t fulfill the account linking in the Alexa skill setup (from the Amazon developer portal) because I don’t have my client ID & secret. I’ve been looking around the new Smartthings Rest API, and all I can find is a link an access token, https://account.smartthings.com/tokens. I was wondering how I can be able to retrieve my client ID & secret? Is there a way to convert my access token into the client ID & secret? Or is there a way I can retrieve my client ID and secret. I’d really appreciate any response so that I can finish my account linking in the Alexa setup. Thanks.

Note: the new API doesn’t require a Smartapp, as you can control your devices without it. I have tested this using Postman, utilizing the API link below.

References:
New Smartthings developer site: https://smartthings.developer.samsung.com/develop/index.html
Smartthings API: https://smartthings.developer.samsung.com/develop/api-ref/st-api.html


#2

You can ask this question as many times as you like, the answer isn’t going to change. You cannot access Alexa from SmartThings natively. Why would people invest all this time in writing Smartapps if you could do it from the api? Think about it for a minute.
SmartThings needs a token, Alexa needs an ID and secret… Why do those have to be interchangeable?
Also, the links you posted are for development of solutions or integrating new devices or clouds into the SmartThings architecture… Not for linking your personal devices or accounts.


(Jack) #3

Can you explain to me then, why I can control my devices using Postman without a Smartapp?

I need it because of the below account linking setup.


#4

Thats on Alexa… You get that after you enable Oath in the Smartapp. I told you all this already.


#5

Wouldn’t that be a question for the Alexa forum? It sounds like Postman doesnt act like Alexa… Smartthings has nothing to do with it. LOL


(Jack) #6

https://smartthings.developer.samsung.com/develop/guides/smartapps/working-with-devices.html#Example-with-Postman


#7

Okay… So why should Alexa? I don’t get why you don’t understand this. Obviously you’re wrong. Give it up.


(Jack) #8

I am trying to do this because I did a live chat with a Smartthings worker, and he said that this is possible, but I should try and ask the community.


#9

Are you trying to just control your devices or trying to build some special skill in Alexa? What did Samsung say was possible? To link the two? Yes… It is… Through a smartapp.


(Jack) #10

He said it was possible to control my devices through an Alexa skill only, without the need of a smartapp.


#11

Yes…but you don’t need a token to do it. See, if you had answered me when I asked what you were trying to accomplish then I could have answered you. You are trying to build a skill in Alexa when there is one already there.


(Jack) #12

I am trying to create my own though, without a smartapp. Can you help?


#13

Did you follow those instructions? That has you go into the Alexa app and then you link to SmartThings. When you say “create your own” what are you trying to create? An Alexa skill? Another program? A new device?


(Jack) #14

I am trying to recreate my own version of the Smartthings Alexa skill, which is possible according to the live chat guy I talked to. This will be only an Alexa Smart Home API, without a smartapp, to control my devices, routines, etc.


#15

Why are you trying to create your own? Why not use the one that’s already there? Did you even look at the page I linked to?

The native Alexa SmartThings skill actually creates it’s own SmartApp when you link it to SmartThings, just like Google assistant, IFTTT, Stringify and many others. You might not create the SmartApp yourself but SmartThings installs one for you when you link the accounts. The process is just automatic. So, your premise that a SmartApp is not required is WRONG. One is required, you just don’t have to create it yourself for the native Alexa support. It’s done for you by SmartThings. But if you want to build a custom skill and not use the Samsung Connect skill, you have to build your own smartapp.


(Jack) #16

I have tested the Smartthings skill myself, referring to the link you gave. I am trying to create me own because I will have more control over what my skill can do, and be able to link to more products. I can use my skill to link to other smart hubs such as the Wink hub and Philips Hue hub, to control devices. It’ll make everything cool and easy. Wink and Philips Hue hubs don’t have support for smartapps, but they do have APIs that I can use. And so does Smartthings now. So I am integrating control of them all in 1 single Alexa skill.


#18

Then you need to create a SmartApp. I’m sorry it’s not what you want to hear but that’s the way it is. There is a SmartApp out there called AskAlexa. Do you think that the developers of that app would have gone through all that trouble if they didn’t have to? Just stop and listen for a minute…you always have a smartapp on the ST side. Even when you don’t have to create one yourself.

You said Postman works the way you want it to…so what you have to do is make Alexa do the same thing Postman is doing. SmartThings is already doing what you want…but Alexa isn’t. Right?


#19

Also, how would being able to link to Alexa allow SmartThings to link to more products? Your premise is incorrect.


(Jack) #20

Yes. I need to convert Postman code into Alexa code.

I use Alexa to control Smartthings, Wink, Philips Hue, etc. - Not Smartthings control Wink, Philips Hue, etc.


#21

This link is in the section of the developer info called…wait for it…SMART APP GUIDE!!!!