homebridge-lg-thinq-ceiling-fan
Version:
A Homebridge plugin for controlling LG ceiling fans via the LG ThinQ platform with working speed control
78 lines (77 loc) • 1.84 kB
TypeScript
export declare const PLATFORM_NAME = "LGCeilingFan";
export declare const PLUGIN_NAME = "homebridge-lg-ceilingfan";
export declare const LG_API_CONSTANTS: {
GATEWAY_URL: string;
SVC_CODE: string;
CLIENT_ID: string;
OAUTH_SECRET_KEY: string;
OAUTH_CLIENT_KEY: string;
APPLICATION_KEY: string;
DATE_FORMAT: string;
DEFAULT_COUNTRY: string;
DEFAULT_LANGUAGE: string;
};
export interface LGCeilingFanConfig {
name: string;
auth_mode: 'token' | 'account';
refresh_token?: string;
username?: string;
password?: string;
country: string;
language: string;
auto_refresh?: boolean;
save_credentials?: boolean;
devices: DeviceConfig[];
polling_interval?: number;
debug?: boolean;
}
export interface DeviceConfig {
id: string;
name?: string;
model?: string;
max_speed?: number;
}
export interface CeilingFanStatus {
isOn: boolean;
fanSpeed: number;
maxSpeed: number;
temperature?: number;
humidity?: number;
}
export interface LGDevice {
deviceId: string;
deviceType: number;
deviceCode: string;
alias: string;
deviceState: string;
deviceRegDate: string;
order: number;
online: boolean;
platformType: string;
modelJsonVer: string;
modelJsonUri: string;
applianceType: string;
snapshot?: any;
tftImageUrl?: string;
groupableDevices?: any[];
}
export interface LGApiResponse {
resultCode: string;
result: any;
}
export interface AuthData {
accessToken: string;
refreshToken: string;
userId: string;
countryCode: string;
languageCode: string;
lgeapiUrl?: string;
}
export interface GatewayInfo {
countryCode: string;
languageCode: string;
thinq2Uri: string;
empUri: string;
empSpxUri?: string;
thinq1Uri?: string;
}