mysa-js-sdk
    Preparing search index...

    Interface representing a device state change notification from a Mysa device.

    This message is sent when a device's operational state has been modified, either through user interaction, scheduled changes, or external commands. It provides confirmation of the change and the resulting device state.

    interface DeviceStateChange {
        body: {
            state: { br: number; ho: number; lk: number; md: number; sp: number };
            success: number;
            trig_src: number;
            type: number;
        };
        id: number;
        msg: DEVICE_STATE_CHANGE;
        src: { ref: string; type: number };
        time: number;
        ver: string;
    }

    Hierarchy (View Summary)

    Index

    Properties

    Properties

    body: {
        state: { br: number; ho: number; lk: number; md: number; sp: number };
        success: number;
        trig_src: number;
        type: number;
    }

    State change data payload containing the new device state and change metadata

    Type declaration

    • state: { br: number; ho: number; lk: number; md: number; sp: number }

      Current device state parameters after the change

      • br: number

        Brightness level (0-100)

      • ho: number

        Unknown

      • lk: number

        Unknown

      • md: number

        Device mode (1 = OFF, 3 = HEAT)

      • sp: number

        Temperature setpoint

    • success: number

      Success indicator for the state change operation (1 = success, 0 = failure)

    • trig_src: number

      Trigger source identifier indicating what initiated the state change

    • type: number

      State change type identifier

    id: number

    Unique identifier for the device or message source

    The strongly-typed message type identifier

    src: { ref: string; type: number }

    Source information identifying the device that changed state

    Type declaration

    • ref: string

      Reference identifier for the device

    • type: number

      Type identifier for the source device

    time: number

    Unix timestamp when the message was created

    ver: string

    Version string of the message format