> For the complete documentation index, see [llms.txt](https://docs.tricloudnexus.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.tricloudnexus.io/edge/nexus-modules/data-connector-modules/scenecontrollermodule/direct-commands/setsequences.md).

# SetSequences

Calling this method set a new sequence configuration for the SceneControllerModule.

### **Method Name:**

SetSequences

### **Payload:**

The direct command requires a new sequence configuration. As an example, the payload below contains a simple setup with only 1 light. A sequence named "Sequence1" is defined, that turns the light on, acquires an image, and turns the light back off again.

```
{
    "sequences": 
    {
        "lights": [
            {
                "id": "Light",
                "channel": 0,
                "description": "Some light"
            }
        ],
        "lightSettings":
        [
            {
                "id": "Light off",
                "lightId": "Light",
                "lightLevel": 0
            },
            {
                "id": "Light on",
                "lightId": "Light",
                "lightLevel": 255
            }
        ],
        "scenes": [
            {
                "id": "Scene0",
                "name": "Light off",
                "lightSettingsIds": [
                    "Light off"
                ]
            },
            {
                "id": "Scene1",
                "name": "Light on",
                "lightSettingsIds": [
                    "Light on"
                ]
            }
        ],
        "sequences": [
            {
                "id": "Sequence1",
                "name": "Simple vision sequence",
                "trigger": {
                    "type": "DirectCommand",
                    "parameters": ""
                },
                "steps": [
                    {
                        "name": "Set light on",
                        "description": "Set light on",
                        "order": 1,
                        "activityType": "SetScene",
                        "parameters": {
                            "sceneId": "Scene1"
                        }
                    },
                    {
                        "name": "GetImage",
                        "description": "Image acquire",
                        "order": 2,
                        "activityType": "CameraAcquireToFile",
                        "parameters": {
                            "filename": "image.bmp",
                            "exposureUs": "35000"
                        }
                    },
                    {
                        "name": "Set light off",
                        "description": "Set light off",
                        "order": 3,
                        "activityType": "SetScene",
                        "parameters": {
                            "sceneId": "Scene0"
                        }
                    }                
                ]
            }
        ]
    }
}
```

### **Return value**

The direct command returns an OperationResult that indicates either success or failure.\
If the operation fails, the validation errors are included in the output.
