Install
openclaw skills install smartthings-directDirect SmartThings hub control via the official SmartThings CLI. List devices, read device status, and execute capability commands without going through Home Assistant. Use when the user asks to control a SmartThings device, check device state, run a scene, or when "smartthings" / "ST" is mentioned.
openclaw skills install smartthings-directDirect control of a SmartThings hub using the official @smartthings/cli. This is the low-level path — bypasses Home Assistant and Matter bridging. Use this when you want to hit SmartThings devices directly.
For the Home Assistant / Matter setup, see the sibling smart-home skill instead.
# macOS (recommended)
brew install smartthingscommunity/smartthings/smartthings
# or npm (Node 24.8+)
npm install --global @smartthings/cli
Binary: smartthings (alias st).
Verify: smartthings --version.
Two options. Browser login is preferred for long-lived use because the CLI stores a refresh token.
Run any command — the CLI opens a browser for Samsung account OAuth on first use.
smartthings locations # first call triggers login
r:devices:*, w:devices:*, x:devices:*, r:locations:*, r:scenes:*, x:scenes:*smartthings devices --token <uuid>
or add to the config file:
~/Library/Preferences/@smartthings/cli/config.yaml~/.config/@smartthings/cli/config.yamldefault:
token: your-pat-uuid-here
Heads up: PATs created after 2024-12-30 expire in 24 hours. For durable agent use, prefer browser auth or expect to reissue the token.
Confirm config path any time with smartthings config.
smartthings devices # list all devices
smartthings devices --json # JSON output
smartthings devices <id> # device detail + capabilities
smartthings devices:status <id> # current attribute values
smartthings devices:health <id> # online/offline
smartthings devices:capability-status <id> <component> <capability>
Format: [component:]<capability>:<command>[(args)] — component defaults to main.
# Switch on/off
smartthings devices:commands <id> switch:switch:on
smartthings devices:commands <id> switch:switch:off
# Dimmer to 50 %
smartthings devices:commands <id> main:switchLevel:setLevel\(50\)
# Thermostat cool setpoint to 24 °C
smartthings devices:commands <id> main:thermostatCoolingSetpoint:setCoolingSetpoint\(24\)
# Color temperature
smartthings devices:commands <id> main:colorTemperature:setColorTemperature\(3000\)
Parentheses need escaping in bash/zsh. Running devices:commands with no args starts an interactive guided prompt — handy for discovering the right capability call.
smartthings locations
smartthings rooms --location-id <loc-id>
smartthings scenes
smartthings scenes:execute <scene-id>
smartthings capabilities # catalog of standard capabilities
| Flag | Effect |
|---|---|
-j, --json | JSON to stdout |
-y, --yaml | YAML |
-o <file> | write to file (extension sets format) |
No built-in field picker — pipe JSON through jq.
When the user says something like "turn off the living room light":
scripts/st-find.sh "living room"
or directly:
smartthings devices --json | jq '.[] | select(.label | test("living room"; "i")) | {deviceId, label}'
smartthings devices:status <id>
smartthings devices:commands <id> switch:switch:off
HTTP 429 = rate limited, HTTP 422 = guardrail violationBack off rather than retrying tight.
smartthings devices -j, not smartthings -j devices.SMARTTHINGS_PROFILE env var switches config profiles; there is no SMARTTHINGS_TOKEN env var.