# 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.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.tricloudnexus.io/edge/nexus-modules/data-connector-modules/scenecontrollermodule/direct-commands/setsequences.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
