lavva.exalushome
Version:
Library implementing communication and abstraction layers for ExalusHome system
36 lines (35 loc) • 1.95 kB
TypeScript
import { Status } from "../../DataFrame";
import { IEvent } from "../../Event";
import { IDIService } from "../../IDIService";
import { ITypedEvent } from '../../TypedEvent';
import { ResponseResult } from "../FieldChangeResult";
export interface IControllerConfigurationService extends IDIService {
OnEnteredConfigurationEvent(): IEvent;
OnExitedConfigurationEvent(): IEvent;
OnConfigurationChangedEvent(): IEvent;
OnConfigurationTimeCheckedEvent(): ITypedEvent<Date>;
CheckIfConfigurationHasChangedAsync(): Promise<boolean>;
GetLastConfigurationChangeTimeAsync(): Promise<Date>;
DidCofigurationChangeAsync(): Promise<boolean>;
EnterConfigurationModeAsync(): Promise<void>;
ExitConfigurationModeAsync(): Promise<void>;
FactoryResetAsync(func: (progress: number) => void): Promise<Status>;
RollbackLastUpdateAsync(func: (progress: number) => void): Promise<Status>;
RestartControllerAsync(func: (progress: number) => void): Promise<Status>;
GetControllerSystemTimeAsync(): Promise<Date | Status>;
SetControllerSystemTimeAsync(date: Date): Promise<Status>;
StartNtpTimeSynchronizationAsync(): Promise<Status>;
ExportControllerConfigurationAsync(): Promise<HTMLAnchorElement | ResponseResult<ControllerConfigurationErrorCode>>;
CanExportOrImportControllerConfigurationAsync(): Promise<boolean>;
ImportControllerConfigurationAsync(file: File): Promise<Status>;
/**
* Checks if the controller software version is enough.
* @param requiredContainerMajor The required major version.
* @param requiredContainerMinor The required minor version.
* @returns True if the current version is enough, false otherwise.
*/
CheckIfControllerSoftwareVersionIsEnough(requiredContainerMajor: number, requiredContainerMinor: number): boolean;
}
export declare enum ControllerConfigurationErrorCode {
CannotExportConfiguration = "CannotExportConfiguration"
}