homebridge-config-ui-x
Version:
A web based management, configuration and control platform for Homebridge.
218 lines (217 loc) • 6.51 kB
TypeScript
import type { ReadStream } from 'fs-extra';
export declare class ConfigService {
name: string;
configPath: string;
storagePath: string;
customPluginPath: string;
strictPluginResolution: boolean;
secretPath: string;
authPath: string;
accessoryLayoutPath: string;
configBackupPath: string;
instanceBackupPath: string;
homebridgeInsecureMode: boolean;
homebridgeVersion: string;
minimumNodeVersion: string;
runningInDocker: boolean;
runningInSynologyPackage: boolean;
runningInPackageMode: boolean;
runningInLinux: boolean;
runningInFreeBSD: boolean;
canShutdownRestartHost: boolean;
enableTerminalAccess: boolean;
usePluginBundles: boolean;
recommendChildBridges: boolean;
runningOnRaspberryPi: boolean;
startupScript: string;
dockerOfflineUpdate: boolean;
package: any;
hbStartupSettings: any;
setupWizardComplete: boolean;
customWallpaperHash: string;
hbServiceUiRestartRequired: boolean;
homebridgeConfig: HomebridgeConfig;
ui: {
name: string;
port: number;
host?: '::' | '0.0.0.0' | string;
auth: 'form' | 'none';
theme: string;
lightingMode: 'auto' | 'light' | 'dark';
menuMode?: 'default' | 'freeze';
sudo?: boolean;
restart?: string;
lang?: string;
log?: {
method?: 'file' | 'custom' | 'systemd' | 'native';
command?: string;
path?: string;
service?: string;
maxSize?: number;
truncateSize?: number;
};
ssl?: {
key?: string;
cert?: string;
pfx?: string;
passphrase?: string;
};
accessoryControl?: {
debug?: boolean;
instanceBlacklist?: string[];
};
plugins?: {
hideUpdatesFor?: string[];
};
temp?: string;
tempUnits?: string;
wallpaper?: string;
linux?: {
shutdown?: string;
restart?: string;
};
debug?: boolean;
proxyHost?: string;
sessionTimeout?: number;
homebridgePackagePath?: string;
scheduledBackupPath?: string;
scheduledBackupDisable?: boolean;
disableServerMetricsMonitoring?: boolean;
terminal?: {
persistence?: boolean;
hideWarning?: boolean;
bufferSize?: number;
};
};
private bridgeFreeze;
private uiFreeze;
secrets: {
secretKey: string;
};
instanceId: string;
constructor();
parseConfig(homebridgeConfig: HomebridgeConfig): void;
uiSettings(authorized?: boolean): {
env: {
canShutdownRestartHost: boolean;
customWallpaperHash: string;
dockerOfflineUpdate: boolean;
homebridgeVersion: string;
homebridgeInstanceName: string;
instanceId: string;
lang: string;
packageName: any;
packageVersion: any;
platform: NodeJS.Platform;
port: number;
setupWizardComplete: boolean;
scheduledBackupDisable: boolean;
scheduledBackupPath: string;
};
formAuth: boolean;
sessionTimeout: number;
lightingMode: "auto" | "light" | "dark";
serverTimestamp: string;
theme: string;
menuMode: "default" | "freeze";
} | {
env: {
enableAccessories: boolean;
enableTerminalAccess: boolean;
nodeVersion: string;
recommendChildBridges: boolean;
runningInDocker: boolean;
runningInSynologyPackage: boolean;
runningInPackageMode: boolean;
runningInLinux: boolean;
runningInFreeBSD: boolean;
runningOnRaspberryPi: boolean;
temperatureUnits: string;
temp: string;
log: {
maxSize: number;
truncateSize: number;
};
ssl: {
key: string;
cert: string;
pfx: string;
passphrase: string;
};
accessoryControl: {
debug: boolean;
instanceBlacklist: string[];
};
plugins: {
hideUpdatesFor: string[];
};
linux: {
shutdown: string;
restart: string;
};
terminal: {
persistence: boolean;
hideWarning: boolean;
bufferSize: any;
};
canShutdownRestartHost: boolean;
customWallpaperHash: string;
dockerOfflineUpdate: boolean;
homebridgeVersion: string;
homebridgeInstanceName: string;
instanceId: string;
lang: string;
packageName: any;
packageVersion: any;
platform: NodeJS.Platform;
port: number;
setupWizardComplete: boolean;
scheduledBackupDisable: boolean;
scheduledBackupPath: string;
};
menuMode: "default" | "freeze";
wallpaper: string;
host: string;
proxyHost: string;
homebridgePackagePath: string;
disableServerMetricsMonitoring: boolean;
keepOrphans: any;
formAuth: boolean;
sessionTimeout: number;
lightingMode: "auto" | "light" | "dark";
serverTimestamp: string;
theme: string;
};
uiRestartRequired(): Promise<boolean>;
private freezeUiSettings;
private setConfigForDocker;
private setConfig;
private getSecrets;
private generateSecretToken;
private getInstanceId;
private getCustomWallpaperHash;
removeWallpaperCache(): void;
streamCustomWallpaper(): ReadStream;
private checkIfRunningOnRaspberryPi;
}
export interface HomebridgeConfig {
bridge: {
username: string;
pin: string;
name: string;
port: number;
advertiser?: 'avahi' | 'resolved' | 'ciao' | 'bonjour-hap';
bind?: string | string[];
};
mdns?: {
interface?: string | string[];
};
ports?: {
start?: number;
end?: number;
};
platforms: Record<string, any>[];
accessories: Record<string, any>[];
plugins?: string[];
disabledPlugins?: string[];
}