sendMqttMessage
Requires:
DeviceKit≥3.3.0@ray-js/ray≥1.4.21
Platforms:
iOSAndroid
Method signature
sendMqttMessage(params: )Minimum SDK versions
- iOS
ThingSmartDeviceKitBizBundle - ≥ 5.2.0
- Android
com.thingclips.smart:thingsmart-bizbundle-devicekit - ≥ 5.2.0
Description
Send a message via the MQTT channel.
Parameters
| Property | Type | Required | Description | Minimum SDK versions |
|---|---|---|---|---|
message | Record<string, Record<string, any>> | Yes | Message content | — |
deviceId | string | Yes | device ID | — |
protocol | number | Yes | Protocol number | — |
options | Record<string, Record<string, any>> | Yes | Reserved marker for issuing-logic configuration; can be extended later (e.g., issuing sounds, follow-up actions after an operation). | — |
complete | () => void | No | Completion callback (executed on both success and failure) | — |
success | (params: boolean) => void | No | Callback on successful API call | — |
fail | (params: Object) => void | No | Failure callback | — |
fail callback parameters
| Property | Type | Description |
|---|---|---|
errorMsg | string | Error message |
errorCode | string | number | Error code |
| Error extension |
Return Value
None