eufy-security-client-fork
Version:
Client to comunicate with Eufy-Security devices
34 lines (33 loc) • 1.92 kB
TypeScript
/// <reference types="node" />
import { SmartSafeNotificationResponse } from "../p2p/models";
import { Device } from "./device";
import { NotificationSwitchMode, WifiSignalLevel } from "./types";
export declare const isGreaterEqualMinVersion: (minimal_version: string, current_version: string) => boolean;
export declare const pad: (num: number) => string;
export declare const getTimezoneGMTString: () => string;
export declare const getAbsoluteFilePath: (device_type: number, channel: number, filename: string) => string;
export declare const isNotificationSwitchMode: (value: number, mode: NotificationSwitchMode) => boolean;
export declare const switchNotificationMode: (currentValue: number, mode: NotificationSwitchMode, enable: boolean) => number;
export declare const calculateWifiSignalLevel: (device: Device, rssi: number) => WifiSignalLevel;
export declare const encryptPassword: (password: string, key: Buffer) => string;
export declare const getBlocklist: (directions: Array<number>) => Array<number>;
export declare const getDistances: (blocklist: Array<number>) => Array<number>;
export interface EufyTimezone {
timeZoneName: string;
timeId: string;
timeSn: string;
timeZoneGMT: string;
}
export declare const timeZoneData: Array<EufyTimezone>;
export declare const getEufyTimezone: () => EufyTimezone | undefined;
export declare const getAdvancedLockTimezone: (stationSN: string) => string;
export declare class SmartSafeByteWriter {
private split_byte;
private data;
write(bytes: Buffer): void;
getData(): Buffer;
}
export declare const getCurrentTimeInSeconds: () => number;
export declare const generateHash: (data: Buffer) => number;
export declare const encodeSmartSafeData: (command: number, payload: Buffer) => Buffer;
export declare const decodeSmartSafeData: (deviceSN: string, data: Buffer) => SmartSafeNotificationResponse;