# setComponentState

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /json-rpc/component:
    post:
      summary: setComponentState
      deprecated: false
      description: >-
        Enable or disable seletceted components at runtime. To get the current
        state and available components see
        [getSystemInformation](https://api.hyperion-project.org/getsysteminformation-17016022e0.md)
        and or
        [Components](https://api.hyperion-project.org/components-priorities-1024426m0.md)
      tags:
        - Hyperion API/Controls/Operational Controls
        - Websocket
        - HTTP/S
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                command:
                  type: string
                  description: The type of command to execute.
                  title: ''
                  enum:
                    - componentstate
                  x-apidog-enum:
                    - value: componentstate
                      name: ''
                      description: ''
                instance:
                  type: array
                  items: &ref_0
                    $ref: '#/components/schemas/instance%20-%20single'
                  uniqueItems: true
                  description: >-
                    List of instance indices (0-254) to which the command
                    applies. An empty array applies a command to all instances.
                componentstate:
                  type: object
                  properties:
                    component:
                      type: string
                      enum:
                        - ALL
                        - SMOOTHING
                        - BLACKBORDER
                        - FORWARDER
                        - BOBLIGHTSERVER
                        - GRABBER
                        - V4L
                        - AUDIO
                        - LEDDEVICE
                      x-apidog-enum:
                        - value: ALL
                          name: ''
                          description: >-
                            Enable or disable Hyperion. Recovers/saves last
                            state of all other components
                        - value: SMOOTHING
                          name: ''
                          description: Smoothing component
                        - value: BLACKBORDER
                          name: ''
                          description: Black bar detection component
                        - value: FORWARDER
                          name: ''
                          description: JSON/Proto forwarder component
                        - value: BOBLIGHTSERVER
                          name: ''
                          description: Boblight server component
                        - value: GRABBER
                          name: ''
                          description: Screen Capture component
                        - value: V4L
                          name: ''
                          description: Video/USB capture device component
                        - value: AUDIO
                          name: ''
                          description: Audio capture device component
                        - value: LEDDEVICE
                          name: ''
                          description: >-
                            LED device component start/stops output of the
                            configured LED device
                    state:
                      type: boolean
                  x-apidog-orders:
                    - component
                    - state
                  required:
                    - component
                    - state
                  x-apidog-ignore-properties: []
                tan:
                  type: integer
                  minimum: 0
                  examples:
                    - 4711
                  description: Transaction number for tracking requests and responses.
              x-apidog-orders:
                - command
                - 01JVH4JDZEFRVBH50KSY1508NW
                - componentstate
                - 01JVH4GYCGNF4ATGB344PD5DDM
              required:
                - command
                - componentstate
              x-apidog-refs:
                01JVH4GYCGNF4ATGB344PD5DDM:
                  $ref: '#/components/schemas/tan'
                01JVH4JDZEFRVBH50KSY1508NW:
                  $ref: '#/components/schemas/instance%20-%20multiple'
              x-apidog-ignore-properties:
                - instance
                - tan
            examples:
              '1':
                value:
                  command: componentstate
                  instance:
                    - 0
                  componentstate:
                    component: LEDDEVICE
                    state: false
                  tan: 4711
                description: Disable the LEDDEVICE component of instance 0
              '2':
                value:
                  command: componentstate
                  instance: []
                  componentstate:
                    component: SMOOTHING
                    state: true
                  tan: 4711
                description: Enable SMOOTHING for all instances
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  command:
                    type: string
                    description: The command executed
                  subcommand:
                    type: string
                    description: The sub-command executed
                  success:
                    type: boolean
                    description: Result, if the request excuted successfully
                  info:
                    type: object
                    properties: {}
                    x-apidog-orders: []
                    description: Information requested
                    additionalProperties: true
                    x-apidog-ignore-properties: []
                  error:
                    type: string
                    description: Reason why a request did not execute successfully
                  errorData:
                    type: array
                    items:
                      type: object
                      properties:
                        description:
                          type: string
                      x-apidog-orders:
                        - description
                      x-apidog-ignore-properties: []
                    description: Detailed error explaination
                  tan:
                    type: integer
                    description: Request's transaction number
                x-apidog-orders:
                  - 01JV5M76DZ4M3GA4AD8Y4G69AP
                required:
                  - command
                  - success
                  - tan
                x-apidog-refs:
                  01JV5M76DZ4M3GA4AD8Y4G69AP:
                    $ref: '#/components/schemas/response'
                x-apidog-ignore-properties:
                  - command
                  - subcommand
                  - success
                  - info
                  - error
                  - errorData
                  - tan
              examples:
                '1':
                  summary: Success
                  value:
                    command: componentstate
                    success: true
                    tan: 4711
                '2':
                  summary: Exception
                  value:
                    command: componentstate
                    error: Errors for instance(s) given
                    errorData:
                      - description: >-
                          Instance [0] is not running, but the (sub-) command
                          requires a running instance.
                      - description: No valid instance(s) provided
                    success: false
                    tan: 4711
          headers: {}
          x-apidog-name: Success
      security:
        - bearer: []
      x-apidog-folder: Hyperion API/Controls/Operational Controls
      x-apidog-status: released
      x-run-in-apidog: https://app.apidog.com/web/project/894413/apis/api-17015269-run
components:
  schemas:
    instance - single:
      type: integer
      minimum: 0
      maximum: 254
      description: Instance index (0-254) to which the command applies.
      x-apidog-folder: ''
    instance - multiple:
      type: object
      properties:
        instance:
          type: array
          items: *ref_0
          uniqueItems: true
          description: >-
            List of instance indices (0-254) to which the command applies. An
            empty array applies a command to all instances.
      x-apidog-orders:
        - instance
      x-apidog-folder: ''
      x-apidog-ignore-properties: []
    tan:
      type: object
      properties:
        tan:
          type: integer
          minimum: 0
          examples:
            - 4711
          description: Transaction number for tracking requests and responses.
      x-apidog-orders:
        - tan
      title: tan
      x-apidog-folder: ''
      x-apidog-ignore-properties: []
    response:
      type: object
      properties:
        command:
          type: string
          description: The command executed
        subcommand:
          type: string
          description: The sub-command executed
        success:
          type: boolean
          description: Result, if the request excuted successfully
        info:
          type: object
          properties: {}
          x-apidog-orders: []
          description: Information requested
          additionalProperties: true
          x-apidog-ignore-properties: []
        error:
          type: string
          description: Reason why a request did not execute successfully
        errorData:
          type: array
          items:
            type: object
            properties:
              description:
                type: string
            x-apidog-orders:
              - description
            x-apidog-ignore-properties: []
          description: Detailed error explaination
        tan:
          type: integer
          description: Request's transaction number
      required:
        - command
        - success
        - tan
      x-apidog-orders:
        - command
        - subcommand
        - success
        - info
        - error
        - errorData
        - tan
      x-apidog-folder: ''
      x-apidog-ignore-properties: []
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
servers:
  - url: http://{{host}}:8090
    description: Develop Env
  - url: https://{{host}}:8092
    description: Testing Env
security: []

```
