Need help setting up Endpoints

I read and tried to follow along with this tutorial

I downloaded the examples and also downloaded XAMPP so I could run the PHP file from my PC. I entered my Client and Secret ID in the PHP file and was able to pull up the screen to Authorize. The first time I did it I was redirected to a screen that basically told me to copy the url and I assumed there should be some sort of buttons on that page, there were not. I hit back and tried to add another device and got “error requesting access token…” after I hit Authorize. I tried deleting and starting over and still get the same error.

Can someone help me thru this?

Thanks,
Scott

1 Like

@swindmiller

Are you looking for a way to create your own Endpoint Smartapp, or would you be fine using the one that is already created in the tutorial you have linked?

You should just be able to use the example in the tutorial unless you are planning on creating new endpoints outside of on/off/toggle controls. Here’s the steps to set it up with the example:

  1. Click this link

  2. Sign in with your credentials

  3. Select the devices you would like to create endpoints for

  4. Click Authorize at the very bottom of the page

This will bring you to a page that looks like this -

If you are looking to get any of the URL’s to use with Assistant+ for Siri control, right click on the command you are wanting to execute and go to “Copy Link Address”.

For example - this is the On command for my coffee maker -

http://graph.api.smartthings.com/api/smartapps/installations/XXXXXXXX-XXXX-XXXXXXX-XXXXXXXXX/switches/XXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX/on?access_token=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXX

4 Likes

Thanks. I thought I was over complicating it.
I had tried this originally but I get an error that says “please select atleast one device to authorize” I have selected one and then tried two and still get the error.
That’s when I thought I had to set everything up on my own.
Any ideas?

And yes @nelemansc I am trying to setup assistant+ :slight_smile:

@swindmiller Any chance you could take a screenshot of where you’re getting the error? I’ve never ran across any errors setting it up myself

Does this help @nelemansc?

Could it be that I don’t have an lock devices?

@swindmiller It’s possible… You could try creating a dummy lock to see if you can bypass the error. Just go into My Devices > Add Device, select Z-Wave Lock for the type and Enter something bogus in for the Device Network ID like “FAKE”. I know I didn’t have a Z-Wave lock originally when I enabled the SmartApp, but it’s worth a shot.

Yeah, that didnt work, same error.

Maybe I should contact support.

@swindmiller probably your best bet. Let me know what you hear from them, now I’m curious

1 Like

Yes. That error is not normal.

Support said they may have to contact @Ben and the following but your saying I should not have to setup my own app right, I just wanted to double check before I write back:

Now, to be entirely honest, I’m very inept at coding, so we will probably have to resort to getting a hold of Ben directly, but let’s see what we can figure out here.

I’m wondering if the URL you’re going to: http://107.20.127.54/smartthings/exampleOauth.php isn’t working because it’s the example OAuth, and not the result of having set up the code on your own account.

Essentially, the demo code that’s running on the http://107.20.127.54/smartthings/exampleOauth.php link is just an example of giving a specific app permission to control the SmartThings on the “Home” Hub, and then you’re selecting which “things”. Because the app and PHP isn’t running on your account, it’s not authorized to control your SmartThings.

Does that make sense?

I think where I might be getting confused (this is all new to me) is do I have to install a SmartApp for this?
My assumption (which may be wrong) is all I have to do is use the existing example: http://107.20.127.54/smartthings/exampleOauth.php without anything installed on my end, check what I want authorized and I will be redirected to a page with the buttons that I can copy the URL from.
Am I wrong on this?

Sorry for being so dense, I just dont fully understand.

The example link should work. It worked for me. You can create the smartapp from the example code yourself if the example server is the problem.

@Navat604, its worked for you recently?

Yes, I was messing around trying to get xbmc to turn my light off with endpoint example. No luck with xbmc yet but endpoint example was working as of yesterday.

Ok thanks so it must be something with my account. I email support back. Thanks for replying!

1 Like