Group
The virtual Group
component is used to store a list of components keys. It uses Group
as RPC namespace and has the following methods:
Group.SetConfig
to update the component's configurationGroup.GetConfig
to obtain the component's configurationGroup.GetStatus
to obtain the component's statusGroup.Set
to update the component's value
Methods
Group.SetConfig
Property | Type | Description |
---|---|---|
| number | Id of the component instance |
| object | Configuration that the method takes |
Find more about the config properties in config section
Group.GetConfig
Properties:
Property | Type | Description |
---|---|---|
| number | Id of the component instance |
Find the Group.GetConfig response properties in config section
Group.GetStatus
Properties:
Property | Type | Description |
---|---|---|
| number | Id of the component instance |
Find more about the status response properties in status section
Group.Set
This method updates the value of the Group component.
Request
Parameters:
Property | Type | Description |
---|---|---|
| number | Id of the component instance. Required |
| array of strings | List of valid components keys (in format |
Configuration
The configuration of the Group component contains information about the default value, whether it should persist after reboot,
and properties of how it will be rendered in the UI. To Get/Set the configuration of the Group component its id
must be specified.
Properties:
Property | Type | Description |
---|---|---|
| number | Id of the component instance |
| string or null | Name of the component instance |
| object or null | Stores the component's metadata |
Status
The status of the Group component contains information about its current value, the timestamp for the value update, and the source of the last command. To obtain the status of the Group component its id
must be specified.
Properties:
Property | Type | Description |
---|---|---|
| string | Source of the last command |
| array of strings | List of valid components keys (in format |
| number | Unix timestamp for the value update |
Examples
Group.SetConfig example
- Group.SetConfig HTTP GET Request
- Group.SetConfig Curl Request
- Group.SetConfig Mos Request
http://192.168.33.1/rpc/Group.SetConfig?id=200&config={"name":"Thermostat"}
curl -X POST -d '{"id":1,"method":"Group.SetConfig","params":{"id":200,"config":{"name":"Thermostat"}}}' http://${SHELLY}/rpc
mos --port ${PORT} call Group.SetConfig '{"id":200,"config":{"name":"Thermostat"}}'
Response
- Group.SetConfig HTTP GET Response
- Group.SetConfig Curl Response
- Group.SetConfig Mos Response
{
"restart_required": false
}
{
"id": 1,
"src": "shelly1pmminig3-84fce63fe000",
"params": {
"restart_required": false
}
}
{
"restart_required": false
}
Group.GetConfig example
- Group.GetConfig HTTP GET Request
- Group.GetConfig Curl Request
- Group.GetConfig Mos Request
http://192.168.33.1/rpc/Group.GetConfig?id=200
curl -X POST -d '{"id":1,"method":"Group.GetConfig","params":{"id":200}}' http://${SHELLY}/rpc
mos --port ${PORT} call Group.GetConfig '{"id":200}'
Response
- Group.GetConfig HTTP GET Response
- Group.GetConfig Curl Response
- Group.GetConfig Mos Response
{
"id": 200,
"name": "Thermostat"
}
{
"id": 1,
"src": "shelly1pmminig3-84fce63fe000",
"params": {
"id": 200,
"name": "Thermostat"
}
}
{
"id": 200,
"name": "Thermostat"
}
Group.GetStatus example
- Group.GetStatus HTTP GET Request
- Group.GetStatus Curl Request
- Group.GetStatus Mos Request
http://192.168.33.1/rpc/Group.GetStatus?id=200
curl -X POST -d '{"id":1,"method":"Group.GetStatus","params":{"id":200}}' http://${SHELLY}/rpc
mos --port ${PORT} call Group.GetStatus '{"id":200}'
Response
- Group.GetStatus HTTP GET Response
- Group.GetStatus Curl Response
- Group.GetStatus Mos Response
{
"value": [
"boolean:200",
"enum:200"
],
"source": "rpc",
"last_update_ts": 1700864253
}
{
"id": 1,
"src": "shelly1pmminig3-84fce63fe000",
"params": {
"value": [
"boolean:200",
"enum:200"
],
"source": "rpc",
"last_update_ts": 1700864253
}
}
{
"value": [
"boolean:200",
"enum:200"
],
"source": "rpc",
"last_update_ts": 1700864253
}
Group.Set example
- Group.Set HTTP GET Request
- Group.Set Curl Request
- Group.Set Mos Request
http://192.168.33.1/rpc/Group.Set?id=200&value=["boolean:200","enum:200"]
curl -X POST -d '{"id":1,"method":"Group.Set","params":{"id":200,"value":["boolean:200","enum:200"]}}' http://${SHELLY}/rpc
mos --port ${PORT} call Group.Set '{"id":200,"value":["boolean:200","enum:200"]}'
Response
- Group.Set HTTP GET Response
- Group.Set Curl Response
- Group.Set Mos Response
null
{
"id": 1,
"src": "shelly1pmminig3-84fce63fe000",
"params": null
}
null