The device will be verified and its generation/model auto-detected
unless –no-verify is specified.
The name is used as a friendly identifier for the device in other commands.
Names with spaces will be normalized to dashes (e.g., “Master Bathroom”
becomes “master-bathroom” as the key).
Credentials for a password-protected device are stored with the device and
used by every command run after it. Give them as –password (the user
defaults to admin, the user Shelly devices use), as –password-stdin to keep
the password out of the shell history, or as –auth user:pass. When the device
has authentication enabled the credentials are checked against it first, and
a device that rejects them is not added. –no-verify skips that check.
A name that is already registered is refused unless –force is given, which
replaces the registration (address, credentials, platform, model). Aliases
of the replaced device are kept.
–platform registers a device managed by a plugin, such as tasmota for the
shelly-tasmota plugin. The plugin’s detect hook verifies the device instead
of the Shelly API.
--auth string Authentication credentials (user:pass)
-f, --force Replace an existing device of the same name
-g, --generation int Device generation (auto-detected if omitted)
-h, --help help for add
--no-verify Skip the connectivity check, auto-detection and the credentials check
--password string Device password
--password-stdin Read the device password from stdin
--platform string Device platform managed by a plugin (e.g. tasmota); default shelly
--user string Username for --password or --password-stdin (default admin)
--config string Config file (default $HOME/.config/shelly/config.yaml)
-F, --fields Print available field names for use with --jq and --template
-Q, --jq stringArray Apply jq expression to filter output (repeatable, joined with |)
--log-categories string Filter logs by category (comma-separated: network,api,device,config,auth,plugin)
--log-json Output logs in JSON format
--no-color Disable colored output
--no-headers Hide table headers in output
--offline Only read from cache, error on cache miss
-o, --output string Output format (table, json, yaml, template) (default "table")
--plain Disable borders and colors (machine-readable output)
-q, --quiet Suppress non-essential output
--raw Print the exact device response(s) as a JSON array and suppress normal output
--refresh Bypass cache and fetch fresh data from device
--template string Go template string for output (use with -o template)
-v, --verbose count Increase verbosity (-v=info, -vv=debug, -vvv=trace)