hub.scenes.device.group.create
- Version: 1.0
- Classes: UI
- Title: Scene manager categories
- Description: Create a new device group object.
Edit
Field | Type | Required | Description |
---|---|---|---|
name | string | + | A name of a group. Should be unique, should meet firmware name length restrictions. Current firmware limits name length of majority of objects to 128 symbols. |
categories | array of objects | – | An array of category filters. Defines a set of device categories that form a set of devices in the group. |
categories[].category | string | – | A category to include to a Device Group. If not present, all categories match the group. |
categories[].subcategories | array of strings | – | A subcategories list to include to a Device Group. If an empty array, or not present or empty, all subcategories of a category match the group. Otherwise, only categories present in the list match the group. |
devices | array of device IDs | – | Device identifiers to be added to a set defined by categories collection |
exceptions | array of device IDs | – | Device identifiers to be excluded from a device group |
persistent | bool | – | Defines if an object is persistent. Default value is false. If a device group is persistent, it cannot be removed with ordinal hub.scenes.device.group.delete call. Can be used for predefined sets of groups |
Edit
- Empty result.
Edit
Code | Message | Data |
---|---|---|
-32602 | Wrong params, | |
-32602 | Wrong field of object | |
-32600 | Value is too long, | |
-32500 | No device found! |
Edit
Broadcasts | Description |
---|---|
hub.scenes.device.group.created | Informs about the device group was successfully created |
Edit
Edit
{
"id":"_ID_",
"jsonrpc":"2.0",
"api": "1.0",
"method":"hub.scenes.device.group.create",
"params":{
"name": "group_name",
"categories": [
{ "category": "security_sensor", "subcategories": [ "co2", "leak" ] }
{ "category": "scene_controller", "subcategories": [ "panic" ] }
],
"devices": [],
"exceptions": [],
"persistent": false
}
}
Edit
{
"error": null,
"id": "_ID_",
"method": "hub.scenes.device.group.create",
"result": {}
}