UNPKG

lavva.exalushome.extalife

Version:

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

63 lines (62 loc) 2.25 kB
import { IntRange } from "lavva.exalushome/build/js/Helpers"; import { SynchronizationTime } from "../../../ExtaLife"; import { DeviceConfigParams } from "../../DeviceConfigParams"; export declare class PirSensorParams extends DeviceConfigParams { DetectionThreshold: PirDetectionThreshold; WindowTime: PirWindowTime; Detection: PirDetection; PredefinedSettings: PirPredefinedSettings; } export declare class MovementDetectorParams extends DeviceConfigParams { OffTime: number; LuxSetting: LuxSettingThreshold; CurrentLuxValue: LuxSettingThreshold; SyncTime: SynchronizationTime; AccEvent: boolean; AccLevel: AccLevel; SensorMode: MoveSensorMode; ExternalOutMode: MoveSensorExternalOutputMode; OpticalLEDSignalization: boolean; MoveLEDSignalization: boolean; } export declare enum AccLevel { Low = 0, Medium = 1, High = 2 } export declare enum MoveSensorMode { NoBrightnessSensor = 0, NightMode = 1, DayMode = 2 } export declare enum MoveSensorExternalOutputMode { NO = 0, NC = 1, Disable = 2 } /** * Represents the time during which the number of pulses specified by the "Detection" parameter must occur. * Time is specified in secounds and its calculated by this value: WindowTime = 2s + this value */ export type PirWindowTime = 0 | 1 | 2 | 3; /** * Determines the number of pulses detected by the PIR after which a frame is sent. */ export type PirDetection = 1 | 2 | 3 | 4; /** * 0 - high detection level (high sensitivity ), small objects trigger the sensor. 255 - low detection level( reduced sensitivity ), small objects within a certain distance do not trigger the sensor. */ export type PirDetectionThreshold = IntRange<0, 256>; /** * Predefined DetectionThreshold, WindowTime and Detection settings: * 0 - Custom options - defined mannualy by each parameter (not using predefined settings) * 1 - Lowest sensitivity * 10 - Highest sensitivity */ export type PirPredefinedSettings = IntRange<0, 11>; /** * Light intensity threshold setting for night or day mode, * For DayMode - value is mapped to range 20 - 200 lux * For NightMode - value is mapped to range from 4 - 20lux */ export type LuxSettingThreshold = IntRange<0, 66>;