Shelly
This service is common for all Gen2+ devices. It handles device management. Here are listed all methods supported by the Shelly namespace.
Shelly.GetStatus
This method returns the status of all the components of the device.
Request
This method takes no parameters.
Response
Attributes in the result are the status objects of all components in the device.
Shelly.GetConfig
This method returns the configuration of all the components of the device.
Request
This method takes no parameters.
Response
Attributes in the result are the configuration objects of all components in the device.
Shelly.ListMethods
This method lists all available RPC methods. It takes into account both ACL and authentication restrictions and only lists the methods allowed for the particular user/channel that's making the request.
Request
This method takes no parameters.
Response
Attributes in the result:
Property | Type | Description |
---|---|---|
| array of type string | Names of the methods allowed |
Shelly.GetDeviceInfo
This method returns information about the device.
Request
Parameters:
Property | Type | Description |
---|---|---|
| boolean | Flag specifying if extra identifying information should be displayed. Optional |
Response
Attributes in the result:
Property | Type | Description |
---|---|---|
| string | Id of the device |
| string | Mac address of the device |
| string | Model of the device |
| number | Generation of the device |
| string | Id of the firmware of the device |
| string | Version of the firmware of the device |
| string | Application name |
| string | Name of the device profile (only applicable for multi-profile devices) |
| boolean |
|
| string or null | Name of the domain ( |
| boolean | Present only when |
| string | Cloud key of the device (see note below), present only when the |
| string | Batch used to provision the device, present only when the |
| string | Shelly internal flags, present only when the |
The cloud key of the device is a JSON Web Token (JWT), generated by the Shelly provisioning server and obtained by the device during provisioning used to identify device to the Shelly cloud. More information about JSON Web Token as well as an online tool to verify the integrity of the cloud key be found on this site. The public key to verify the signature of the cloud key JWT is:
-----BEGIN PUBLIC KEY-----
MHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEhwiPS5G27EGpuW3uaRQYSlcCxdxMm9E0
0xI6zeqfou0cI7Cn5+oaf7SsH2E/8nKQN4uAkRIlX2PG/yoggEXR+iwOzA/ZW6km
Pcy25FAkstbYuzYWJRme27O8OhURBc7W
-----END PUBLIC KEY-----
Shelly.ListProfiles
The term profile
abstracts high-level device functionality. Some devices can operate in different exclusive modes or profiles, for example, Shelly Plus2PM and Shelly Pro2PM can operate in a switch
or cover
profile. Shelly.ListProfiles
lists the names of available profiles and the type/count of functional components exposed for each profile. Shelly.ListProfiles
is only available on multi-profile devices.
Request
This method takes no parameters.
Shelly.SetProfile
This method sets the device profile
. Shelly.SetProfile
is only available on multi-profile devices.
Changing the device profile will delete all webhooks and schedules on the device.
Request
Parameters:
Property | Type | Description |
---|---|---|
| string | Name of the device profile |
Response
- When the newly selected
profile
is different than the activeprofile
:Shelly.SetProfile
returnsprofile_was
, followed by an automatic reboot
- When the newly selected
profile
is the same as the activeprofile
:Shelly.SetProfile
returnsprofile_was
Shelly.ListTimezones
This method returns list of timezones, it supports paging.
Request
Parameters:
Property | Type | Description |
---|---|---|
| number | Index of the list from which to start generating the result Optional |
Response
Attributes in the result:
Property | Type | Description |
---|---|---|
| array of type string | List of timezones |
| number | Index of the first entry in the result |
| number | Total number of available timezones |
Shelly.DetectLocation
This method detects and returns the location of the device.
Request
This method takes no parameters.
Response
Attributes in the result:
Property | Type | Description |
---|---|---|
| string or null | Timezone of the detected location ( |
| number or null | Latitude of the detected location in degrees ( |
| number or null | Longitude of the detected location in degrees ( |
Shelly.CheckForUpdate
This method checks for new firmware version for the device and returns information about it. If no update is available returns empty JSON object as result.
Request
This method takes no parameters.
Response
Attributes in the result (only the ones available are shown):
Property | Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
| object | Indicates new stable version of the firmware.
| |||||||||
| object | Indicates new beta version of the firmware.
|
Shelly.Update
This method updates the firmware version of the device.
Request
Parameters:
Property | Type | Description |
---|---|---|
| string | The type of the new version - either |
| string | Url address of the update. Optional |
Shelly.Update
takes either stage
or url
.
Shelly.FactoryReset
This method resets the configuration to its default state.
Request
This method takes no parameters.
Shelly.ResetWiFiConfig
This method resets the WiFi configuration of the device.
Request
This method takes no parameters.
Response
The result from this method is null
.
Shelly.Reboot
This method reboots the device.
Request
Parameters:
Property | Type | Description |
---|---|---|
| number | Delay until reboot in milliseconds. Any values are valid but the minimum is capped at 500 ms. Default value: 1000 ms. Optional |
Shelly.SetAuth
This method sets authentication details (password) for the device. More detailed description of the authentication mechanism can be found here.
Request
Parameters:
Property | Type | Description |
---|---|---|
| string | Must be set to admin. Only one user is supported. Required |
| string | Must be the id of the device. Only one realm is supported. Required |
| string or null | " |
Shelly.PutUserCA
This method allows uploading of a custom certificate authority (CA) PEM bundle. Because the file can be larger than what can fit in a single RPC frame, the method allows uploading in chunks (for example line by line). More about the user CA support provided by Shelly can be found here.
Request
Parameters:
Property | Type | Description |
---|---|---|
| string or null | Contents of the PEM file ( |
| boolean |
|
Response
The result from this method is the lenght of the certificate in bytes.
Shelly.PutTLSClientCert
This method allows uploading of a custom client certificate client.crt
. Because the file can be larger than what can fit in a single RPC frame, the method allows uploading in chunks (for example line by line).
More about the user certificate support provided by Shelly can be found here.
Request
Parameters:
Property | Type | Description |
---|---|---|
| string or null | Contents of the |
| boolean |
|
Response
The result from this method is the lenght of the certificate in bytes.
Shelly.PutTLSClientKey
This method allows uploading of a custom client key client.key
. Because the file can be larger than what can fit in a single RPC frame, the method allows uploading in chunks (for example line by line).
More about the user certificate support provided by Shelly can be found here.
Request
Parameters:
Property | Type | Description |
---|---|---|
| string or null | Contents of the |
| boolean |
|
Response
The result from this method is the length of the certificate in bytes.
Shelly.GetComponents
This method returns a list with device's components, it supports paging, filter for dynamic components (for example virtual components) and allows the user to get only the needed information from the component.
Request
Parameters:
Property | Type | Description |
---|---|---|
| number | Index of the component from which to start generating the result Optional |
| array of strings | "status" will include the component's status, "config" - the config. The keys are always included. Combination of both ( |
| boolean |
|
Response
Property | Type | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| array of objects |
| ||||||||||||
| number | Sys's configuration revision | ||||||||||||
| number | Index of the first component in the result | ||||||||||||
| number | Total number of components with all filters applied |
HTTP Endpoint: /shelly
This resource is equivalent to invoking Shelly.GetDeviceInfo. The aim of this request is to identify a device. As the generation (gen
) of the device determines the channels and methods/endpoints available, this information is useful for further integrations of Shelly devices in other systems.
Example:
curl http://${SHELLY}/shelly
{
"id": "shellypro4pm-f008d1d8b8b8",
"mac": "F008D1D8B8B8",
"model": "SPSW-004PE16EU",
"gen": 2,
"fw_id": "20210720-153353/0.6.7-gc36674b",
"ver": "0.6.7",
"app": "FourPro",
"auth_en": true,
"auth_domain": "shellypro4pm-f008d1d8b8b8"
}
HTTP Endpoint: /ota
Flashing devices with custom firmware will irreversably void the device warranty.
Shelly devices contains a suite of safety features. Every firmware build goes through extensive testing to ensure all safety features and protection mechanisms work reliably. We cannot provide the same guarantee for unofficial firmware images.
This endpoints allows a shelly device to be flashed with a compatible Shelly OS firmware. It expects a url
parameter and will attempt to download the firmware image from there.
Example:
curl http://${SHELLY}/ota?url=http://third-party-firmware.site/path/to/image.zip
Examples
Shelly.GetStatus example
- Shelly.GetStatus HTTP GET Request
- Shelly.GetStatus Curl Request
- Shelly.GetStatus Mos Request
http://192.168.33.1/rpc/Shelly.GetStatus
curl -X POST -d '{"id":1,"method":"Shelly.GetStatus"}' http://${SHELLY}/rpc
mos --port ${PORT} call Shelly.GetStatus
Response
- Shelly.GetStatus HTTP GET Response
- Shelly.GetStatus Curl Response
- Shelly.GetStatus Mos Response
{
"ble": {},
"cloud": {
"connected": false
},
"eth": {
"ip": "10.33.55.170"
},
"input:0": {
"id": 0,
"state": false
},
"input:1": {
"id": 1,
"state": false
},
"input:2": {
"id": 2,
"state": false
},
"input:3": {
"id": 3,
"state": false
},
"mqtt": {
"connected": false
},
"switch:0": {
"id": 0,
"source": "timer",
"output": true,
"timer_started_at": 1626935739.79,
"timer_duration": 60,
"apower": 8.9,
"voltage": 237.5,
"aenergy": {
"total": 6.532,
"by_minute": [
45.199,
47.141,
88.397
],
"minute_ts": 1626935779
},
"temperature": {
"tC": 23.5,
"tF": 74.4
}
},
"switch:1": {
"id": 1,
"source": "init",
"output": false,
"apower": 0,
"voltage": 237.5,
"aenergy": {
"total": 0,
"by_minute": [
0,
0,
0
],
"minute_ts": 1626935779
},
"temperature": {
"tC": 23.5,
"tF": 74.4
}
},
"switch:2": {
"id": 2,
"source": "timer",
"output": false,
"timer_started_at": 1626935591.8,
"timer_duration": 345,
"apower": 0,
"voltage": 237.5,
"aenergy": {
"total": 0.068,
"by_minute": [
0,
0,
0
],
"minute_ts": 1626935779
},
"temperature": {
"tC": 23.5,
"tF": 74.4
}
},
"switch:3": {
"id": 3,
"source": "init",
"output": false,
"apower": 0,
"voltage": 237.5,
"aenergy": {
"total": 0,
"by_minute": [
0,
0,
0
],
"minute_ts": 1626935779
},
"temperature": {
"tC": 23.5,
"tF": 74.4
}
},
"sys": {
"mac": "A8032ABE54DC",
"restart_required": false,
"time": "16:06",
"unixtime": 1650035219,
"uptime": 11081,
"ram_size": 254744,
"ram_free": 151560,
"fs_size": 458752,
"fs_free": 180224,
"cfg_rev": 26,
"kvs_rev": 2725,
"schedule_rev": 0,
"webhook_rev": 0,
"available_updates": {
"stable": {
"version": "0.10.1"
}
}
},
"wifi": {
"sta_ip": null,
"status": "disconnected",
"ssid": null,
"rssi": 0
},
"ws": {
"connected": true
}
}
{
"id": 1,
"src": "shellypro4pm-f008d1d8b8b8",
"params": {
"ble": {},
"cloud": {
"connected": false
},
"eth": {
"ip": "10.33.55.170"
},
"input:0": {
"id": 0,
"state": false
},
"input:1": {
"id": 1,
"state": false
},
"input:2": {
"id": 2,
"state": false
},
"input:3": {
"id": 3,
"state": false
},
"mqtt": {
"connected": false
},
"switch:0": {
"id": 0,
"source": "timer",
"output": true,
"timer_started_at": 1626935739.79,
"timer_duration": 60,
"apower": 8.9,
"voltage": 237.5,
"aenergy": {
"total": 6.532,
"by_minute": [
45.199,
47.141,
88.397
],
"minute_ts": 1626935779
},
"temperature": {
"tC": 23.5,
"tF": 74.4
}
},
"switch:1": {
"id": 1,
"source": "init",
"output": false,
"apower": 0,
"voltage": 237.5,
"aenergy": {
"total": 0,
"by_minute": [
0,
0,
0
],
"minute_ts": 1626935779
},
"temperature": {
"tC": 23.5,
"tF": 74.4
}
},
"switch:2": {
"id": 2,
"source": "timer",
"output": false,
"timer_started_at": 1626935591.8,
"timer_duration": 345,
"apower": 0,
"voltage": 237.5,
"aenergy": {
"total": 0.068,
"by_minute": [
0,
0,
0
],
"minute_ts": 1626935779
},
"temperature": {
"tC": 23.5,
"tF": 74.4
}
},
"switch:3": {
"id": 3,
"source": "init",
"output": false,
"apower": 0,
"voltage": 237.5,
"aenergy": {
"total": 0,
"by_minute": [
0,
0,
0
],
"minute_ts": 1626935779
},
"temperature": {
"tC": 23.5,
"tF": 74.4
}
},
"sys": {
"mac": "A8032ABE54DC",
"restart_required": false,
"time": "16:06",
"unixtime": 1650035219,
"uptime": 11081,
"ram_size": 254744,
"ram_free": 151560,
"fs_size": 458752,
"fs_free": 180224,
"cfg_rev": 26,
"kvs_rev": 2725,
"schedule_rev": 0,
"webhook_rev": 0,
"available_updates": {
"stable": {
"version": "0.10.1"
}
}
},
"wifi": {
"sta_ip": null,
"status": "disconnected",
"ssid": null,
"rssi": 0
},
"ws": {
"connected": true
}
}
}
{
"ble": {},
"cloud": {
"connected": false
},
"eth": {
"ip": "10.33.55.170"
},
"input:0": {
"id": 0,
"state": false
},
"input:1": {
"id": 1,
"state": false
},
"input:2": {
"id": 2,
"state": false
},
"input:3": {
"id": 3,
"state": false
},
"mqtt": {
"connected": false
},
"switch:0": {
"id": 0,
"source": "timer",
"output": true,
"timer_started_at": 1626935739.79,
"timer_duration": 60,
"apower": 8.9,
"voltage": 237.5,
"aenergy": {
"total": 6.532,
"by_minute": [
45.199,
47.141,
88.397
],
"minute_ts": 1626935779
},
"temperature": {
"tC": 23.5,
"tF": 74.4
}
},
"switch:1": {
"id": 1,
"source": "init",
"output": false,
"apower": 0,
"voltage": 237.5,
"aenergy": {
"total": 0,
"by_minute": [
0,
0,
0
],
"minute_ts": 1626935779
},
"temperature": {
"tC": 23.5,
"tF": 74.4
}
},
"switch:2": {
"id": 2,
"source": "timer",
"output": false,
"timer_started_at": 1626935591.8,
"timer_duration": 345,
"apower": 0,
"voltage": 237.5,
"aenergy": {
"total": 0.068,
"by_minute": [
0,
0,
0
],
"minute_ts": 1626935779
},
"temperature": {
"tC": 23.5,
"tF": 74.4
}
},
"switch:3": {
"id": 3,
"source": "init",
"output": false,
"apower": 0,
"voltage": 237.5,
"aenergy": {
"total": 0,
"by_minute": [
0,
0,
0
],
"minute_ts": 1626935779
},
"temperature": {
"tC": 23.5,
"tF": 74.4
}
},
"sys": {
"mac": "A8032ABE54DC",
"restart_required": false,
"time": "16:06",
"unixtime": 1650035219,
"uptime": 11081,
"ram_size": 254744,
"ram_free": 151560,
"fs_size": 458752,
"fs_free": 180224,
"cfg_rev": 26,
"kvs_rev": 2725,
"schedule_rev": 0,
"webhook_rev": 0,
"available_updates": {
"stable": {
"version": "0.10.1"
}
}
},
"wifi": {
"sta_ip": null,
"status": "disconnected",
"ssid": null,
"rssi": 0
},
"ws": {
"connected": true
}
}
Shelly.GetConfig example
- Shelly.GetConfig HTTP GET Request
- Shelly.GetConfig Curl Request
- Shelly.GetConfig Mos Request
http://192.168.33.1/rpc/Shelly.GetConfig
curl -X POST -d '{"id":1,"method":"Shelly.GetConfig"}' http://${SHELLY}/rpc
mos --port ${PORT} call Shelly.GetConfig
Response
- Shelly.GetConfig HTTP GET Response
- Shelly.GetConfig Curl Response
- Shelly.GetConfig Mos Response
{
"ble": {
"enable": true
},
"cloud": {
"enable": false,
"server": "iot.shelly.cloud:6012/jrpc"
},
"eth": {
"enable": true,
"ipv4mode": "dhcp",
"ip": null,
"netmask": null,
"gw": null,
"nameserver": null
},
"input:0": {
"id": 0,
"name": null,
"type": "switch",
"invert": false
},
"input:1": {
"id": 1,
"name": null,
"type": "switch",
"invert": false
},
"input:2": {
"id": 2,
"name": null,
"type": "switch",
"invert": false
},
"input:3": {
"id": 3,
"name": null,
"type": "switch",
"invert": false
},
"mqtt": {
"enable": false,
"server": null,
"user": null,
"pass": null
},
"switch:0": {
"id": 0,
"name": null,
"in_mode": "follow",
"initial_state": "match_input",
"auto_on": true,
"auto_on_delay": 60,
"auto_off": true,
"auto_off_delay": 60,
"power_limit": 3500,
"voltage_limit": 280,
"current_limit": 16
},
"switch:1": {
"id": 1,
"name": null,
"in_mode": "follow",
"initial_state": "match_input",
"auto_on": false,
"auto_on_delay": 60,
"auto_off": false,
"auto_off_delay": 60,
"power_limit": 3500,
"voltage_limit": 280,
"current_limit": 16
},
"switch:2": {
"id": 2,
"name": null,
"in_mode": "follow",
"initial_state": "match_input",
"auto_on": true,
"auto_on_delay": 345,
"auto_off": true,
"auto_off_delay": 2,
"power_limit": 3500,
"voltage_limit": 280,
"current_limit": 16
},
"switch:3": {
"id": 3,
"name": null,
"in_mode": "follow",
"initial_state": "match_input",
"auto_on": false,
"auto_on_delay": 60,
"auto_off": false,
"auto_off_delay": 60,
"power_limit": 3500,
"voltage_limit": 280,
"current_limit": 16
},
"sys": {
"device": {
"name": null,
"mac": "F008D1D8B8B8",
"fw_id": "20210720-153353/0.6.7-gc36674b"
},
"location": {
"tz": "Europe/Sofia",
"lat": 42.67236,
"lon": 23.38738
},
"ui_data": {},
"sntp": {
"server": "time.google.com"
}
},
"wifi": {
"ap": {
"ssid": "ShellyPro4PM-F008D1D8B8B8",
"is_open": true,
"enable": true
},
"sta": {
"ssid": null,
"is_open": true,
"enable": false,
"ipv4mode": "dhcp",
"ip": null,
"netmask": null,
"gw": null,
"nameserver": null
},
"sta1": {
"ssid": null,
"is_open": true,
"enable": false,
"ipv4mode": "dhcp",
"ip": null,
"netmask": null,
"gw": null,
"nameserver": null
},
"ws": {
"enable": false,
"server": null,
"ssl_ca": "ca.pem"
},
"roam": {
"rssi_thr": -80,
"interval": 60
}
}
}
{
"id": 1,
"src": "shellypro4pm-f008d1d8b8b8",
"params": {
"ble": {
"enable": true
},
"cloud": {
"enable": false,
"server": "iot.shelly.cloud:6012/jrpc"
},
"eth": {
"enable": true,
"ipv4mode": "dhcp",
"ip": null,
"netmask": null,
"gw": null,
"nameserver": null
},
"input:0": {
"id": 0,
"name": null,
"type": "switch",
"invert": false
},
"input:1": {
"id": 1,
"name": null,
"type": "switch",
"invert": false
},
"input:2": {
"id": 2,
"name": null,
"type": "switch",
"invert": false
},
"input:3": {
"id": 3,
"name": null,
"type": "switch",
"invert": false
},
"mqtt": {
"enable": false,
"server": null,
"user": null,
"pass": null
},
"switch:0": {
"id": 0,
"name": null,
"in_mode": "follow",
"initial_state": "match_input",
"auto_on": true,
"auto_on_delay": 60,
"auto_off": true,
"auto_off_delay": 60,
"power_limit": 3500,
"voltage_limit": 280,
"current_limit": 16
},
"switch:1": {
"id": 1,
"name": null,
"in_mode": "follow",
"initial_state": "match_input",
"auto_on": false,
"auto_on_delay": 60,
"auto_off": false,
"auto_off_delay": 60,
"power_limit": 3500,
"voltage_limit": 280,
"current_limit": 16
},
"switch:2": {
"id": 2,
"name": null,
"in_mode": "follow",
"initial_state": "match_input",
"auto_on": true,
"auto_on_delay": 345,
"auto_off": true,
"auto_off_delay": 2,
"power_limit": 3500,
"voltage_limit": 280,
"current_limit": 16
},
"switch:3": {
"id": 3,
"name": null,
"in_mode": "follow",
"initial_state": "match_input",
"auto_on": false,
"auto_on_delay": 60,
"auto_off": false,
"auto_off_delay": 60,
"power_limit": 3500,
"voltage_limit": 280,
"current_limit": 16
},
"sys": {
"device": {
"name": null,
"mac": "F008D1D8B8B8",
"fw_id": "20210720-153353/0.6.7-gc36674b"
},
"location": {
"tz": "Europe/Sofia",
"lat": 42.67236,
"lon": 23.38738
},
"ui_data": {},
"sntp": {
"server": "time.google.com"
}
},
"wifi": {
"ap": {
"ssid": "ShellyPro4PM-F008D1D8B8B8",
"is_open": true,
"enable": true
},
"sta": {
"ssid": null,
"is_open": true,
"enable": false,
"ipv4mode": "dhcp",
"ip": null,
"netmask": null,
"gw": null,
"nameserver": null
},
"sta1": {
"ssid": null,
"is_open": true,
"enable": false,
"ipv4mode": "dhcp",
"ip": null,
"netmask": null,
"gw": null,
"nameserver": null
},
"ws": {
"enable": false,
"server": null,
"ssl_ca": "ca.pem"
},
"roam": {
"rssi_thr": -80,
"interval": 60
}
}
}
}
{
"ble": {
"enable": true
},
"cloud": {
"enable": false,
"server": "iot.shelly.cloud:6012/jrpc"
},
"eth": {
"enable": true,
"ipv4mode": "dhcp",
"ip": null,
"netmask": null,
"gw": null,
"nameserver": null
},
"input:0": {
"id": 0,
"name": null,
"type": "switch",
"invert": false
},
"input:1": {
"id": 1,
"name": null,
"type": "switch",
"invert": false
},
"input:2": {
"id": 2,
"name": null,
"type": "switch",
"invert": false
},
"input:3": {
"id": 3,
"name": null,
"type": "switch",
"invert": false
},
"mqtt": {
"enable": false,
"server": null,
"user": null,
"pass": null
},
"switch:0": {
"id": 0,
"name": null,
"in_mode": "follow",
"initial_state": "match_input",
"auto_on": true,
"auto_on_delay": 60,
"auto_off": true,
"auto_off_delay": 60,
"power_limit": 3500,
"voltage_limit": 280,
"current_limit": 16
},
"switch:1": {
"id": 1,
"name": null,
"in_mode": "follow",
"initial_state": "match_input",
"auto_on": false,
"auto_on_delay": 60,
"auto_off": false,
"auto_off_delay": 60,
"power_limit": 3500,
"voltage_limit": 280,
"current_limit": 16
},
"switch:2": {
"id": 2,
"name": null,
"in_mode": "follow",
"initial_state": "match_input",
"auto_on": true,
"auto_on_delay": 345,
"auto_off": true,
"auto_off_delay": 2,
"power_limit": 3500,
"voltage_limit": 280,
"current_limit": 16
},
"switch:3": {
"id": 3,
"name": null,
"in_mode": "follow",
"initial_state": "match_input",
"auto_on": false,
"auto_on_delay": 60,
"auto_off": false,
"auto_off_delay": 60,
"power_limit": 3500,
"voltage_limit": 280,
"current_limit": 16
},
"sys": {
"device": {
"name": null,
"mac": "F008D1D8B8B8",
"fw_id": "20210720-153353/0.6.7-gc36674b"
},
"location": {
"tz": "Europe/Sofia",
"lat": 42.67236,
"lon": 23.38738
},
"ui_data": {},
"sntp": {
"server": "time.google.com"
}
},
"wifi": {
"ap": {
"ssid": "ShellyPro4PM-F008D1D8B8B8",
"is_open": true,
"enable": true
},
"sta": {
"ssid": null,
"is_open": true,
"enable": false,
"ipv4mode": "dhcp",
"ip": null,
"netmask": null,
"gw": null,
"nameserver": null
},
"sta1": {
"ssid": null,
"is_open": true,
"enable": false,
"ipv4mode": "dhcp",
"ip": null,
"netmask": null,
"gw": null,
"nameserver": null
},
"ws": {
"enable": false,
"server": null,
"ssl_ca": "ca.pem"
},
"roam": {
"rssi_thr": -80,
"interval": 60
}
}
}
Shelly.ListMethods example
- Shelly.ListMethods HTTP GET Request
- Shelly.ListMethods Curl Request
- Shelly.ListMethods Mos Request
http://192.168.33.1/rpc/Shelly.ListMethods
curl -X POST -d '{"id":1,"method":"Shelly.ListMethods"}' http://${SHELLY}/rpc
mos --port ${PORT} call Shelly.ListMethods
Response
- Shelly.ListMethods HTTP GET Response
- Shelly.ListMethods Curl Response
- Shelly.ListMethods Mos Response
{
"methods": [
"Switch.SetConfig",
"Switch.GetConfig",
"Switch.GetStatus",
"Switch.Toggle",
"Switch.Set",
"Schedule.List",
"Schedule.DeleteAll",
"Schedule.Delete",
"Schedule.Update",
"Schedule.Create",
"Input.SetConfig",
"Input.GetConfig",
"Input.GetStatus",
"Webhook.ListSupported",
"Webhook.List",
"Webhook.DeleteAll",
"Webhook.Delete",
"Webhook.Update",
"Webhook.Create",
"Mqtt.SetConfig",
"Mqtt.GetConfig",
"Mqtt.GetStatus",
"Cloud.SetConfig",
"Cloud.GetConfig",
"Cloud.GetStatus",
"BLE.SetConfig",
"BLE.GetConfig",
"BLE.GetStatus",
"Eth.SetConfig",
"Eth.GetConfig",
"Eth.GetStatus",
"Wifi.Scan",
"Wifi.SetConfig",
"Wifi.GetConfig",
"Wifi.GetStatus",
"Sys.SetConfig",
"Sys.GetConfig",
"Sys.GetStatus",
"HTTP.GET",
"Shelly.ListMethods",
"Shelly.PutTLSClientKey",
"Shelly.PutTLSClientCert",
"Shelly.PutUserCA",
"Shelly.Reboot",
"Shelly.SetAuth",
"Shelly.Update",
"Shelly.CheckForUpdate",
"Shelly.DetectLocation",
"Shelly.ListTimezones",
"Shelly.GetStatus",
"Shelly.FactoryReset",
"Shelly.ResetWiFiConfig",
"Shelly.GetConfig",
"Shelly.GetDeviceInfo",
"Shelly.ListProfiles",
"Shelly.SetProfile"
]
}
{
"id": 1,
"src": "shellypro4pm-f008d1d8b8b8",
"params": {
"methods": [
"Switch.SetConfig",
"Switch.GetConfig",
"Switch.GetStatus",
"Switch.Toggle",
"Switch.Set",
"Schedule.List",
"Schedule.DeleteAll",
"Schedule.Delete",
"Schedule.Update",
"Schedule.Create",
"Input.SetConfig",
"Input.GetConfig",
"Input.GetStatus",
"Webhook.ListSupported",
"Webhook.List",
"Webhook.DeleteAll",
"Webhook.Delete",
"Webhook.Update",
"Webhook.Create",
"Mqtt.SetConfig",
"Mqtt.GetConfig",
"Mqtt.GetStatus",
"Cloud.SetConfig",
"Cloud.GetConfig",
"Cloud.GetStatus",
"BLE.SetConfig",
"BLE.GetConfig",
"BLE.GetStatus",
"Eth.SetConfig",
"Eth.GetConfig",
"Eth.GetStatus",
"Wifi.Scan",
"Wifi.SetConfig",
"Wifi.GetConfig",
"Wifi.GetStatus",
"Sys.SetConfig",
"Sys.GetConfig",
"Sys.GetStatus",
"HTTP.GET",
"Shelly.ListMethods",
"Shelly.PutTLSClientKey",
"Shelly.PutTLSClientCert",
"Shelly.PutUserCA",
"Shelly.Reboot",
"Shelly.SetAuth",
"Shelly.Update",
"Shelly.CheckForUpdate",
"Shelly.DetectLocation",
"Shelly.ListTimezones",
"Shelly.GetStatus",
"Shelly.FactoryReset",
"Shelly.ResetWiFiConfig",
"Shelly.GetConfig",
"Shelly.GetDeviceInfo",
"Shelly.ListProfiles",
"Shelly.SetProfile"
]
}
}
{
"methods": [
"Switch.SetConfig",
"Switch.GetConfig",
"Switch.GetStatus",
"Switch.Toggle",
"Switch.Set",
"Schedule.List",
"Schedule.DeleteAll",
"Schedule.Delete",
"Schedule.Update",
"Schedule.Create",
"Input.SetConfig",
"Input.GetConfig",
"Input.GetStatus",
"Webhook.ListSupported",
"Webhook.List",
"Webhook.DeleteAll",
"Webhook.Delete",
"Webhook.Update",
"Webhook.Create",
"Mqtt.SetConfig",
"Mqtt.GetConfig",
"Mqtt.GetStatus",
"Cloud.SetConfig",
"Cloud.GetConfig",
"Cloud.GetStatus",
"BLE.SetConfig",
"BLE.GetConfig",
"BLE.GetStatus",
"Eth.SetConfig",
"Eth.GetConfig",
"Eth.GetStatus",
"Wifi.Scan",
"Wifi.SetConfig",
"Wifi.GetConfig",
"Wifi.GetStatus",
"Sys.SetConfig",
"Sys.GetConfig",
"Sys.GetStatus",
"HTTP.GET",
"Shelly.ListMethods",
"Shelly.PutTLSClientKey",
"Shelly.PutTLSClientCert",
"Shelly.PutUserCA",
"Shelly.Reboot",
"Shelly.SetAuth",
"Shelly.Update",
"Shelly.CheckForUpdate",
"Shelly.DetectLocation",
"Shelly.ListTimezones",
"Shelly.GetStatus",
"Shelly.FactoryReset",
"Shelly.ResetWiFiConfig",
"Shelly.GetConfig",
"Shelly.GetDeviceInfo",
"Shelly.ListProfiles",
"Shelly.SetProfile"
]
}
Shelly.GetDeviceInfo example
- Shelly.GetDeviceInfo HTTP GET Request
- Shelly.GetDeviceInfo Curl Request
- Shelly.GetDeviceInfo Mos Request
http://192.168.33.1/rpc/Shelly.GetDeviceInfo
curl -X POST -d '{"id":1,"method":"Shelly.GetDeviceInfo"}' http://${SHELLY}/rpc
mos --port ${PORT} call Shelly.GetDeviceInfo
Response
- Shelly.GetDeviceInfo HTTP GET Response
- Shelly.GetDeviceInfo Curl Response
- Shelly.GetDeviceInfo Mos Response
{
"id": "shellypro4pm-f008d1d8b8b8",
"mac": "F008D1D8B8B8",
"model": "SPSW-004PE16EU",
"gen": 2,
"fw_id": "20210720-153353/0.6.7-gc36674b",
"ver": "0.6.7",
"app": "FourPro",
"auth_en": true,
"auth_domain": "shellypro4pm-f008d1d8b8b8",
"discoverable": false
}
{
"id": 1,
"src": "shellypro4pm-f008d1d8b8b8",
"params": {
"id": "shellypro4pm-f008d1d8b8b8",
"mac": "F008D1D8B8B8",
"model": "SPSW-004PE16EU",
"gen": 2,
"fw_id": "20210720-153353/0.6.7-gc36674b",
"ver": "0.6.7",
"app": "FourPro",
"auth_en": true,
"auth_domain": "shellypro4pm-f008d1d8b8b8",
"discoverable": false
}
}
{
"id": "shellypro4pm-f008d1d8b8b8",
"mac": "F008D1D8B8B8",
"model": "SPSW-004PE16EU",
"gen": 2,
"fw_id": "20210720-153353/0.6.7-gc36674b",
"ver": "0.6.7",
"app": "FourPro",
"auth_en": true,
"auth_domain": "shellypro4pm-f008d1d8b8b8",
"discoverable": false
}
Shelly.ListProfiles example
- Shelly.ListProfiles HTTP GET Request
- Shelly.ListProfiles Curl Request
- Shelly.ListProfiles Mos Request
http://192.168.33.1/rpc/Shelly.ListProfiles
curl -X POST -d '{"id":1,"method":"Shelly.ListProfiles"}' http://${SHELLY}/rpc
mos --port ${PORT} call Shelly.ListProfiles
Response
- Shelly.ListProfiles HTTP GET Response
- Shelly.ListProfiles Curl Response
- Shelly.ListProfiles Mos Response
{
"profiles": {
"cover": {
"components": [
{
"type": "input",
"count": 2
},
{
"type": "cover",
"count": 1
}
]
},
"switch": {
"components": [
{
"type": "input",
"count": 2
},
{
"type": "switch",
"count": 2
}
]
}
}
}
{
"id": 1,
"src": "shellyplus2pm-a8032ab636ec",
"params": {
"profiles": {
"cover": {
"components": [
{
"type": "input",
"count": 2
},
{
"type": "cover",
"count": 1
}
]
},
"switch": {
"components": [
{
"type": "input",
"count": 2
},
{
"type": "switch",
"count": 2
}
]
}
}
}
}
{
"profiles": {
"cover": {
"components": [
{
"type": "input",
"count": 2
},
{
"type": "cover",
"count": 1
}
]
},
"switch": {
"components": [
{
"type": "input",
"count": 2
},
{
"type": "switch",
"count": 2
}
]
}
}
}
Shelly.SetProfile example
- Shelly.SetProfile HTTP GET Request
- Shelly.SetProfile Curl Request
- Shelly.SetProfile Mos Request
http://192.168.33.1/rpc/Shelly.SetProfile?name="cover"
curl -X POST -d '{"id":1,"method":"Shelly.SetProfile","params":{"name":"cover"}}' http://${SHELLY}/rpc
mos --port ${PORT} call Shelly.SetProfile '{"name":"cover"}'
Response
- Shelly.SetProfile HTTP GET Response
- Shelly.SetProfile Curl Response
- Shelly.SetProfile Mos Response
{
"profile_was": "switch"
}
{
"id": 1,
"src": "shellyplus2pm-a8032ab636ec",
"params": {
"profile_was": "switch"
}
}
{
"profile_was": "switch"
}
Shelly.ListTimezones example
- Shelly.ListTimezones HTTP GET Request
- Shelly.ListTimezones Curl Request
- Shelly.ListTimezones Mos Request
http://192.168.33.1/rpc/Shelly.ListTimezones
curl -X POST -d '{"id":1,"method":"Shelly.ListTimezones"}' http://${SHELLY}/rpc
mos --port ${PORT} call Shelly.ListTimezones
Response
- Shelly.ListTimezones HTTP GET Response
- Shelly.ListTimezones Curl Response
- Shelly.ListTimezones Mos Response
{
"timezones": [
"Africa/Abidjan",
"Africa/Accra",
"Africa/Addis_Ababa",
"Africa/Algiers",
"Africa/Asmara",
"Africa/Asmera"
],
"offset": 0,
"total": 597
}
{
"id": 1,
"src": "shellyplus2pm-a8032ab636ec",
"params": {
"timezones": [
"Africa/Abidjan",
"Africa/Accra",
"Africa/Addis_Ababa",
"Africa/Algiers",
"Africa/Asmara",
"Africa/Asmera"
],
"offset": 0,
"total": 597
}
}
{
"timezones": [
"Africa/Abidjan",
"Africa/Accra",
"Africa/Addis_Ababa",
"Africa/Algiers",
"Africa/Asmara",
"Africa/Asmera"
],
"offset": 0,
"total": 597
}
Shelly.DetectLocation example
- Shelly.DetectLocation HTTP GET Request
- Shelly.DetectLocation Curl Request
- Shelly.DetectLocation Mos Request
http://192.168.33.1/rpc/Shelly.DetectLocation
curl -X POST -d '{"id":1,"method":"Shelly.DetectLocation"}' http://${SHELLY}/rpc
mos --port ${PORT} call Shelly.DetectLocation
Response
- Shelly.DetectLocation HTTP GET Response
- Shelly.DetectLocation Curl Response
- Shelly.DetectLocation Mos Response
{
"tz": "Europe/Sofia",
"lat": 42.67236,
"lon": 23.38738
}
{
"id": 1,
"src": "shellyplus2pm-a8032ab636ec",
"params": {
"tz": "Europe/Sofia",
"lat": 42.67236,
"lon": 23.38738
}
}
{
"tz": "Europe/Sofia",
"lat": 42.67236,
"lon": 23.38738
}
Shelly.CheckForUpdate example
- Shelly.CheckForUpdate HTTP GET Request
- Shelly.CheckForUpdate Curl Request
- Shelly.CheckForUpdate Mos Request
http://192.168.33.1/rpc/Shelly.CheckForUpdate
curl -X POST -d '{"id":1,"method":"Shelly.CheckForUpdate"}' http://${SHELLY}/rpc
mos --port ${PORT} call Shelly.CheckForUpdate
Response
- Shelly.CheckForUpdate HTTP GET Response
- Shelly.CheckForUpdate Curl Response
- Shelly.CheckForUpdate Mos Response
{
"beta": {
"version": "0.5.1",
"build_id": "20210610-122509/g4bbec18"
}
}
{
"id": 1,
"src": "shellyplus2pm-a8032ab636ec",
"params": {
"beta": {
"version": "0.5.1",
"build_id": "20210610-122509/g4bbec18"
}
}
}
{
"beta": {
"version": "0.5.1",
"build_id": "20210610-122509/g4bbec18"
}
}
Shelly.Update example
- Shelly.Update HTTP GET Request
- Shelly.Update Curl Request
- Shelly.Update Mos Request
http://192.168.33.1/rpc/Shelly.Update?stage="beta"
curl -X POST -d '{"id":1,"method":"Shelly.Update","params":{"stage":"beta"}}' http://${SHELLY}/rpc
mos --port ${PORT} call Shelly.Update '{"stage":"beta"}'
Response
- Shelly.Update HTTP GET Response
- Shelly.Update Curl Response
- Shelly.Update Mos Response
null
{
"id": 1,
"src": "shellyplus2pm-a8032ab636ec",
"params": null
}
null
Shelly.FactoryReset example
- Shelly.FactoryReset HTTP GET Request
- Shelly.FactoryReset Curl Request
- Shelly.FactoryReset Mos Request
http://192.168.33.1/rpc/Shelly.FactoryReset
curl -X POST -d '{"id":1,"method":"Shelly.FactoryReset"}' http://${SHELLY}/rpc
mos --port ${PORT} call Shelly.FactoryReset
Response
- Shelly.FactoryReset HTTP GET Response
- Shelly.FactoryReset Curl Response
- Shelly.FactoryReset Mos Response
null
{
"id": 1,
"src": "shellyplus2pm-a8032ab636ec",
"params": null
}
null
Shelly.ResetWiFiConfig example
- Shelly.ResetWiFiConfig HTTP GET Request
- Shelly.ResetWiFiConfig Curl Request
- Shelly.ResetWiFiConfig Mos Request
http://192.168.33.1/rpc/Shelly.ResetWiFiConfig
curl -X POST -d '{"id":1,"method":"Shelly.ResetWiFiConfig"}' http://${SHELLY}/rpc
mos --port ${PORT} call Shelly.ResetWiFiConfig
Response
- Shelly.ResetWiFiConfig HTTP GET Response
- Shelly.ResetWiFiConfig Curl Response
- Shelly.ResetWiFiConfig Mos Response
null
{
"id": 1,
"src": "shellyplus2pm-a8032ab636ec",
"params": null
}
null
Shelly.Reboot example
- Shelly.Reboot HTTP GET Request
- Shelly.Reboot Curl Request
- Shelly.Reboot Mos Request
http://192.168.33.1/rpc/Shelly.Reboot
curl -X POST -d '{"id":1,"method":"Shelly.Reboot"}' http://${SHELLY}/rpc
mos --port ${PORT} call Shelly.Reboot
Response
- Shelly.Reboot HTTP GET Response
- Shelly.Reboot Curl Response
- Shelly.Reboot Mos Response
null
{
"id": 1,
"src": "shellyplus2pm-a8032ab636ec",
"params": null
}
null
Shelly.SetAuth example
- Shelly.SetAuth HTTP GET Request
- Shelly.SetAuth Curl Request
- Shelly.SetAuth Mos Request
http://192.168.33.1/rpc/Shelly.SetAuth?user="admin"&realm="shellypro4pm-f008d1d8b8b8"&ha1="7f22c63135ab3c86d165d812fbab2ac30950ee53d86451e508c699e5de9c39ac"
curl -X POST -d '{"id":1,"method":"Shelly.SetAuth","params":{"user":"admin","realm":"shellypro4pm-f008d1d8b8b8","ha1":"7f22c63135ab3c86d165d812fbab2ac30950ee53d86451e508c699e5de9c39ac"}}' http://${SHELLY}/rpc
mos --port ${PORT} call Shelly.SetAuth '{"user":"admin","realm":"shellypro4pm-f008d1d8b8b8","ha1":"7f22c63135ab3c86d165d812fbab2ac30950ee53d86451e508c699e5de9c39ac"}'
Response
- Shelly.SetAuth HTTP GET Response
- Shelly.SetAuth Curl Response
- Shelly.SetAuth Mos Response
null
{
"id": 1,
"src": "shellyplus2pm-a8032ab636ec",
"params": null
}
null
Shelly.PutTLSClientKey example
- Shelly.PutTLSClientKey HTTP GET Request
- Shelly.PutTLSClientKey Curl Request
- Shelly.PutTLSClientKey Mos Request
http://192.168.33.1/rpc/Shelly.PutTLSClientKey?data="MIIB4TCCAYegAwIBAgIRKjikHJYKBN5CsiilC+g0mAIwCgYIKoZIzj0EAwIwUDEk"&append=true
curl -X POST -d '{"id":1,"method":"Shelly.PutTLSClientKey","params":{"data":"MIIB4TCCAYegAwIBAgIRKjikHJYKBN5CsiilC+g0mAIwCgYIKoZIzj0EAwIwUDEk","append":true}}' http://${SHELLY}/rpc
mos --port ${PORT} call Shelly.PutTLSClientKey '{"data":"MIIB4TCCAYegAwIBAgIRKjikHJYKBN5CsiilC+g0mAIwCgYIKoZIzj0EAwIwUDEk","append":true}'
Response
- Shelly.PutTLSClientKey HTTP GET Response
- Shelly.PutTLSClientKey Curl Response
- Shelly.PutTLSClientKey Mos Response
{
"len": 64
}
{
"id": 1,
"src": "shellyplus2pm-a8032ab636ec",
"params": {
"len": 64
}
}
{
"len": 64
}
Shelly.PutTLSClientCert example
- Shelly.PutTLSClientCert HTTP GET Request
- Shelly.PutTLSClientCert Curl Request
- Shelly.PutTLSClientCert Mos Request
http://192.168.33.1/rpc/Shelly.PutTLSClientCert?data="MIIB4TCCAYegAwIBAgIRKjikHJYKBN5CsiilC+g0mAIwCgYIKoZIzj0EAwIwUDEk"&append=true
curl -X POST -d '{"id":1,"method":"Shelly.PutTLSClientCert","params":{"data":"MIIB4TCCAYegAwIBAgIRKjikHJYKBN5CsiilC+g0mAIwCgYIKoZIzj0EAwIwUDEk","append":true}}' http://${SHELLY}/rpc
mos --port ${PORT} call Shelly.PutTLSClientCert '{"data":"MIIB4TCCAYegAwIBAgIRKjikHJYKBN5CsiilC+g0mAIwCgYIKoZIzj0EAwIwUDEk","append":true}'
Response
- Shelly.PutTLSClientCert HTTP GET Response
- Shelly.PutTLSClientCert Curl Response
- Shelly.PutTLSClientCert Mos Response
{
"len": 64
}
{
"id": 1,
"src": "shellyplus2pm-a8032ab636ec",
"params": {
"len": 64
}
}
{
"len": 64
}
Shelly.PutUserCA example
- Shelly.PutUserCA HTTP GET Request
- Shelly.PutUserCA Curl Request
- Shelly.PutUserCA Mos Request
http://192.168.33.1/rpc/Shelly.PutUserCA?data="MIIB4TCCAYegAwIBAgIRKjikHJYKBN5CsiilC+g0mAIwCgYIKoZIzj0EAwIwUDEk"&append=true
curl -X POST -d '{"id":1,"method":"Shelly.PutUserCA","params":{"data":"MIIB4TCCAYegAwIBAgIRKjikHJYKBN5CsiilC+g0mAIwCgYIKoZIzj0EAwIwUDEk","append":true}}' http://${SHELLY}/rpc
mos --port ${PORT} call Shelly.PutUserCA '{"data":"MIIB4TCCAYegAwIBAgIRKjikHJYKBN5CsiilC+g0mAIwCgYIKoZIzj0EAwIwUDEk","append":true}'
Response
- Shelly.PutUserCA HTTP GET Response
- Shelly.PutUserCA Curl Response
- Shelly.PutUserCA Mos Response
{
"len": 64
}
{
"id": 1,
"src": "shellyplus2pm-a8032ab636ec",
"params": {
"len": 64
}
}
{
"len": 64
}
Shelly.GetComponents example
- Shelly.GetComponents HTTP GET Request
- Shelly.GetComponents Curl Request
- Shelly.GetComponents Mos Request
http://192.168.33.1/rpc/Shelly.GetComponents?include=["config"]
curl -X POST -d '{"id":1,"method":"Shelly.GetComponents","params":{"include":["config"]}}' http://${SHELLY}/rpc
mos --port ${PORT} call Shelly.GetComponents '{"include":["config"]}'
Response
- Shelly.GetComponents HTTP GET Response
- Shelly.GetComponents Curl Response
- Shelly.GetComponents Mos Response
{
"components": [
{
"key": "ble",
"config": {
"enable": true,
"rpc": {
"enable": true
},
"observer": {
"enable": false
}
}
},
{
"key": "boolean:201",
"config": {
"id": 201,
"name": "",
"meta": null,
"persisted": false,
"default_value": true
}
}
]
}
{
"id": 1,
"src": "shelly1pmminig3-84fce63fe000",
"params": {
"components": [
{
"key": "ble",
"config": {
"enable": true,
"rpc": {
"enable": true
},
"observer": {
"enable": false
}
}
},
{
"key": "boolean:201",
"config": {
"id": 201,
"name": "",
"meta": null,
"persisted": false,
"default_value": true
}
}
]
}
}
{
"components": [
{
"key": "ble",
"config": {
"enable": true,
"rpc": {
"enable": true
},
"observer": {
"enable": false
}
}
},
{
"key": "boolean:201",
"config": {
"id": 201,
"name": "",
"meta": null,
"persisted": false,
"default_value": true
}
}
]
}