mysa-js-sdk
    Preparing search index...

    Function parseMqttPayload

    • Parses an MQTT payload from binary data into a typed OutPayload object.

      Converts the raw ArrayBuffer received from MQTT messages into a structured TypeScript object representing device status, state changes, or other outgoing message types from Mysa devices.

      Parameters

      • payload: ArrayBuffer

        The raw binary MQTT message payload as ArrayBuffer

      Returns OutPayload

      The parsed payload as a typed OutPayload object

      Error if the payload cannot be decoded or parsed as valid JSON