hub.device.groups.list
- Version: 1.0
- Classes: UI
- Title: Scene manager categories
- Description: Returns an array of device groups
Edit
Field | Type | Required | Description |
---|---|---|---|
ids | array of IDs | – | Filter output with only these device groups |
version | string, SHA1 (hex checksum) | – | Version/hash of a request If a “version” parameter is passed, and the response matches this version sha1 , return empty response with version only. |
Edit
- Array/filtered array of device groups or version of device groups list.
Edit
Code | Message | Data |
---|---|---|
-32602 | Wrong params, | |
-32602 | Wrong field of object |
Edit
Edit
Edit
Get the full list call:
{
"id": "__ID__",
"api": "1.0",
"method": "hub.device.groups.list",
"params": {
}
}
Edit
{
"error":null,
"id":"633216245ab7be12415365c4",
"result":{
"deviceGroups":[
{
"_id":"633216245ab7be12415365c4",
"name":"SecuritySensors 01",
"categories":[
{
"category":"security_sensor",
"subcategories":[
"co2",
"leak"
]
},
{
"category":"scene_controller",
"exceptions":[
"panic"
]
}
],
"devices":[
],
"exceptions":[
],
"persistent":false
}
],
"version":"37095e6a9af5f92895099c7ddddd3c23caface71"
}
}
Edit
Edit
Optimised request: client has item groups list of specific version already and asks about the changed one: call:
{
"id": "__ID__",
"api": "1.0",
"method": "hub.device.groups.list",
"params": {
"version": "37095e6a9af5f92895099c7ddddd3c23caface71"
}
}
Edit
{
"api": "1.0",
"error": null,
"id": "633216245ab7be12415365c4",
"result": {
"version": "37095e6a9af5f92895099c7ddddd3c23caface71"
}
}
Note: By default, returns full list of item group objects. Note: The “version” can be used to avoid passing data from a controller to a client, if the client already has the same version of data.