UNPKG

matterbridge

Version:
102 lines 7.42 kB
/** * This file contains the RoboticVacuumCleaner class. * * @file roboticVacuumCleaner.ts * @author Luca Liguori * @date 2025-05-01 * @version 1.1.0 * * Copyright 2025, 2026, 2027 Luca Liguori. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ import { MatterbridgeEndpoint } from './matterbridgeEndpoint.js'; import { MaybePromise } from '@matter/main'; import { RvcRunModeServer } from '@matter/main/behaviors/rvc-run-mode'; import { RvcOperationalStateServer } from '@matter/main/behaviors/rvc-operational-state'; import { RvcCleanModeServer } from '@matter/main/behaviors/rvc-clean-mode'; import { RvcRunMode } from '@matter/main/clusters/rvc-run-mode'; import { RvcCleanMode } from '@matter/main/clusters/rvc-clean-mode'; import { RvcOperationalState } from '@matter/main/clusters/rvc-operational-state'; import { ServiceArea } from '@matter/main/clusters/service-area'; import { ModeBase } from '@matter/main/clusters/mode-base'; import { OperationalState } from '@matter/main/clusters/operational-state'; export declare class RoboticVacuumCleaner extends MatterbridgeEndpoint { /** * Creates an instance of the RoboticVacuumCleaner class. * * @param {string} name - The name of the robotic vacuum cleaner. * @param {string} serial - The serial number of the robotic vacuum cleaner. * @param {number} [currentRunMode] - The current run mode of the robotic vacuum cleaner. Defaults to 1 (Idle). * @param {RvcRunMode.ModeOption[]} [supportedRunModes] - The supported run modes for the robotic vacuum cleaner. Defaults to a predefined set of modes. * @param {number} [currentCleanMode] - The current clean mode of the robotic vacuum cleaner. Defaults to 1 (Vacuum). * @param {RvcCleanMode.ModeOption[]} [supportedCleanModes] - The supported clean modes for the robotic vacuum cleaner. Defaults to a predefined set of modes. * @param {number | null} [currentPhase] - The current phase of the robotic vacuum cleaner. Defaults to null. * @param {string[] | null} [phaseList] - The list of phases for the robotic vacuum cleaner. Defaults to null. * @param {RvcOperationalState.OperationalState} [operationalState] - The current operational state of the robotic vacuum cleaner. Defaults to Docked. * @param {RvcOperationalState.OperationalStateStruct[]} [operationalStateList] - The list of operational states for the robotic vacuum cleaner. Defaults to a predefined set of states. * @param {ServiceArea.Area[]} [supportedAreas] - The supported areas for the robotic vacuum cleaner. Defaults to a predefined set of areas. * @param {number[]} [selectedAreas] - The selected areas for the robotic vacuum cleaner. Defaults to an empty array (all areas allowed). * @param {number} [currentArea] - The current area of the robotic vacuum cleaner. Defaults to 1 (Living). */ constructor(name: string, serial: string, currentRunMode?: number, supportedRunModes?: RvcRunMode.ModeOption[], currentCleanMode?: number, supportedCleanModes?: RvcCleanMode.ModeOption[], currentPhase?: number | null, phaseList?: string[] | null, operationalState?: RvcOperationalState.OperationalState, operationalStateList?: RvcOperationalState.OperationalStateStruct[], supportedAreas?: ServiceArea.Area[], selectedAreas?: number[], currentArea?: number); /** * Creates a default RvcRunMode Cluster Server. * * @param {number} [currentMode] - The current mode of the RvcRunMode cluster. Defaults to 1 (Idle). * @param {RvcRunMode.ModeOption[]} [supportedModes] - The supported modes for the RvcRunMode cluster. Defaults to a predefined set of modes. * * @returns {this} The current MatterbridgeEndpoint instance for chaining. */ createDefaultRvcRunModeClusterServer(currentMode?: number, supportedModes?: RvcRunMode.ModeOption[]): this; /** * Creates a default RvcCleanMode Cluster Server. * * @param {number} [currentMode] - The current mode of the RvcCleanMode cluster. Defaults to 1 (Vacuum). * @param {RvcCleanMode.ModeOption[]} [supportedModes] - The supported modes for the RvcCleanMode cluster. Defaults to a predefined set of modes. * * @returns {this} The current MatterbridgeEndpoint instance for chaining. */ createDefaultRvcCleanModeClusterServer(currentMode?: number, supportedModes?: RvcCleanMode.ModeOption[]): this; /** * Creates a default ServiceArea Cluster Server. * * @param {ServiceArea.Area[]} [supportedAreas] - The supported areas for the ServiceArea cluster. Defaults to a predefined set of areas. * @param {number[]} [selectedAreas] - The selected areas for the ServiceArea cluster. Defaults to an empty array (all areas allowed). * @returns {this} The current MatterbridgeEndpoint instance for chaining. */ createDefaultServiceAreaClusterServer(supportedAreas?: ServiceArea.Area[], selectedAreas?: number[], currentArea?: number): this; /** * Creates a default RvcOperationalState Cluster Server. * * @param {string[] | null} [phaseList] - The list of phases for the RvcOperationalState cluster. Defaults to null. * @param {number | null} [currentPhase] - The current phase of the RvcOperationalState cluster. Defaults to null. * @param {RvcOperationalState.OperationalStateStruct[]} [operationalStateList] - The list of operational states for the RvcOperationalState cluster. Defaults to a predefined set of states. * @param {RvcOperationalState.OperationalState} [operationalState] - The current operational state of the RvcOperationalState cluster. Defaults to Docked. * @param {RvcOperationalState.ErrorStateStruct} [operationalError] - The current operational error of the RvcOperationalState cluster. Defaults to NoError. * @returns {this} The current MatterbridgeEndpoint instance for chaining. */ createDefaultRvcOperationalStateClusterServer(phaseList?: string[] | null, currentPhase?: number | null, operationalStateList?: RvcOperationalState.OperationalStateStruct[], operationalState?: RvcOperationalState.OperationalState, operationalError?: RvcOperationalState.ErrorStateStruct): this; } export declare class MatterbridgeRvcRunModeServer extends RvcRunModeServer { changeToMode(request: ModeBase.ChangeToModeRequest): MaybePromise<ModeBase.ChangeToModeResponse>; } export declare class MatterbridgeRvcCleanModeServer extends RvcCleanModeServer { changeToMode(request: ModeBase.ChangeToModeRequest): MaybePromise<ModeBase.ChangeToModeResponse>; } export declare class MatterbridgeRvcOperationalStateServer extends RvcOperationalStateServer { pause(): MaybePromise<OperationalState.OperationalCommandResponse>; resume(): MaybePromise<OperationalState.OperationalCommandResponse>; goHome(): MaybePromise<OperationalState.OperationalCommandResponse>; } //# sourceMappingURL=roboticVacuumCleaner.d.ts.map