Set camera switching configuration

📘

This feature is supported by HDL410 and HDX systems.

This tutorial shows how to configure the camera switching configuration for the room where Nureva® audio devices are located.

What can be controlled with the API?

  • cameraSwitcherDefaults:
    • defaultCameraInputPort: The default camera to be used when no audio has been detected in the camera zones. Possible values are "USB1", "USB2", and "HDMI".
    • zonesTriggerWaitTime: Minimum duration of time that sound is required in a zone to trigger a camera switch in milliseconds.
    • switchToDefaultWaitTime: Maximum duration of time when no sound is detected to trigger a switch back to the default camera in milliseconds.
  • cameraSwitcherZoneInputMaps: An array of mappings of a zone to the camera that should be used when audio is detected within the zone.
    • zoneId: The id of the camera zone.
    • inputPort: The camera to be used. Possible values are "USB1", "USB2", and "HDMI".

The Get zones tutorial can be used to retrieve camera zones information.
The Set zones tutorial can be used to configure the camera zones.


Minimum role required: integrator

The Set Room Layout endpoint can be accessed with the integrator role or any role of a higher level.


Overview

  1. Use the Get Room Layout endpoint to get the current camera switching configuration.
  2. Use the Set Room Layout endpoint to make a request to change the camera switching configuration.
  3. Use the Get Room Layout endpoint to check that the change has been applied successfully.

Instructions

Step 1 - Make a request to get the current camera switching configuration

Use the Get Room Layout Information endpoint:

  1. Set the path with the IP address of the Nureva® device followed by /api/v1/room/layout.
  2. Update the headers to include Authorization as key and the value being Nureva followed by the authParameters received from the login endpoint.
  3. Update the headers to include Nureva-Client-Id as key and integration_app_name as the value.
  4. Update the headers to include Nureva-Client-Version as key and 0.0.1 as the value.
  5. Send the GET request. The code sample below is a request to retrieve the camera switching configuration of the room of the device with the IP address of 10.0.0.1.
curl --request GET \
     --url https://10.0.0.1/api/v1/room/layout \
     --header 'Authorization: Nureva Z2VuZXJhbDo=' \
     --header 'Nureva-Client-Id: integration_app_name' \
     --header 'Nureva-Client-Version: 0.0.1'
  1. If the call is successful, an HTTP status code of 200 OK will be returned.

Step 2 - Make a request to update the zones configuration

Use the Set Room Layout Information endpoint:

  1. Set the path with the IP address of the Nureva® device followed by /api/v1/room/layout.
  2. Update the headers to include Authorization as key and the value being Nureva followed by the authParameters received from the login endpoint.
  3. Update the headers to include Nureva-Client-Id as key and integration_app_name as the value.
  4. Update the headers to include Nureva-Client-Version as key and 0.0.1 as the value.
  5. Update the headers to include Content-type as key and application/json as value.
  6. Update the request body to send a JSON object with updated camera switching configuration
curl --request PATCH \
     --url https://10.0.0.1/api/v1/room/layout \
     --header 'Authorization: Nureva Z2VuZXJhbDo=' \
     --header 'Nureva-Client-Id: integration_app_name' \
     --header 'Nureva-Client-Version: 0.0.1' \
     --header 'Content-type: application/json' \
     --data '{"cameraSwitcherDefaults": {"defaultCameraInputPort": "USB2","zonesTriggerWaitTime": 1500,"switchToDefaultWaitTime": 8000},"cameraSwitcherZoneInputMaps": [{"zoneId": "898f31e7-f72c-478f-ba62-4c7a058e7081","inputPort": "HDMI"},{"zoneId": "2dcd4c2c-1460-4c25-8f26-960ed802ac84","inputPort": "USB1"},{"zoneId": "c2c4ac7a-e153-419d-bc5c-95b3190e62d7","inputPort": "USB2"}]}'
  1. Send the PATCH request.
  2. If the call is successful, an HTTP status code of 200 OK will be returned.

Step 3 - Check that the change has been applied successfully

Use the Get Room Layout Information endpoint:

  1. Set the path with the IP address of the Nureva® device followed by /api/v1/room/layout.
  2. Update the headers to include Authorization as key and the value being Nureva followed by the authParameters received from the login endpoint.
  3. Update the headers to include Nureva-Client-Id as key and integration_app_name as the value.
  4. Update the headers to include Nureva-Client-Version as key and 0.0.1 as the value.
  5. Send the GET request. The code sample below is a request to retrieve the camera switching configuration of the room of the device with the IP address of 10.0.0.1.
curl --request GET \
     --url https://10.0.0.1/api/v1/room/layout \
     --header 'Authorization: Nureva Z2VuZXJhbDo=' \
     --header 'Nureva-Client-Id: integration_app_name' \
     --header 'Nureva-Client-Version: 0.0.1'
  1. If the call is successful, an HTTP status code of 200 OK will be returned.
  2. Check that the values of cameraSwitcherDefaults and cameraSwitcherZoneInputMaps match the values sent in step 2.

The example below indicates that the change was successfully applied, for the PATCH call in step 2.

{
  "cameraSwitcherDefaults": {
    "defaultCameraInputPort": "USB2",
    "zonesTriggerWaitTime": 1500,
    "switchToDefaultWaitTime": 8000
  },
  "cameraSwitcherZoneInputMaps": [
    {
      "zoneId": "898f31e7-f72c-478f-ba62-4c7a058e7081",
      "inputPort": "HDMI"
    },
    {
      "zoneId": "2dcd4c2c-1460-4c25-8f26-960ed802ac84",
      "inputPort": "USB1"
    },
    {
      "zoneId": "c2c4ac7a-e153-419d-bc5c-95b3190e62d7",
      "inputPort": "USB2"
    }
  ]
}

Tutorial complete!

You now know how to set the camera switching configuration.