MELCloud & MELCloud Home API for Node.js - v60.5.0
    Preparing search index...

    Class HomeDeviceAtwFacade

    Facade for a MELCloud Home ATW (air-to-water) device. Provides typed access to zone setpoints, tank temperature, and ATW telemetry endpoints (comfort-graph, internaltemperatures, interval energy).

    Hierarchy (View Summary)

    Index
    errorMessage: null

    Home's /context flags a faulted unit (isInError) but carries no text for it — the wording lives in the unit's error log, a separate read — so the contract's message is null on this dialect.

    type: "airToWater"

    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 capabilities(): TData["capabilities"]

      Static capability flags and ranges advertised by this device, narrowed to the device-type shape by TData.

      Returns TData["capabilities"]

      The capability descriptor.

    • 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 forcedHotWaterMode(): boolean

      Whether the unit is forcing hot-water generation.

      Returns boolean

      true when forced, false otherwise.

    • get hasCoolingMode(): boolean

      Whether the device firmware reports cooling-mode support. Distinct from HomeAtwDeviceCapabilities.hasHeatZone1/hasHeatZone2 (per-zone heat capability) — this flag mirrors the HasCoolingMode setting from /context.

      Returns boolean

      true when the device reports cooling mode availability.

    • get id(): string

      Unique device identifier as assigned by MELCloud Home.

      Returns string

      The GUID string assigned by MELCloud Home.

    • get inStandbyMode(): boolean

      Whether the unit is in standby (powered, but idle).

      Returns boolean

      true when on standby.

    • 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 isConnected(): boolean

      The RAW /context isConnected flag, as the wire read it on the latest sync — exposed for comparison with what the official app shows, never as availability. Its positive side is live-probed (12/12 true on healthy units); its negative side is unproven, and a flag that flapped would grey a tile on every flap, which is why isAvailable — the contract consumers must act on — only flips after a day of continuous false. Independent of the streak: a unit one minute into a disconnection reads isConnected: false and isAvailable: true at once.

      Returns boolean

      The wire flag, verbatim.

    • get isInError(): boolean

      Whether the unit itself reports a fault — the /context isInError flag, which MELCloud relays from the unit.

      Returns boolean

      true while the unit reports a fault of its own.

    • 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 operationalStateZone1(): ClassicOperationModeStateZone

      Zone-1 derived operational state: the top-level operationMode projected onto the zone (Heating/Cooling/Defrost map through, everything else — hot water, legionella, stop, unknown — reads idle), matching what the MELCloud Home app displays. The Classic flag refinements (Idle{Zone}, Prohibit*) do not exist on the Home wire, so prohibited is never produced.

      Returns ClassicOperationModeStateZone

      The derived zone-1 state.

    • get operationMode(): string

      Top-level operation mode advertised by the FTC controller. Values include Stop and the heat/cool modes; the SDK does not narrow further because the controller exposes other strings on some firmware revisions.

      Returns string

      The raw mode string as reported by the FTC.

    • get operationModeZone1(): HomeAtwZoneMode

      Active zone-1 control basis, normalized from the FTC zone operation mode ('HeatCurve' reads 'curve', the external *Thermostat variants and unknown firmware strings degrade to the room modes).

      Returns HomeAtwZoneMode

      The zone-1 mode.

    • get outdoorTemperature(): number

      Outdoor temperature reported by the FTC, in degrees Celsius.

      Returns number

      Degrees Celsius as measured at the outdoor unit.

    • get power(): boolean

      Whether the unit is powered on. Independent of standby: a unit in standby is powered but idle.

      Returns boolean

      true when on, false when off.

    • get roomTemperatureZone1(): number

      Last-reported zone-1 room temperature in degrees Celsius.

      Returns number

      Degrees Celsius for the zone-1 thermostat.

    • get roomTemperatureZone2(): number | null

      Last-reported zone-2 room temperature, or null for single-zone units.

      Returns number | null

      The room temperature, or null.

    • get rssi(): number

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

      Returns number

      The RSSI value.

    • get setTankWaterTemperature(): number

      Configured tank-water target temperature in degrees Celsius.

      Returns number

      The setpoint.

    • get setTemperatureZone2(): number | null

      Configured zone-2 target temperature, or null for single-zone units.

      Returns number | null

      The setpoint, or null.

    • get supportsOverheat(): boolean

      Whether this device can hold an overheat protection — the feature is ATA-only (the official app never offers it on ATW units).

      Returns boolean

      true on ATA devices.

    • get tankWaterTemperature(): number

      Last-reported tank water temperature in degrees Celsius.

      Returns number

      Degrees Celsius of the domestic hot-water tank.

    • get temperatureStep(): number

      Setpoint granularity in °C, straight from the FTC's advertised increment — the ATW counterpart of the ATA derivation from hasHalfDegreeIncrements.

      Returns number

      The advertised increment (typically 0.5 or 1).

    • Fetches energy telemetry for this device over the given time window — cumulative consumption on ATA units, one interval-measure direction on ATW units (measure selects consumed or produced there, and only there). See HomeEnergyQuery for the window and interval semantics.

      Parameters

      • params: { from: string; interval: string; measure: "consumed" | "produced"; to: string }

        Query window and interval, plus the energy direction on ATW.

      Returns Promise<Result<HomeEnergyData>>

      The telemetry bundle, or a typed failure.

    • Fetches energy telemetry as the normalized series — the projection of getEnergy that owns the wire dialect so consumers never decode it: each sample's UTC wall-clock stamp anchored as an epoch-ms instant, each value in kilowatt-hours whatever the device type (ATW interval buckets are kWh on the wire; the ATA cumulative measure is watt-hours, scaled here), samples in wire order. A garbled sample degrades field-by-field to null — never NaN, never a throw — and keeps its entry. The wire-verbatim bundle stays available on getEnergy.

      Parameters

      • params: {
            from: string;
            interval: HomeEnergyInterval;
            measure: "consumed" | "produced";
            to: string;
        }

        Query window and typed interval, plus the energy direction on ATW.

      Returns Promise<Result<HomeEnergySeriesPoint[]>>

      The normalized samples, or a typed failure.

    • Fetches the error-log entries for this device, projected onto the cross-dialect shape: errorCode maps to code, errorReason to message when present, clearedTimestamp to clearedAt when cleared — each wall-clock stamp paired with its UTC-anchored epoch instant. The raw wire entries stay available on the API client.

      Returns Promise<Result<ErrorLogEntry[]>>

      The neutral entries (possibly empty), or a typed failure.

    • Fetches the fine temperature chart — the merged comfort-graph and internal-temperatures series with operation-mode background bands, over the whole of today on a five-minute grid, or over one specific hour on a minute grid. The Home counterpart of the Classic getHourlyTemperatures contract (a superset: the Classic hourly wire only carries the internal series).

      Parameters

      • Optionalhour: Hour

        Optional hour of today (0-23); omitted covers today.

      Returns Promise<Result<ReportChartLineOptions>>

      Structured line chart options (°C), or a typed failure.

    • Fetches the temperature history as line chart data — the merged comfort-graph and internal-temperatures series resampled on a regular grid, with operation-mode background bands. The Home counterpart of the Classic getTemperatures contract (a superset: the Classic temperatures wire has no flow/return series and no mode bands).

      Parameters

      Returns Promise<Result<ReportChartLineOptions>>

      Structured line chart options (°C), or a typed failure.

    • 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 ATW setpoint update — the base pipeline narrowed to the ATW payload, with zone setpoints clamped to [minSetTemperature, maxSetTemperature] and the tank setpoint to [minSetTankTemperature, maxSetTankTemperature].

      Parameters

      Returns Promise<void>

      NoChangesError when values carries no defined value.