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

    Class HomeDeviceAtaFacade

    Facade for a MELCloud Home ATA device. Provides typed access to device settings and per-mode temperature clamping before forwarding updates to the BFF.

    Hierarchy (View Summary)

    Index
    type: "airToAir"

    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 id(): string

      Unique device identifier as assigned by MELCloud Home.

      Returns string

      The GUID string assigned by MELCloud Home.

    • 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.

    • get name(): string

      User-facing display name set in the MELCloud Home app.

      Returns string

      The device's display name.

    • get operationMode(): HomeOperationMode

      Currently active operation mode (heat/cool/auto/dry/fan/off). The type documents the known vocabulary; unknown or absent wire values pass through unchecked (see #enumSetting), so exhaustive switches should keep a default arm.

      Returns HomeOperationMode

      The operation mode — a HomeOperationMode member for known wire values, an unchecked wire string otherwise.

    • get overheatProtection(): ProtectionState | null

      Current overheat-protection settings, or null when not configured. ATA-only: the base facade does not expose it because the official app never offers the feature on ATW units (their /context field stays null).

      Returns ProtectionState | null

      The cross-dialect protection state from /context.

    • get roomTemperature(): number

      Last-reported room temperature in degrees Celsius.

      Returns number

      Degrees Celsius as last reported by the device.

    • get rssi(): number

      Last-reported Wi-Fi signal strength of the device adapter, in dBm.

      Returns number

      The RSSI value.

    • get temperatureStep(): number

      Setpoint granularity in °C, from the unit's advertised half-degree capability.

      Returns number

      0.5 on half-degree units, 1 otherwise.

    • Fetches cumulative-energy telemetry for this device over the given time window.

      Parameters

      • params: { from: string; interval: string; to: string }

        Query window.

        • from: string

          ISO start timestamp (inclusive).

        • interval: string

          Aggregation interval (Minute, Hour, Day, Week or Month).

        • to: string

          ISO end timestamp (exclusive).

      Returns Promise<Result<HomeEnergyData>>

      The telemetry bundle, or a typed failure.

    • Apply a Classic group state to this device: the delta is translated to the Home vocabulary and pushed through the native per-device update path. Group writes are no-op tolerant: an all-null delta translates to nothing and resolves without a wire call, and a device already matching the delta (a NoChangesError from its update) counts as success.

      Parameters

      Returns Promise<void>

      The zone-shaped success outcome once the write completes.

    • 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>