UNPKG

homebridge-pioneer-avr-2025

Version:

A Pioneer AVR plugin for homebridge. This plugin is designed for Pioneer models that use Telnet Commands (e.g., VSX-922). It may not be compatible with newer models (e.g., VSX-LX304).

46 lines 1.78 kB
import type { TelnetAvr } from '../telnet-avr/telnetAvr'; import type { Logging } from 'homebridge'; import type { AVState } from './pioneerAvr'; /** * This mixin adds power management methods to a base class, including power control, * status checking, and handling disconnections. * @param Base - The base class to extend with power management methods. * @returns A new class that extends the base class with added power management functionality. */ export declare function PowerManagementMixin<TBase extends new (...args: any[]) => { log: Logging; state: AVState; lastUserInteraction: number; telnetAvr: TelnetAvr; }>(Base: TBase): { new (...args: any[]): { telnetAvr: TelnetAvr; /** * Placeholder for setting the power state of the AVR. * Intended to be overridden externally. */ functionSetPowerState(_state: boolean): void; /** * Sends a power status query to the AVR and updates the power state. * @param callback - Function to run after updating power state. */ __updatePower(callback: () => void): Promise<void>; /** * Retrieves the power status of the AVR. * @param callback - The function to handle the power status result. */ powerStatus(callback: (err: any, status?: boolean) => void): Promise<void>; /** * Sends a power-on command to the AVR and updates the power status. */ powerOn(): Promise<void>; /** * Sends a power-off command to the AVR and updates the power status. */ powerOff(): Promise<void>; log: Logging; state: AVState; lastUserInteraction: number; }; } & TBase; //# sourceMappingURL=power.d.ts.map