โ NOTE: This CLI is currently considered an alpha release. It has currently has only a few specific features implemented and is a work in progress.
- Download the appropriate binary from the releases tab of the github page.
- Install it on your path and rename it to "smartthings". It does not need administrator privileges but of course will need to be executable.
- Run
smartthings --help
to make sure it's working. - Run a specific command with
smartthings <command>
NOTE: Some users are experiencing issues with the default login flow. If you are experiencing this issue, you can work around it by creating a personal access token and including it in your configuration file like this:
default:
token: my-personal-access-token
Many commands in the CLI handle complex input and/or output, mostly for use with the SmartThings REST API.
Complex input can always be passed as JSON or YAML and in a couple cases a "question and answer" mode is provided.
The output format will match the input format unless otherwise specified. When there is no input specified the default will be a user-friendly (often table) formatted style if the output is going to the console or JSON otherwise.
Name | Shortcut | Description |
---|---|---|
json | j | Write output in JSON format. |
yaml | y | Write output in YAML format. |
indent | Specify the number of spaces for YAML or JSON output | |
input | i | Specify a filename for input. |
output | o | Specify a filename for output. The extension of this file will control its type unless overridden with --json or --yaml . |
The CLI supports an automatic login flow that pops up a browser window asking you to log in and give the CLI permission to access your account. The CLI will automatically request login as needed.
Although not recommended, you can use a personal access token for authentication
by creating a configuration file and including the
token in a token
key for your profile.
- You can get more specific information about any command or sub-hierarchy
of commands by using
--help
with a specific command or branch. For example, you can run any of the following commands for varying level of detail:smartthings capabilities --help
,smartthings capabilities:presentation --help
smartthings capabilities:presentation:create --help
- The CLI accepts data in YAML or JSON format and can output data in either format as well as the default table format.
- Commands that take input accept stdin or a file specified
by the
--input
(shortcut-i
) flag. - Commands that output data will output the data to stdout unless a file
is specified the using
--output (shortcut
-o`) flag. - When a command takes input and results in output, the format of the output
will match the input format unless an output filename is specified
using
--output
with a different extension. - Command line flags must go after the command. Use
smartthings command -f flag
instead ofsmartthings -f flag command
.
Commands that use the SmartThings REST API are organized in a hierarchy that maps to that hierarchy.
smartthings apps [ID]
smartthings apps:authorize ARN
smartthings apps:create
smartthings apps:delete [ID]
smartthings apps:oauth [ID]
smartthings apps:oauth:generate [ID]
smartthings apps:oauth:update [ID]
smartthings apps:register [ID]
smartthings apps:settings [ID]
smartthings apps:settings:update [ID]
smartthings apps:update [ID]
smartthings autocomplete [SHELL]
smartthings capabilities [ID] [VERSION]
smartthings capabilities:create
smartthings capabilities:delete [ID] [VERSION]
smartthings capabilities:namespaces
smartthings capabilities:presentation [ID] [VERSION]
smartthings capabilities:presentation:create [ID] [VERSION]
smartthings capabilities:presentation:update [ID] [VERSION]
smartthings capabilities:translations [ID] [VERSION] [TAG]
smartthings capabilities:translations:create [ID] [VERSION]
smartthings capabilities:translations:update [ID] [VERSION]
smartthings capabilities:translations:upsert [ID] [VERSION]
smartthings capabilities:update [ID] [VERSION]
smartthings config [NAME]
smartthings devicepreferences [IDORINDEX]
smartthings devicepreferences:create
smartthings devicepreferences:update [ID]
smartthings deviceprofiles [ID]
smartthings deviceprofiles:create
smartthings deviceprofiles:delete [ID]
smartthings deviceprofiles:device-config [ID]
smartthings deviceprofiles:presentation [ID]
smartthings deviceprofiles:publish [ID]
smartthings deviceprofiles:translations [ID] [TAG]
smartthings deviceprofiles:translations:delete [ID] [TAG]
smartthings deviceprofiles:translations:upsert [ID]
smartthings deviceprofiles:update [ID]
smartthings deviceprofiles:view [ID]
smartthings deviceprofiles:view:create
smartthings deviceprofiles:view:update [ID]
smartthings devices [ID]
smartthings devices:capability-status [ID] [COMPONENT] [CAPABILITY]
smartthings devices:commands [ID] [COMMAND]
smartthings devices:component-status [ID] [COMPONENT]
smartthings devices:delete [ID]
smartthings devices:health [ID]
smartthings devices:preferences [ID]
smartthings devices:presentation [ID]
smartthings devices:rename [ID] [LABEL]
smartthings devices:status [ID]
smartthings devices:update [ID]
smartthings edge:channels [IDORINDEX]
smartthings edge:channels:assign [DRIVERID] [VERSION]
smartthings edge:channels:create
smartthings edge:channels:delete [ID]
smartthings edge:channels:drivers [IDORINDEX]
smartthings edge:channels:enroll [HUBID]
smartthings edge:channels:enrollments [IDORINDEX]
smartthings edge:channels:invites [IDORINDEX]
smartthings edge:channels:invites:accept ID
smartthings edge:channels:invites:create
smartthings edge:channels:invites:delete [ID]
smartthings edge:channels:unassign [DRIVERID]
smartthings edge:channels:unenroll [HUBID]
smartthings edge:channels:update [ID]
smartthings edge:drivers [IDORINDEX]
smartthings edge:drivers:delete [ID]
smartthings edge:drivers:install [DRIVERID]
smartthings edge:drivers:installed [IDORINDEX]
smartthings edge:drivers:logcat [DRIVERID]
smartthings edge:drivers:package [PROJECTDIRECTORY]
smartthings edge:drivers:uninstall [DRIVERID]
smartthings generate:java
smartthings generate:node
smartthings help [COMMAND]
smartthings installedapps [ID]
smartthings installedapps:delete [ID]
smartthings installedapps:rename [ID] [NAME]
smartthings installedschema [ID]
smartthings installedschema:delete [ID]
smartthings locations [IDORINDEX]
smartthings locations:create
smartthings locations:delete [ID]
smartthings locations:rooms [IDORINDEX]
smartthings locations:rooms:create
smartthings locations:rooms:delete [ID]
smartthings locations:rooms:update [ID]
smartthings locations:update [ID]
smartthings logout
smartthings plugins
smartthings plugins:inspect PLUGIN...
smartthings plugins:install PLUGIN...
smartthings plugins:link PLUGIN
smartthings plugins:uninstall PLUGIN...
smartthings plugins:update
smartthings presentation PRESENTATIONID [MANUFACTURERNAME]
smartthings presentation:device-config PRESENTATIONID [MANUFACTURERNAME]
smartthings presentation:device-config:create
smartthings presentation:device-config:generate ID
smartthings rules [IDORINDEX]
smartthings rules:create
smartthings rules:delete [ID]
smartthings rules:update [ID]
smartthings schema [ID]
smartthings schema:authorize ARN
smartthings schema:create
smartthings schema:delete [ID]
smartthings schema:regenerate [ID]
smartthings schema:update [ID]
get a specific app or a list of apps
USAGE
$ smartthings apps [ID]
ARGUMENTS
ID the app id or number from list
OPTIONS
-h, --help show CLI help
-j, --json use JSON format of input and/or output
-o, --output=output specify output file
-p, --profile=profile [default: default] configuration profile
-t, --token=token the auth token to use
-v, --verbose include URLs and ARNs in table output
-y, --yaml use YAML format of input and/or output
--classification=classification filter results by one or more classifications, AUTOMATION, SERVICE, DEVICE,
CONNECTED_SERVICE
--compact use compact table format with no lines between body rows
--expanded use expanded table format with a line between each body row
--indent=indent specify indentation for formatting JSON or YAML output
--language=language ISO language code or "NONE" to not specify a language. Defaults to the OS locale
--type=type filter results by appType, WEBHOOK_SMART_APP, LAMBDA_SMART_APP, API_ONLY
See code: dist/commands/apps.ts
authorize calls to your AWS Lambda function from SmartThings
USAGE
$ smartthings apps:authorize ARN
ARGUMENTS
ARN the ARN of the AWS Lambda function
OPTIONS
-h, --help show CLI help
-p, --profile=profile [default: default] configuration profile
--principal=principal use this principal instead of the default when authorizing lambda functions
--statement-id=statement-id use this statement id instead of the default when authorizing lambda functions
EXAMPLES
$ smartthings apps:authorize arn:aws:lambda:us-east-1:1234567890:function:your-test-app
Note that this command is the same as running the following with the AWS CLI:
$ aws lambda add-permission --region us-east-1 \
--function-name arn:aws:lambda:us-east-1:1234567890:function:your-test-app \
--statement-id smartthings --principal 906037444270 --action lambda:InvokeFunction
It requires your machine to be configured to run the AWS CLI
See code: dist/commands/apps/authorize.ts
update the OAuth settings of the app
USAGE
$ smartthings apps:create
OPTIONS
-d, --dry-run produce JSON but don't actually submit
-h, --help show CLI help
-i, --input=input specify input file
-j, --json use JSON format of input and/or output
-o, --output=output specify output file
-p, --profile=profile [default: default] configuration profile
-t, --token=token the auth token to use
-y, --yaml use YAML format of input and/or output
--authorize authorize Lambda functions to be called by SmartThings
--compact use compact table format with no lines between body rows
--expanded use expanded table format with a line between each body row
--indent=indent specify indentation for formatting JSON or YAML output
--language=language ISO language code or "NONE" to not specify a language. Defaults to the OS locale
--principal=principal use this principal instead of the default when authorizing lambda functions
--statement-id=statement-id use this statement id instead of the default when authorizing lambda functions
See code: dist/commands/apps/create.ts
delete the app
USAGE
$ smartthings apps:delete [ID]
ARGUMENTS
ID App profile UUID or number in the list
OPTIONS
-h, --help show CLI help
-p, --profile=profile [default: default] configuration profile
-t, --token=token the auth token to use
--language=language ISO language code or "NONE" to not specify a language. Defaults to the OS locale
See code: dist/commands/apps/delete.ts
get OAuth settings of the app
USAGE
$ smartthings apps:oauth [ID]
ARGUMENTS
ID the app id or number in the list
OPTIONS
-h, --help show CLI help
-j, --json use JSON format of input and/or output
-o, --output=output specify output file
-p, --profile=profile [default: default] configuration profile
-t, --token=token the auth token to use
-y, --yaml use YAML format of input and/or output
--compact use compact table format with no lines between body rows
--expanded use expanded table format with a line between each body row
--indent=indent specify indentation for formatting JSON or YAML output
--language=language ISO language code or "NONE" to not specify a language. Defaults to the OS locale
See code: dist/commands/apps/oauth.ts
update the OAuth settings of the app and regenerate the clientId and clientSecret
USAGE
$ smartthings apps:oauth:generate [ID]
ARGUMENTS
ID the app id
OPTIONS
-d, --dry-run produce JSON but don't actually submit
-h, --help show CLI help
-i, --input=input specify input file
-j, --json use JSON format of input and/or output
-o, --output=output specify output file
-p, --profile=profile [default: default] configuration profile
-t, --token=token the auth token to use
-y, --yaml use YAML format of input and/or output
--compact use compact table format with no lines between body rows
--expanded use expanded table format with a line between each body row
--indent=indent specify indentation for formatting JSON or YAML output
--language=language ISO language code or "NONE" to not specify a language. Defaults to the OS locale
See code: dist/commands/apps/oauth/generate.ts
update the OAuth settings of the app
USAGE
$ smartthings apps:oauth:update [ID]
ARGUMENTS
ID the app id
OPTIONS
-d, --dry-run produce JSON but don't actually submit
-h, --help show CLI help
-i, --input=input specify input file
-j, --json use JSON format of input and/or output
-o, --output=output specify output file
-p, --profile=profile [default: default] configuration profile
-t, --token=token the auth token to use
-y, --yaml use YAML format of input and/or output
--compact use compact table format with no lines between body rows
--expanded use expanded table format with a line between each body row
--indent=indent specify indentation for formatting JSON or YAML output
--language=language ISO language code or "NONE" to not specify a language. Defaults to the OS locale
See code: dist/commands/apps/oauth/update.ts
Send request to app target URL to confirm existence and authorize lifecycle events
USAGE
$ smartthings apps:register [ID]
ARGUMENTS
ID the app id
OPTIONS
-h, --help show CLI help
-p, --profile=profile [default: default] configuration profile
-t, --token=token the auth token to use
--language=language ISO language code or "NONE" to not specify a language. Defaults to the OS locale
See code: dist/commands/apps/register.ts
get OAuth settings of the app
USAGE
$ smartthings apps:settings [ID]
ARGUMENTS
ID the app id
OPTIONS
-h, --help show CLI help
-j, --json use JSON format of input and/or output
-o, --output=output specify output file
-p, --profile=profile [default: default] configuration profile
-t, --token=token the auth token to use
-y, --yaml use YAML format of input and/or output
--compact use compact table format with no lines between body rows
--expanded use expanded table format with a line between each body row
--indent=indent specify indentation for formatting JSON or YAML output
--language=language ISO language code or "NONE" to not specify a language. Defaults to the OS locale
See code: dist/commands/apps/settings.ts
update the OAuth settings of the app
USAGE
$ smartthings apps:settings:update [ID]
ARGUMENTS
ID the app id
OPTIONS
-d, --dry-run produce JSON but don't actually submit
-h, --help show CLI help
-i, --input=input specify input file
-j, --json use JSON format of input and/or output
-o, --output=output specify output file
-p, --profile=profile [default: default] configuration profile
-t, --token=token the auth token to use
-y, --yaml use YAML format of input and/or output
--compact use compact table format with no lines between body rows
--expanded use expanded table format with a line between each body row
--indent=indent specify indentation for formatting JSON or YAML output
--language=language ISO language code or "NONE" to not specify a language. Defaults to the OS locale
See code: dist/commands/apps/settings/update.ts
update the OAuth settings of the app
USAGE
$ smartthings apps:update [ID]
ARGUMENTS
ID the app id
OPTIONS
-d, --dry-run produce JSON but don't actually submit
-h, --help show CLI help
-i, --input=input specify input file
-j, --json use JSON format of input and/or output
-o, --output=output specify output file
-p, --profile=profile [default: default] configuration profile
-t, --token=token the auth token to use
-y, --yaml use YAML format of input and/or output
--authorize authorize Lambda functions to be called by SmartThings
--compact use compact table format with no lines between body rows
--expanded use expanded table format with a line between each body row
--indent=indent specify indentation for formatting JSON or YAML output
--language=language ISO language code or "NONE" to not specify a language. Defaults to the OS locale
--principal=principal use this principal instead of the default when authorizing lambda functions
--statement-id=statement-id use this statement id instead of the default when authorizing lambda functions
See code: dist/commands/apps/update.ts
display autocomplete installation instructions
USAGE
$ smartthings autocomplete [SHELL]
ARGUMENTS
SHELL shell type
OPTIONS
-r, --refresh-cache Refresh cache (ignores displaying instructions)
EXAMPLES
$ smartthings autocomplete
$ smartthings autocomplete bash
$ smartthings autocomplete zsh
$ smartthings autocomplete --refresh-cache
See code: @oclif/plugin-autocomplete
get a specific capability
USAGE
$ smartthings capabilities [ID] [VERSION]
ARGUMENTS
ID the capability id or number in list
VERSION the capability version
OPTIONS
-h, --help show CLI help
-j, --json use JSON format of input and/or output
-n, --namespace=namespace a specific namespace to query; will use all by default
-o, --output=output specify output file
-p, --profile=profile [default: default] configuration profile
-s, --standard show standard SmartThings capabilities
-t, --token=token the auth token to use
-y, --yaml use YAML format of input and/or output
--compact use compact table format with no lines between body rows
--expanded use expanded table format with a line between each body row
--indent=indent specify indentation for formatting JSON or YAML output
--language=language ISO language code or "NONE" to not specify a language. Defaults to the OS locale
See code: dist/commands/capabilities.ts
create a capability for a user
USAGE
$ smartthings capabilities:create
OPTIONS
-d, --dry-run produce JSON but don't actually submit
-h, --help show CLI help
-i, --input=input specify input file
-j, --json use JSON format of input and/or output
-n, --namespace=namespace the namespace to create the capability under
-o, --output=output specify output file
-p, --profile=profile [default: default] configuration profile
-t, --token=token the auth token to use
-y, --yaml use YAML format of input and/or output
--compact use compact table format with no lines between body rows
--expanded use expanded table format with a line between each body row
--indent=indent specify indentation for formatting JSON or YAML output
--language=language ISO language code or "NONE" to not specify a language. Defaults to the OS locale
See code: dist/commands/capabilities/create.ts
delete a capability
USAGE
$ smartthings capabilities:delete [ID] [VERSION]
ARGUMENTS
ID the capability id
VERSION the capability version
OPTIONS
-h, --help show CLI help
-p, --profile=profile [default: default] configuration profile
-t, --token=token the auth token to use
--language=language ISO language code or "NONE" to not specify a language. Defaults to the OS locale
See code: dist/commands/capabilities/delete.ts
list all capability namespaces currently available in a user account
USAGE
$ smartthings capabilities:namespaces
OPTIONS
-h, --help show CLI help
-j, --json use JSON format of input and/or output
-o, --output=output specify output file
-p, --profile=profile [default: default] configuration profile
-t, --token=token the auth token to use
-y, --yaml use YAML format of input and/or output
--compact use compact table format with no lines between body rows
--expanded use expanded table format with a line between each body row
--indent=indent specify indentation for formatting JSON or YAML output
--language=language ISO language code or "NONE" to not specify a language. Defaults to the OS locale
See code: dist/commands/capabilities/namespaces.ts
get presentation information for a specific capability
USAGE
$ smartthings capabilities:presentation [ID] [VERSION]
ARGUMENTS
ID the capability id or number in list
VERSION the capability version
OPTIONS
-h, --help show CLI help
-j, --json use JSON format of input and/or output
-n, --namespace=namespace a specific namespace to query; will use all by default
-o, --output=output specify output file
-p, --profile=profile [default: default] configuration profile
-t, --token=token the auth token to use
-y, --yaml use YAML format of input and/or output
--compact use compact table format with no lines between body rows
--expanded use expanded table format with a line between each body row
--indent=indent specify indentation for formatting JSON or YAML output
--language=language ISO language code or "NONE" to not specify a language. Defaults to the OS locale
See code: dist/commands/capabilities/presentation.ts
create presentation model for a capability
USAGE
$ smartthings capabilities:presentation:create [ID] [VERSION]
ARGUMENTS
ID the capability id
VERSION the capability version
OPTIONS
-d, --dry-run produce JSON but don't actually submit
-h, --help show CLI help
-i, --input=input specify input file
-j, --json use JSON format of input and/or output
-o, --output=output specify output file
-p, --profile=profile [default: default] configuration profile
-t, --token=token the auth token to use
-y, --yaml use YAML format of input and/or output
--compact use compact table format with no lines between body rows
--expanded use expanded table format with a line between each body row
--indent=indent specify indentation for formatting JSON or YAML output
--language=language ISO language code or "NONE" to not specify a language. Defaults to the OS locale
See code: dist/commands/capabilities/presentation/create.ts
update presentation information of a capability
USAGE
$ smartthings capabilities:presentation:update [ID] [VERSION]
ARGUMENTS
ID the capability id
VERSION the capability version
OPTIONS
-d, --dry-run produce JSON but don't actually submit
-h, --help show CLI help
-i, --input=input specify input file
-j, --json use JSON format of input and/or output
-o, --output=output specify output file
-p, --profile=profile [default: default] configuration profile
-t, --token=token the auth token to use
-y, --yaml use YAML format of input and/or output
--compact use compact table format with no lines between body rows
--expanded use expanded table format with a line between each body row
--indent=indent specify indentation for formatting JSON or YAML output
--language=language ISO language code or "NONE" to not specify a language. Defaults to the OS locale
See code: dist/commands/capabilities/presentation/update.ts
Get list of locales supported by the capability
USAGE
$ smartthings capabilities:translations [ID] [VERSION] [TAG]
ARGUMENTS
ID the capability id or number in list
VERSION the capability version
TAG the locale tag
OPTIONS
-h, --help show CLI help
-j, --json use JSON format of input and/or output
-n, --namespace=namespace a specific namespace to query; will use all by default
-o, --output=output specify output file
-p, --profile=profile [default: default] configuration profile
-t, --token=token the auth token to use
-v, --verbose include list of supported locales in table output
-y, --yaml use YAML format of input and/or output
--compact use compact table format with no lines between body rows
--expanded use expanded table format with a line between each body row
--indent=indent specify indentation for formatting JSON or YAML output
--language=language ISO language code or "NONE" to not specify a language. Defaults to the OS locale
EXAMPLES
$ smartthings capabilities:translations
โโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโฌโโโโโโโโโโโ
โ # โ Id โ Version โ Status โ
โโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโผโโโโโโโโโโโค
โ 1 โ custom1.outputModulation โ 1 โ proposed โ
โ 2 โ custom1.outputVoltage โ 1 โ proposed โ
โโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโดโโโโโโโโโโโ
? Select a capability. 1
โโโโโฌโโโโโโ
โ # โ Tag โ
โโโโโผโโโโโโค
โ 1 โ en โ
โ 2 โ ko โ
โโโโโดโโโโโโ
outputModulation (master)$ st capabilities:translations -v
โโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโฌโโโโโโโโโโโฌโโโโโโโโโโโโโ
โ # โ Id โ Version โ Status โ Locales โ
โโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโผโโโโโโโโโโโผโโโโโโโโโโโโโค
โ 1 โ custom1.outputModulation โ 1 โ proposed โ ko, en, es โ
โ 2 โ custom1.outputVoltage โ 1 โ proposed โ en โ
โโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโดโโโโโโโโโโโดโโโโโโโโโโโโโ
? Select a capability. 1
โโโโโฌโโโโโโ
โ # โ Tag โ
โโโโโผโโโโโโค
โ 1 โ en โ
โ 1 โ es โ
โ 2 โ ko โ
โโโโโดโโโโโโ
$ smartthings capabilities:translations 1
$ smartthings capabilities:translations custom1.outputModulation
โโโโโฌโโโโโโ
โ # โ Tag โ
โโโโโผโโโโโโค
โ 1 โ en โ
โ 2 โ ko โ
โโโโโดโโโโโโ
$ smartthings capabilities:translations 1 1
$ smartthings capabilities:translations 1 en
$ smartthings capabilities:translations custom1.outputModulation 1 1
$ smartthings capabilities:translations custom1.outputModulation 1 en
$ smartthings capabilities:translations custom1.outputModulation en
Tag: en
Attributes:
โโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โโโโโโโโโโโโโโ
โ Name โ Label โ Description โ Template
โ
โโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โโโโโโโโโโโโโโค
โ outputModulation โ Output Modulation โ Power supply output modulation โ The {{attribute}} of {{device.label}}
is {{value}} โ
โ outputModulation.50hz โ 50 Hz โ โ
โ
โ outputModulation.60hz โ 60 Hz โ โ
โ
โโโโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โโโโโโโโโโโโโโ
Commands:
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Name โ Label โ Description โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ setOutputModulation โ Set Output Modulation โ Set the output modulation to the specified value โ
โ setOutputModulation.outputModulation โ Output Modulation โ The desired output modulation โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
See code: dist/commands/capabilities/translations.ts
create a capability translation
USAGE
$ smartthings capabilities:translations:create [ID] [VERSION]
ARGUMENTS
ID the capability id
VERSION the capability version
OPTIONS
-d, --dry-run produce JSON but don't actually submit
-h, --help show CLI help
-i, --input=input specify input file
-j, --json use JSON format of input and/or output
-o, --output=output specify output file
-p, --profile=profile [default: default] configuration profile
-t, --token=token the auth token to use
-y, --yaml use YAML format of input and/or output
--compact use compact table format with no lines between body rows
--expanded use expanded table format with a line between each body row
--indent=indent specify indentation for formatting JSON or YAML output
--language=language ISO language code or "NONE" to not specify a language. Defaults to the OS locale
EXAMPLES
$ smartthings capabilities:translations:create custom1.outputModulation 1 -i en.yaml
tag: en
label: Output Modulation
attributes:
outputModulation:
label: Output Modulation
displayTemplate: 'The {{attribute}} of {{device.label}} is {{value}}'
i18n:
value:
50hz:
label: 50 Hz
60hz:
label: 60 Hz
commands:
setOutputModulation:
label: Set Output Modulation
arguments:
outputModulation:
label: Output Modulation
$ smartthings capabilities:translations:create -i en.yaml
โโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโฌโโโโโโโโโโโ
โ # โ Id โ Version โ Status โ
โโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโผโโโโโโโโโโโค
โ 1 โ custom1.outputModulation โ 1 โ proposed โ
โ 2 โ custom1.outputVoltage โ 1 โ proposed โ
โโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโดโโโโโโโโโโโ
? Enter id or index 1
tag: en
label: Output Modulation
attributes:
outputModulation:
label: Output Modulation
displayTemplate: 'The {{attribute}} of {{device.label}} is {{value}}'
i18n:
value:
50hz:
label: 50 Hz
60hz:
label: 60 Hz
commands:
setOutputModulation:
label: Set Output Modulation
arguments:
outputModulation:
label: Output Modulation
See code: dist/commands/capabilities/translations/create.ts
update a capability translation
USAGE
$ smartthings capabilities:translations:update [ID] [VERSION]
ARGUMENTS
ID the capability id
VERSION the capability version
OPTIONS
-d, --dry-run produce JSON but don't actually submit
-h, --help show CLI help
-i, --input=input specify input file
-j, --json use JSON format of input and/or output
-o, --output=output specify output file
-p, --profile=profile [default: default] configuration profile
-t, --token=token the auth token to use
-y, --yaml use YAML format of input and/or output
--compact use compact table format with no lines between body rows
--expanded use expanded table format with a line between each body row
--indent=indent specify indentation for formatting JSON or YAML output
--language=language ISO language code or "NONE" to not specify a language. Defaults to the OS locale
EXAMPLES
$ smartthings capabilities:translations:update custom1.outputModulation 1 -i en.yaml
tag: en
label: Output Modulation
attributes:
outputModulation:
label: Output Modulation
displayTemplate: 'The {{attribute}} of {{device.label}} is {{value}}'
i18n:
value:
50hz:
label: 50 Hz
60hz:
label: 60 Hz
commands:
setOutputModulation:
label: Set Output Modulation
arguments:
outputModulation:
label: Output Modulation
$ smartthings capabilities:translations:update -i en.yaml
โโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโฌโโโโโโโโโโโ
โ # โ Id โ Version โ Status โ
โโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโผโโโโโโโโโโโค
โ 1 โ custom1.outputModulation โ 1 โ proposed โ
โ 2 โ custom1.outputVoltage โ 1 โ proposed โ
โโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโดโโโโโโโโโโโ
? Enter id or index 1
tag: en
label: Output Modulation
attributes:
outputModulation:
label: Output Modulation
displayTemplate: 'The {{attribute}} of {{device.label}} is {{value}}'
i18n:
value:
50hz:
label: 50 Hz
60hz:
label: 60 Hz
commands:
setOutputModulation:
label: Set Output Modulation
arguments:
outputModulation:
label: Output Modulation
See code: dist/commands/capabilities/translations/update.ts
create or update a capability translation
USAGE
$ smartthings capabilities:translations:upsert [ID] [VERSION]
ARGUMENTS
ID the capability id
VERSION the capability version
OPTIONS
-d, --dry-run produce JSON but don't actually submit
-h, --help show CLI help
-i, --input=input specify input file
-j, --json use JSON format of input and/or output
-o, --output=output specify output file
-p, --profile=profile [default: default] configuration profile
-t, --token=token the auth token to use
-y, --yaml use YAML format of input and/or output
--compact use compact table format with no lines between body rows
--expanded use expanded table format with a line between each body row
--indent=indent specify indentation for formatting JSON or YAML output
--language=language ISO language code or "NONE" to not specify a language. Defaults to the OS locale
EXAMPLES
$ smartthings capabilities:translations:upsert custom1.outputModulation 1 -i en.yaml
tag: en
label: Output Modulation
attributes:
outputModulation:
label: Output Modulation
displayTemplate: 'The {{attribute}} of {{device.label}} is {{value}}'
i18n:
value:
50hz:
label: 50 Hz
60hz:
label: 60 Hz
commands:
setOutputModulation:
label: Set Output Modulation
arguments:
outputModulation:
label: Output Modulation
$ smartthings capabilities:translations:upsert -i en.yaml
โโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโฌโโโโโโโโโโโ
โ # โ Id โ Version โ Status โ
โโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโผโโโโโโโโโโโค
โ 1 โ custom1.outputModulation โ 1 โ proposed โ
โ 2 โ custom1.outputVoltage โ 1 โ proposed โ
โโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโดโโโโโโโโโโโ
? Enter id or index 1
tag: en
label: Output Modulation
attributes:
outputModulation:
label: Output Modulation
displayTemplate: 'The {{attribute}} of {{device.label}} is {{value}}'
i18n:
value:
50hz:
label: 50 Hz
60hz:
label: 60 Hz
commands:
setOutputModulation:
label: Set Output Modulation
arguments:
outputModulation:
label: Output Modulation
See code: dist/commands/capabilities/translations/upsert.ts
update a capability
USAGE
$ smartthings capabilities:update [ID] [VERSION]
ARGUMENTS
ID the capability id
VERSION the capability version
OPTIONS
-d, --dry-run produce JSON but don't actually submit
-h, --help show CLI help
-i, --input=input specify input file
-j, --json use JSON format of input and/or output
-o, --output=output specify output file
-p, --profile=profile [default: default] configuration profile
-t, --token=token the auth token to use
-y, --yaml use YAML format of input and/or output
--compact use compact table format with no lines between body rows
--expanded use expanded table format with a line between each body row
--indent=indent specify indentation for formatting JSON or YAML output
--language=language ISO language code or "NONE" to not specify a language. Defaults to the OS locale
See code: dist/commands/capabilities/update.ts
list config file entries
USAGE
$ smartthings config [NAME]
ARGUMENTS
NAME the config name
OPTIONS
-h, --help show CLI help
-j, --json use JSON format of input and/or output
-o, --output=output specify output file
-p, --profile=profile [default: default] configuration profile
-v, --verbose Include additional data in table output
-y, --yaml use YAML format of input and/or output
--compact use compact table format with no lines between body rows
--expanded use expanded table format with a line between each body row
--indent=indent specify indentation for formatting JSON or YAML output
See code: dist/commands/config.ts
list device preferences or get information for a specific device preference
USAGE
$ smartthings devicepreferences [IDORINDEX]
ARGUMENTS
IDORINDEX device preference id or index
OPTIONS
-h, --help show CLI help
-j, --json use JSON format of input and/or output
-o, --output=output specify output file
-p, --profile=profile [default: default] configuration profile
-t, --token=token the auth token to use
-y, --yaml use YAML format of input and/or output
--compact use compact table format with no lines between body rows
--expanded use expanded table format with a line between each body row
--indent=indent specify indentation for formatting JSON or YAML output
--language=language ISO language code or "NONE" to not specify a language. Defaults to the OS locale
ALIASES
$ smartthings device-preferences
EXAMPLES
$ smartthings devicepreferences # list all device preferences, sorted by title
$ smartthings devicepreferences device-preference-id # display details for preference with specified id
$ smartthings devicepreferences 2 # display details for second preference when sorted by title
$ smartthings devicepreferences 3 -y # display details for third preference as YAML
$ smartthings devicepreferences 3 -o dp.json # write details as JSON for third preference to dp.json
See code: dist/commands/devicepreferences.ts
create a device preference
USAGE
$ smartthings devicepreferences:create
OPTIONS
-d, --dry-run produce JSON but don't actually submit
-h, --help show CLI help
-i, --input=input specify input file
-j, --json use JSON format of input and/or output
-o, --output=output specify output file
-p, --profile=profile [default: default] configuration profile
-t, --token=token the auth token to use
-y, --yaml use YAML format of input and/or output
--compact use compact table format with no lines between body rows
--expanded use expanded table format with a line between each body row
--indent=indent specify indentation for formatting JSON or YAML output
--language=language ISO language code or "NONE" to not specify a language. Defaults to the OS locale
ALIASES
$ smartthings device-preferences:create
EXAMPLES
$ smartthings devicepreferences:create # create a new device profile by answering
questions
$ smartthings devicepreferences:create -d # generate a device profile by answering questions
but do not actually create it
$ smartthings devicepreferences:create -i dp.json # create a new device profile defined by the file
dp.json
$ smartthings devicepreferences:create -i dp.json -o dp-saved.json # create a new device profile defined by the file
dp.json and write the results to dp-saved.json
See code: dist/commands/devicepreferences/create.ts
update a device preference
USAGE
$ smartthings devicepreferences:update [ID]
ARGUMENTS
ID the device preference id
OPTIONS
-d, --dry-run produce JSON but don't actually submit
-h, --help show CLI help
-i, --input=input specify input file
-j, --json use JSON format of input and/or output
-o, --output=output specify output file
-p, --profile=profile [default: default] configuration profile
-t, --token=token the auth token to use
-y, --yaml use YAML format of input and/or output
--compact use compact table format with no lines between body rows
--expanded use expanded table format with a line between each body row
--indent=indent specify indentation for formatting JSON or YAML output
--language=language ISO language code or "NONE" to not specify a language. Defaults to the OS locale
ALIASES
$ smartthings device-preferences:update
EXAMPLES
$ smartthings devicepreferences:update -i dp.json # update a device preference with data from
dp.json, select which preference from a list
$ smartthings devicepreferences:update -i dp.yaml my-preference-id # update device preference my-preference-id with
data from dp.yaml
See code: dist/commands/devicepreferences/update.ts
list all device profiles available in a user account or retrieve a single profile
USAGE
$ smartthings deviceprofiles [ID]
ARGUMENTS
ID device profile to retrieve; UUID or the number of the profile from list
OPTIONS
-h, --help show CLI help
-j, --json use JSON format of input and/or output
-o, --output=output specify output file
-p, --profile=profile [default: default] configuration profile
-t, --token=token the auth token to use
-v, --verbose include presentationId and manufacturerName in list output
-y, --yaml use YAML format of input and/or output
--compact use compact table format with no lines between body rows
--expanded use expanded table format with a line between each body row
--indent=indent specify indentation for formatting JSON or YAML output
--language=language ISO language code or "NONE" to not specify a language. Defaults to the OS locale
ALIASES
$ smartthings device-profiles
EXAMPLES
$ smartthings deviceprofiles # list all device profiles
$ smartthings deviceprofiles bb0fdc5-...-a8bd2ea # show device profile with the specified UUID
$ smartthings deviceprofiles 2 # show the second device profile in the list
$ smartthings deviceprofiles 3 -j # show the profile in JSON format
$ smartthings deviceprofiles 5 -y # show the profile in YAML format
$ smartthings deviceprofiles 4 -j -o profile.json # write the profile to the file "profile.json"
See code: dist/commands/deviceprofiles.ts
Create a new device profile
USAGE
$ smartthings deviceprofiles:create
OPTIONS
-d, --dry-run produce JSON but don't actually submit
-h, --help show CLI help
-i, --input=input specify input file
-j, --json use JSON format of input and/or output
-o, --output=output specify output file
-p, --profile=profile [default: default] configuration profile
-t, --token=token the auth token to use
-y, --yaml use YAML format of input and/or output
--compact use compact table format with no lines between body rows
--expanded use expanded table format with a line between each body row
--indent=indent specify indentation for formatting JSON or YAML output
--language=language ISO language code or "NONE" to not specify a language. Defaults to the OS locale
DESCRIPTION
Creates a new device profile. If a vid field is not present in the meta
then a default device presentation will be created for this profile and the
vid set to reference it.
ALIASES
$ smartthings device-profiles:create
EXAMPLES
$ smartthings deviceprofiles:create -i myprofile.json # create a device profile from the JSON file definition
$ smartthings deviceprofiles:create -i myprofile.yaml # create a device profile from the YAML file definition
$ smartthings deviceprofiles:create # create a device profile with interactive dialog
See code: dist/commands/deviceprofiles/create.ts
delete a device profile
USAGE
$ smartthings deviceprofiles:delete [ID]
ARGUMENTS
ID Device profile UUID or number in the list
OPTIONS
-h, --help show CLI help
-p, --profile=profile [default: default] configuration profile
-t, --token=token the auth token to use
--language=language ISO language code or "NONE" to not specify a language. Defaults to the OS locale
ALIASES
$ smartthings device-profiles:delete
EXAMPLES
$ smartthings deviceprofiles:delete 63b8c91e-9686-4c43-9afb-fbd9f77e3bb0 # delete profile with this UUID
$ smartthings deviceprofiles:delete 5 # delete the 5th profile in the list
See code: dist/commands/deviceprofiles/delete.ts
get the presentation associated with a device profile
USAGE
$ smartthings deviceprofiles:device-config [ID]
ARGUMENTS
ID device profile id or the number in list
OPTIONS
-h, --help show CLI help
-j, --json use JSON format of input and/or output
-o, --output=output specify output file
-p, --profile=profile [default: default] configuration profile
-t, --token=token the auth token to use
-y, --yaml use YAML format of input and/or output
--compact use compact table format with no lines between body rows
--expanded use expanded table format with a line between each body row
--indent=indent specify indentation for formatting JSON or YAML output
--language=language ISO language code or "NONE" to not specify a language. Defaults to the OS locale
ALIASES
$ smartthings device-profiles:device-config
See code: dist/commands/deviceprofiles/device-config.ts
get the presentation associated with a device profile
USAGE
$ smartthings deviceprofiles:presentation [ID]
ARGUMENTS
ID device profile UUID or the number of the profile from list
OPTIONS
-h, --help show CLI help
-j, --json use JSON format of input and/or output
-o, --output=output specify output file
-p, --profile=profile [default: default] configuration profile
-t, --token=token the auth token to use
-y, --yaml use YAML format of input and/or output
--compact use compact table format with no lines between body rows
--expanded use expanded table format with a line between each body row
--indent=indent specify indentation for formatting JSON or YAML output
--language=language ISO language code or "NONE" to not specify a language. Defaults to the OS locale
ALIASES
$ smartthings device-profiles:presentation
EXAMPLES
$ smartthings deviceprofiles:presentation fd4adb7f-4a23-4134-9b39-05ed889a03cf
$ smartthings deviceprofiles:presentation fd4adb7f-4a23-4134-9b39-05ed889a03cf --language=ko
$ smartthings deviceprofiles:presentation fd4adb7f-4a23-4134-9b39-05ed889a03cf --language=NONE
Specifying only the presentationId defaults to the "SmartThingsCommunity" manufacturer
name and the language set for the computer's operating system. The language can be
overridden by specifying an ISO language code. If "NONE" is specified for the language
flag then no language header is specified in the API request
See code: dist/commands/deviceprofiles/presentation.ts
publish a device profile (published profiles cannot be modified)
USAGE
$ smartthings deviceprofiles:publish [ID]
ARGUMENTS
ID device profile id
OPTIONS
-h, --help show CLI help
-j, --json use JSON format of input and/or output
-o, --output=output specify output file
-p, --profile=profile [default: default] configuration profile
-t, --token=token the auth token to use
-y, --yaml use YAML format of input and/or output
--compact use compact table format with no lines between body rows
--expanded use expanded table format with a line between each body row
--indent=indent specify indentation for formatting JSON or YAML output
--language=language ISO language code or "NONE" to not specify a language. Defaults to the OS locale
ALIASES
$ smartthings device-profiles:publish
See code: dist/commands/deviceprofiles/publish.ts
Get list of locales supported by the device profiles
USAGE
$ smartthings deviceprofiles:translations [ID] [TAG]
ARGUMENTS
ID UUID or the number of the profile from list
TAG the locale tag or number of the tag from list
OPTIONS
-h, --help show CLI help
-j, --json use JSON format of input and/or output
-o, --output=output specify output file
-p, --profile=profile [default: default] configuration profile
-t, --token=token the auth token to use
-v, --verbose include list of locales in table output
-y, --yaml use YAML format of input and/or output
--compact use compact table format with no lines between body rows
--expanded use expanded table format with a line between each body row
--indent=indent specify indentation for formatting JSON or YAML output
--language=language ISO language code or "NONE" to not specify a language. Defaults to the OS locale
ALIASES
$ smartthings device-profiles:translations
EXAMPLES
$ smartthings deviceprofiles:translations
โโโโโโฌโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ # โ Name โ Status โ Id โ
โโโโโโผโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ 1 โ Test Switch โ DEVELOPMENT โ 58e73d0c-b5a5-4814-b344-c10f4ff357bb โ
โ 2 โ Two Channel Outlet โ DEVELOPMENT โ 3acbf2fc-6be2-4be0-aeb5-44759cbd66c2 โ
โโโโโโดโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
? Select a Device Profile. 2
โโโโโฌโโโโโโ
โ # โ Tag โ
โโโโโผโโโโโโค
โ 1 โ en โ
โ 2 โ es โ
โโโโโดโโโโโโ
$ smartthings deviceprofiles:translations -v
โโโโโโฌโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโ
โ # โ Name โ Status โ Id โ Locales โ
โโโโโโผโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโค
โ 1 โ Test Switch โ DEVELOPMENT โ 58e73d0c-b5a5-4814-b344-c10f4ff357bb โ โ
โ 2 โ Two Channel Outlet โ DEVELOPMENT โ 3acbf2fc-6be2-4be0-aeb5-44759cbd66c2 โ en, es โ
โโโโโโดโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโ
? Select a Device Profile. 2
โโโโโฌโโโโโโ
โ # โ Tag โ
โโโโโผโโโโโโค
โ 1 โ en โ
โ 2 โ es โ
โโโโโดโโโโโโ
$ smartthings deviceprofiles:translations 2
$ smartthings deviceprofiles:translations 3acbf2fc-6be2-4be0-aeb5-c10f4ff357bb
โโโโโฌโโโโโโ
โ # โ Tag โ
โโโโโผโโโโโโค
โ 1 โ en โ
โ 2 โ es โ
โโโโโดโโโโโโ
$ smartthings deviceprofiles:translations 2 2
$ smartthings deviceprofiles:translations 2 en
$ smartthings deviceprofiles:translations 3acbf2fc-6be2-4be0-aeb5-44759cbd66c2 en
Tag: en
โโโโโโโโโโโโโฌโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Component โ Label โ Description โ
โโโโโโโโโโโโโผโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ main โ Main Power โ Controls power to all outlets โ
โ outlet1 โ Outlet One โ Switchable outlet 1 power โ
โ outlet2 โ Outlet two โ Switchable outlet 1 power โ
โโโโโโโโโโโโโดโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
See code: dist/commands/deviceprofiles/translations.ts
delete a device profile translation
USAGE
$ smartthings deviceprofiles:translations:delete [ID] [TAG]
ARGUMENTS
ID device profile UUID or number in the list
TAG the locale tag
OPTIONS
-h, --help show CLI help
-p, --profile=profile [default: default] configuration profile
-t, --token=token the auth token to use
--language=language ISO language code or "NONE" to not specify a language. Defaults to the OS locale
ALIASES
$ smartthings device-profiles:translations:delete
EXAMPLES
$ smartthings deviceprofiles:translations:delete 3acbf2fc-6be2-4be0-aeb5-44759cbd66c2 en
Device profile "3acbf2fc-6be2-4be0-aeb5-44759cbd66c2" translation "en" deleted
$ smartthings deviceprofiles:translations:delete
โโโโโโฌโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ # โ Name โ Status โ Id โ
โโโโโโผโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ 1 โ Test Switch โ DEVELOPMENT โ 58e73d0c-b5a5-4814-b344-c10f4ff357bb โ
โ 2 โ Two Channel Outlet โ DEVELOPMENT โ 3acbf2fc-6be2-4be0-aeb5-44759cbd66c2 โ
โโโโโโดโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
? Enter id or index 2
โโโโโฌโโโโโโ
โ # โ Tag โ
โโโโโผโโโโโโค
โ 1 โ en โ
โ 2 โ es โ
โโโโโดโโโโโโ
? Enter id or index 1
Device profile "3acbf2fc-6be2-4be0-aeb5-44759cbd66c2" translation "en" deleted
See code: dist/commands/deviceprofiles/translations/delete.ts
create or update a device profile translation
USAGE
$ smartthings deviceprofiles:translations:upsert [ID]
ARGUMENTS
ID UUID or the number of the profile from list
OPTIONS
-d, --dry-run produce JSON but don't actually submit
-h, --help show CLI help
-i, --input=input specify input file
-j, --json use JSON format of input and/or output
-o, --output=output specify output file
-p, --profile=profile [default: default] configuration profile
-t, --token=token the auth token to use
-y, --yaml use YAML format of input and/or output
--compact use compact table format with no lines between body rows
--expanded use expanded table format with a line between each body row
--indent=indent specify indentation for formatting JSON or YAML output
--language=language ISO language code or "NONE" to not specify a language. Defaults to the OS locale
ALIASES
$ smartthings device-profiles:translations:upsert
EXAMPLES
$ smartthings deviceprofiles:translations:upsert 3acbf2fc-6be2-4be0-aeb5-44759cbd66c2 -i en.yaml
tag: en
components:
main:
label: Main Power
description: Controls power to all outlets
outlet1:
label: Outlet One
description: Switchable outlet 1 power
outlet2:
label: Outlet two
description: Switchable outlet 1 power
$ smartthings deviceprofiles:translations:upsert -i en.yaml
โโโโโโฌโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ # โ Name โ Status โ Id โ
โโโโโโผโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ 1 โ Test Switch โ DEVELOPMENT โ 58e73d0c-b5a5-4814-b344-c10f4ff357bb โ
โ 2 โ Two Channel Outlet โ DEVELOPMENT โ 3acbf2fc-6be2-4be0-aeb5-44759cbd66c2 โ
โโโโโโดโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
? Enter id or index 2
tag: en
components:
main:
label: Main Power
description: Controls power to all outlets
outlet1:
label: Outlet One
description: Switchable outlet 1 power
outlet2:
label: Outlet two
description: Switchable outlet 1 power
See code: dist/commands/deviceprofiles/translations/upsert.ts
update a device profile
USAGE
$ smartthings deviceprofiles:update [ID]
ARGUMENTS
ID device profile UUID or number in the list
OPTIONS
-d, --dry-run produce JSON but don't actually submit
-h, --help show CLI help
-i, --input=input specify input file
-j, --json use JSON format of input and/or output
-o, --output=output specify output file
-p, --profile=profile [default: default] configuration profile
-t, --token=token the auth token to use
-y, --yaml use YAML format of input and/or output
--compact use compact table format with no lines between body rows
--expanded use expanded table format with a line between each body row
--indent=indent specify indentation for formatting JSON or YAML output
--language=language ISO language code or "NONE" to not specify a language. Defaults to the OS locale
ALIASES
$ smartthings device-profiles:update
See code: dist/commands/deviceprofiles/update.ts
show device profile and device configuration in a single, consolidated view
USAGE
$ smartthings deviceprofiles:view [ID]
ARGUMENTS
ID device profile UUID or the number from list
OPTIONS
-h, --help show CLI help
-j, --json use JSON format of input and/or output
-o, --output=output specify output file
-p, --profile=profile [default: default] configuration profile
-t, --token=token the auth token to use
-y, --yaml use YAML format of input and/or output
--compact use compact table format with no lines between body rows
--expanded use expanded table format with a line between each body row
--indent=indent specify indentation for formatting JSON or YAML output
--language=language ISO language code or "NONE" to not specify a language. Defaults to the OS locale
ALIASES
$ smartthings device-profiles:view
See code: dist/commands/deviceprofiles/view.ts
create a new device profile and device configuration
USAGE
$ smartthings deviceprofiles:view:create
OPTIONS
-d, --dry-run produce JSON but don't actually submit
-h, --help show CLI help
-i, --input=input specify input file
-j, --json use JSON format of input and/or output
-o, --output=output specify output file
-p, --profile=profile [default: default] configuration profile
-t, --token=token the auth token to use
-y, --yaml use YAML format of input and/or output
--compact use compact table format with no lines between body rows
--expanded use expanded table format with a line between each body row
--indent=indent specify indentation for formatting JSON or YAML output
--language=language ISO language code or "NONE" to not specify a language. Defaults to the OS locale
DESCRIPTION
Creates a new device profile and device configuration. Unlike deviceprofiles:create,
this command accepts a consolidated object that can include a device configuration
in a property named "view".
ALIASES
$ smartthings device-profiles:view:create
EXAMPLES
$ smartthings deviceprofiles:view:create -i test.json
This test.json file defines a switch that cannot be controlled by the automations builder:
name: Test Switch
components:
- id: main
capabilities:
- id: switch
view:
dashboard:
states:
- capability: switch
actions:
- capability: switch
detailView:
- capability: switch
automation:
conditions:
- capability: switch
See code: dist/commands/deviceprofiles/view/create.ts
update a device profile and configuration
USAGE
$ smartthings deviceprofiles:view:update [ID]
ARGUMENTS
ID device profile id
OPTIONS
-d, --dry-run produce JSON but don't actually submit
-h, --help show CLI help
-i, --input=input specify input file
-j, --json use JSON format of input and/or output
-o, --output=output specify output file
-p, --profile=profile [default: default] configuration profile
-t, --token=token the auth token to use
-y, --yaml use YAML format of input and/or output
--compact use compact table format with no lines between body rows
--expanded use expanded table format with a line between each body row
--indent=indent specify indentation for formatting JSON or YAML output
--language=language ISO language code or "NONE" to not specify a language. Defaults to the OS locale
DESCRIPTION
Updates a device profile and device configuration and sets the vid of the profile
to the vid of the updated configuration. Unlike deviceprofiles:update this
command accepts a consolidated object that can include a device configuration
in a property named "view".
ALIASES
$ smartthings device-profiles:view:update
EXAMPLES
$ smartthings deviceprofiles:view:update 84042863-0d34-4c5c-b497-808daf230787 -i test.json
This test.json file adds the powerMeter capability to the device and makes it available in
the device detail view but not the rule builder:
components:
- id: main
capabilities:
- id: switch
- id: powerMeter
view:
dashboard:
states:
- capability: switch
actions:
- capability: switch
detailView:
- capability: switch
- capability: powerMeter
automation:
conditions:
- capability: switch
See code: dist/commands/deviceprofiles/view/update.ts
list all devices available in a user account or retrieve a single device
USAGE
$ smartthings devices [ID]
ARGUMENTS
ID device to retrieve; UUID or the number of the device from list
OPTIONS
-C, --capabilities-mode=and|or Treat capability filter query params as a logical "or" or "and" with a
default of "and".
-a, --installed-app-id=installed-app-id filter results by installed app that created the device
-c, --capability=capability filter results by capability
-d, --device-id=device-id filter results by device
-h, --help show CLI help
-j, --json use JSON format of input and/or output
-l, --location-id=location-id filter results by location
-o, --output=output specify output file
-p, --profile=profile [default: default] configuration profile
-t, --token=token the auth token to use
-v, --verbose include location name in output
-y, --yaml use YAML format of input and/or output
--compact use compact table format with no lines between body rows
--expanded use expanded table format with a line between each body row
--indent=indent specify indentation for formatting JSON or YAML output
--language=language ISO language code or "NONE" to not specify a language. Defaults to the OS
locale
See code: dist/commands/devices.ts
get the current status of all of a device capability's attributes
USAGE
$ smartthings devices:capability-status [ID] [COMPONENT] [CAPABILITY]
ARGUMENTS
ID the device id
COMPONENT the component id
CAPABILITY the capability id
OPTIONS
-h, --help show CLI help
-j, --json use JSON format of input and/or output
-o, --output=output specify output file
-p, --profile=profile [default: default] configuration profile
-t, --token=token the auth token to use
-y, --yaml use YAML format of input and/or output
--compact use compact table format with no lines between body rows
--expanded use expanded table format with a line between each body row
--indent=indent specify indentation for formatting JSON or YAML output
--language=language ISO language code or "NONE" to not specify a language. Defaults to the OS locale
See code: dist/commands/devices/capability-status.ts
execute a device command
USAGE
$ smartthings devices:commands [ID] [COMMAND]
ARGUMENTS
ID the device id
COMMAND the command [<component>]:<capability>:<command>([<arguments>])
OPTIONS
-h, --help show CLI help
-i, --input=input specify input file
-j, --json use JSON format of input and/or output
-p, --profile=profile [default: default] configuration profile
-t, --token=token the auth token to use
-y, --yaml use YAML format of input and/or output
--indent=indent specify indentation for formatting JSON or YAML output
--language=language ISO language code or "NONE" to not specify a language. Defaults to the OS locale
See code: dist/commands/devices/commands.ts
get the current status of a device component's attributes
USAGE
$ smartthings devices:component-status [ID] [COMPONENT]
ARGUMENTS
ID the device id
COMPONENT the component id
OPTIONS
-h, --help show CLI help
-j, --json use JSON format of input and/or output
-o, --output=output specify output file
-p, --profile=profile [default: default] configuration profile
-t, --token=token the auth token to use
-y, --yaml use YAML format of input and/or output
--compact use compact table format with no lines between body rows
--expanded use expanded table format with a line between each body row
--indent=indent specify indentation for formatting JSON or YAML output
--language=language ISO language code or "NONE" to not specify a language. Defaults to the OS locale
See code: dist/commands/devices/component-status.ts
delete a device
USAGE
$ smartthings devices:delete [ID]
ARGUMENTS
ID device UUID
OPTIONS
-h, --help show CLI help
-p, --profile=profile [default: default] configuration profile
-t, --token=token the auth token to use
--language=language ISO language code or "NONE" to not specify a language. Defaults to the OS locale
See code: dist/commands/devices/delete.ts
get the current health status of a device
USAGE
$ smartthings devices:health [ID]
ARGUMENTS
ID the device id
OPTIONS
-h, --help show CLI help
-j, --json use JSON format of input and/or output
-o, --output=output specify output file
-p, --profile=profile [default: default] configuration profile
-t, --token=token the auth token to use
-y, --yaml use YAML format of input and/or output
--compact use compact table format with no lines between body rows
--expanded use expanded table format with a line between each body row
--indent=indent specify indentation for formatting JSON or YAML output
--language=language ISO language code or "NONE" to not specify a language. Defaults to the OS locale
See code: dist/commands/devices/health.ts
get the current preferences of a device
USAGE
$ smartthings devices:preferences [ID]
ARGUMENTS
ID the device id
OPTIONS
-h, --help show CLI help
-j, --json use JSON format of input and/or output
-o, --output=output specify output file
-p, --profile=profile [default: default] configuration profile
-t, --token=token the auth token to use
-y, --yaml use YAML format of input and/or output
--compact use compact table format with no lines between body rows
--expanded use expanded table format with a line between each body row
--indent=indent specify indentation for formatting JSON or YAML output
--language=language ISO language code or "NONE" to not specify a language. Defaults to the OS locale
See code: dist/commands/devices/preferences.ts
get a device presentation
USAGE
$ smartthings devices:presentation [ID]
ARGUMENTS
ID the device id or number in the list
OPTIONS
-h, --help show CLI help
-j, --json use JSON format of input and/or output
-o, --output=output specify output file
-p, --profile=profile [default: default] configuration profile
-t, --token=token the auth token to use
-y, --yaml use YAML format of input and/or output
--compact use compact table format with no lines between body rows
--expanded use expanded table format with a line between each body row
--indent=indent specify indentation for formatting JSON or YAML output
--language=language ISO language code or "NONE" to not specify a language. Defaults to the OS locale
See code: dist/commands/devices/presentation.ts
rename a device
USAGE
$ smartthings devices:rename [ID] [LABEL]
ARGUMENTS
ID the device id
LABEL the new device label
OPTIONS
-h, --help show CLI help
-j, --json use JSON format of input and/or output
-o, --output=output specify output file
-p, --profile=profile [default: default] configuration profile
-t, --token=token the auth token to use
-y, --yaml use YAML format of input and/or output
--compact use compact table format with no lines between body rows
--expanded use expanded table format with a line between each body row
--indent=indent specify indentation for formatting JSON or YAML output
--language=language ISO language code or "NONE" to not specify a language. Defaults to the OS locale
See code: dist/commands/devices/rename.ts
get the current status of all of a device's component's attributes
USAGE
$ smartthings devices:status [ID]
ARGUMENTS
ID the device id
OPTIONS
-h, --help show CLI help
-j, --json use JSON format of input and/or output
-o, --output=output specify output file
-p, --profile=profile [default: default] configuration profile
-t, --token=token the auth token to use
-y, --yaml use YAML format of input and/or output
--compact use compact table format with no lines between body rows
--expanded use expanded table format with a line between each body row
--indent=indent specify indentation for formatting JSON or YAML output
--language=language ISO language code or "NONE" to not specify a language. Defaults to the OS locale
See code: dist/commands/devices/status.ts
get the current status of all of a device's component's attributes
USAGE
$ smartthings devices:update [ID]
ARGUMENTS
ID the device id
OPTIONS
-d, --dry-run produce JSON but don't actually submit
-h, --help show CLI help
-i, --input=input specify input file
-j, --json use JSON format of input and/or output
-o, --output=output specify output file
-p, --profile=profile [default: default] configuration profile
-t, --token=token the auth token to use
-y, --yaml use YAML format of input and/or output
--compact use compact table format with no lines between body rows
--expanded use expanded table format with a line between each body row
--indent=indent specify indentation for formatting JSON or YAML output
--language=language ISO language code or "NONE" to not specify a language. Defaults to the OS locale
See code: dist/commands/devices/update.ts
list all channels owned by you or retrieve a single channel
USAGE
$ smartthings edge:channels [IDORINDEX]
ARGUMENTS
IDORINDEX the channel id or number in list
OPTIONS
-h, --help show CLI help
-j, --json use JSON format of input and/or output
-o, --output=output specify output file
-p, --profile=profile [default: default] configuration profile
-t, --token=token the auth token to use
-y, --yaml use YAML format of input and/or output
--compact use compact table format with no lines between body rows
--expanded use expanded table format with a line between each body row
--indent=indent specify indentation for formatting JSON or YAML output
--language=language ISO language code or "NONE" to not specify a language. Defaults to the OS locale
See code: @smartthings/plugin-cli-edge
assign a driver to a channel
USAGE
$ smartthings edge:channels:assign [DRIVERID] [VERSION]
ARGUMENTS
DRIVERID driver id
VERSION driver version
OPTIONS
-C, --channel=channel channel id
-h, --help show CLI help
-p, --profile=profile [default: default] configuration profile
-t, --token=token the auth token to use
--language=language ISO language code or "NONE" to not specify a language. Defaults to the OS locale
ALIASES
$ smartthings edge:drivers:publish
See code: @smartthings/plugin-cli-edge
create a channel
USAGE
$ smartthings edge:channels:create
OPTIONS
-d, --dry-run produce JSON but don't actually submit
-h, --help show CLI help
-i, --input=input specify input file
-j, --json use JSON format of input and/or output
-o, --output=output specify output file
-p, --profile=profile [default: default] configuration profile
-t, --token=token the auth token to use
-y, --yaml use YAML format of input and/or output
--compact use compact table format with no lines between body rows
--expanded use expanded table format with a line between each body row
--indent=indent specify indentation for formatting JSON or YAML output
--language=language ISO language code or "NONE" to not specify a language. Defaults to the OS locale
See code: @smartthings/plugin-cli-edge
delete a channel
USAGE
$ smartthings edge:channels:delete [ID]
ARGUMENTS
ID channel id
OPTIONS
-h, --help show CLI help
-p, --profile=profile [default: default] configuration profile
-t, --token=token the auth token to use
--language=language ISO language code or "NONE" to not specify a language. Defaults to the OS locale
See code: @smartthings/plugin-cli-edge
list all drivers assigned to a given channel
USAGE
$ smartthings edge:channels:drivers [IDORINDEX]
ARGUMENTS
IDORINDEX the channel id or number in list
OPTIONS
-h, --help show CLI help
-j, --json use JSON format of input and/or output
-o, --output=output specify output file
-p, --profile=profile [default: default] configuration profile
-t, --token=token the auth token to use
-y, --yaml use YAML format of input and/or output
--compact use compact table format with no lines between body rows
--expanded use expanded table format with a line between each body row
--indent=indent specify indentation for formatting JSON or YAML output
--language=language ISO language code or "NONE" to not specify a language. Defaults to the OS locale
ALIASES
$ smartthings edge:channels:assignments
See code: @smartthings/plugin-cli-edge
enroll a hub in a channel
USAGE
$ smartthings edge:channels:enroll [HUBID]
ARGUMENTS
HUBID hub id
OPTIONS
-C, --channel=channel channel id
-h, --help show CLI help
-p, --profile=profile [default: default] configuration profile
-t, --token=token the auth token to use
--language=language ISO language code or "NONE" to not specify a language. Defaults to the OS locale
See code: @smartthings/plugin-cli-edge
list all channels a given hub is enrolled in
USAGE
$ smartthings edge:channels:enrollments [IDORINDEX]
ARGUMENTS
IDORINDEX the hub id or number in list
OPTIONS
-h, --help show CLI help
-j, --json use JSON format of input and/or output
-o, --output=output specify output file
-p, --profile=profile [default: default] configuration profile
-t, --token=token the auth token to use
-y, --yaml use YAML format of input and/or output
--compact use compact table format with no lines between body rows
--expanded use expanded table format with a line between each body row
--indent=indent specify indentation for formatting JSON or YAML output
--language=language ISO language code or "NONE" to not specify a language. Defaults to the OS locale
See code: @smartthings/plugin-cli-edge
list invitations or retrieve a single invitation by id or index
USAGE
$ smartthings edge:channels:invites [IDORINDEX]
ARGUMENTS
IDORINDEX the invitation id or number in list
OPTIONS
-C, --channel=channel channel id
-h, --help show CLI help
-j, --json use JSON format of input and/or output
-o, --output=output specify output file
-p, --profile=profile [default: default] configuration profile
-t, --token=token the auth token to use
-y, --yaml use YAML format of input and/or output
--compact use compact table format with no lines between body rows
--expanded use expanded table format with a line between each body row
--indent=indent specify indentation for formatting JSON or YAML output
--language=language ISO language code or "NONE" to not specify a language. Defaults to the OS locale
ALIASES
$ smartthings edge:channels:invitations
EXAMPLES
smartthings edge:channels:invites # list all invites on all channels you own
smartthings edge:channels:invites 2 # list details about the second invite show when listed as in the
example above
smartthings edge:channels:invites -C <channel id> # list all invites on channel with id <channel id>
smartthings edge:channels:invites <invite id> # list details about the invite with id <invite id>
See code: @smartthings/plugin-cli-edge
accept a channel invitation
USAGE
$ smartthings edge:channels:invites:accept ID
ARGUMENTS
ID invite UUID
OPTIONS
-h, --help show CLI help
-p, --profile=profile [default: default] configuration profile
-t, --token=token the auth token to use
--language=language ISO language code or "NONE" to not specify a language. Defaults to the OS locale
ALIASES
$ smartthings edge:channels:invitations:accept
See code: @smartthings/plugin-cli-edge
create an invitation
USAGE
$ smartthings edge:channels:invites:create
OPTIONS
-d, --dry-run produce JSON but don't actually submit
-h, --help show CLI help
-i, --input=input specify input file
-j, --json use JSON format of input and/or output
-o, --output=output specify output file
-p, --profile=profile [default: default] configuration profile
-t, --token=token the auth token to use
-y, --yaml use YAML format of input and/or output
--compact use compact table format with no lines between body rows
--expanded use expanded table format with a line between each body row
--indent=indent specify indentation for formatting JSON or YAML output
--language=language ISO language code or "NONE" to not specify a language. Defaults to the OS locale
ALIASES
$ smartthings edge:channels:invitations:create
See code: @smartthings/plugin-cli-edge
delete a channel invitation
USAGE
$ smartthings edge:channels:invites:delete [ID]
ARGUMENTS
ID invitation UUID
OPTIONS
-C, --channel=channel channel id
-h, --help show CLI help
-p, --profile=profile [default: default] configuration profile
-t, --token=token the auth token to use
--language=language ISO language code or "NONE" to not specify a language. Defaults to the OS locale
ALIASES
$ smartthings edge:channels:invitations:revoke
$ smartthings edge:channels:invitations:delete
$ smartthings edge:channels:invites:revoke
See code: @smartthings/plugin-cli-edge
remove a driver from a channel
USAGE
$ smartthings edge:channels:unassign [DRIVERID]
ARGUMENTS
DRIVERID driver id
OPTIONS
-C, --channel=channel channel id
-h, --help show CLI help
-p, --profile=profile [default: default] configuration profile
-t, --token=token the auth token to use
--language=language ISO language code or "NONE" to not specify a language. Defaults to the OS locale
ALIASES
$ smartthings edge:drivers:unpublish
See code: @smartthings/plugin-cli-edge
unenroll a hub from a channel
USAGE
$ smartthings edge:channels:unenroll [HUBID]
ARGUMENTS
HUBID hub id
OPTIONS
-C, --channel=channel channel id
-h, --help show CLI help
-p, --profile=profile [default: default] configuration profile
-t, --token=token the auth token to use
--language=language ISO language code or "NONE" to not specify a language. Defaults to the OS locale
See code: @smartthings/plugin-cli-edge
update a channel
USAGE
$ smartthings edge:channels:update [ID]
ARGUMENTS
ID the channel id
OPTIONS
-d, --dry-run produce JSON but don't actually submit
-h, --help show CLI help
-i, --input=input specify input file
-j, --json use JSON format of input and/or output
-o, --output=output specify output file
-p, --profile=profile [default: default] configuration profile
-t, --token=token the auth token to use
-y, --yaml use YAML format of input and/or output
--compact use compact table format with no lines between body rows
--expanded use expanded table format with a line between each body row
--indent=indent specify indentation for formatting JSON or YAML output
--language=language ISO language code or "NONE" to not specify a language. Defaults to the OS locale
See code: @smartthings/plugin-cli-edge
list all drivers available in a user account or retrieve a single driver
USAGE
$ smartthings edge:drivers [IDORINDEX]
ARGUMENTS
IDORINDEX the driver id or number in list
OPTIONS
-h, --help show CLI help
-j, --json use JSON format of input and/or output
-o, --output=output specify output file
-p, --profile=profile [default: default] configuration profile
-t, --token=token the auth token to use
-y, --yaml use YAML format of input and/or output
--compact use compact table format with no lines between body rows
--expanded use expanded table format with a line between each body row
--indent=indent specify indentation for formatting JSON or YAML output
--language=language ISO language code or "NONE" to not specify a language. Defaults to the OS locale
See code: @smartthings/plugin-cli-edge
delete an edge driver
USAGE
$ smartthings edge:drivers:delete [ID]
ARGUMENTS
ID driver UUID
OPTIONS
-h, --help show CLI help
-p, --profile=profile [default: default] configuration profile
-t, --token=token the auth token to use
--language=language ISO language code or "NONE" to not specify a language. Defaults to the OS locale
See code: @smartthings/plugin-cli-edge
install an edge driver onto a hub
USAGE
$ smartthings edge:drivers:install [DRIVERID]
ARGUMENTS
DRIVERID id of driver to install
OPTIONS
-C, --channel=channel channel id
-H, --hub=hub hub id
-h, --help show CLI help
-p, --profile=profile [default: default] configuration profile
-t, --token=token the auth token to use
--language=language ISO language code or "NONE" to not specify a language. Defaults to the OS locale
EXAMPLES
smartthings edge:drivers:install # use Q&A format to enter required values
smartthings edge:drivers:install -H <hub-id> # specify the hub on the command line, other
fields will be asked for
smartthings edge:drivers:install -H <hub-id> -C <channel-id> <driver-id> # install a driver from a channel on an
enrolled hub
See code: @smartthings/plugin-cli-edge
list all drivers installed on a given hub
USAGE
$ smartthings edge:drivers:installed [IDORINDEX]
ARGUMENTS
IDORINDEX the driver id or number in list
OPTIONS
-H, --hub=hub hub id
-h, --help show CLI help
-j, --json use JSON format of input and/or output
-o, --output=output specify output file
-p, --profile=profile [default: default] configuration profile
-t, --token=token the auth token to use
-y, --yaml use YAML format of input and/or output
--compact use compact table format with no lines between body rows
--expanded use expanded table format with a line between each body row
--indent=indent specify indentation for formatting JSON or YAML output
--language=language ISO language code or "NONE" to not specify a language. Defaults to the OS locale
See code: @smartthings/plugin-cli-edge
stream logs from installed drivers
USAGE
$ smartthings edge:drivers:logcat [DRIVERID]
ARGUMENTS
DRIVERID a specific driver to stream logs from
OPTIONS
-a, --all stream from all installed drivers
-h, --help show CLI help
-p, --profile=profile [default: default] configuration profile
-t, --token=token the auth token to use
--hub-address=hub-address IPv4 address of hub with optionally appended port number
--language=language ISO language code or "NONE" to not specify a language. Defaults to the OS locale
See code: @smartthings/plugin-cli-edge
build and upload an edge package
USAGE
$ smartthings edge:drivers:package [PROJECTDIRECTORY]
ARGUMENTS
PROJECTDIRECTORY [default: .] directory containing project to upload
OPTIONS
-I, --install prompt for hub to install to after assigning it to the channel, implies --assign if
--assign or --channel not included
-a, --assign prompt for a channel to assign the driver to after upload
-b, --build-only=build-only save package to specified zip file but skip upload
-h, --help show CLI help
-j, --json use JSON format of input and/or output
-o, --output=output specify output file
-p, --profile=profile [default: default] configuration profile
-t, --token=token the auth token to use
-u, --upload=upload upload zip file previously built with --build flag
-y, --yaml use YAML format of input and/or output
--channel=channel automatically assign driver to specified channel after upload
--compact use compact table format with no lines between body rows
--expanded use expanded table format with a line between each body row
--hub=hub automatically install driver to specified hub, implies --assign if --assign or --channel
not included
--indent=indent specify indentation for formatting JSON or YAML output
--language=language ISO language code or "NONE" to not specify a language. Defaults to the OS locale
EXAMPLE
# build and upload driver found in current directory:
$ smartthings edge:drivers:package
# build and upload driver found in current directory:
$ smartthings edge:drivers:package
# build and upload driver found in current directory, assign it to a channel, and install it;
# user will be prompted for channel and hub
$ smartthings edge:drivers:package -I
# build and upload driver found in current directory then assign it to the specified channel
# and install it to the specified hub
$ smartthings edge:drivers:package --channel <channel-id> --hub <hubId>
# build and upload driver found in the my-driver directory
$ smartthings edge:drivers:package my-driver
# build the driver in the my-package directory and save it as driver.zip
$ smartthings edge:drivers:package -b driver.zip my-package
# upload the previously built driver found in driver.zip
$ smartthings edge:drivers:package -u driver.zip
See code: @smartthings/plugin-cli-edge
uninstall an edge driver from a hub
USAGE
$ smartthings edge:drivers:uninstall [DRIVERID]
ARGUMENTS
DRIVERID id of driver to uninstall
OPTIONS
-H, --hub=hub hub id
-h, --help show CLI help
-p, --profile=profile [default: default] configuration profile
-t, --token=token the auth token to use
--language=language ISO language code or "NONE" to not specify a language. Defaults to the OS locale
See code: @smartthings/plugin-cli-edge
generate a Java starter app
USAGE
$ smartthings generate:java
OPTIONS
-h, --help show CLI help
-p, --profile=profile [default: default] configuration profile
See code: dist/commands/generate/java.ts
generate a NodeJS starter app
USAGE
$ smartthings generate:node
OPTIONS
-h, --help show CLI help
-p, --profile=profile [default: default] configuration profile
See code: dist/commands/generate/node.ts
display help for smartthings
USAGE
$ smartthings help [COMMAND]
ARGUMENTS
COMMAND command to show help for
OPTIONS
--all see all commands in CLI
See code: @oclif/plugin-help
get a specific app or a list of apps
USAGE
$ smartthings installedapps [ID]
ARGUMENTS
ID the app id
OPTIONS
-h, --help show CLI help
-j, --json use JSON format of input and/or output
-l, --location-id=location-id filter results by location
-o, --output=output specify output file
-p, --profile=profile [default: default] configuration profile
-t, --token=token the auth token to use
-v, --verbose include location name in output
-y, --yaml use YAML format of input and/or output
--compact use compact table format with no lines between body rows
--expanded use expanded table format with a line between each body row
--indent=indent specify indentation for formatting JSON or YAML output
--language=language ISO language code or "NONE" to not specify a language. Defaults to the OS locale
See code: dist/commands/installedapps.ts
delete the installed app instance
USAGE
$ smartthings installedapps:delete [ID]
ARGUMENTS
ID installed app UUID
OPTIONS
-h, --help show CLI help
-l, --location-id=location-id filter results by location
-p, --profile=profile [default: default] configuration profile
-t, --token=token the auth token to use
-v, --verbose include location name in output
--language=language ISO language code or "NONE" to not specify a language. Defaults to the OS locale
See code: dist/commands/installedapps/delete.ts
renamed an installed app instance
USAGE
$ smartthings installedapps:rename [ID] [NAME]
ARGUMENTS
ID the installed app id
NAME the new installed app name
OPTIONS
-h, --help show CLI help
-j, --json use JSON format of input and/or output
-l, --location-id=location-id filter results by location
-o, --output=output specify output file
-p, --profile=profile [default: default] configuration profile
-t, --token=token the auth token to use
-v, --verbose include location name in output
-y, --yaml use YAML format of input and/or output
--compact use compact table format with no lines between body rows
--expanded use expanded table format with a line between each body row
--indent=indent specify indentation for formatting JSON or YAML output
--language=language ISO language code or "NONE" to not specify a language. Defaults to the OS locale
See code: dist/commands/installedapps/rename.ts
get a specific schema connector instance or a list of instances
USAGE
$ smartthings installedschema [ID]
ARGUMENTS
ID the isa id
OPTIONS
-h, --help show CLI help
-j, --json use JSON format of input and/or output
-l, --location-id=location-id filter results by location
-o, --output=output specify output file
-p, --profile=profile [default: default] configuration profile
-t, --token=token the auth token to use
-v, --verbose include location name in output
-y, --yaml use YAML format of input and/or output
--compact use compact table format with no lines between body rows
--expanded use expanded table format with a line between each body row
--indent=indent specify indentation for formatting JSON or YAML output
--language=language ISO language code or "NONE" to not specify a language. Defaults to the OS locale
See code: dist/commands/installedschema.ts
delete the installed schema connector instance
USAGE
$ smartthings installedschema:delete [ID]
ARGUMENTS
ID installed schema connector UUID
OPTIONS
-h, --help show CLI help
-l, --location-id=location-id filter results by location
-p, --profile=profile [default: default] configuration profile
-t, --token=token the auth token to use
-v, --verbose include location name in output
--language=language ISO language code or "NONE" to not specify a language. Defaults to the OS locale
See code: dist/commands/installedschema/delete.ts
list locations or get information for a specific Location
USAGE
$ smartthings locations [IDORINDEX]
ARGUMENTS
IDORINDEX the location id or number in list
OPTIONS
-h, --help show CLI help
-j, --json use JSON format of input and/or output
-o, --output=output specify output file
-p, --profile=profile [default: default] configuration profile
-t, --token=token the auth token to use
-y, --yaml use YAML format of input and/or output
--compact use compact table format with no lines between body rows
--expanded use expanded table format with a line between each body row
--indent=indent specify indentation for formatting JSON or YAML output
--language=language ISO language code or "NONE" to not specify a language. Defaults to the OS locale
See code: dist/commands/locations.ts
create a Location for a user
USAGE
$ smartthings locations:create
OPTIONS
-d, --dry-run produce JSON but don't actually submit
-h, --help show CLI help
-i, --input=input specify input file
-j, --json use JSON format of input and/or output
-o, --output=output specify output file
-p, --profile=profile [default: default] configuration profile
-t, --token=token the auth token to use
-y, --yaml use YAML format of input and/or output
--compact use compact table format with no lines between body rows
--expanded use expanded table format with a line between each body row
--indent=indent specify indentation for formatting JSON or YAML output
--language=language ISO language code or "NONE" to not specify a language. Defaults to the OS locale
See code: dist/commands/locations/create.ts
delete a location
USAGE
$ smartthings locations:delete [ID]
ARGUMENTS
ID location id
OPTIONS
-h, --help show CLI help
-p, --profile=profile [default: default] configuration profile
-t, --token=token the auth token to use
--language=language ISO language code or "NONE" to not specify a language. Defaults to the OS locale
EXAMPLES
$ smartthings locations:delete # choose the location to delete from a list
$ smartthings locations:delete my-location-id # delete the location with the specified id
See code: dist/commands/locations/delete.ts
list rooms or get information for a specific room
USAGE
$ smartthings locations:rooms [IDORINDEX]
ARGUMENTS
IDORINDEX room UUID or index
OPTIONS
-h, --help show CLI help
-j, --json use JSON format of input and/or output
-l, --location-id=location-id a specific location to query
-o, --output=output specify output file
-p, --profile=profile [default: default] configuration profile
-t, --token=token the auth token to use
-y, --yaml use YAML format of input and/or output
--compact use compact table format with no lines between body rows
--expanded use expanded table format with a line between each body row
--indent=indent specify indentation for formatting JSON or YAML output
--language=language ISO language code or "NONE" to not specify a language. Defaults to the OS locale
ALIASES
$ smartthings rooms
See code: dist/commands/locations/rooms.ts
create a room
USAGE
$ smartthings locations:rooms:create
OPTIONS
-d, --dry-run produce JSON but don't actually submit
-h, --help show CLI help
-i, --input=input specify input file
-j, --json use JSON format of input and/or output
-l, --location-id=location-id a specific location to query
-o, --output=output specify output file
-p, --profile=profile [default: default] configuration profile
-t, --token=token the auth token to use
-y, --yaml use YAML format of input and/or output
--compact use compact table format with no lines between body rows
--expanded use expanded table format with a line between each body row
--indent=indent specify indentation for formatting JSON or YAML output
--language=language ISO language code or "NONE" to not specify a language. Defaults to the OS locale
ALIASES
$ smartthings rooms:create
See code: dist/commands/locations/rooms/create.ts
delete a room
USAGE
$ smartthings locations:rooms:delete [ID]
ARGUMENTS
ID room UUID
OPTIONS
-h, --help show CLI help
-l, --location-id=location-id a specific location to query
-p, --profile=profile [default: default] configuration profile
-t, --token=token the auth token to use
--language=language ISO language code or "NONE" to not specify a language. Defaults to the OS locale
ALIASES
$ smartthings rooms:delete
See code: dist/commands/locations/rooms/delete.ts
update a room
USAGE
$ smartthings locations:rooms:update [ID]
ARGUMENTS
ID room UUID
OPTIONS
-d, --dry-run produce JSON but don't actually submit
-h, --help show CLI help
-i, --input=input specify input file
-j, --json use JSON format of input and/or output
-l, --location-id=location-id a specific location to query
-o, --output=output specify output file
-p, --profile=profile [default: default] configuration profile
-t, --token=token the auth token to use
-y, --yaml use YAML format of input and/or output
--compact use compact table format with no lines between body rows
--expanded use expanded table format with a line between each body row
--indent=indent specify indentation for formatting JSON or YAML output
--language=language ISO language code or "NONE" to not specify a language. Defaults to the OS locale
ALIASES
$ smartthings rooms:update
See code: dist/commands/locations/rooms/update.ts
update a location
USAGE
$ smartthings locations:update [ID]
ARGUMENTS
ID the location id
OPTIONS
-d, --dry-run produce JSON but don't actually submit
-h, --help show CLI help
-i, --input=input specify input file
-j, --json use JSON format of input and/or output
-o, --output=output specify output file
-p, --profile=profile [default: default] configuration profile
-t, --token=token the auth token to use
-y, --yaml use YAML format of input and/or output
--compact use compact table format with no lines between body rows
--expanded use expanded table format with a line between each body row
--indent=indent specify indentation for formatting JSON or YAML output
--language=language ISO language code or "NONE" to not specify a language. Defaults to the OS locale
See code: dist/commands/locations/update.ts
USAGE
$ smartthings logout
OPTIONS
-h, --help show CLI help
-p, --profile=profile [default: default] configuration profile
-t, --token=token the auth token to use
--language=language ISO language code or "NONE" to not specify a language. Defaults to the OS locale
See code: dist/commands/logout.ts
list installed plugins
USAGE
$ smartthings plugins
OPTIONS
--core show core plugins
EXAMPLE
$ smartthings plugins
See code: @oclif/plugin-plugins
displays installation properties of a plugin
USAGE
$ smartthings plugins:inspect PLUGIN...
ARGUMENTS
PLUGIN [default: .] plugin to inspect
OPTIONS
-h, --help show CLI help
-v, --verbose
EXAMPLE
$ smartthings plugins:inspect myplugin
See code: @oclif/plugin-plugins
installs a plugin into the CLI
USAGE
$ smartthings plugins:install PLUGIN...
ARGUMENTS
PLUGIN plugin to install
OPTIONS
-f, --force yarn install with force flag
-h, --help show CLI help
-v, --verbose
DESCRIPTION
Can be installed from npm or a git url.
Installation of a user-installed plugin will override a core plugin.
e.g. If you have a core plugin that has a 'hello' command, installing a user-installed plugin with a 'hello' command
will override the core plugin implementation. This is useful if a user needs to update core plugin functionality in
the CLI without the need to patch and update the whole CLI.
ALIASES
$ smartthings plugins:add
EXAMPLES
$ smartthings plugins:install myplugin
$ smartthings plugins:install https://github.com/someuser/someplugin
$ smartthings plugins:install someuser/someplugin
See code: @oclif/plugin-plugins
links a plugin into the CLI for development
USAGE
$ smartthings plugins:link PLUGIN
ARGUMENTS
PATH [default: .] path to plugin
OPTIONS
-h, --help show CLI help
-v, --verbose
DESCRIPTION
Installation of a linked plugin will override a user-installed or core plugin.
e.g. If you have a user-installed or core plugin that has a 'hello' command, installing a linked plugin with a 'hello'
command will override the user-installed or core plugin implementation. This is useful for development work.
EXAMPLE
$ smartthings plugins:link myplugin
See code: @oclif/plugin-plugins
removes a plugin from the CLI
USAGE
$ smartthings plugins:uninstall PLUGIN...
ARGUMENTS
PLUGIN plugin to uninstall
OPTIONS
-h, --help show CLI help
-v, --verbose
ALIASES
$ smartthings plugins:unlink
$ smartthings plugins:remove
See code: @oclif/plugin-plugins
update installed plugins
USAGE
$ smartthings plugins:update
OPTIONS
-h, --help show CLI help
-v, --verbose
See code: @oclif/plugin-plugins
query device presentation by vid
USAGE
$ smartthings presentation PRESENTATIONID [MANUFACTURERNAME]
ARGUMENTS
PRESENTATIONID system generated identifier that corresponds to a device presentation
MANUFACTURERNAME manufacturer name. Defaults to SmartThingsCommunity
OPTIONS
-h, --help show CLI help
-j, --json use JSON format of input and/or output
-o, --output=output specify output file
-p, --profile=profile [default: default] configuration profile
-t, --token=token the auth token to use
-y, --yaml use YAML format of input and/or output
--compact use compact table format with no lines between body rows
--expanded use expanded table format with a line between each body row
--indent=indent specify indentation for formatting JSON or YAML output
--language=language ISO language code or "NONE" to not specify a language. Defaults to the OS locale
EXAMPLES
$ smartthings presentation fd4adb7f-4a23-4134-9b39-05ed889a03cf
$ smartthings presentation 4ea31e30-2aba-41c7-a3ec-8f97423d565a SmartThings
$ smartthings presentation fd4adb7f-4a23-4134-9b39-05ed889a03cf --language=ko
$ smartthings presentation fd4adb7f-4a23-4134-9b39-05ed889a03cf --language=NONE
Specifying only the presentationId defaults to the "SmartThingsCommunity" manufacturer
name and the language set for the computer's operating system. The language can be
overridden by specifying an ISO language code. If "NONE" is specified for the language
flag then no language header is specified in the API request
See code: dist/commands/presentation.ts
query device config by presentationId
USAGE
$ smartthings presentation:device-config PRESENTATIONID [MANUFACTURERNAME]
ARGUMENTS
PRESENTATIONID system generated identifier that corresponds to a device presentation
MANUFACTURERNAME manufacturer name. Defaults to SmartThingsCommunity
OPTIONS
-h, --help show CLI help
-j, --json use JSON format of input and/or output
-o, --output=output specify output file
-p, --profile=profile [default: default] configuration profile
-t, --token=token the auth token to use
-y, --yaml use YAML format of input and/or output
--compact use compact table format with no lines between body rows
--expanded use expanded table format with a line between each body row
--indent=indent specify indentation for formatting JSON or YAML output
--language=language ISO language code or "NONE" to not specify a language. Defaults to the OS locale
See code: dist/commands/presentation/device-config.ts
create a device config
USAGE
$ smartthings presentation:device-config:create
OPTIONS
-d, --dry-run produce JSON but don't actually submit
-h, --help show CLI help
-i, --input=input specify input file
-j, --json use JSON format of input and/or output
-o, --output=output specify output file
-p, --profile=profile [default: default] configuration profile
-t, --token=token the auth token to use
-y, --yaml use YAML format of input and/or output
--compact use compact table format with no lines between body rows
--expanded use expanded table format with a line between each body row
--indent=indent specify indentation for formatting JSON or YAML output
--language=language ISO language code or "NONE" to not specify a language. Defaults to the OS locale
See code: dist/commands/presentation/device-config/create.ts
generate the default device configuration
USAGE
$ smartthings presentation:device-config:generate ID
ARGUMENTS
ID the profile id (or legacy DTH id))
OPTIONS
-h, --help show CLI help
-j, --json use JSON format of input and/or output
-o, --output=output specify output file
-p, --profile=profile [default: default] configuration profile
-t, --token=token the auth token to use
-y, --yaml use YAML format of input and/or output
--compact use compact table format with no lines between body rows
--dth generate from legacy DTH id instead of a profile id
--expanded use expanded table format with a line between each body row
--indent=indent specify indentation for formatting JSON or YAML output
--language=language ISO language code or "NONE" to not specify a language. Defaults to the OS locale
--type-shard-id=type-shard-id data management shard Id where the device type resides, only useful for legacy DTH type
integrations
See code: dist/commands/presentation/device-config/generate.ts
get a specific rule
USAGE
$ smartthings rules [IDORINDEX]
ARGUMENTS
IDORINDEX rule UUID or index
OPTIONS
-h, --help show CLI help
-j, --json use JSON format of input and/or output
-l, --location-id=location-id a specific location to query
-o, --output=output specify output file
-p, --profile=profile [default: default] configuration profile
-t, --token=token the auth token to use
-y, --yaml use YAML format of input and/or output
--compact use compact table format with no lines between body rows
--expanded use expanded table format with a line between each body row
--indent=indent specify indentation for formatting JSON or YAML output
--language=language ISO language code or "NONE" to not specify a language. Defaults to the OS locale
See code: dist/commands/rules.ts
create a rule
USAGE
$ smartthings rules:create
OPTIONS
-d, --dry-run produce JSON but don't actually submit
-h, --help show CLI help
-i, --input=input specify input file
-j, --json use JSON format of input and/or output
-l, --location-id=location-id a specific location to query
-o, --output=output specify output file
-p, --profile=profile [default: default] configuration profile
-t, --token=token the auth token to use
-y, --yaml use YAML format of input and/or output
--compact use compact table format with no lines between body rows
--expanded use expanded table format with a line between each body row
--indent=indent specify indentation for formatting JSON or YAML output
--language=language ISO language code or "NONE" to not specify a language. Defaults to the OS locale
See code: dist/commands/rules/create.ts
delete a rule
USAGE
$ smartthings rules:delete [ID]
ARGUMENTS
ID rule UUID
OPTIONS
-h, --help show CLI help
-l, --location-id=location-id a specific location to query
-p, --profile=profile [default: default] configuration profile
-t, --token=token the auth token to use
--language=language ISO language code or "NONE" to not specify a language. Defaults to the OS locale
See code: dist/commands/rules/delete.ts
update a rule
USAGE
$ smartthings rules:update [ID]
ARGUMENTS
ID rule UUID
OPTIONS
-d, --dry-run produce JSON but don't actually submit
-h, --help show CLI help
-i, --input=input specify input file
-j, --json use JSON format of input and/or output
-l, --location-id=location-id a specific location to query
-o, --output=output specify output file
-p, --profile=profile [default: default] configuration profile
-t, --token=token the auth token to use
-y, --yaml use YAML format of input and/or output
--compact use compact table format with no lines between body rows
--expanded use expanded table format with a line between each body row
--indent=indent specify indentation for formatting JSON or YAML output
--language=language ISO language code or "NONE" to not specify a language. Defaults to the OS locale
See code: dist/commands/rules/update.ts
list all ST Schema Apps currently available in a user account
USAGE
$ smartthings schema [ID]
ARGUMENTS
ID the schema connector id
OPTIONS
-h, --help show CLI help
-j, --json use JSON format of input and/or output
-o, --output=output specify output file
-p, --profile=profile [default: default] configuration profile
-t, --token=token the auth token to use
-v, --verbose include ARN in output
-y, --yaml use YAML format of input and/or output
--compact use compact table format with no lines between body rows
--expanded use expanded table format with a line between each body row
--indent=indent specify indentation for formatting JSON or YAML output
--language=language ISO language code or "NONE" to not specify a language. Defaults to the OS locale
See code: dist/commands/schema.ts
authorize calls to your ST Schema Lambda function from SmartThings
USAGE
$ smartthings schema:authorize ARN
ARGUMENTS
ARN the ARN of the AWS Lambda function
OPTIONS
-h, --help show CLI help
-p, --profile=profile [default: default] configuration profile
--principal=principal use this principal instead of the default when authorizing lambda functions
--statement-id=statement-id use this statement id instead of the default when authorizing lambda functions
EXAMPLES
$ smartthings schema:authorize arn:aws:lambda:us-east-1:1234567890:function:your-test-app
Note that this command is the same as running the following with the AWS CLI:
$ aws lambda add-permission --region us-east-1 \
--function-name arn:aws:lambda:us-east-1:1234567890:function:your-test-app \
--statement-id smartthings --principal 148790070172 --action lambda:InvokeFunction
It requires your machine to be configured to run the AWS CLI
See code: dist/commands/schema/authorize.ts
create an ST Schema connector
USAGE
$ smartthings schema:create
OPTIONS
-d, --dry-run produce JSON but don't actually submit
-h, --help show CLI help
-i, --input=input specify input file
-j, --json use JSON format of input and/or output
-o, --output=output specify output file
-p, --profile=profile [default: default] configuration profile
-t, --token=token the auth token to use
-y, --yaml use YAML format of input and/or output
--authorize authorize connector's Lambda functions to be called by SmartThings
--compact use compact table format with no lines between body rows
--expanded use expanded table format with a line between each body row
--indent=indent specify indentation for formatting JSON or YAML output
--language=language ISO language code or "NONE" to not specify a language. Defaults to the OS locale
--principal=principal use this principal instead of the default when authorizing lambda functions
--statement-id=statement-id use this statement id instead of the default when authorizing lambda functions
See code: dist/commands/schema/create.ts
delete the ST Schema connector
USAGE
$ smartthings schema:delete [ID]
ARGUMENTS
ID schema app id
OPTIONS
-h, --help show CLI help
-p, --profile=profile [default: default] configuration profile
-t, --token=token the auth token to use
--language=language ISO language code or "NONE" to not specify a language. Defaults to the OS locale
See code: dist/commands/schema/delete.ts
Regenerate the clientId and clientSecret of the ST Schema connector. The previous values will be invalidated, which may affect existing installations.
USAGE
$ smartthings schema:regenerate [ID]
ARGUMENTS
ID schema app id
OPTIONS
-h, --help show CLI help
-j, --json use JSON format of input and/or output
-o, --output=output specify output file
-p, --profile=profile [default: default] configuration profile
-t, --token=token the auth token to use
-y, --yaml use YAML format of input and/or output
--compact use compact table format with no lines between body rows
--expanded use expanded table format with a line between each body row
--indent=indent specify indentation for formatting JSON or YAML output
--language=language ISO language code or "NONE" to not specify a language. Defaults to the OS locale
See code: dist/commands/schema/regenerate.ts
update an ST Schema connector
USAGE
$ smartthings schema:update [ID]
ARGUMENTS
ID the app id
OPTIONS
-h, --help show CLI help
-i, --input=input specify input file
-j, --json use JSON format of input and/or output
-p, --profile=profile [default: default] configuration profile
-t, --token=token the auth token to use
-y, --yaml use YAML format of input and/or output
--authorize authorize Lambda functions to be called by SmartThings
--indent=indent specify indentation for formatting JSON or YAML output
--language=language ISO language code or "NONE" to not specify a language. Defaults to the OS locale
--principal=principal use this principal instead of the default when authorizing lambda functions
--statement-id=statement-id use this statement id instead of the default when authorizing lambda functions
See code: dist/commands/schema/update.ts
More details about configuration and logging in the CLI can be found on the configuration documentation page.
This is the monorepo for the SmartThings CLI. Currently, the following packages are included:
- cli - the CLI itself; @smartthings/cli node package
- lib - a library for use in the CLI and its extensions; @smartthings/cli-lib node package
- testlib - a library for use in the CLI and its extensions with utility methods to make testing with Jest easier; @smartthings/cli-testlib node package
The CLI uses lerna to manage multiple packages in a monorepo. Dependencies are hoisted during bootstrap by default.
To disable this, modify the following in lerna.json
.
"command": {
"bootstrap": {
"hoist": false
}
The CLI depends on the SmartThings Core SDK. To use a pre-release version for testing purposes, you'll need to make any required changes in both checked out repositories and then:
- Be sure you're using at least NodeJS version 12.
- In the root directory of the SDK
- run
npm install
. - run
npm link
. If you're using a globally-installed version of node, you might need to run this with admin privileges.
- run
- Install lerna globally with
npm -g i lerna
. (Alternatively, you can usenpx lerna
below instead of simplylerna
.) - In the in the root directory of the CLI repository run
./bootstrap.sh --reset --link-sdk
. - The bootstrap script will compile the CLI but you can:
- run
lerna run compile
to compile again, or - run
lerna run watch
to watch for changes and compile on the fly, or - run
lerna run build
to clean and compile
- run
- To run the CLI, run the
run
command in packages/cli/bin. You can create a link to this file to make it easier to run. Since the final installed name will be "smartthings", that's a good name for the link. For example:ln -s ~/mydevdir/smartthings-cli/packages/cli/bin/run ~/bin/smartthings
There is also a full_clean.sh
script you can run to start over again. This is
sometimes helpful when pulling new code.
Before opening a pull request be sure to:
- Run eslint via
lerna run lint
- Run tests with
lerna run test
- If you've added or or removed commands or updated any of their arguments
or flags, be sure to update the readme. Doing a full build via
lerna run build
will do this but you can also runlerna run readme
.