Link Search Menu Expand Document

HTControl service

Service related to the TV remote control

The HTControl service is available on these models: v2-S14 / v2-S9.

const SonosDevice = require('@svrooij/sonos').SonosDevice
const sonos = new SonosDevice('192.168.x.x')
sonos.HTControlService.OneOfTheMethodsBelow({...})

All actions that require input expect an object with the specified parameters, even if it only requires one parameter.

  1. CommitLearnedIRCodes
  2. GetIRRepeaterState
  3. GetLEDFeedbackState
  4. IdentifyIRRemote
  5. IsRemoteConfigured
  6. LearnIRCode
  7. SetIRRepeaterState
  8. SetLEDFeedbackState
  9. HTControlService event

CommitLearnedIRCodes

const result = await sonos.HTControlService.CommitLearnedIRCodes({ Name:... });

Input object:

property type description
Name string  

This actions returns a boolean whether or not the requests succeeded.

GetIRRepeaterState

const result = await sonos.HTControlService.GetIRRepeaterState();

Output object:

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

GetLEDFeedbackState

const result = await sonos.HTControlService.GetLEDFeedbackState();

Output object:

property type description
LEDFeedbackState string Possible values: On / Off

IdentifyIRRemote

const result = await sonos.HTControlService.IdentifyIRRemote({ Timeout:... });

Input object:

property type description
Timeout number  

This actions returns a boolean whether or not the requests succeeded.

IsRemoteConfigured

const result = await sonos.HTControlService.IsRemoteConfigured();

Output object:

property type description
RemoteConfigured boolean  

LearnIRCode

const result = await sonos.HTControlService.LearnIRCode({ IRCode:..., Timeout:... });

Input object:

property type description
IRCode string  
Timeout number  

This actions returns a boolean whether or not the requests succeeded.

SetIRRepeaterState

const result = await sonos.HTControlService.SetIRRepeaterState({ DesiredIRRepeaterState:... });

Input object:

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

This actions returns a boolean whether or not the requests succeeded.

SetLEDFeedbackState

const result = await sonos.HTControlService.SetLEDFeedbackState({ LEDFeedbackState:... });

Input object:

property type description
LEDFeedbackState string Allowed values: On / Off

This actions returns a boolean whether or not the requests succeeded.

HTControlService event

const SonosDevice = require('@svrooij/sonos').SonosDevice
const sonos = new SonosDevice('192.168.x.x')
sonos.HTControlService.Events('serviceEvent', (data) => {
  console.log(data);
});

The HTControlService emits events with these properties. Not all properties are emitted every time.

parameter type possible values
IRRepeaterState string On / Off / Disabled
LEDFeedbackState string On / Off
RemoteConfigured boolean  
TOSLinkConnected boolean  

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