If the HDMI CEC bus is available, the setTvPowerState
command in the homeTheater
namespace will instruct the home theater capable device to send a CEC “TV On” command on the bus. The CEC specification does not require that the device acknowledges commands. Support for this command varies by TV manufacturer. If the TV sends a success or failure response to the player, the player provides it to your integration. Otherwise, the player returns a generic success response.
Note that this command is only applicable for Sonos players that support HDMI ARC. Currently this is only the Beam. If your integration sends this command to a player that doesn’t support it, the player returns a globalError
with an errorCode
of:
ERROR_UNSUPPORTED_NAMESPACE
for non-home theater speakers, orERROR_UNSUPPORTED_COMMAND
for home theater speakers without CEC HDMI support.
Endpoint
POST
1 |
/players/{playerId}/homeTheater/tvPowerState |
Request Parameters
This command requires a playerId
to determine the target of the command. See the Control documentation for details.
See the table below for descriptions of parameters in the body.
Parameter | Type | Value |
---|---|---|
tvPowerState |
tvPowerState | The TV Power State control options. |
Response
Returns an empty body with a success
value of true if successful. In the event of a failure, returns a globalError
.
Example
Request
1 2 3 |
{ "tvPowerState" : "ON" } |