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 with the API?
The local control API offers the ability to increase or decrease the speaker volume for a Nureva audio device. The API mirrors the behavior of the volume up and down buttons on the remote control.
The minimum volume is 0 and the maximum volume is 100.
Trying to increase the speaker volume to beyond 100 or decrease it to below 0 will not change the volume.
Currently, there is no functionality to get the speaker volume.
Minimum role required: general
general
The Change Speaker Volume endpoint can be accessed with the general
role or any role of a higher level.
Overview
-
Use Change Speaker Volume to a make a request to change the speaker volume on the audio device.
-
Check that the change has been applied successfully.
Instructions
Step 1 - Make a request to change the speaker volume
Use the Change Speaker Volume endpoint:
- Set the path with the IP address of the Nureva device followed by
/api/v1/audio/volume/change
. - Update the headers to include
Authorization
as key and the value beingNureva
followed by theauthParameters
received from the login endpoint. - Update the headers to include
Nureva-Client-Id
as key andintegration_app_name
as the value. - Update the headers to include
Nureva-Client-Version
as key and0.0.1
as the value. - Update the headers to include
Content-type
as key andapplication/json
as value. - Add the property
"operation"
to the body property. - Give
"operation"
a value of either"increment"
or"decrement"
(case sensitive). This is a required property. The code sample below is a request to increment the speaker volume.- "increment" increments the volume by 4-6 volume points (to a maximum of 100)
- "decrement" decrements the volume by 4-6 volume points (to a minimum of 0)
curl --request PUT \
--url https://10.0.0.1/api/v1/audio/volume/change \
--header 'Authorization: Nureva Z2VuZXJhbDo=' \
--header 'Nureva-Client-Id: integration_app_name' \
--header 'Nureva-Client-Version: 0.0.1'\
--header 'Content-type: application/json' \
--data '{"operation":"increment"}'
- Send the PUT request.
Step 2 - Check that the change has been applied successfully
After sending a request to the Change Speaker Volume endpoint, look at the returned HTTP status code. If the call is successful, an HTTP status code of 200 OK will be returned as a response, with no response body.
Tutorial complete!
You now know how to increase and decrease the speaker volume.
Updated 12 days ago