Cloud
The cloud component is called Cloud
. It handles cloud services of a device. The cloud component uses cloud
as RPC namespace and provides the methods:
Cloud.SetConfig
to update the component's configurationCloud.GetConfig
to obtain the component's configurationCloud.GetStatus
to obtain the component's status
It uses the key cloud
when enumerated in objects including multiple component payloads, like Shelly.GetStatus
.
Methods
Cloud.SetConfig
Properties:
Property | Type | Description |
---|---|---|
| object | Configuration that the method takes |
Find more about the config properties in config section
Cloud.GetConfig
The Cloud.GetConfig method does not own any request properties.Find the response properties in config section
Cloud.GetStatus
The Cloud.GetStatus method does not own any request properties.Find the response properties in status section
Configuration
The configuration of the Cloud component shows information about the connection to the cloud.
Property | Type | Description |
---|---|---|
| boolean | True if cloud connection is enabled, false otherwise |
| string or null | Name of the server to which the device is connected |
Status
Through the status of the Cloud component it can be checked whether the device is connected to the cloud.
Attributes in the result:
Property | Type | Description |
---|---|---|
| boolean | True if the device is connected to the Shelly cloud, false otherwise |
Examples
Cloud.SetConfig example
- Cloud.SetConfig HTTP GET Request
- Cloud.SetConfig Curl Request
- Cloud.SetConfig Mos Request
http://192.168.33.1/rpc/Cloud.SetConfig?config={"enable":true}
curl -X POST -d '{"id":1,"method":"Cloud.SetConfig","params":{"config":{"enable":true}}}' http://${SHELLY}/rpc
mos --port ${PORT} call Cloud.SetConfig '{"config":{"enable":true}}'
Response
- Cloud.SetConfig HTTP GET Response
- Cloud.SetConfig Curl Response
- Cloud.SetConfig Mos Response
{
"restart_required": false
}
{
"id": 1,
"src": "shellyplus1pm-441793ce3f08",
"params": {
"restart_required": false
}
}
{
"restart_required": false
}
Cloud.GetConfig example
- Cloud.GetConfig HTTP GET Request
- Cloud.GetConfig Curl Request
- Cloud.GetConfig Mos Request
http://192.168.33.1/rpc/Cloud.GetConfig
curl -X POST -d '{"id":1,"method":"Cloud.GetConfig"}' http://${SHELLY}/rpc
mos --port ${PORT} call Cloud.GetConfig
Response
- Cloud.GetConfig HTTP GET Response
- Cloud.GetConfig Curl Response
- Cloud.GetConfig Mos Response
{
"enable": false,
"server": "iot.shelly.cloud:6012/jrpc"
}
{
"id": 1,
"src": "shellyplus1pm-441793ce3f08",
"params": {
"enable": false,
"server": "iot.shelly.cloud:6012/jrpc"
}
}
{
"enable": false,
"server": "iot.shelly.cloud:6012/jrpc"
}
Cloud.GetStatus example
- Cloud.GetStatus HTTP GET Request
- Cloud.GetStatus Curl Request
- Cloud.GetStatus Mos Request
http://192.168.33.1/rpc/Cloud.GetStatus
curl -X POST -d '{"id":1,"method":"Cloud.GetStatus"}' http://${SHELLY}/rpc
mos --port ${PORT} call Cloud.GetStatus
Response
- Cloud.GetStatus HTTP GET Response
- Cloud.GetStatus Curl Response
- Cloud.GetStatus Mos Response
{
"connected": true
}
{
"id": 1,
"src": "shellyplus1pm-441793ce3f08",
"params": {
"connected": true
}
}
{
"connected": true
}