mysa-js-sdk
    Preparing search index...

    Interface representing a command to change the state of a Mysa device.

    This message type allows clients to modify device settings such as temperature setpoint and operating mode. The command is structured with source and destination routing information along with the specific state changes to apply.

    interface ChangeDeviceState {
        body: {
            cmd: [{ md?: number; sp?: number; tm: number }];
            type: number;
            ver: number;
        };
        dest: { ref: string; type: number };
        id: number;
        msg: CHANGE_DEVICE_STATE;
        resp: number;
        src: { ref: string; type: number };
        time: number;
        ver: string;
    }

    Hierarchy (View Summary)

    Index

    Properties

    Properties

    body: {
        cmd: [{ md?: number; sp?: number; tm: number }];
        type: number;
        ver: number;
    }

    Command payload containing the state changes to apply

    Type declaration

    • cmd: [{ md?: number; sp?: number; tm: number }]

      Array of command objects to execute

    • type: number

      Command type identifier. Must be 1 for BB-V1-X, 4 for BB-V2-X, and 5 for BB-V2-X-L. Devices don't seem to respond to this command if it has the wrong type value for the device.

    • ver: number

      Command format version. Should be 1.

    dest: { ref: string; type: number }

    Destination routing information for the command

    Type declaration

    • ref: string

      Reference identifier for the command destination (device)

    • type: number

      Type identifier for the destination. Should be 1.

    id: number

    Unique identifier for the device or message source

    The strongly-typed message type identifier

    resp: number

    Unknown, should always be 2.

    src: { ref: string; type: number }

    Source routing information for the command

    Type declaration

    • ref: string

      Reference identifier for the command source. Should correspond to the user id.

    • type: number

      Type identifier for the source. Should be 100.

    time: number

    Unix timestamp when the message was created

    ver: string

    Version string of the message format