homebridge-kef-speaker
Version:
Homebridge plugin for KEF wireless speakers (LS50 Wireless II, LSX II, LS60)
70 lines (69 loc) • 1.87 kB
TypeScript
/**
* This is the name of the platform that users will use to register the plugin in the Homebridge config.json
*/
export declare const PLATFORM_NAME = "KefLsxII";
/**
* This must match the name of your plugin as defined the package.json `name` property
*/
export declare const PLUGIN_NAME = "homebridge-kef-lsx-ii";
/**
* KEF Speaker models and their supported sources
*/
export declare const SPEAKER_MODELS: {
readonly LS50W2: {
readonly name: "KEF LS50 Wireless II";
readonly sources: readonly ["wifi", "bluetooth", "tv", "optical", "coaxial", "analog"];
};
readonly LSX2: {
readonly name: "KEF LSX II";
readonly sources: readonly ["wifi", "bluetooth", "tv", "optical", "analog", "usb"];
};
readonly LS60: {
readonly name: "KEF LS60";
readonly sources: readonly ["wifi", "bluetooth", "tv", "optical", "coaxial", "analog"];
};
};
/**
* Source display names for HomeKit
*/
export declare const SOURCE_NAMES: {
readonly wifi: "WiFi";
readonly bluetooth: "Bluetooth";
readonly tv: "TV";
readonly optical: "Optical";
readonly coaxial: "Coaxial";
readonly analog: "Analog";
readonly usb: "USB";
};
/**
* Configuration interfaces
*/
export interface SpeakerConfig {
name: string;
ip: string;
model: keyof typeof SPEAKER_MODELS;
restorePowerState?: boolean;
showCurrentSong?: boolean;
volumeLimit?: {
min: number;
max: number;
};
nightMode?: {
enabled: boolean;
maxVolume: number;
schedule: {
start: string;
end: string;
};
};
polling?: {
enabled: boolean;
interval: number;
includeSongStatus: boolean;
updateDisplayName: boolean;
};
}
export interface PlatformConfig {
name: string;
speakers: SpeakerConfig[];
}