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

    Interface ClassicAPIAdapter

    Low-level API adapter exposing all MELCloud HTTP endpoints. Methods are grouped by supported device types.

    Best-effort getters return Result<T> so callers can branch on the typed failure shape (network / unauthorized / rate-limited / server) instead of catching opaque exceptions.

    Mutations (update*, login) and sync (fetch) keep their throw-on-failure contract — symmetric with Home's updateValues and list.

    Every method returns the unwrapped payload (no { data } wrapper). Transport metadata (status, headers) lives inside the SDK on request<T>(); consumers don't see it. Applied uniformly across both Classic and Home so the public surface is symmetric.

    interface ClassicAPIAdapter {
        authenticate: (credentials: LoginCredentials) => Promise<void>;
        clearSync: () => void;
        ensureAuthenticated: () => Promise<boolean>;
        fetch: () => Promise<ClassicBuildingWithStructure[]>;
        getEnergy: <T extends ClassicDeviceType>(
            __namedParameters: { postData: ClassicEnergyPostData },
        ) => Promise<Result<ClassicEnergyData<T>>>;
        getErrorEntries: (
            __namedParameters: { postData: ClassicErrorLogPostData },
        ) => Promise<Result<ClassicFailureData | ClassicErrorLogData[]>>;
        getErrorLog: (
            query: ClassicErrorLogQuery,
            deviceIds: number[],
        ) => Promise<Result<ClassicErrorLog>>;
        getFrostProtection: (
            __namedParameters: { params: ClassicSettingsParams },
        ) => Promise<Result<ClassicFrostProtectionData>>;
        getGroup: (
            __namedParameters: { postData: ClassicGetGroupPostData },
        ) => Promise<Result<ClassicGetGroupData>>;
        getHolidayMode: (
            __namedParameters: { params: ClassicSettingsParams },
        ) => Promise<Result<ClassicHolidayModeData>>;
        getHourlyTemperatures: (
            __namedParameters: { postData: { device: number; hour: Hour } },
        ) => Promise<Result<ClassicReportData>>;
        getInternalTemperatures: (
            __namedParameters: { postData: ClassicReportPostData },
        ) => Promise<Result<ClassicReportData>>;
        getOperationModes: (
            __namedParameters: { postData: ClassicReportPostData },
        ) => Promise<Result<ClassicOperationModeLogData>>;
        getSignal: (
            __namedParameters: {
                postData: { devices: number | number[]; hour: Hour };
            },
        ) => Promise<Result<ClassicReportData>>;
        getTemperatures: (
            __namedParameters: { postData: ClassicTemperatureLogPostData },
        ) => Promise<Result<ClassicReportData>>;
        getTiles: (
            __namedParameters: { postData: ClassicTilesPostData<null> },
        ) => Promise<Result<ClassicTilesData<null>>> & <
            T extends ClassicDeviceType,
        >(
            __namedParameters: { postData: ClassicTilesPostData<T> },
        ) => Promise<Result<ClassicTilesData<T>>>;
        getValues: <T extends ClassicDeviceType>(
            __namedParameters: { params: ClassicGetDeviceDataParams },
        ) => Promise<Result<ClassicGetDeviceData<T>>>;
        isAuthenticated: () => boolean;
        isRateLimited: boolean;
        locale: string | undefined;
        logOut: () => void;
        notifySync: SyncCallback;
        registry: ClassicRegistry;
        resumeSession: () => Promise<boolean>;
        setSyncInterval: (minutes: number | false) => void;
        timezone: string | undefined;
        updateFrostProtection: (
            __namedParameters: { postData: ClassicFrostProtectionPostData },
        ) => Promise<ClassicFailureData | ClassicSuccessData>;
        updateGroupState: (
            __namedParameters: { postData: ClassicSetGroupPostData },
        ) => Promise<ClassicFailureData | ClassicSuccessData>;
        updateHolidayMode: (
            __namedParameters: { postData: ClassicHolidayModePostData },
        ) => Promise<ClassicFailureData | ClassicSuccessData>;
        updatePower: (
            __namedParameters: { postData: ClassicSetPowerPostData },
        ) => Promise<boolean>;
        updateValues: <T extends ClassicDeviceType>(
            __namedParameters: { postData: ClassicSetDevicePostData<T>; type: T },
        ) => Promise<ClassicSetDeviceData<T>>;
    }

    Hierarchy (View Summary)

    Implemented by

    Index
    authenticate: (credentials: LoginCredentials) => Promise<void>

    Sign in with explicit credentials; throws on rejection.

    clearSync: () => void

    Cancel any pending automatic sync.

    ensureAuthenticated: () => Promise<boolean>

    Sync check first; when it reads false, one best-effort resumeSession probe, then a re-check — the lazy self-heal consumers otherwise hand-roll (a valid persisted Home token reads unauthenticated until a context fetch has run).

    Fetch all buildings and sync the model registry.

    getEnergy: <T extends ClassicDeviceType>(
        __namedParameters: { postData: ClassicEnergyPostData },
    ) => Promise<Result<ClassicEnergyData<T>>>

    Fetch energy consumption report. Supported by ATA and ATW devices.

    getErrorEntries: (
        __namedParameters: { postData: ClassicErrorLogPostData },
    ) => Promise<Result<ClassicFailureData | ClassicErrorLogData[]>>

    Fetch raw error log entries from the Classic API.

    getErrorLog: (
        query: ClassicErrorLogQuery,
        deviceIds: number[],
    ) => Promise<Result<ClassicErrorLog>>

    Retrieve a parsed and paginated error log for the given devices. Supported by all device types.

    getFrostProtection: (
        __namedParameters: { params: ClassicSettingsParams },
    ) => Promise<Result<ClassicFrostProtectionData>>

    Get frost protection settings for a building, floor, area, or device.

    getGroup: (
        __namedParameters: { postData: ClassicGetGroupPostData },
    ) => Promise<Result<ClassicGetGroupData>>

    Fetch ATA device group state. ATA only.

    getHolidayMode: (
        __namedParameters: { params: ClassicSettingsParams },
    ) => Promise<Result<ClassicHolidayModeData>>

    Get holiday mode settings for a building, floor, area, or device.

    getHourlyTemperatures: (
        __namedParameters: { postData: { device: number; hour: Hour } },
    ) => Promise<Result<ClassicReportData>>

    Fetch hourly temperature report. ATW only.

    getInternalTemperatures: (
        __namedParameters: { postData: ClassicReportPostData },
    ) => Promise<Result<ClassicReportData>>

    Fetch internal temperature report. ATW only.

    getOperationModes: (
        __namedParameters: { postData: ClassicReportPostData },
    ) => Promise<Result<ClassicOperationModeLogData>>

    Fetch operation mode log data for charting.

    getSignal: (
        __namedParameters: {
            postData: { devices: number | number[]; hour: Hour };
        },
    ) => Promise<Result<ClassicReportData>>

    Fetch WiFi signal strength report.

    getTemperatures: (
        __namedParameters: { postData: ClassicTemperatureLogPostData },
    ) => Promise<Result<ClassicReportData>>

    Fetch temperature log data.

    getTiles: (
        __namedParameters: { postData: ClassicTilesPostData<null> },
    ) => Promise<Result<ClassicTilesData<null>>> & <T extends ClassicDeviceType>(
        __namedParameters: { postData: ClassicTilesPostData<T> },
    ) => Promise<Result<ClassicTilesData<T>>>

    Fetch tile data for device overview.

    getValues: <T extends ClassicDeviceType>(
        __namedParameters: { params: ClassicGetDeviceDataParams },
    ) => Promise<Result<ClassicGetDeviceData<T>>>

    Fetch current device data by device and building ID.

    isAuthenticated: () => boolean

    Whether a session is currently usable, from local state alone.

    isRateLimited: boolean

    Whether the client is currently inside a server rate-limit backoff.

    locale: string | undefined

    BCP-47 locale tag the instance was configured with, or undefined.

    logOut: () => void

    Explicit sign-out: clears the persisted session material.

    notifySync: SyncCallback

    Notify any registered events.onSyncComplete observer that a sync just landed. Routed through the lifecycle emitter so a misbehaving observer cannot break the caller.

    registry: ClassicRegistry

    Classic model registry synced by the fetch cycle.

    resumeSession: () => Promise<boolean>

    Best-effort session restore from persisted credentials. Never throws — returns false when no credentials are persisted or sign-in fails (logged via the SDK logger).

    setSyncInterval: (minutes: number | false) => void

    Update the automatic sync interval and reschedule. Pass false to disable.

    timezone: string | undefined

    IANA timezone the instance was configured with, or undefined.

    updateFrostProtection: (
        __namedParameters: { postData: ClassicFrostProtectionPostData },
    ) => Promise<ClassicFailureData | ClassicSuccessData>

    Update frost protection settings.

    updateGroupState: (
        __namedParameters: { postData: ClassicSetGroupPostData },
    ) => Promise<ClassicFailureData | ClassicSuccessData>

    Update ATA device group state. ATA only.

    updateHolidayMode: (
        __namedParameters: { postData: ClassicHolidayModePostData },
    ) => Promise<ClassicFailureData | ClassicSuccessData>

    Update holiday mode settings.

    updatePower: (
        __namedParameters: { postData: ClassicSetPowerPostData },
    ) => Promise<boolean>

    Turn devices on or off.

    updateValues: <T extends ClassicDeviceType>(
        __namedParameters: { postData: ClassicSetDevicePostData<T>; type: T },
    ) => Promise<ClassicSetDeviceData<T>>

    Send updated device values to the Classic API.