import type { ImageFrameStatus } from '../types/device.js'; import { Buffer } from 'node:buffer'; import { SequenceDevice } from './sequence-device.js'; /** Frame settings read over BLE (pySwitchbot `SwitchbotArtFrame2.get_basic_info`) */ export interface ImageFrameInfo { batteryCharging: boolean; battery: number; firmware: number; hardware: number; displaySize: number; displayMode: number; lastNetworkStatus: number; /** Id of the image on screen */ currentImageIndex: number; totalNumOfImages: number; orientation: number; } /** * Decode the frame's basic info reply (pySwitchbot `SwitchbotArtFrame2.get_basic_info`). * Returns undefined for a missing, failed or short reply. */ export declare function parseImageFrameInfo(data: Buffer | undefined): ImageFrameInfo | undefined; /** The image ids set in a stored-image bitmap: bit b of byte i is image id i * 8 + b + 1 */ export declare function imageIdsFromBitmap(bitmap: Buffer): number[]; /** * Art Frame 2 (pySwitchbot `SwitchbotArtFrame2`, pySwitchbot 3.10.0): an encrypted image frame * with 16-bit image ids. Set the account's key with `device.setKey({ keyId, encryptionKey })`. * * Status comes from the advertisement. The commands are BLE only, except next/previous image, * which fall back to the OpenAPI `next` and `previous` commands. */ export declare class WoArtFrame2 extends SequenceDevice { /** Frame state comes from the manufacturer data in advertisements, as in pySwitchbot */ protected get readsFromAdvertisement(): boolean; /** Send a BLE command and return its reply; throws when BLE fails or the reply is empty */ private exchange; /** Send a command and report whether the frame answered with status 0x01 */ private run; /** * Read the frame settings without downloading the image bitmap (pySwitchbot `get_basic_info`). * Returns undefined when the frame refuses the request or the reply is short. */ getFrameInfo(): Promise; /** * Read the ids of the stored user images, from the frame's packet-ordered bitmap * (pySwitchbot `_get_image_indexes`). */ getImageIds(): Promise; private setImageId; /** Show the next stored image (OpenAPI `next` when BLE is unavailable or fails) */ nextImage(): Promise; /** Show the previous stored image (OpenAPI `previous` when BLE is unavailable or fails) */ prevImage(): Promise; /** Run a BLE command; fall back to an OpenAPI command when BLE is unavailable or fails */ private runWithAPIFallback; /** Show a random stored user image other than the current one */ randomImage(): Promise; /** Show a user image by its zero-based position in the stored list */ setImage(index: number): Promise; /** * Get device status (BLE advertisement first, API fallback) */ getStatus(): Promise; } //# sourceMappingURL=wo-art-frame2.d.ts.map