hub.scenes.block.data.list
- Version: 0.0.1
- Classes: UI
- Title: Scene manager categories
- Description: The command is a way to get multiple result sets of data related to each other. Should describe and list any type present to describe Item Value Type of Scene Value Type.
- Terms: The command is a way to get multiple result sets of data related to each other. Should describe and list any type present to describe Item Value Type of Scene Value Type.
- Abstract: The new hub.scenes.block.data.list command is intended to provide information that can be used to a user interface (UI) to compose scene blocks by themselves.
The previous approach to provide data for a UI was to use hub.scenes.block.list API command to obtain preformatted when blocks for any item listed in a static data source.The new approach should provide data to compose comparison operations for any kind of data represented by devices/items available on a hub.The new command will provide a number of collections to use.
They are:
- List of value types available for the current version of the firmware. This collection will contain a list of types that can be used to compose an item of a logical device. Example of a value type: bool, int, float, string, token, array, dictionary,
- List of value type families with a listing of value types bound to the same family. A value type family is a group of types for which the same list of comparison methods available from the scenes engine can be applied.
Edit
Field | Type | Required | Description |
---|---|---|---|
valueTypes | boolean | – | If true, show a list of Item Value Types supported by the current version of the firmware. |
scalableValueTypes | boolean | – | If true, shows a list of scalable value types (value types with units) supported by the firmware. |
valueScales | boolean | – | If true, shows a list of value for every present value type. |
scenesValueTypes | boolean | – | If true, show a list of Scenes value Types. They are types to represent some scene-specific data, but there is no ability to create an item of those value types. |
valueTypeFamilies | boolean | – | If true, shows a list of value-type families. Value types can be united to families. A family of value types can be used to indicate what common operations can be applied to all types of a family. |
comparisonOperators | boolean | – | If true, shows a list of value-type family-related comparison methods. |
comparisonMethods | boolean | – | If true, shows a list of comparison methods present in the firmware, and shows their metadata, that indicates what kind of parameters can be passed to a particular comparison method. via as command call. |
actionMethods | boolean | – | If true, shows a list of actions present in the firmware, and shows their metadata, that indicates what kind of actions are available in scenes. |
advancedScenesVersion | boolean | – | If true, extracts advanced_scenes feature version. The same value can be obtained via as hub.features.list command call. |
Edit
Field | Type | Required | Description |
---|---|---|---|
valueTypes | object | – | Contains a list of value types present in the firmware, except scalable value types. which are included. By them full set of rules is filtered |
valueTypes.list | array of strings | + | An array of value type names. |
scalableValueTypes | object | – | Contains a list of scalable value types/(values with units), available for that version of the firmware. |
scalableValueTypes.list | array of strings | + | An array of scalable value type names. |
valueScales | object | – | Lists available scales/units of a specific scalable value type. Indicates whether a scalable value has a converter between different , has a default . |
valueScales.{scalable type name} | object | – | Information about particular scalable type |
valueScales.{scalable type name}.scales | array of strings | + | A list of for a value type |
valueScales.{scalable type name}.converter | boolean | – | If true, a value has a converter between different . |
valueScales.{scalable type name}.defaultScale | string | – | If a type has a default , shows its name. |
scenesValueTypes | object | – | Contains a list of Scene value types present in the firmware. Examples: , . |
scenesValueTypes.list | array of strings | + | An array of value type names. |
valueTypeFamilies | object | – | A list of families of value types. A single value type family can have the same list of comparison methods for any type present in the family. |
valueTypeFamilies.{familyName} | object | + | A list of value types that forms a family. |
comparisonOperators | object | – | Describes comparison operators available for different value type families. |
comparisonOperators.families | array of family operations objects | + | A list of different sets of comparison methods bound to a specific value type family |
comparisonMethods | object | – | Describes properties of different comparison methods. |
comparisonMethods.info | object | – | Describes a version of a comparison methods metadata. |
comparisonMethods.{methodName}.dataSource | array of objects | – | An array of data sources supported by the comparison method. |
comparisonMethods.{methodName}.dataSource[].index | int | – | The position of a data source is a method (0 – left, 1 – right in case of two operands). One of the fields or is required. |
comparisonMethods.{methodName}.dataSource[].types | array of data source types | + | Data source types that are supported on this position or field. Possible data sources: , , , , , . Future data sources: , . |
comparisonMethods.{methodName}.dataSource[].field | string | – | Optional. The field name of a parameter. One of the fields or is required. |
comparisonMethods.{methodName}.comparator | object | – | Optional. description of a comparator if needed |
comparisonMethods.{methodName}.comparator.type | string | + | A type of a comparator possible values |
comparisonMethods.{methodName}.comparator.options | array of strings | – | A name of a field where the comparator is expected by a comparison method |
comparisonMethods.{methodName}.comparator.field | string | – | A list of comparators supported by the comparison method |
actionMethods | object | – | Describes properties of different action methods. |
actionMethods.info | object | – | Describes a version of a action methods metadata. |
actionMethods.{actionName}.dataSource | array of objects | – | An array of data sources supported by the action methods. |
actionMethods.{actionName}.dataSource[].index | int | – | The position of a data source is a method (0 – left, 1 – right in case of two operands). One of the fields or is required. |
actionMethods.{actionName}.dataSource[].types | array of data source types | + | Data source types that are supported on this position or field. Possible data sources: , , , . |
actionMethods.{actionName}.dataSource[].field | string | – | Optional. The field name of a parameter. One of the fields or is required. |
actionMethods.{actionName}.dataTarget | array of objects | – | An array of data targets supported by the action method. |
actionMethods.{actionName}.dataTarget[].index | int | – | The position of a data target is a method (0 – left, 1 – right in case of two operands). One of the fields or is required. |
actionMethods.{actionName}.dataTarget[].types | array of data target types | + | Data target types that are supported on this position or field. Possible data targets: , , , , , , , , . |
actionMethods.{actionName}.dataTarget[].field | string | – | Optional. The field name of a parameter. One of the fields or is required. |
actionMethods.{actionName}.execution | string | + | An array of execution modes supported by the action method, which can be or . |
actionMethods.{actionName}.scope | string | – | Optional. An array of scopes in which the action method can be executed, such as or . |
actionMethods.{actionName}.typeSystem | string | – | Optional. A string that specifies the type system used by the action method, such as . |
advancedScenesVersion | string | – | The value of advanced_scenes feature. |
Value Type Family Operations:
Field | Type | Required | Description |
---|---|---|---|
family | string | + | Name of a value type family. |
methods | array of objects | + | A list of comparison methods is available for a value of any type from the value type family. |
methods[].op | string | + | A comparison operation to use with a comparison method as a comparator. |
methods[].name | string | + | A name of a comparator. |
methods[].method | string | + | A comparison method name to compose a when block with (like , , etc). |
Edit
Edit
{
"method": "hub.scenes.block.data.list",
"params": {
"valueTypes": true,
"scalableValueTypes": true,
"valueScales": true,
"scenesValueTypes": true,
"valueTypeFamilies": true,
"comparisonOperators": true,
"comparisonMethods": true,
"actionMethods": true,
"advancedScenesVersion": true
}
}
Edit
{
"api": "1.0",
"error": null,
"method": "hub.scenes.block.data.list",
"id": "<REQUEST_ID>",
"result": {
"valueTypes": {
"list": [ "bool", "int", "float", "string", "token", "dictionary", "array", "rgb", ... ]
},
"scalableValueTypes": {
"list": [ "illuminance", "pressure", ... 38 more names ]
},
"valueScales": {
"temperature": { "scales": [ "celsius", "fahrenheit" ], "converter": true, "defaultScale": "fahrenheit" },
...
"velocity": { "scales": [ "meter_per_second", "mile_per_hour" ], "converter": false }
},
"scenesValueTypes": { "list": ["24_hours_interval", "interval", "hms_interval"] },
"valueTypeFamilies": {
"numeric": [ "int", "float", "scalableValueTypes" ],
"strings": [ "string", "token" ],
"valuesWithLess": [ "int", "float", "scalableValueTypes", "string" ],
"valuesWithoutLess": [ "otherTypes??" ]
},
"comparisonOperators": {
"families": [ {
"family": "numeric",
"methods": [
{"op": "<", "name": "less", "method": "compareNumbers"},
{"op": ">", "name": "greater", "method": "compareNumbers"},
{"op": "<=", "name": "less equal", "method": "compareNumbers"},
{"op": ">=", "name": "greater equal", "method": "compareNumbers"},
{"op": "==", "name": "equal", "method": "compareNumbers"},
{"op": "!=", "name": "not equal", "method": "compareNumbers"},
{"op": "between", "name": "between", "method": "compareNumberRange"},
{"op": "not_between", "name": "not between", "method": "compareNumberRange"}
]
},
{
"family": "strings",
"methods": [
{"op": "<", "name": "less", "method": "compareStrings"},
{"op": ">", "name": "greater", "method": "compareStrings"},
{"op": "<=", "name": "less equal", "method": "compareStrings"},
{"op": ">=", "name": "greater equal", "method": "compareStrings"},
{"op": "==", "name": "equal", "method": "compareStrings"},
{"op": "!=", "name": "not equal", "method": "compareStrings"},
{"op": "begin", "name": "begins with", "method": "stringOperation"},
{"op": "end", "name": "ends with", "method": "stringOperation"},
{"op": "contain", "name": "contains", "method": "stringOperation"},
{"op": "length", "name": "length equal to", "method": "stringOperation"},
{"op": "not_begin", "name": "doesn't begin with", "method": "stringOperation"},
{"op": "not_end", "name": "doesn't end with", "method": "stringOperation"},
{"op": "not_contain", "name": "doesn't contain", "method": "stringOperation"},
{"op": "not_length", "name": "length not equal to", "method": "stringOperation"}
]
},
{
"family": "valuesWithLess",
"methods": [
{"op": "<", "name": "less", "method": "compareValues"},
{"op": ">", "name": "greater", "method": "compareValues"},
{"op": "<=", "name": "less equal", "method": "compareValues"},
{"op": ">=", "name": "greater equal", "method": "compareValues"},
{"op": "==", "name": "equal", "method": "compareValues"},
{"op": "!=", "name": "not equal", "method": "compareValues"}
]
},
{
"family": "valuesWithoutLess",
"methods": [
{"op": "==", "name": "equal", "method": "compareValues"},
{"op": "!=", "name": "not equal", "method": "compareValues"}
]
}
]
},
"comparisonMethods": {
"info": { "version": "1.0.0" },
"compareNumberRange": {
"comparator": {
"family": "numeric",
"field": "comparator",
"options": [ "between", "not_between" ],
"type": "enum"
},
"dataSource": [
{ "index": 0, "types": [ "item", "expression" ] },
{ "index": 1, "types": [ "constant" ], "field": "startValue" },
{ "index": 2, "types": [ "constant" ], "field": "endValue" }
]
},
"compareNumbers": {
"comparator": {
"family": "numeric",
"field": "comparator",
"options": [ "<", ">", "<=", ">=", "==", "!=" ],
"type": "enum"
},
"dataSource": [
{ "index": 0, "types": [ "item", "expression" ] },
{ "index": 1, "types": [ "constant", "expression" ] }
]
},
"compareStrings": {
"comparator": {
"family": "strings",
"field": "comparator",
"options": [ "<", ">", "<=", ">=", "==", "!=" ],
"type": "enum"
},
"dataSource": [
{ "index": 0, "types": [ "item", "expression" ] },
{ "index": 1, "types": [ "constant", "expression" ] }
]
},
"compareValues": {
"comparator": {
"family": "valuesWithoutLess",
"field": "comparator",
"options": [ "==", "!=" ],
"type": "enum"
},
"dataSource": [
{ "index": 0, "types": [ "item", "expression" ] },
{ "index": 1, "types": [ "constant", "expression" ] }
]
},
"inArray": {
"comparator": {
"family": "array",
"field": "comparator",
"options": [ "in", "not_in" ],
"type": "enum"
},
"dataSource": [
{ "index": 0, "types": [ "item", "expression" ] },
{ "index": 1, "types": [ "constant" ] }
]
},
"isItemState": {
"dataSource": [
{ "index": 0, "types": [ "device_item", "item" ] },
{ "index": 1, "types": [ "constant", "expression" ] }
]
},
"isItemStateChanged": {
"dataSource": [
{ "index": 0, "types": [ "item", "expression" ] },
{ "index": 1, "types": [ "constant", "expression" ], "field": "start" },
{ "index": 2, "types": [ "constant", "expression" ], "field": "finish" }
]
},
"stringOperation": {
"comparator": {
"family": "strings",
"field": "comparator",
"options": [ "begin", "end", "contain", "length", "not_begin", "not_end", "not_contain", "not_length" ],
"type": "enum"
},
"dataSource": [
{ "index": 0, "types": [ "item", "expression" ] },
{ "index": 1, "types": [ "constant", "expression" ] }
]
}
},
"actionMethods": {
"Info": { "schema_version": "0.0.1" },
"setItemValue": {
"dataSource": [ {"index": 0, "types": ["constant"] } ],
"dataTarget": [ {"index": 0, "types": ["item"] } ],
"execution": ["async"],
"typeSystem": "itemValueTypes",
"scope": ["local", "global"]
},
"setDeviceArmed": {
"dataSource": [ {"index": 0, "types": ["constant"] } ],
"dataTarget": [ {"index": 0, "types": ["device"] } ],
"execution": ["async"],
"scope": ["local", "global"]
},
"sendCloudAbstractCommand": {
"dataSource": [ {"index": 0, "types": ["object"] } ],
"dataTarget": [ {"index": 0, "types": ["cloud"] } ],
"execution": ["sync"]
},
"switchHouseMode": {
"dataSource": [ {"index": 0, "types": ["constant"] } ],
"dataTarget": [ {"index": 0, "types": ["houseMode"] } ],
"execution": ["async"]
},
"sendHttpRequest": {
"dataSource": [ {"index": 0, "types": ["constant"] } ],
"dataTarget": null,
"execution": ["async"],
"sideEffects": [
{
"action": "saveResult",
"dataTarget": [ {"index": 0, "types": ["expression"] } ]
}
]
},
"runCustomScript": {
"dataSource": [ {"index": 0, "types": ["constant"] } ],
"dataTarget": [ {"index": 0, "types": ["constant"] } ],
"execution": ["async"]
},
"runPluginScript": {
"dataSource": [ {"index": 0, "types": ["constant"] } ],
"dataTarget": [ {"index": 0, "types": ["script"] } ],
"execution": ["sync"]
},
"runScene": {
"dataSource": [ {"index": 0, "types": ["constant"] } ],
"dataTarget": [ {"index": 0, "types": ["scene"] } ],
"execution": ["async"]
},
"stopScene": {
"dataSource": [ {"index": 0, "types": ["constant"] } ],
"dataTarget": [ {"index": 0, "types": ["scene"] } ],
"execution": ["async"]
},
"setSceneState": {
"dataSource": [ {"index": 0, "types": ["constant"] } ],
"dataTarget": [ {"index": 0, "types": ["scene"] } ],
"execution": ["async"]
},
"rebootHub": {
"dataSource": null,
"dataTarget": [ {"index": 0, "types": ["constant"] } ],
"execution": ["async"]
},
"cloudAPI": {
"dataSource": [ {"index": 0, "types": ["constant"] } ],
"dataTarget": [ {"index": 0, "types": ["constant"] } ],
"execution": ["async"],
"sideEffects": [
{
"action": "saveResult",
"dataTarget": [ {"index": 0, "types": ["expression"] } ]
}
]
},
"resetHub": {
"dataSource": null,
"dataTarget": [ {"index": 0, "types": ["constant"] } ],
"execution": ["async"]
},
"resetLatch": {
"dataSource": [ {"index": 0, "types": ["constant"] } ],
"dataTarget": [ {"index": 0, "types": ["constant"] } ],
"execution": ["async"]
},
"setVariable": {
"dataSource": [ {"index": 0, "types": ["constant"] } ],
"dataTarget": [ {"index": 0, "types": ["expression"] } ],
"execution": ["sync"],
"typeSystem": ["itemValueTypes", "free"],
"sideEffects": [
{
"action": "saveResult",
"dataTarget": [ {"index": 0, "types": ["expression"] } ]
}
]
},
"resetSceneLatches": {
"dataSource": [ {"index": 0, "types": ["constant"] } ],
"dataTarget": [ {"index": 0, "types": ["constant"] } ],
"execution": ["async"]
},
"setExpression": {
"dataSource": [ {"index": 0, "types": ["constant"] } ],
"dataTarget": [ {"index": 0, "types": ["expression"] } ],
"execution": ["sync"],
"typeSystem": ["itemValueTypes", "free"],
"sideEffects": [
{
"action": "saveResult",
"dataTarget": [ {"index": 0, "types": ["expression"] } ]
}
]
},
"toggleValue": {
"dataSource": null,
"dataTarget": [ {"index": 0, "types": ["item"] } ],
"execution": ["async"],
"typeSystem": "itemValueTypes"
},
"groupSetItemValue": {
"dataSource": [ {"index": 0, "types": ["constant", "expression"] } ],
"dataTarget": [ {"index": 0, "types": ["device_group"] },
{"index": 1, "types": ["item_group"] } ],
"execution": ["async"],
"typeSystem": "itemValueTypes",
"scope": ["local"]
},
"groupToggleValue": {
"dataSource": null,
"dataTarget": [
{"index": 0, "types": ["device_group"] },
{"index": 1, "types": ["item_group"] }
],
"execution": ["async"],
"typeSystem": "itemValueTypes",
"scope": ["local"]
},
"groupSetDeviceArmed": {
"dataSource": [ {"index": 0, "types": ["constant"] } ],
"dataTarget": [ {"index": 0, "types": ["device_group"] } ],
"execution": ["async"],
"typeSystem": "itemValueTypes",
"scope": ["local"]
}
},
"advancedScenesVersion": { "version": "Major.Minor" }
}
}
How can we help?
A premium WordPress theme with integrated Knowledge Base,
providing 24/7 community based support.