|  Developer
Updated on May 6, 2022

hub.scenes.global.create

  • Version: 1.0
  • Classes: UI
  • Title: Global Scene categories
  • Description: Create a new global scene.
Edit
Field Type Required Description
enabled boolean + enable or disable scene
_id string + global scene ID is given by cloud
tag string tag for debugging
name string scene name. Maximum name length is 25 characters.
then JsonArray + Array of the blocks
when JsonArray + Array of the blocks
exec_policy string It is execution policy of scene. There is policy of block ( see description of action blocks ). The block policy can have next states: – result of execution each block should checked and scene should be failed in case if block is failed; – result of execution each block should be ignored and checked only in the end of scene execution. If any action was failed than partially_finished status. If all blocks have this status and all of them are failed than failed status.
Edit
Broadcasts Description
hub.scene.global.added Broadcast when the scene is successfully created.
hub.scene.global.run.progress Notification about the scene status. It’s fired when status of scene is changed.
Edit
Code Message Data
-32600 Bad request, is empty
-32600 Bad request, does not exist
-32500 Scene is ill formed. Can’t parse when block
-32500 Scene is ill formed. Can’t parse then block
-32500 Scene is failed. There is no such method
-32500 Scene contain conditions for not intersect numbers values inside of AND condition
-32500 Scene contain conditions for same functionality inside of AND condition
-32500 Scene contain conditions for same functionality inside of AND condition
-32500 Scene cannot contain “isInterval” conditions along with other time based condition in the same AND operator
Edit
Empty result or an error.
Edit
				
					{
    "id": "_ID_",
    "jsonrpc": "2.0",
    "api":"1.0",
    "method": "hub.scenes.global.create",
    "params": {
        "_id": "5c7ff48b7f00002a07a408e3",
        "enabled": true,
        "tag": "testRule/1",
        "execPolicy": "check_result",
        "then" : [
        ],
        "when": [
        ]
    }
}				
			
Edit
				
					{
    "id": "_ID_",
    "jsonrpc": "2.0",
    "result": {
        "_id":"5c7ff48b7f00002a07a408e3"
    }
}