Link Search Menu Expand Document

HTControl service

Service related to the TV remote control

The HTControl service is available on these models: Sonos Beam (S14) S2 / Sonos Playbar (S9) S2.

  1. Available actions
    1. CommitLearnedIRCodes
    2. GetIRRepeaterState
    3. GetLEDFeedbackState
    4. IdentifyIRRemote
    5. IsRemoteConfigured
    6. LearnIRCode
    7. SetIRRepeaterState
    8. SetLEDFeedbackState
  2. Events
    1. Subscribe to events
    2. Event variables

Service data

name value
Control URL http://192.168.x.x:1400/HTControl/Control
Event subscription URL http://192.168.x.x:1400/HTControl/Event
Discovery URL http://192.168.x.x:1400/xml/HTControl1.xml
Service ID urn:upnp-org:serviceId:HTControl
Service type urn:schemas-upnp-org:service:HTControl:1

Sample request

POST /HTControl/Control
Host: 192.168.x.x:1400
soapaction: "urn:schemas-upnp-org:service:HTControl:1#{ActionName}"
Content-Type: text/xml; charset="utf-8"

<?xml version="1.0" encoding="utf-8"?>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
  <s:Body>
    {ActionBodyHere}
  </s:Body>
</s:Envelope>

Available actions

CommitLearnedIRCodes

Action body:

<u:CommitLearnedIRCodes xmlns:u="urn:schemas-upnp-org:service:HTControl:1">
  <Name>string</Name>
</u:CommitLearnedIRCodes>

Inputs:

parameter type description
Name string  

GetIRRepeaterState

Action body:

<u:GetIRRepeaterState xmlns:u="urn:schemas-upnp-org:service:HTControl:1">
</u:GetIRRepeaterState>

No input arguments

Outputs:

parameter type description
CurrentIRRepeaterState string Possible values: On / Off / Disabled

GetLEDFeedbackState

Action body:

<u:GetLEDFeedbackState xmlns:u="urn:schemas-upnp-org:service:HTControl:1">
</u:GetLEDFeedbackState>

No input arguments

Outputs:

parameter type description
LEDFeedbackState string Possible values: On / Off

IdentifyIRRemote

Action body:

<u:IdentifyIRRemote xmlns:u="urn:schemas-upnp-org:service:HTControl:1">
  <Timeout>ui4</Timeout>
</u:IdentifyIRRemote>

Inputs:

parameter type description
Timeout ui4  

IsRemoteConfigured

Action body:

<u:IsRemoteConfigured xmlns:u="urn:schemas-upnp-org:service:HTControl:1">
</u:IsRemoteConfigured>

No input arguments

Outputs:

parameter type description
RemoteConfigured boolean 1 for true and 0 for false

LearnIRCode

Action body:

<u:LearnIRCode xmlns:u="urn:schemas-upnp-org:service:HTControl:1">
  <IRCode>string</IRCode>
  <Timeout>ui4</Timeout>
</u:LearnIRCode>

Inputs:

parameter type description
IRCode string  
Timeout ui4  

SetIRRepeaterState

Action body:

<u:SetIRRepeaterState xmlns:u="urn:schemas-upnp-org:service:HTControl:1">
  <DesiredIRRepeaterState>string</DesiredIRRepeaterState>
</u:SetIRRepeaterState>

Inputs:

parameter type description
DesiredIRRepeaterState string Allowed values: On / Off / Disabled

SetLEDFeedbackState

Action body:

<u:SetLEDFeedbackState xmlns:u="urn:schemas-upnp-org:service:HTControl:1">
  <LEDFeedbackState>string</LEDFeedbackState>
</u:SetLEDFeedbackState>

Inputs:

parameter type description
LEDFeedbackState string Allowed values: On / Off

Events

The HTControlService has variables that might be emitted if you subscribe to events.

Subscribe to events

SUBSCRIBE /HTControl/Event
Host: 192.168.x.x:1400
callback: <http://...>
NT: upnp:event
Timeout: Second-3600

Event variables

Variable Sends events* type possible values
IRRepeaterState ✔ string On / Off / Disabled
LEDFeedbackState   string On / Off
RemoteConfigured   boolean 1 for true and 0 for false
TOSLinkConnected ✔ boolean 1 for true and 0 for false

If the variable has a ✔ in the Sends events column, the service discovery specifies this variable emits events. Other properties might be send as a part of LastChange


This file is automatically generated with @svrooij/sonos-docs, do not edit manually.

Device Software generation Software version Discovery date
Sonos Beam (S14) S2 64.3-19080 2021-08-18T06:04:08.308Z
Sonos Playbar (S9) S2 77.4-49290 2024-02-13T15:55:46.307Z