lavva.exalushome.extalife
Version:
Library implementing communication and abstraction layers for ExtaLife API in ExalusHome system
83 lines (82 loc) • 4.33 kB
TypeScript
import { IDeviceConfigService } from "lavva.exalushome/build/js/Services/Devices/IDeviceConfigService";
import { GetParamsErrorCode } from "../../../ExtaLife";
import { FieldChangeResultType, ResponseResult } from "lavva.exalushome/build/js/Services/FieldChangeResult";
import { IDeviceChannel } from '../../../../../exalushome-library/build/js/Services/Devices/IDeviceChannel';
export interface ISbrConfigService extends IDeviceConfigService {
/**
* This method allows to set auto close time in device
* @param deviceChannel channel of device
* @param timeInMiliseconds must by in range from 60_000 to 3_600_000 ms
* @param resetOnCrossToOn Set to true if you want to reset timer when device is turned on, false otherwise
*/
SetAutoCloseTimeAsync(deviceChannel: IDeviceChannel, timeInMiliseconds: number, resetOnCrossToOn: boolean): Promise<ResponseResult<FieldChangeResultType>>;
/**
* This method allows to get auto close time set in device
* @param deviceChannel channel of device
*/
GetAutoCloseTimeAsync(deviceChannel: IDeviceChannel): Promise<SbrAutoCloseTime | ResponseResult<GetParamsErrorCode>>;
/**
* This methods allows to set alarm light delay in device
* @param deviceChannel channel of device
* @param lightDelayInMiliseconds light delay must be in range of 0 up to 120_000 ms
*/
SetAlarmLightDelayAsync(deviceChannel: IDeviceChannel, lightDelayInMiliseconds: number): Promise<ResponseResult<FieldChangeResultType>>;
/**
* This method allows to get alarm light delay set in device
* @param deviceChannel channel of device
*/
GetAlarmLightDelayAsync(deviceChannel: IDeviceChannel): Promise<number | ResponseResult<GetParamsErrorCode>>;
/**
* This method allows to set alarm light duration in device
* @param deviceChannel channel of device
* @param lightDurationInMiliseconds light duration must br in range of 0 up to 3_600_00 ms
*/
SetAlarmLightDurationAsync(deviceChannel: IDeviceChannel, lightDurationInMiliseconds: number): Promise<ResponseResult<FieldChangeResultType>>;
/**
* This method allows to get alarm light duration set in device
* @param deviceChannel channel of device
*/
GetAlarmLightDurationAsync(deviceChannel: IDeviceChannel): Promise<number | ResponseResult<GetParamsErrorCode>>;
/**
* This method allows to get service info statistics from device, method can be called only by user with support privilages
* @param deviceChannel channel of device
*/
GetServiceInfoAsync(deviceChannel: IDeviceChannel): Promise<SbrServiceInfo | ResponseResult<GetParamsErrorCode>>;
/**
* This method allows to check if pin secure is supported by channel and device
* @param deviceChannel channel of device
*/
IsPinSecureSupportedAsync(deviceChannel: IDeviceChannel): Promise<boolean>;
/**
* This method allows to set pin secure in device, when pinSecureEnabled is true pinCode must be provided and must be at least 4 digit string, when pinSecureEnabled is false pinCode is ignored
* When enabled pin secure, device will require pin code to change position, need to use PreciseGateControlSecure task type!
* @param deviceChannel channel of device
* @param pinSecureEnabled flag to enable or disable pin secure
* @param pinCode pin code to set, must be at least 4 digits long
*/
SetPinSecureAsync(deviceChannel: IDeviceChannel, pinSecureEnabled: boolean, pinCode?: string): Promise<ResponseResult<FieldChangeResultType>>;
/**
* This method allows check if pin secure is enabled in device
* @param deviceChannel channel of device
*/
GetPinSecureStatusAsync(deviceChannel: IDeviceChannel): Promise<boolean | ResponseResult<GetParamsErrorCode>>;
}
export declare class SbrAutoCloseTime {
DeviceGuid: string;
TimeInMiliseconds: number;
ResetOnCrossToOn: boolean;
}
export declare class SbrAlarmLightDelay {
DeviceGuid: string;
LightDelayInMiliseconds: number;
}
export declare class SbrAlarmLightDuration {
DeviceGuid: string;
LightDurationInMiliseconds: number;
}
export declare class SbrServiceInfo {
StartsCount: number;
SafetyBarTrgCount: number;
PhotocelTrgCount: number;
InertionBreaksTrgCount: number;
}