AbstractWire-format device payload variant exposed on
model.data, narrowed to the device-type-specific shape by each subclass.
Builds a Home device facade backed by the given API client and registry-resident device model. Only the model's id is retained: every later access re-resolves through the registry.
Wire-format device payload variant exposed on
model.data, narrowed to the device-type-specific shape by each subclass.
Home API client.
Backing device model, narrowed to a specific variant.
ReadonlyerrorHome'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.
ReadonlytypeConnection-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.
Static capability flags and ranges advertised by this device,
narrowed to the device-type shape by TData.
The capability descriptor.
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.
true while the registry still resolves the id.
Unique device identifier as assigned by MELCloud Home.
The GUID string assigned by MELCloud Home.
Whether the unit is in standby (powered, but idle).
true when on standby.
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).
false after a day of continuous disconnection.
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.
The wire flag, verbatim.
Whether the unit itself reports a fault — the /context isInError
flag, which MELCloud relays from the unit.
true while the unit reports a fault of its own.
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).
true when owned, false when shared with this account.
User-facing display name set in the MELCloud Home app.
The device's display name.
Whether the unit is powered on. Independent of standby: a unit in standby is powered but idle.
true when on, false when off.
Last-reported Wi-Fi signal strength of the device adapter, in dBm.
The RSSI value.
Whether this device can hold an overheat protection — the feature is ATA-only (the official app never offers it on ATW units).
true on ATA devices.
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.
Query window and interval, plus the energy direction on ATW.
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.
Query window and typed interval, plus the energy direction on ATW.
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.
The neutral entries (possibly empty), or a typed failure.
Reads the current frost-protection settings — the cross-dialect
async contract shared with the Classic facades; the answer comes
from the synced /context model, no wire call.
The protection state, or null when never configured.
Reads the current holiday-mode window — the cross-dialect async
contract shared with the Classic facades; the answer comes from the
synced /context model, no wire call, both bounds projected onto
the caller's clock.
The holiday-mode state, or null when never configured.
Reads the current overheat-protection settings. The wire carries
the field on both types but only ATA units ever hold one (see
supportsOverheat): ATW units answer null like a
never-configured ATA unit — no type guard needed.
The protection state, or null when never configured.
Fetches RSSI telemetry for this device over the given time window.
Query window.
ISO start timestamp (inclusive).
ISO end timestamp (exclusive).
The telemetry bundle, or a typed failure.
Fetches the Wi-Fi signal chart — the whole of today on a
five-minute grid, or one specific hour on a minute grid. The Home
counterpart of the Classic getSignalStrength contract.
Optionalhour: Hour
Optional hour of today (0-23); omitted covers today.
Structured line chart options (dBm), or a typed failure.
Updates this device's frost protection — the cross-dialect write contract shared with the Classic facades, bounds clamped into range.
The new frost-protection settings.
Updates this device's holiday-mode window — the cross-dialect write contract shared with the Classic facades; an enabled window's bounds are projected from the caller's clock onto the wire's UTC.
The new holiday-mode window.
Updates this device's overheat protection. ATA-only on the wire: on an ATW unit the write resolves without any wire call (the same silent drop the batch write applies to ATW ids).
The new overheat-protection settings.
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.
true to power on, false to power off.
Pushes a partial update to the device; rejects when values
carries no defined value (an explicitly-undefined key counts as
absent), otherwise overlays the per-type clampValues hook's
clamped setpoints and forwards. Each subclass narrows the payload
to its device-type shape.
Partial update payload.
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-typegetSignalpassthrough, and provides the protectedsetting()lookup used by both the ATA and ATW facade subclasses.TDatanarrows the wrapped device payload (e.g.HomeAtaDeviceDatafor HomeDeviceAtaFacade) so subclasses see the device-type specific shape onmodel.datawithout unsafe casts.The base carries everything the types share — identity, availability, capabilities, power/standby, the telemetry passthroughs and the update pipeline; only what genuinely diverges between ATA and ATW (operation modes, setpoint vocabulary, report merging) lives in the subclass, reached through hooks like
clampValues.