@o-lukas/homebridge-smartthings-tv
Version:
This is a plugin for Homebridge. It offers some basic functions to control Samsung TVs using the SmartThings API.
128 lines (127 loc) • 4.26 kB
TypeScript
import { PlatformAccessory, Logger } from 'homebridge';
import { SmartThingsPlatform } from './smartThingsPlatform.js';
import { SmartThingsClient, Device, Component } from '@smartthings/core-sdk';
import { SmartThingsAccessory } from './smartThingsAccessory.js';
/**
* Class implements a SmartThings soundbar accessory.
*/
export declare class SoundbarAccessory extends SmartThingsAccessory {
private readonly logCapabilities;
private readonly pollingInterval;
private readonly cyclicCallsLogging;
private readonly macAddress;
private readonly ipAddress;
private readonly inputSources;
private service;
private speakerService;
private inputSourceServices;
private capabilities;
private activeIdentifierChangeTime;
private activeIdentifierChangeValue;
constructor(name: string, device: Device, component: Component, client: SmartThingsClient, log: Logger, platform: SmartThingsPlatform, accessory: PlatformAccessory, logCapabilities: boolean, pollingInterval: number | undefined, cyclicCallsLogging: boolean, macAddress?: string | undefined, ipAddress?: string | undefined, inputSources?: [{
name: string;
id: string;
}] | undefined);
/**
* Registers all available capabilities of the SmartThings Component.
*/
registerCapabilities(): Promise<void>;
/**
* Registers the SmartThings Capablity if it's functionality is implemented.
*
* @param capability the Capability
*/
private registerCapability;
/**
* Setter for Homebridge accessory Active property.
*
* @param value the CharacteristicValue
*/
private setActive;
/**
* Getter for Homebridge accessory Active property.
*
* @param log flag to turn logging on/off
* @returns the CharacteristicValue
*/
private getActive;
/**
* Setter for Homebridge accessory VolumeSelector property.
*
* @param value the CharacteristicValue
*/
private setVolumeSelector;
/**
* Setter for Homebridge accessory Volume property.
*
* @param value the CharacteristicValue
*/
private setVolume;
/**
* Getter for Homebridge accessory Volume property.
*
* @param log flag to turn logging on/off
* @returns the CharacteristicValue
*/
private getVolume;
/**
* Setter for Homebridge accessory Mute property.
*
* @param value the CharacteristicValue
*/
private setMute;
/**
* Getter for Homebridge accessory Mute property.
*
* @param log flag to turn logging on/off
* @returns the CharacteristicValue
*/
private getMute;
/**
* Setter for Homebridge accessory ActiveIdentifier property.
*
* @param value the CharacteristicValue
*/
private setActiveIdentifier;
/**
* Getter for Homebridge accessory ActiveIdentifier property.
*
* @param log flag to turn logging on/off
* @returns the CharacteristicValue
*/
private getActiveIdentifier;
/**
* Setter for Homebridge accessory RemoteKey property.
*
* @param value the CharacteristicValue
*/
private setRemoteKey;
/**
* Validates that the SmartThings Capability needed to execute the remote key is available.
*
* @param capabilityId the identifier of the SmartThings Capablity
* @param remoteKey the remote key
* @returns TRUE in case capability is available - FALSE otherwise
*/
private validateRemoteKeyCapability;
/**
* Registers all available media input sources (e.g. HDMI inputs).
*/
private registerAvailableInputSources;
/**
* Registers a Homebridge input source.
*
* @param id the input source id
* @param name the input source display name
* @param inputSource the InputSourceType or @code undefined @endcode to use @link guessInputSourceType @endlink
* to determine InputSourceType
*/
private registerInputSource;
/**
* Guesses the InputSourceType from the identifier of the input source.
*
* @param inputSourceId the identifier of the input source
* @returns the InputSourceType (HDMI|TUNER|OTHER)
*/
private guessInputSourceType;
}