MELCloud & MELCloud Home API for Node.js - v48.2.0
    Preparing search index...

    Class HomeBaseDeviceFacade<TData>Abstract

    Shared scaffolding for every Home device facade. Holds the API client + registry-resident model, exposes the common identity getters (id, name, rssi) and the cross-type getSignal passthrough, and provides the protected setting() lookup used by both the ATA and ATW facade subclasses.

    TData narrows the wrapped device payload (e.g. HomeAtaDeviceData for HomeDeviceAtaFacade) so subclasses see the device-type specific shape on model.data without unsafe casts.

    The class is intentionally thin: anything that diverges between ATA and ATW (operation modes, capability fields, update payload shape, telemetry endpoints) lives in the subclass.

    Type Parameters

    • TData extends HomeDeviceData

      Wire-format device payload variant exposed on model.data, narrowed to the device-type-specific shape by each subclass.

    Hierarchy (View Summary)

    Implements

    Index

    Connection-type discriminator, captured at construction (a physical device never changes type) so it stays readable on a pruned id — the Home counterpart of the Classic facades' type.

    • get exists(): boolean

      Whether the underlying device still exists in the registry. Non-throwing introspection mirroring the Classic facades' exists: a consumer holding a cached facade can detect staleness without a try/catch.

      Returns boolean

      true while the registry still resolves the id.

    • get isAvailable(): boolean

      Whether MELCloud can still deliver writes to the unit. false means the wifi adapter lost its link to the cloud: writes are accepted but never delivered, and readings go stale. The /context isConnected flag only counts once it has read false for a full day: its negative side is unproven, and the persistence window makes a Classic-Offline-style tight-threshold boolean harmless (such a flag never stays false through a report cycle).

      Returns boolean

      false after a day of continuous disconnection.

    • get isOwner(): boolean

      Whether the current account owns this device rather than being a guest of it. Reports the structural origin only: false does not by itself prove a guest is barred from control (the BFF accepts guest writes on shared units).

      Returns boolean

      true when owned, false when shared with this account.

    • Powers the unit on or off. This is the unit-level master power (the Power setting, shown as the system on/off toggle in the app), defined at the base like the Classic side's updatePower — the contracts differ: this one resolves void and throws the typed transport error. Convenience wrapper over updateValues.

      Parameters

      • isOn: boolean = true

        true to power on, false to power off.

      Returns Promise<void>

    • Pushes a partial update to the device. Each subclass narrows the payload to its device-type shape; both shapes share the power field this base's updatePower relies on.

      Parameters

      • values: { power?: boolean | null }

        Partial update payload.

      Returns Promise<void>