System
The system component provides information about general device status, resource usage, availability of firmware updates, etc.
The system component can be used to configure aspects of the device behavior:
- log streaming over websocket, UDP or serial port. Logs can provide valuable insight about firmware behavior and enable debugging;
- UDP RPC channel availability, useful in some integration scenarios;
- Local timezone and geolocation, used for scheduling and sunrise/sunset event time calculation;
- Experimental ECO Mode, which, when enabled throttles CPU speed and enables low-power mode for the WiFi radio when possible. This can signifficantly decrease power consumption, but may increase latency.
It also facilitates backing up and restoring device settings as well as changing the factory defaults.
Backup and default configuration are available on all Gen3 and Gen4 devices, and on Gen2 devices still in active production (see Firmware Update Policy). They are not available on Shelly Plus Uni, Shelly Plus RGBW PM, Shelly EM Gen4 (Zigbee firmware) and Shelly 2PM Gen4 (Zigbee firmware), where there is not enough free flash space to include them.
The system component uses Sys as RPC namespace. It handles the system services of a device and provides the methods:
Sys.GetConfigto obtain the component's configurationSys.SetConfigto update the component's configurationSys.GetStatusto obtain the component's statusSys.SetTimeto set system time settimeSys.StartDiscoveryto start an mDNS scan for other Shelly devices on the local networkSys.StopDiscoveryto stop an in-progress scanSys.CreateBackupto create a downloadable backup of the device setupSys.DownloadBackupto read chunks of a previously created backupSys.UploadBackupto upload a backup archive in chunksSys.RestoreBackupto restore a previously uploaded backupSys.CreateDefaultConfigto make the current setup the factory defaultSys.UploadDefaultConfigto upload a default-configuration archive in chunksSys.ApplyDefaultConfigto commit a previously uploaded default configurationSys.ClearDefaultConfigto clear the installed default configuration
It uses the key sys when enumerated in objects including multiple component payloads, like Shelly.GetStatus.
Methods
Sys.SetConfig
Parameters:
| Property | Type | Description |
|---|---|---|
| object | Configuration that the method takes |
Find more about the config properties in config section
Sys.GetConfig
Find the Sys.GetConfig response properties in config section
Sys.GetStatus
Find more about the status response properties in status section
Sys.SetTime
Method sets system time.
Request:
| Property | Type | Description |
|---|---|---|
| number | Unix timestamp (in UTC) to set as current time Fraction number, where the whole part (before decimal) is in seconds, fraction part in milliseconds (fraction part is optional and should be up to 3 digits) |
If the device gets time from NTP server the set will be overwritten.
Sys.StartDiscovery
(since 2.2.0)
Network discovery is available on all Gen3 and Gen4 devices, and on Gen2 devices still in active production (see Firmware Update Policy). It is not available on Gen4 devices running Zigbee firmware, where there is not enough free flash space to include it. These devices still advertise themselves over mDNS while connected to Wi-Fi, so other devices can discover them.
Starts a timed mDNS browse of the local network for other Shelly devices. Every Gen2+ Shelly advertises itself over the _shelly._tcp service, so this method makes it possible to enumerate the Shellies present on the network — with their name, model, firmware version and address — directly from the device, without relying on the cloud or the router.
The call returns null immediately and the scan runs in the background. Results are delivered asynchronously as discovery_results events, batched over a short window, followed by a single discovery_done event when the scan ends. While a scan is active, Sys.GetStatus includes a discovery object.
The host device does not appear in its own results. Results are not persisted — nothing is retained after the scan ends.
Request:
| Property | Type | Description |
|---|---|---|
| number | Optional, defaults to |
Returns null on success, or an error if a scan is already in progress or duration is out of range.
Sys.StopDiscovery
(since 2.2.0)
Stops an in-progress Sys.StartDiscovery scan before its duration elapses, for example once the target device has been found. A discovery_done event is emitted exactly as it is for a naturally-expiring scan, so clients see one consistent terminal signal regardless of how the scan ended.
Takes no parameters. Returns null on success, or an error if no scan is currently in progress.
Backup operations and provisioning state
Some backup-related operations are gated by the device's provisioning state. They expose data captured from the device filesystem (Wi-Fi passwords, cloud tokens, Matter fabric keys, etc.) or set/clear the authentication header that protects the default-configuration slot, so they are only allowed once the open setup window has closed:
Gated (allowed only in complete or locked) | Not gated (allowed in any state) |
|---|---|
Sys.CreateBackup | Sys.UploadBackup |
Sys.DownloadBackup | Sys.RestoreBackup |
GET /backup.zip | Sys.UploadDefaultConfig |
Sys.CreateDefaultConfig | Sys.ApplyDefaultConfig |
Sys.ClearDefaultConfig |
In pending or confirmed, gated RPCs return an error indicating that the precondition is not met (the current provisioning state is included in the error message), and GET /backup.zip returns 503 Service Unavailable. The non-gated entries import data into the device rather than exfiltrate it, so they remain available during setup ("Unbox & Go").
Sys.CreateBackup
Method creates a downloadable backup of the device setup.
Gated by provisioning state: only allowed in complete or locked.
Request:
| Property | Type | Description |
|---|---|---|
| boolean | Optional, defaults to |
Response:
| Property | Type | Description |
|---|---|---|
| string | Present only when |
| boolean | Always |
The device does not reboot on its own. After this call returns, Sys status reports restart_required: true (and a Sys status-change notification is emitted with the same field). The caller picks the moment to reboot, typically via Shelly.Reboot. The previous backup, if any, remains downloadable via Sys.DownloadBackup and the /backup.zip endpoint until the reboot. Once the reboot completes, the new backup is described by the backup property in the status.
Sys.DownloadBackup
Method allows reading a previously created backup in chunks.
Gated by provisioning state: only allowed in complete or locked.
Request:
| Property | Type | Description |
|---|---|---|
| number | Chunk offset |
| number | Maximum number of bytes to read |
Response:
| Property | Type | Description |
|---|---|---|
| string | Base64-encoded data |
| number | Bytes remaining to be read |
Sys.UploadBackup
Method uploads a backup archive to the device in chunks. Call this first, inspect the returned manifest, then trigger the actual restore with Sys.RestoreBackup.
Sending offset: 0 implicitly discards any in-progress upload and starts a fresh session. Chunks must be ordered by offset with no gaps.
Request:
| Property | Type | Description |
|---|---|---|
| number | Chunk offset |
| string | Base64-encoded data |
| boolean | Marks the final chunk and triggers manifest extraction |
Response (final chunk only):
| Property | Type | Description | |||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| object | Metadata extracted from the uploaded archive's unencrypted manifest file
|
Sys.RestoreBackup
Restores the backup uploaded via Sys.UploadBackup. The device reboots and extracts the archive onto a wiped filesystem. If the manifest returned by the upload step reports encrypt: true, a decryption key must be provided.
Request:
| Property | Type | Description |
|---|---|---|
| string | Optional. Required when the uploaded archive is encrypted. |
Unlike Sys.CreateBackup and Sys.CreateDefaultConfig, restore reboots the device immediately. Restore is destructive — the live filesystem is wiped before extraction — so there is no useful state to expose between the RPC call and the reboot. The device comes back up running the freshly restored configuration.
Sys.CreateDefaultConfig
Method makes the current setup the factory default. A password protects all subsequent operations on the default configuration. The first call establishes the password; later calls must present the same password.
Gated by provisioning state: only allowed in complete or locked.
Request:
| Property | Type | Description |
|---|---|---|
| string | Default-configuration password |
Response:
| Property | Type | Description |
|---|---|---|
| boolean | Always |
The device does not reboot on its own. After this call returns, Sys status reports restart_required: true (and a Sys status-change notification is emitted with the same field). The caller picks the moment to reboot, typically via Shelly.Reboot. Once the reboot completes and the archive has been written, default_config.exists flips to true and a status-change notification is emitted on that field.
Sys.UploadDefaultConfig
Uploads a default-configuration archive to the device in chunks. Same chunked-upload semantics as Sys.UploadBackup (including offset: 0 starting a fresh session). Call this first, then Sys.ApplyDefaultConfig to commit.
Request:
| Property | Type | Description |
|---|---|---|
| string | Default-configuration password (set or verified on every call) |
| number | Chunk offset |
| string | Base64-encoded data |
| boolean | Marks the final chunk and triggers manifest extraction |
Response (final chunk only):
| Property | Type | Description |
|---|---|---|
| object | Metadata extracted from the uploaded archive's unencrypted manifest file (same fields as the Sys.UploadBackup manifest). |
Sys.ApplyDefaultConfig
Commits the archive uploaded via Sys.UploadDefaultConfig as the device's default configuration. If the manifest reports encrypt: true, a decryption key must be provided; the archive is then decrypted in place. No reboot.
Request:
| Property | Type | Description |
|---|---|---|
| string | Default-configuration password |
| string | Optional. Required when the uploaded archive is encrypted. |
A failed apply (wrong decryption key, flash error) invalidates the default-configuration slot; the archive must be re-uploaded.
Sys.ClearDefaultConfig
Clears the installed default configuration. The device is left as-is at runtime; the next factory reset will produce a truly blank device rather than restoring the default configuration.
Gated by provisioning state: only allowed in complete or locked.
Request:
| Property | Type | Description |
|---|---|---|
| string | Default-configuration password |
Returns an error if no default configuration is installed or if the password does not match the stored hash.
The 30-second hold of the system button performs an equivalent action (clearing the default configuration) and then factory-resets the device. It is always available and cannot be disabled.
Default configuration
The default configuration is an archive that a vendor can install on the device so it survives factory reset: after any factory reset (via Shelly.FactoryReset or the system-button hold), the device first wipes user state and then re-applies the default configuration automatically. A password-hashed authentication header protects the slot; all operations that create, replace or remove it must present that password.
Two ways to install a default configuration:
- On-device snapshot. Sys.CreateDefaultConfig takes the current device filesystem and commits it as the default configuration.
- Off-device upload. Sys.UploadDefaultConfig uploads an archive in chunks. The final chunk returns the archive's manifest, so the caller can inspect
encrypt,model, etc. before calling Sys.ApplyDefaultConfig to commit. When the archive is encrypted,Sys.ApplyDefaultConfigdecrypts it in place.
Sys.ClearDefaultConfig removes the installed default configuration. Holding the system button for 30 seconds performs an equivalent clear and then factory-resets the device; that path is always available and is the intended escape hatch when the password is lost.
The current state is reported in the status as default_config.exists and in notifications as a status change on the same field: false the moment an upload begins or a clear completes, true once a successful apply commits the configuration. For Sys.CreateDefaultConfig, the flip to true happens after the caller-initiated reboot, when the post-reboot half writes the archive — at the same time the restart_required flag clears.
HTTP Endpoint: /backup.zip
Downloads the most recently created user backup as a ZIP archive — the same payload streamed by Sys.DownloadBackup, exposed over HTTP for clients that prefer a direct file download.
The endpoint is gated by provisioning state: only available in complete or locked. In pending or confirmed it returns 503 Service Unavailable.
When the device has authentication configured (http.auth_domain or, as a fallback, rpc.auth_domain set via Shelly.SetAuth), the endpoint requires HTTP digest authentication; either set of credentials is accepted.
Returns 404 Not Found when no backup exists yet — i.e. Sys.CreateBackup has not been invoked, or the device has not yet rebooted to produce one.
Example:
curl -OJ http://${SHELLY}/backup.zip
Configuration
System configuration contains information about device's identifiers, location, debug logs, UI data, and communication over udp.
Parameters:
| Property | Type | Description | |||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| object | Information about the device
| |||||||||||||||||||||||||||||||||||||||
| object | Information about the current location of the device
| |||||||||||||||||||||||||||||||||||||||
| object | Configuration of the device's debug logs. See more about the debug logs and how to read them here
| |||||||||||||||||||||||||||||||||||||||
| object | User interface data | |||||||||||||||||||||||||||||||||||||||
| object | Configuration for the RPC over UDP
| |||||||||||||||||||||||||||||||||||||||
| object | Configuration for the sntp server
| |||||||||||||||||||||||||||||||||||||||
| number | Configuration revision. This number will be incremented for every configuration change of a device component. If the new config value is the same as the old one there will be no change of this property. Can not be modified explicitly by a call to |
sys_btn_toggle is available on a selected range of pro devices:
It functions on the following principle:
In switch mode/profile:
If at least one switch is
ON-> set all switches toOFF.If all switches are
OFF-> set all switches toON.
In cover mode/profile, the device is acting as in cover->in_mode->single configuration (affected device: ShellyPro2PM).
Secure provisioning
(since 1.7.5)
Access Point & BLE RPC protection
Open AP & BLE RPC auto-shutdown: Open AP & BLE RPC are only available for 15 minutes after boot on devices that have never yet acquired IP over Wi-Fi or Ethernet. Once an IP is acquired, AP (unless protected with a password) & BLE RPC are automatically disabled. In case no IP was acquired during the initial setup window, AP (unless protected with a password) & BLE RPC are temporarily shut down - until the device is power-cycled or a factory/network reset occurs.
AP password persistence: Once an AP password has been set, it cannot be changed back to empty (open AP).
Provisioning state
The device reports its provisioning state in Shelly.GetDeviceInfo via the provision field:
pending: initial device provisioning available over a 15 minutes setup window (3 minutes on battery-powered devices)confirmed: device provisioned, unprotected interfaces remain available over a 5 minutes grace window (on battery-powered devices, the original 3-minute setup timer continues instead)complete: grace window expired, AP (unless protected with a password) & BLE RPC are automatically disabledlocked: initial setup window expired without going online, AP (unless protected with a password) & BLE RPC are temporarily shut down until device is power-cycled, a factory/network reset occurs, or user button is pressed (latter only applicable to battery-powered devices). While in this state, the device emits a BLE advertisement with thelockedflag (bit 5) set in the0x01Shelly-Specific Flags block of the Shelly manufacturer-specific data, so it remains discoverable even though BLE RPC is disabled. The device is still connectable while locked, but the only accessible service is GAP.
When provision field changes, the device emits a corresponding notification event: provision_pending, provision_confirmed, provision_complete, provision_locked, for example:
{
"src": "shellypro4pm-f008d1d8b8b8",
"dst": "user_1",
"method": "NotifyEvent",
"params": {
"ts": 1631266683.84,
"events": [
{
"component": "sys",
"event": "provision_complete",
"ts": 1631266683.84
}
]
}
}
Provisioning object in Sys.GetStatus
While the device is in the pending or confirmed provisioning state, Sys.GetStatus includes a provisioning object with:
stage— the current provisioning stagestarted_at— when the device entered the stage (Unix timestamp)started_ut— when the device entered the stage (Uptime in seconds)duration— how long the stage lasts, in seconds
A NotifyStatus event is emitted when the object appears or its contents change.
{
"src": "shellyhtg3-dcda0cb79604",
"dst": "user_1",
"method": "NotifyStatus",
"params": {
"ts": 1778246311.0,
"sys": {
"provisioning": {
"stage": "confirmed",
"started_at": 1778246311,
"started_ut": 3,
"duration": 180
}
}
}
}
Battery Device Provisioning
(since 2.0.0)
Battery-powered devices have modified provisioning behavior:
- Setup window: The provisioning window is 3 minutes (tied to setup mode), not 15 minutes
- No grace window: The 5-minute
confirmedgrace timer does not apply; the original setup timer continues until completion - Button wake recovery: Pressing the device button while in
lockedstate restarts setup mode and returns topending - Periodic wake: When the device wakes from deep sleep via periodic timer (not button press), it remains in
lockedstate with AP and BLE RPC disabled - Upgrade path: Devices that already have Wi-Fi configured (station mode enabled, AP disabled) before updating to firmware 2.0.0 boot directly into
complete— the provisioning state machine is skipped entirely
Enhanced Security
(Since firmware 2.0.0)
The enhanced_security flag enforces additional security measures to protect the device. This feature is part of Shelly's compliance with Radio Equipment Directive (RED) cybersecurity requirements.
HTTPS by Default
For additional information regarding custom HTTPS certificates refer to this guide
Devices shipped from factory with firmware 2.0.0+ come with:
- Pre-installed HTTPS certificates issued by Shelly's internal PKI
- HTTP to HTTPS redirection enabled by default
Behavior by Factory Firmware Version
| Factory Firmware | enhanced_security Default | Can Disable? |
|---|---|---|
| Prior to 2.0.0 | false | Yes, via factory reset only (after enabling) |
| 2.0.0 or later | true | No (permanently enabled) |
Once enhanced_security is enabled on a device with factory firmware prior to 2.0.0, it can only be disabled by performing a factory reset.
Status
System status contains information about network state, system time and other common attributes of the Shelly device. Presence of some keys is optional, depending on the underlying hardware components.
Properties:
| Property | Type | Description | |||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| string | Mac address of the device | |||||||||||||||||||||||||||
| boolean |
| |||||||||||||||||||||||||||
| string | Current time in the format HH:MM (24-hour time format in the current timezone with leading zero). | |||||||||||||||||||||||||||
| number | Unix timestamp (in UTC), | |||||||||||||||||||||||||||
| number | Last time the system synced time from NTP server (in UTC), | |||||||||||||||||||||||||||
| number | Time in seconds since last reboot | |||||||||||||||||||||||||||
| number | Total size of the RAM in the system in Bytes | |||||||||||||||||||||||||||
| number | Size of the free RAM in the system in Bytes | |||||||||||||||||||||||||||
| number | Total size of the file system in Bytes | |||||||||||||||||||||||||||
| number | Size of the free file system in Bytes | |||||||||||||||||||||||||||
| number | Configuration revision number | |||||||||||||||||||||||||||
| number | KVS (Key-Value Store) revision number | |||||||||||||||||||||||||||
| number | Schedules revision number, present if schedules are enabled | |||||||||||||||||||||||||||
| number | Webhooks revision number, present if webhooks are enabled | |||||||||||||||||||||||||||
| number | KNX configuration revision number, present on devices supporting KNX with KNX enabled | |||||||||||||||||||||||||||
| number | BLE cloud relay configuration revision number, present on devices supporting BLE cloud relay functionality | |||||||||||||||||||||||||||
| number | BTHomeControl configuration revision number, present when device supports control with BLU devices | |||||||||||||||||||||||||||
| object | Information about available updates, similar to the one returned by Shelly.CheckForUpdate (empty object:
, if no updates available). This information is automatically updated every 24 hours. Note that
| |||||||||||||||||||||||||||
| object | Information about boot type and cause (only for battery-operated devices)
| |||||||||||||||||||||||||||
| number | Period (in seconds) at which device wakes up and sends "keep-alive" packet to cloud, readonly. Count starts from last full wakeup | |||||||||||||||||||||||||||
| number | Time offset (in seconds). This is the difference between the device local time and UTC | |||||||||||||||||||||||||||
| object | Backup status
| |||||||||||||||||||||||||||
| object | State of the installed default configuration. A
| |||||||||||||||||||||||||||
| object | Provisioning timer state. Present only while the device is in an active provisioning state (
| |||||||||||||||||||||||||||
| object | (since 2.2.0) Network-discovery state. Present only while a
|
The last_sync_ts property is stored in energy-independent memory for devices with a real-time clock(e.g. ShellyPro3EM).
The nsteps property in available_updates is meant to aid in designing user interaction for a special case of updates that may require a two step pass, which although rarely may be necessary as for example updates of certain devices after release 2.0.0 which will perform server assisted repartitioning. For regular updates the property will not be present. For a two step update, based on information sent by the server when the update is determined to require two steps the nsteps property will be shown in Sys.Status with a value of 1 and also will be included in a status change. Due to the specifics of OTA implementation in firmware for this kind of updates the same update may not require a second pass in which case nsteps won't be shown. When the second pass starts, which will happen automatically after the delay for committing update, the server will send nsteps with a value of 0, denoting last step. After completion available updates will change and will not include the entry for the version firmware just updated to, thus not showing nsteps.
MQTT control
Since version 0.14.0
The system component MQTT functionality provides commands for OTA updates.
Shelly will subscribe to the following topics, accepting commands:
<topic_prefix>/command/sys
Shelly publishes on:
<topic_prefix>/status/sys- topic where the result of thestatus_updateandota_update_checkcommands is published. Thestatus_updatecommand can be sent either on the common device topic or the component specific topic. This topic is already used for existing status notifications, if enabled.<topic_prefix>/error/sys- error message is published if update is requested and the corresponding stage is not found.<topic_prefix>/events/rpc- regular event notifications of OTA progress are published on this topic when update is started with theota_update_tocommands.
Accepted commands are:
status_update- causes status of thesyscomponent to be published on the<topic_prefix>/status/systopic, which includes available updates information.ota_update_check- causes the device to request information of available updates and then publishes component status which includes available updates information on the<topic_prefix>/status/systopic. Also event notification with information for updates is published on the<topic_prefix>/events/rpctopic.ota_update_to_stable,ota_update_to_beta,ota_update_to_test- starts an update for the specified stage.
<topic_prefix> is a custom prefix if set or defaults to <device_id>
Notifications
This section describes notifications for events specific to the System component. For general information please see this page.
The System component can send notifications for the following events:
ota_beginota_progressota_successota_errorsleepscheduled_restartcomponent_addedcomponent_removedsys_btn_downsys_btn_upsys_btn_pushprovision_pending(since 1.7.5)provision_confirmed(since 1.7.5)provision_complete(since 1.7.5)provision_locked(since 1.7.5)discovery_results(since 2.2.0)discovery_done(since 2.2.0)
component_added and component_removed events are produced whenever a new dynamic component or Shelly script is added or removed.
The discovery_results and discovery_done events are emitted during a Sys.StartDiscovery scan. They are delivered to local channels only (WebSocket, MQTT, scripts) and are not forwarded to the cloud.
discovery_results carries a batch of results collected over a short window (results stream while the scan is active, they are not all delivered at the end):
| Property | Type | Description | |||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| array | Discovery results found in this batch. Each entry:
|
A physical device advertises more than one DNS-SD record (one under its device id, one under its friendly name), so the same device may appear as more than one entry across a scan.
iface reports which of the scanning device's own network interfaces the record arrived on. It says nothing about how the discovered device is connected — a result with iface: "ETH" may itself be a device connected over WiFi; the value only means the scanning device heard it on its Ethernet interface.
On a device with a single active interface every result carries the same iface. The field only becomes meaningful on multi-homed scanning devices (e.g. Pro models): there the same remote device can legitimately be heard on both interfaces and reported twice — once with iface: "WiFi STA" and once with iface: "ETH" — with the address as seen from each.
discovery_done is emitted exactly once when the scan ends, whether by duration expiry or by an explicit Sys.StopDiscovery:
| Property | Type | Description |
|---|---|---|
| number | Number of results reported during the scan. |
Examples
Sys.SetConfig example
- Sys.SetConfig HTTP GET Request
- Sys.SetConfig Curl Request
- Sys.SetConfig Mos Request
http://192.168.33.1/rpc/Sys.SetConfig?config={"location":{"tz":"Europe/Sofia"}}
curl -X POST -d '{"id":1,"method":"Sys.SetConfig","params":{"config":{"location":{"tz":"Europe/Sofia"}}}}' http://${SHELLY}/rpc
mos --port ${PORT} call Sys.SetConfig '{"config":{"location":{"tz":"Europe/Sofia"}}}'
Response
- Sys.SetConfig HTTP GET Response
- Sys.SetConfig Curl Response
- Sys.SetConfig Mos Response
{
"restart_required": false
}
{
"id": 1,
"src": "shellyplus2pm-a8032ab636ec",
"params": {
"restart_required": false
}
}
{
"restart_required": false
}
Sys.SetConfig - Enable Enhanced Security
This example applies only to devices with factory firmware prior to 2.0.0. Once enabled, enhanced_security can only be disabled via factory reset.
- Sys.SetConfig HTTP GET Request
- Sys.SetConfig Curl Request
- Sys.SetConfig Mos Request
http://192.168.33.1/rpc/Sys.SetConfig?config={"device":{"enhanced_security":true}}
curl -X POST -d '{"id":1,"method":"Sys.SetConfig","params":{"config":{"device":{"enhanced_security":true}}}}' http://${SHELLY}/rpc
mos --port ${PORT} call Sys.SetConfig '{"config":{"device":{"enhanced_security":true}}}'
Response
- Sys.SetConfig HTTP GET Response
- Sys.SetConfig Curl Response
- Sys.SetConfig Mos Response
{
"restart_required": true
}
{
"id": 1,
"src": "shellyplus1-a8032abe54dc",
"params": {
"restart_required": true
}
}
{
"restart_required": true
}
Sys.SetConfig - Disable TLS Certificate Time Validation
The tls_check_cert_validity_time setting is provided as a temporary workaround for users experiencing TLS certificate validation failures due to time synchronization issues. This option is subject to deprecation in future firmware releases. It is recommended to resolve time synchronization issues rather than disabling this security check.
This setting can only be changed to false when enhanced_security is false.
- Sys.SetConfig HTTP GET Request
- Sys.SetConfig Curl Request
- Sys.SetConfig Mos Request
http://192.168.33.1/rpc/Sys.SetConfig?config={"device":{"tls_check_cert_validity_time":false}}
curl -X POST -d '{"id":1,"method":"Sys.SetConfig","params":{"config":{"device":{"tls_check_cert_validity_time":false}}}}' http://${SHELLY}/rpc
mos --port ${PORT} call Sys.SetConfig '{"config":{"device":{"tls_check_cert_validity_time":false}}}'
Response
- Sys.SetConfig HTTP GET Response
- Sys.SetConfig Curl Response
- Sys.SetConfig Mos Response
{
"restart_required": false
}
{
"id": 1,
"src": "shellyplus1-a8032abe54dc",
"params": {
"restart_required": false
}
}
{
"restart_required": false
}
Sys.GetConfig example
- Sys.GetConfig HTTP GET Request
- Sys.GetConfig Curl Request
- Sys.GetConfig Mos Request
http://192.168.33.1/rpc/Sys.GetConfig
curl -X POST -d '{"id":1,"method":"Sys.GetConfig"}' http://${SHELLY}/rpc
mos --port ${PORT} call Sys.GetConfig
Response
- Sys.GetConfig HTTP GET Response
- Sys.GetConfig Curl Response
- Sys.GetConfig Mos Response
{
"device": {
"name": null,
"mac": "A8032AB636EC",
"fw_id": "20220527-091739/0.10.2-beta4-gecc3a61",
"eco_mode": false,
"profile": "cover",
"discoverable": false,
"tls_check_cert_validity_time": true,
"enhanced_security": false
},
"location": {
"tz": "Europe/Sofia",
"lat": 42.6534,
"lon": 23.31119
},
"debug": {
"mqtt": {
"enable": false
},
"websocket": {
"enable": false
},
"udp": {
"addr": null
}
},
"ui_data": {},
"rpc_udp": {
"dst_addr": null,
"listen_port": null
},
"sntp": {
"server": "time.google.com"
},
"cfg_rev": 10
}
{
"id": 1,
"src": "shellyplus2pm-a8032ab636ec",
"params": {
"device": {
"name": null,
"mac": "A8032AB636EC",
"fw_id": "20220527-091739/0.10.2-beta4-gecc3a61",
"eco_mode": false,
"profile": "cover",
"discoverable": false,
"tls_check_cert_validity_time": true,
"enhanced_security": false
},
"location": {
"tz": "Europe/Sofia",
"lat": 42.6534,
"lon": 23.31119
},
"debug": {
"mqtt": {
"enable": false
},
"websocket": {
"enable": false
},
"udp": {
"addr": null
}
},
"ui_data": {},
"rpc_udp": {
"dst_addr": null,
"listen_port": null
},
"sntp": {
"server": "time.google.com"
},
"cfg_rev": 10
}
}
{
"device": {
"name": null,
"mac": "A8032AB636EC",
"fw_id": "20220527-091739/0.10.2-beta4-gecc3a61",
"eco_mode": false,
"profile": "cover",
"discoverable": false,
"tls_check_cert_validity_time": true,
"enhanced_security": false
},
"location": {
"tz": "Europe/Sofia",
"lat": 42.6534,
"lon": 23.31119
},
"debug": {
"mqtt": {
"enable": false
},
"websocket": {
"enable": false
},
"udp": {
"addr": null
}
},
"ui_data": {},
"rpc_udp": {
"dst_addr": null,
"listen_port": null
},
"sntp": {
"server": "time.google.com"
},
"cfg_rev": 10
}
Sys.GetStatus example
- Sys.GetStatus HTTP GET Request
- Sys.GetStatus Curl Request
- Sys.GetStatus Mos Request
http://192.168.33.1/rpc/Sys.GetStatus
curl -X POST -d '{"id":1,"method":"Sys.GetStatus"}' http://${SHELLY}/rpc
mos --port ${PORT} call Sys.GetStatus
Response
- Sys.GetStatus HTTP GET Response
- Sys.GetStatus Curl Response
- Sys.GetStatus Mos Response
{
"mac": "A8032AB636EC",
"restart_required": false,
"time": "16:20",
"unixtime": 1654694407,
"last_sync_ts": 1654694307,
"uptime": 120,
"ram_size": 253464,
"ram_free": 146012,
"fs_size": 458752,
"fs_free": 212992,
"cfg_rev": 10,
"kvs_rev": 277,
"schedule_rev": 0,
"webhook_rev": 0,
"btrelay_rev": 0,
"available_updates": {
"stable": {
"version": "0.10.2"
}
},
"backup": {
"href": "/backup.zip",
"created": 1758267551
},
"default_config": {
"exists": false
},
"provisioning": {
"stage": "pending",
"started_at": 1654694292,
"started_ut": 5,
"duration": 900
}
}
{
"id": 1,
"src": "shellyplus2pm-a8032ab636ec",
"params": {
"mac": "A8032AB636EC",
"restart_required": false,
"time": "16:20",
"unixtime": 1654694407,
"last_sync_ts": 1654694307,
"uptime": 120,
"ram_size": 253464,
"ram_free": 146012,
"fs_size": 458752,
"fs_free": 212992,
"cfg_rev": 10,
"kvs_rev": 277,
"schedule_rev": 0,
"webhook_rev": 0,
"btrelay_rev": 0,
"available_updates": {
"stable": {
"version": "0.10.2"
}
},
"backup": {
"href": "/backup.zip",
"created": 1758267551
},
"default_config": {
"exists": false
},
"provisioning": {
"stage": "pending",
"started_at": 1654694292,
"started_ut": 5,
"duration": 900
}
}
}
{
"mac": "A8032AB636EC",
"restart_required": false,
"time": "16:20",
"unixtime": 1654694407,
"last_sync_ts": 1654694307,
"uptime": 120,
"ram_size": 253464,
"ram_free": 146012,
"fs_size": 458752,
"fs_free": 212992,
"cfg_rev": 10,
"kvs_rev": 277,
"schedule_rev": 0,
"webhook_rev": 0,
"btrelay_rev": 0,
"available_updates": {
"stable": {
"version": "0.10.2"
}
},
"backup": {
"href": "/backup.zip",
"created": 1758267551
},
"default_config": {
"exists": false
},
"provisioning": {
"stage": "pending",
"started_at": 1654694292,
"started_ut": 5,
"duration": 900
}
}
Sys.SetTime example
- Sys.SetTime HTTP GET Request
- Sys.SetTime Curl Request
- Sys.SetTime Mos Request
http://192.168.33.1/rpc/Sys.SetTime?unixtime=1737104483.546
curl -X POST -d '{"id":1,"method":"Sys.SetTime","params":{"unixtime":1737104483.546}}' http://${SHELLY}/rpc
mos --port ${PORT} call Sys.SetTime '{"unixtime":1737104483.546}'
Response
- Sys.SetTime HTTP GET Response
- Sys.SetTime Curl Response
- Sys.SetTime Mos Response
null
{
"id": 1,
"src": "shellyplus2pm-a8032ab636ec",
"params": null
}
null
Sys.StartDiscovery example
- Sys.StartDiscovery HTTP GET Request
- Sys.StartDiscovery Curl Request
- Sys.StartDiscovery Mos Request
http://192.168.33.1/rpc/Sys.StartDiscovery?duration=10
curl -X POST -d '{"id":1,"method":"Sys.StartDiscovery","params":{"duration":10}}' http://${SHELLY}/rpc
mos --port ${PORT} call Sys.StartDiscovery '{"duration":10}'
Response
- Sys.StartDiscovery HTTP GET Response
- Sys.StartDiscovery Curl Response
- Sys.StartDiscovery Mos Response
null
{
"id": 1,
"src": "shellyi4g3-8cbfea976af8",
"params": null
}
null
Sys.StopDiscovery example
- Sys.StopDiscovery HTTP GET Request
- Sys.StopDiscovery Curl Request
- Sys.StopDiscovery Mos Request
http://192.168.33.1/rpc/Sys.StopDiscovery
curl -X POST -d '{"id":1,"method":"Sys.StopDiscovery"}' http://${SHELLY}/rpc
mos --port ${PORT} call Sys.StopDiscovery
Response
- Sys.StopDiscovery HTTP GET Response
- Sys.StopDiscovery Curl Response
- Sys.StopDiscovery Mos Response
null
{
"id": 1,
"src": "shellyi4g3-8cbfea976af8",
"params": null
}
null
Sys.CreateBackup example
- Sys.CreateBackup HTTP GET Request
- Sys.CreateBackup Curl Request
- Sys.CreateBackup Mos Request
http://192.168.33.1/rpc/Sys.CreateBackup?encrypt=true
curl -X POST -d '{"id":1,"method":"Sys.CreateBackup","params":{"encrypt":true}}' http://${SHELLY}/rpc
mos --port ${PORT} call Sys.CreateBackup '{"encrypt":true}'
Response
- Sys.CreateBackup HTTP GET Response
- Sys.CreateBackup Curl Response
- Sys.CreateBackup Mos Response
{
"key": "a3b7k-m2xQp-L9t4n-d6Wfv-Zs1Ay",
"restart_required": true
}
{
"id": 1,
"src": "shellyplus2pm-a8032ab636ec",
"params": {
"key": "a3b7k-m2xQp-L9t4n-d6Wfv-Zs1Ay",
"restart_required": true
}
}
{
"key": "a3b7k-m2xQp-L9t4n-d6Wfv-Zs1Ay",
"restart_required": true
}
Sys.DownloadBackup example
- Sys.DownloadBackup HTTP GET Request
- Sys.DownloadBackup Curl Request
- Sys.DownloadBackup Mos Request
http://192.168.33.1/rpc/Sys.DownloadBackup?offset=0&len=4
curl -X POST -d '{"id":1,"method":"Sys.DownloadBackup","params":{"offset":0,"len":4}}' http://${SHELLY}/rpc
mos --port ${PORT} call Sys.DownloadBackup '{"offset":0,"len":4}'
Response
- Sys.DownloadBackup HTTP GET Response
- Sys.DownloadBackup Curl Response
- Sys.DownloadBackup Mos Response
{
"data": "UEsDBA==",
"left": 1065
}
{
"id": 1,
"src": "shellyplus2pm-a8032ab636ec",
"params": {
"data": "UEsDBA==",
"left": 1065
}
}
{
"data": "UEsDBA==",
"left": 1065
}
Sys.UploadBackup example
Final chunk (non-final chunks take the same shape but return null):
- Sys.UploadBackup HTTP GET Request
- Sys.UploadBackup Curl Request
- Sys.UploadBackup Mos Request
http://192.168.33.1/rpc/Sys.UploadBackup?offset=6144&data="UEsFBgAAAAAAAA=="&final=true
curl -X POST -d '{"id":1,"method":"Sys.UploadBackup","params":{"offset":6144,"data":"UEsFBgAAAAAAAA==","final":true}}' http://${SHELLY}/rpc
mos --port ${PORT} call Sys.UploadBackup '{"offset":6144,"data":"UEsFBgAAAAAAAA==","final":true}'
Response
- Sys.UploadBackup HTTP GET Response
- Sys.UploadBackup Curl Response
- Sys.UploadBackup Mos Response
{
"manifest": {
"created_at": 1758267551,
"fw_ver": "1.9.99",
"model": "SNSN-10138",
"app_name": "Pro4PM",
"device_name": "Living Room Lights",
"encrypt": true
}
}
{
"id": 1,
"src": "shellyplus2pm-a8032ab636ec",
"params": {
"manifest": {
"created_at": 1758267551,
"fw_ver": "1.9.99",
"model": "SNSN-10138",
"app_name": "Pro4PM",
"device_name": "Living Room Lights",
"encrypt": true
}
}
}
{
"manifest": {
"created_at": 1758267551,
"fw_ver": "1.9.99",
"model": "SNSN-10138",
"app_name": "Pro4PM",
"device_name": "Living Room Lights",
"encrypt": true
}
}
Sys.RestoreBackup example
- Sys.RestoreBackup HTTP GET Request
- Sys.RestoreBackup Curl Request
- Sys.RestoreBackup Mos Request
http://192.168.33.1/rpc/Sys.RestoreBackup?key="a3b7k-m2xQp-L9t4n-d6Wfv-Zs1Ay"
curl -X POST -d '{"id":1,"method":"Sys.RestoreBackup","params":{"key":"a3b7k-m2xQp-L9t4n-d6Wfv-Zs1Ay"}}' http://${SHELLY}/rpc
mos --port ${PORT} call Sys.RestoreBackup '{"key":"a3b7k-m2xQp-L9t4n-d6Wfv-Zs1Ay"}'
Response
- Sys.RestoreBackup HTTP GET Response
- Sys.RestoreBackup Curl Response
- Sys.RestoreBackup Mos Response
null
{
"id": 1,
"src": "shellyplus2pm-a8032ab636ec",
"params": null
}
null
Sys.CreateDefaultConfig example
- Sys.CreateDefaultConfig HTTP GET Request
- Sys.CreateDefaultConfig Curl Request
- Sys.CreateDefaultConfig Mos Request
http://192.168.33.1/rpc/Sys.CreateDefaultConfig?password="vendor secret"
curl -X POST -d '{"id":1,"method":"Sys.CreateDefaultConfig","params":{"password":"vendor secret"}}' http://${SHELLY}/rpc
mos --port ${PORT} call Sys.CreateDefaultConfig '{"password":"vendor secret"}'
Response
- Sys.CreateDefaultConfig HTTP GET Response
- Sys.CreateDefaultConfig Curl Response
- Sys.CreateDefaultConfig Mos Response
{
"restart_required": true
}
{
"id": 1,
"src": "shellyplus2pm-a8032ab636ec",
"params": {
"restart_required": true
}
}
{
"restart_required": true
}
Sys.UploadDefaultConfig example
Final chunk (non-final chunks take the same shape but return null):
- Sys.UploadDefaultConfig HTTP GET Request
- Sys.UploadDefaultConfig Curl Request
- Sys.UploadDefaultConfig Mos Request
http://192.168.33.1/rpc/Sys.UploadDefaultConfig?password="vendor secret"&offset=6144&data="UEsFBgAAAAAAAA=="&final=true
curl -X POST -d '{"id":1,"method":"Sys.UploadDefaultConfig","params":{"password":"vendor secret","offset":6144,"data":"UEsFBgAAAAAAAA==","final":true}}' http://${SHELLY}/rpc
mos --port ${PORT} call Sys.UploadDefaultConfig '{"password":"vendor secret","offset":6144,"data":"UEsFBgAAAAAAAA==","final":true}'
Response
- Sys.UploadDefaultConfig HTTP GET Response
- Sys.UploadDefaultConfig Curl Response
- Sys.UploadDefaultConfig Mos Response
{
"manifest": {
"created_at": 1758267551,
"fw_ver": "1.9.99",
"model": "SNSN-10138",
"app_name": "Pro4PM",
"device_name": "",
"encrypt": false
}
}
{
"id": 1,
"src": "shellyplus2pm-a8032ab636ec",
"params": {
"manifest": {
"created_at": 1758267551,
"fw_ver": "1.9.99",
"model": "SNSN-10138",
"app_name": "Pro4PM",
"device_name": "",
"encrypt": false
}
}
}
{
"manifest": {
"created_at": 1758267551,
"fw_ver": "1.9.99",
"model": "SNSN-10138",
"app_name": "Pro4PM",
"device_name": "",
"encrypt": false
}
}
Sys.ApplyDefaultConfig example
- Sys.ApplyDefaultConfig HTTP GET Request
- Sys.ApplyDefaultConfig Curl Request
- Sys.ApplyDefaultConfig Mos Request
http://192.168.33.1/rpc/Sys.ApplyDefaultConfig?password="vendor secret"
curl -X POST -d '{"id":1,"method":"Sys.ApplyDefaultConfig","params":{"password":"vendor secret"}}' http://${SHELLY}/rpc
mos --port ${PORT} call Sys.ApplyDefaultConfig '{"password":"vendor secret"}'
Response
- Sys.ApplyDefaultConfig HTTP GET Response
- Sys.ApplyDefaultConfig Curl Response
- Sys.ApplyDefaultConfig Mos Response
null
{
"id": 1,
"src": "shellyplus2pm-a8032ab636ec",
"params": null
}
null
Sys.ClearDefaultConfig example
- Sys.ClearDefaultConfig HTTP GET Request
- Sys.ClearDefaultConfig Curl Request
- Sys.ClearDefaultConfig Mos Request
http://192.168.33.1/rpc/Sys.ClearDefaultConfig?password="vendor secret"
curl -X POST -d '{"id":1,"method":"Sys.ClearDefaultConfig","params":{"password":"vendor secret"}}' http://${SHELLY}/rpc
mos --port ${PORT} call Sys.ClearDefaultConfig '{"password":"vendor secret"}'
Response
- Sys.ClearDefaultConfig HTTP GET Response
- Sys.ClearDefaultConfig Curl Response
- Sys.ClearDefaultConfig Mos Response
null
{
"id": 1,
"src": "shellyplus2pm-a8032ab636ec",
"params": null
}
null
Notifications example
The System component can send notifications for the following events:
- OTA begin:
Example 1:
Notify that OTA update has started.{
"src": "shellypro4pm-f008d1d8b8b8",
"dst": "user_1",
"method": "NotifyEvent",
"params": {
"ts": 1631266683.84,
"events": [
{
"component": "sys",
"event": "ota_begin",
"msg": "Waiting for data",
"ts": 1631266683.84
}
]
}
}
- OTA progress
Example 2:
Notify the current OTA update progress.{
"src": "shellypro4pm-f008d1d8b8b8",
"dst": "user_1",
"method": "NotifyEvent",
"params": {
"ts": 1631266684.6,
"events": [
{
"component": "sys",
"event": "ota_progress",
"msg": "Waiting for data",
"progress_percent": 22,
"ts": 1631266684.6
}
]
}
}
- OTA success
Example 3:
Notify that OTA update has succeeded.{
"src": "shellypro4pm-f008d1d8b8b8",
"dst": "user_1",
"method": "NotifyEvent",
"params": {
"ts": 1631266736.82,
"events": [
{
"component": "sys",
"event": "ota_success",
"msg": "Update applied, rebooting",
"ts": 1631266736.82
}
]
}
}
- OTA error
Example 4:
Notify that OTA update has encountered an error.{
"src": "shellypro4pm-f008d1d8b8b8",
"dst": "user_1",
"method": "NotifyEvent",
"params": {
"ts": 1631266736.82,
"events": [
{
"component": "sys",
"event": "ota_error",
"msg": "Unexpected end of data",
"ts": 1631266736.82
}
]
}
}
- Sleep (only for battery-operated devices)
Example 5:
Notify that device is going to sleep.{
"src": "shellyplusht2-f008d1d8b8b8",
"dst": "user_1",
"method": "NotifyEvent",
"params": {
"ts": 1631266736.82,
"events": [
{
"component": "sys",
"event": "sleep",
"ts": 1631266736.82
}
]
}
}
- Scheduled restart
Example 6:
Notify that device is going to reboot.{
"src": "shellyplus1-a8032abe54dc",
"dst": "user_1",
"method": "NotifyEvent",
"params": {
"ts": 1664446358.14,
"events": [
{
"component": "sys",
"event": "scheduled_restart",
"time_ms": 997,
"ts": 1664446358.14
}
]
}
}
- Dynamic component added
Example 7:
Notify that a new dynamic component is added.{
"src": "shellyplus1-a8032abe54dc",
"dst": "user_1",
"method": "NotifyEvent",
"params": {
"ts": 1705794984.07,
"events": [
{
"component": "sys",
"event": "component_added",
"target":"script:1",
"restart_required":false,
"ts": 1705794984.07,
"cfg_rev":10
}
]
}
}
- Dynamic component removed
Example 8:
Notify that some dynamic component is removed.{
"src": "shellyplus1-a8032abe54dc",
"dst": "user_1",
"method": "NotifyEvent",
"params": {
"ts": 1705795031.69,
"events": [
{
"component": "sys",
"event": "component_removed",
"target":"script:1",
"restart_required":false,
"ts": 1705795031.69,
"cfg_rev":11
}
]
}
}
- Devices discovered (during a
Sys.StartDiscoveryscan)
Example 9:
Notify a batch of discovered devices.{
"src": "shellyi4g3-8cbfea976af8",
"dst": "user_1",
"method": "NotifyEvent",
"params": {
"ts": 1774350200.41,
"events": [
{
"component": "sys",
"event": "discovery_results",
"results": [
{
"name": "Living Room Light",
"host": "shellycolorblbg3-48f6eeaaade0.local",
"iface": "WiFi STA",
"ipv4": ["192.168.1.101"],
"ipv6": ["fe80::a92:72ff:fe42:21ec"],
"attrs": {
"app": "RGBCCTBulbG3",
"gen": 3,
"ver": "2.0.0"
}
}
],
"ts": 1774350200.41
}
]
}
}
- Discovery done
Example 10:
Notify that a discovery scan has ended.{
"src": "shellyi4g3-8cbfea976af8",
"dst": "user_1",
"method": "NotifyEvent",
"params": {
"ts": 1774350205.41,
"events": [
{
"component": "sys",
"event": "discovery_done",
"result_count": 14,
"ts": 1774350205.41
}
]
}
}
Request status over MQTT example
export MQTT_SERVER="broker.hivemq.com"
export MQTT_PORT=1883
export SHELLY_ID="shellyplus1-a8032abe54dc" # The <shelly-id> of your device
mosquitto_sub -h ${MQTT_SERVER} -p ${MQTT_PORT} -t ${SHELLY_ID}/status/sys
export MQTT_SERVER="broker.hivemq.com"
export MQTT_PORT=1883
export SHELLY_ID="shellyplus1-a8032abe54dc" # The <shelly-id> of your device
mosquitto_pub -h ${MQTT_SERVER} -p ${MQTT_PORT} -t ${SHELLY_ID}/command/sys -m status_update
{
"mac": "A8032ABE54DC",
"restart_required": false,
"time": "19:23",
"unixtime": 1675272236,
"last_sync_ts": 1675272236,
"uptime": 7971,
"ram_size": 234768,
"ram_free": 162196,
"fs_size": 458752,
"fs_free": 110592,
"cfg_rev": 7,
"kvs_rev": 1,
"schedule_rev": 0,
"webhook_rev": 0,
"btrelay_rev": 0,
"available_updates": {
"beta": {
"version": "0.13.0-beta1"
},
"stable": {
"version": "0.12.0"
}
}
}