Change speaker volume

This tutorial shows how to change the speaker volume for Nureva® HDL310 and HDL410 devices over the local network.


What can be controlled via the API?

The local control API provides the ability to increase or decrease the speaker volume for a Nureva audio device. The API mirrors the behaviour of the volume up and down buttons on the remote control.


Overview

  1. Use changeSpeakerVolume to a make a request to change the audio device speaker volume

  2. Check that the change has been applied successfully


Instructions

Step 1 - Create a command to change the speaker volume

  1. Pass "v1/devices/commands/changeSpeakerVolume" in to the "request" property
  2. Fill in requestId and clientId according to the request format guide
  3. Give "operation" a value of either "increment" or "decrement" (case sensitive)
    • "increment" increments the volume by 4-6 volume points
    • "decrement" decrements the volume by 4-6 volume points
  4. Send the request

The example request below will increment volume.

{
  "request": "v1/devices/commands/changeSpeakerVolume",
  "requestId": "3abe203s-42b7-4b0b-9awaf-5c381793a192",
  "clientId": "test",
  "body": {
    "operation": "increment"
  }
}

Step 2 - Check that the change has been applied successfully

  • Use the requestId to identify the response associated with your request. The requestId in the request and response should match up.
  • If the request was successful, the request, requestId and clientId will be echoed back as a response
  • If the request was unsuccessful, the request, requestId and clientId will be echoed back along with an error property, which will include details about the error

The example response below indicates that the microphone volume was successfully changed.

{
  "request": "v1/devices/commands/changeSpeakerVolume",
  "requestId": "3abe203s-42b7-4b0b-9awaf-5c381793a192",
  "clientId": "test"
}

Tutorial complete!

You now know how to increase and decrease the speaker volume.