MELCloud & MELCloud Home API for Node.js - v23.3.3
    Preparing search index...

    Interface DeviceFacade<T>

    Facade for an individual MELCloud device with type-safe data access and control.

    interface DeviceFacade<T extends DeviceType> {
        data: ListDeviceData<T>;
        devices: readonly DeviceModelAny[];
        fetch: () => Promise<ListDeviceData<T>>;
        flags: Record<keyof UpdateDeviceData<T>, number>;
        getEnergy: (query: ReportQuery) => Promise<EnergyData<T>>;
        getErrors: (query: ErrorLogQuery) => Promise<FailureData | ErrorLog>;
        getFrostProtection: () => Promise<FrostProtectionData>;
        getHolidayMode: () => Promise<HolidayModeData>;
        getHourlyTemperatures: (
            hour?: HourNumbers,
        ) => Promise<ReportChartLineOptions>;
        getInternalTemperatures: (
            query: ReportQuery,
        ) => Promise<ReportChartLineOptions>;
        getOperationModes: (query: ReportQuery) => Promise<ReportChartPieOptions>;
        getSignalStrength: (hour?: HourNumbers) => Promise<ReportChartLineOptions>;
        getTemperatures: (query: ReportQuery) => Promise<ReportChartLineOptions>;
        getTiles: (device: true | DeviceModelAny) => Promise<TilesData<T>> & (
            device?: false,
        ) => Promise<TilesData<null>>;
        getValues: () => Promise<GetDeviceData<T>>;
        id: number;
        name: string;
        notifySync: (params?: { type?: DeviceType }) => Promise<void>;
        setFrostProtection: (
            query: FrostProtectionQuery,
        ) => Promise<FailureData | SuccessData>;
        setHolidayMode: (
            query: HolidayModeQuery,
        ) => Promise<FailureData | SuccessData>;
        setPower: (value?: boolean) => Promise<boolean>;
        setValues: (data: UpdateDeviceData<T>) => Promise<SetDeviceData<T>>;
        type: T;
    }

    Type Parameters

    Hierarchy (View Summary)

    • BaseDeviceModel<T>
    • Facade
      • DeviceFacade
    Index

    Properties

    devices: readonly DeviceModelAny[]

    All devices managed by this facade.

    fetch: () => Promise<ListDeviceData<T>>

    Fetch the latest device data after syncing.

    flags: Record<keyof UpdateDeviceData<T>, number>

    Bitfield flags mapping each updatable property to its effective flag value.

    getEnergy: (query: ReportQuery) => Promise<EnergyData<T>>

    Fetch energy consumption report. ATA and ATW only.

    getErrors: (query: ErrorLogQuery) => Promise<FailureData | ErrorLog>

    Retrieve the error log for all devices in this facade.

    getFrostProtection: () => Promise<FrostProtectionData>

    Get the current frost protection settings.

    getHolidayMode: () => Promise<HolidayModeData>

    Get the current holiday mode settings.

    getHourlyTemperatures: (hour?: HourNumbers) => Promise<ReportChartLineOptions>

    Fetch hourly temperature report. ATW only.

    getInternalTemperatures: (query: ReportQuery) => Promise<ReportChartLineOptions>

    Fetch internal temperature report. ATW only.

    getOperationModes: (query: ReportQuery) => Promise<ReportChartPieOptions>

    Fetch operation mode usage as pie chart data.

    getSignalStrength: (hour?: HourNumbers) => Promise<ReportChartLineOptions>

    Fetch WiFi signal strength report as line chart data.

    getTemperatures: (query: ReportQuery) => Promise<ReportChartLineOptions>

    Fetch temperature history as line chart data.

    getTiles: (device: true | DeviceModelAny) => Promise<TilesData<T>> & (
        device?: false,
    ) => Promise<TilesData<null>>

    Fetch tile overview data, optionally selecting a specific device.

    getValues: () => Promise<GetDeviceData<T>>

    Fetch current device values from the API.

    id: number
    name: string
    notifySync: (params?: { type?: DeviceType }) => Promise<void>

    Trigger a sync callback for downstream consumers.

    setFrostProtection: (
        query: FrostProtectionQuery,
    ) => Promise<FailureData | SuccessData>

    Update frost protection settings with temperature clamping.

    setHolidayMode: (query: HolidayModeQuery) => Promise<FailureData | SuccessData>

    Enable or disable holiday mode.

    setPower: (value?: boolean) => Promise<boolean>

    Turn all devices in this facade on or off.

    setValues: (data: UpdateDeviceData<T>) => Promise<SetDeviceData<T>>

    Send updated device values, clamping temperatures to valid ranges.

    type: T