Rate Limiting Annoucement

I didn’t know Device Handlers are exposing any web APIs. Could someone point me to documentation for that?

1 Like

Is this it? In the cloud connected device types doc:

http://docs.smartthings.com/en/latest/cloud-and-lan-connected-device-types-developers-guide/building-cloud-connected-device-types/building-the-device-type.html

No, there is no mention of exposing web APIs. It only documents some outbound HTTP commands.

Device handlers can expose endpoints via a mappings block like SmartApps. The SmartApp Web Services guide applies to device handlers as well, in that they can define a mappings block to expose endpoints.

It’s not clearly documented that this applies to device handlers, or why you would need to do this, at the moment. It’s on the list. Sorry.

If I could expose device handlers endpoints, how would I enable OAuth for a device handler to get client id/secret?
If I can’t then why is there a limit on something that can’t be done?

2 Likes

OAuth is for authentication, not API calls. You don’t need OAuth to make web calls. It makes perfect sense for them to also rate limit that.

I thought one would need to authenticate in order to be able to call APIs on a device.

Either way, I would like to know what the mechanism is and where it is documented.

1 Like

Authentication can be done elsewhere and passed to the handler or not at all.

Where’s the API doc for this functionality? Samples? Anything?

We don’t have good documentation at the moment for using mappings in a device handler specificaly. You can find some information about configuring the mappings to handle inbound requests in the SmartApp Web Services guide. There’s also an example SmartApp that exposes web APIs [here][2].

We do have in our backlog work to document web services better overall, including in device handlers.

@Jim, is there any documentation or sample for using mappings in a device handler?

Once I stick mappings in a device handler, how do I interface with it?

You keep referring me to SmartApp web services guide.

Andrew, you are such a tease! You know something and you are not telling.

No. There is no documentation currently for specifically using the mappings in a device handler. We are aware of that gap and it is in our documentation backlog to address.

@Jim, is the time window synchronous across the cloud?

Hello @April, with this new policy, is there a limit on the number of http requests a smartapp or device can send?

I now get the following error message sometimes:

groovyx.net.http.HttpResponseException: Too Many Requests

Please let me know.
Regards.

1 Like

There are no limits on outbound requests. You may want to check the rate limiting policy on the API you are calling to see if that’s being hit.

1 Like

Thnx @Jim, I will check with them.

Is this still the case?

1 Like

yep! That is correct.

1 Like

when will SmartThings merge in switches with scene control and the appropriate smart app (abc manager) so they can run locally?