For the complete documentation index, see llms.txt. This page is also available as Markdown.

SmartThings

Read and control SmartThings devices, locations, and scenes: list devices, check status, send commands, and run scenes.

Connectors

Choose the connector that matches your authentication method. The options below use the names shown in StackAI.

Connector
Authentication

SmartThings

OAuth sign-in

SmartThings (Personal Access Token)

Personal Access Token

SmartThings

Connect a SmartThings account to read devices, locations, and scenes, and to send device commands. Renews itself automatically.

Set up in SmartThings

  1. Use a SmartThings account with access to the records and operations that your workflow needs.

  2. If your organization restricts application access or user consent, have its administrator approve the connection before you sign in.

Set up in StackAI

  1. Open Settings → Connections, add a connection, and select SmartThings.

  2. Select Connect, sign in to the provider account, and review the requested access. Complete authorization to return to StackAI.

  3. Save the connection and check its connection status. Select this saved connection when configuring an action or feature that uses it.

StackAI obtains the OAuth credentials during sign-in. You do not need to paste an access token or refresh token.

SmartThings (Personal Access Token)

Connect with a SmartThings personal access token. IMPORTANT: personal access tokens minted since 30 Dec 2024 expire after 24 hours and cannot renew themselves; SmartThings then rejects every request with 401 until the token is replaced by hand. Use the SmartThings OAuth connector for a connection that refreshes itself. Tokens minted before 30 Dec 2024 keep their original long-lived expiry.

Set up in SmartThings

  1. Sign in to the SmartThings personal access token page with the Samsung account that owns the devices.

  2. Generate a token, give it a name, and select the scopes required for the devices and operations in your workflow.

  3. Copy the token while it is displayed.

Set up in StackAI

  1. Open Settings → Connections, add a connection, and select SmartThings (Personal Access Token).

  2. Enter the credentials and connection details in the fields below.

  3. Save the connection and check its connection status. Select this saved connection when configuring an action or feature that uses it.

Connection fields

StackAI field
Required
What to enter

Personal Access Token

Yes

A SmartThings personal access token carrying the scopes this workflow needs (e.g. r:devices:, x:devices:, r:locations:, r:scenes:, x:scenes:*). IMPORTANT: personal access tokens minted since 30 Dec 2024 expire after 24 hours and cannot renew themselves; SmartThings then rejects every request with 401 until the token is replaced by hand. Use the SmartThings OAuth connector for a connection that refreshes itself. Tokens minted before 30 Dec 2024 keep their original long-lived expiry. Provider instructions.

Connection notes

  • New SmartThings personal access tokens expire after 24 hours. Replace the saved credential when it expires; do not assume this connector refreshes a personal access token.

Provider documentation: Setup reference.

Verify the connection

Check that the connection is healthy. Then run a read operation against a resource the connected account can access. A successful connection check confirms authentication; it does not guarantee permission for every action.

If access is denied, check the credential or OAuth permissions, the selected account or environment, and access to the specific resource. Update expired credentials or reconnect after permissions change.

Use an action

  1. Add the required SmartThings action to the workflow.

  2. Select a connection when the action requests one.

  3. Complete the required fields. Use the reference picker when a value comes from another workflow step.

  4. Run the workflow and inspect the action’s output. Check the result before using it in a later step.

Actions

List Devices

List the devices in your SmartThings account, optionally filtered by location.

Required permissions: r:devices:*.

Inputs

Field
Type
Required
Description

Location

select (string)

No

Only show devices in this location (home/site). Leave empty for all locations. Options load from the selected connection.

Capability filter

string

No

Only show devices that support all of these capabilities (comma-separated).

Include current status

boolean

No

Also return each device's current capability values (slower). Default: false.

Max results

integer

No

Maximum number of devices to return. Minimum: 1. Default: 50.

Next page cursor

string

No

Continue a previous listing from where it stopped.

Outputs

Field
Type
Description

Devices

object_array

The matching devices with their ids, names, rooms, and capabilities.

Next cursor

string

Present when more devices exist; pass it back to continue.

Get Device Details

Get a device's profile: name, room, type, and the capabilities it supports.

Required permissions: r:devices:*.

Inputs

Field
Type
Required
Description

Device

select (string)

Yes

The device to inspect. Options load from the selected connection.

Include health

boolean

No

Also check whether the device is online or offline.

Outputs

Field
Type
Description

Device

object

The device's profile and supported capabilities.

Get Device Status

Read a device's current values: on/off, level, temperature, battery, sensor readings.

Required permissions: r:devices:*.

Inputs

Field
Type
Required
Description

Device

select (string)

Yes

The device to read. Options load from the selected connection.

Capability

select (string)

No

Only return readings for this capability (e.g. switch, temperature). Options load from the selected connection.

Outputs

Field
Type
Description

Readings

object_array

The device's current values, one row per attribute.

Send Device Command

Control a device: turn it on or off, dim it, set a temperature, lock or unlock it.

Required permissions: x:devices:*.

Inputs

Field
Type
Required
Description

Device

select (string)

Yes

The device to control. Options load from the selected connection.

Capability

select (string)

Yes

The feature of the device to control (e.g. switch, dimmer, lock). Options load from the selected connection.

Command

select (string)

Yes

What the device should do (e.g. on, off, setLevel). Options load from the selected connection.

Arguments

string

No

Values the command needs, comma-separated (e.g. brightness 0-100). For commands that take an object, such as setColor, write a JSON array instead: [{"hue": 60, "saturation": 100}].

Component

string

No

For multi-part devices only (e.g. a two-outlet plug). Usually 'main'. Default: main.

Outputs

Field
Type
Description

Command results

object_array

Whether the device accepted the command.

Execute Scene

Run one of your SmartThings scenes (e.g. 'Good Night', 'Movie Time').

Required permissions: x:scenes:*.

Inputs

Field
Type
Required
Description

Scene

select (string)

Yes

The scene to run. Options load from the selected connection.

Outputs

Field
Type
Description

Status

string

The result of running the scene.

List Scenes

List the scenes in your SmartThings account, optionally filtered by location.

Required permissions: r:scenes:*.

Inputs

Field
Type
Required
Description

Location

select (string)

No

Only show scenes in this location. Leave empty for all locations. Options load from the selected connection.

Max results

integer

No

Maximum number of scenes to return. Minimum: 1. Default: 50.

Next page cursor

string

No

Continue a previous listing from where it stopped.

Outputs

Field
Type
Description

Scenes

object_array

The scenes with their ids and names.

Next cursor

string

Present when more scenes exist; pass it back to continue.

List Locations

List the locations (homes or sites) in your SmartThings account.

Required permissions: r:locations:*.

Inputs

Field
Type
Required
Description

Max results

integer

No

Maximum number of locations to return. Minimum: 1. Default: 50.

Next page cursor

string

No

Continue a previous listing from where it stopped.

Outputs

Field
Type
Description

Locations

object_array

The locations with their ids and names.

Next cursor

string

Present when more locations exist; pass it back to continue.

List Rooms

List the rooms in one of your locations.

Required permissions: r:locations:*.

Inputs

Field
Type
Required
Description

Location

select (string)

Yes

The location whose rooms to list. Options load from the selected connection.

Max results

integer

No

Maximum number of rooms to return. Minimum: 1. Default: 50.

Next page cursor

string

No

Continue a previous listing from where it stopped.

Outputs

Field
Type
Description

Rooms

object_array

The rooms with their ids and names.

Next cursor

string

Present when more rooms exist; pass it back to continue.

Triggers

A trigger starts a workflow when its configured event occurs. Configure the event and filters before enabling the trigger.

Device Status Changed

Fires when a device's status changes: it turns on or off, a sensor trips, a reading moves. Polls the device's full status and diffs it against the value seen on the previous poll, since SmartThings has no event feed for device status.

Pick the device to watch, and optionally narrow to one capability (e.g. 'switch') to ignore changes on every other capability. Device status calls are capped at 12 per minute per device; the default 5-minute schedule stays well inside that budget.

Required permissions: r:devices:*.

Configuration

Field
Type
Required
Description

Device

select (string)

Yes

The device to watch. Options load from the selected connection.

Capability

select (string)

No

Only fire for changes to this capability (e.g. switch, motion). Options load from the selected connection.

Event inputs

Field
Type
Required
Description

Component

string

Yes

The device component the reading belongs to. Default: .

Capability

string

Yes

The capability the reading belongs to. Default: .

Attribute

string

Yes

The attribute that changed. Default: .

Previous value

string

No

The value recorded on the previous poll.

New value

string

Yes

The attribute's current value. Default: .

Unit

string

No

The unit the value is measured in, if any.

Timestamp

string

No

When SmartThings recorded this value.

Outputs

Field
Type
Description

Component

string

The device component the reading belongs to.

Capability

string

The capability the reading belongs to.

Attribute

string

The attribute that changed.

Previous value

string

The value recorded on the previous poll.

New value

string

The attribute's current value.

Unit

string

The unit the value is measured in, if any.

Timestamp

string

When SmartThings recorded this value.

Device Added

Fires when a new device is added to your SmartThings account. Polls the device listing and diffs it against the ids seen on the previous poll, since SmartThings has no event feed for device registration.

Optionally narrow the watch to one location. The first poll after enabling this trigger only records the current devices; it never replays your existing devices as new.

Required permissions: r:devices:*.

Configuration

Field
Type
Required
Description

Location

select (string)

No

Only watch for devices added to this location. Leave empty for all locations. Options load from the selected connection.

Event inputs

Field
Type
Required
Description

Device ID

string

Yes

The new device's unique id.

Name

string

No

The device's system name.

Label

string

No

The device's user-facing label.

Location ID

string

No

The location (home/site) the device belongs to.

Room ID

string

No

The room the device is assigned to.

Device Type

string

No

The kind of device (e.g. switch, sensor, thermostat).

Capabilities

array

Yes

The capabilities this device supports.

Outputs

Field
Type
Description

Device ID

string

The new device's unique id.

Name

string

The device's system name.

Label

string

The device's user-facing label.

Location ID

string

The location (home/site) the device belongs to.

Room ID

string

The room the device is assigned to.

Device Type

string

The kind of device (e.g. switch, sensor, thermostat).

Capabilities

string_array

The capabilities this device supports.

Important behavior

If an operation is denied, check the connection’s granted permissions and the account’s access in the provider. Reauthorize the connection when it needs additional permissions.

Actions that create, update, send, or delete data can change the connected service. Review their inputs before running them. A retry can repeat an operation; consider this when configuring retries for actions that change data.

The catalog lists the fields and capabilities available in the supplied provider definition. Availability can also depend on your deployment and organization’s Feature Access settings.

Last updated

Was this helpful?