UNPKG

lavva.exalushome.extalife

Version:

Library implementing communication and abstraction layers for ExtaLife API in ExalusHome system

51 lines (50 loc) 3.3 kB
import { Status } from 'lavva.exalushome/build/js/DataFrame'; import { IDevice } from 'lavva.exalushome/build/js/Services/Devices/IDevice'; import { IDeviceConfigService } from 'lavva.exalushome/build/js/Services/Devices/IDeviceConfigService'; import { ResponseResult } from 'lavva.exalushome/build/js/Services/FieldChangeResult'; import { GetParamsErrorCode } from '../../../ExtaLife'; import { LimitSwitchConfiguration, TypeOfGateChannel } from './Rob21ConfigParams'; export interface IRob21ConfigService extends IDeviceConfigService { GetGateModeAsync(device: IDevice, channel: number): Promise<TypeOfGateChannel | ResponseResult<GetParamsErrorCode>>; SetGateModeAsync(device: IDevice, channel: number, mode: TypeOfGateChannel): Promise<Status>; GetPulseTimeAsync(device: IDevice, channel: number): Promise<number | ResponseResult<GetParamsErrorCode>>; /** * Function to set pulse time in seconds, pulse time can be set only when device is in mode Gate or Gateway mode * @param device device * @param channel channel * @param pulseTime pulse time in range 0.1 to 300 with step 0.1 * @returns status according to result of execution * - if value of pulses is out of range method returns WrongData * - if device mode is incorrect method returns OperationNotPermitted */ SetPulseTimeAsync(device: IDevice, channel: number, pulseTime: number): Promise<Status>; GetLimitingSwitchesConfigurationsAsync(device: IDevice, channel: number): Promise<LimitSwitchConfiguration[] | ResponseResult<GetParamsErrorCode>>; /** * Function to set limiting switch configuration, configuration can be set only when device is in mode Gate or Gateway mode * @param device device * @param params configuration parameters, * @returns status according to result of execution * - if device mode is incorrect method returns OperationNotPermitted */ SetLimitingSwitchConfigurationAsync(device: IDevice, params: LimitSwitchConfiguration): Promise<Status>; GetTimeBetweenPulsesAsync(device: IDevice, channel: number): Promise<number | ResponseResult<GetParamsErrorCode>>; /** * Function to set time between pulses (delay time), parameter can be set only when device is in Gateway mode * @param device device * @param channel device channel * @param timeBetweenPulse time between pulses (delay time) in range between 1 and 300 with step 1 * @returns status according to result of execution * - if value of pulses is out of range method returns WrongData * - if device mode is incorrect method returns OperationNotPermitted */ SetTimeBetweenPulsesAsync(device: IDevice, channel: number, timeBetweenPulse: number): Promise<Status>; GetOpeningTime(device: IDevice, channel: number): Promise<number | ResponseResult<GetParamsErrorCode>>; /** * Function to set opening time (Notification time), parameter can be set only when device is in Gateway mode * @param device device * @param channel device channel * @param openingTime opening time (in sec) - range between 1 and 300 with step 1 * @retunrs status according to result of execution */ SetOpeningTimeAsync(device: IDevice, channel: number, openingTime: number): Promise<Status>; }