@ray-js/robot-data-stream 0.0.13-beta-7 → 0.0.13-beta-9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. package/lib/api/index.d.ts +2 -12
  2. package/lib/api/index.js +1 -172
  3. package/lib/api/p2pApi.d.ts +8 -27
  4. package/lib/api/p2pApi.js +271 -169
  5. package/lib/api/sweeperP2p.d.ts +55 -21
  6. package/lib/api/sweeperP2p.js +376 -246
  7. package/lib/constant.d.ts +0 -52
  8. package/lib/constant.js +0 -54
  9. package/lib/index.d.ts +12 -1
  10. package/lib/index.js +187 -2
  11. package/lib/mqtt/createCommonOptions.d.ts +15 -56
  12. package/lib/mqtt/createCommonOptions.js +8 -44
  13. package/lib/mqtt/mqttProvider.d.ts +15 -23
  14. package/lib/mqtt/mqttProvider.js +26 -63
  15. package/lib/mqtt/myError.d.ts +4 -0
  16. package/lib/mqtt/myError.js +6 -0
  17. package/lib/mqtt/promise.js +3 -8
  18. package/lib/mqtt/type/index.d.ts +0 -9
  19. package/lib/mqtt/type/index.js +0 -8
  20. package/lib/mqtt/type/requestType.d.ts +0 -3
  21. package/lib/mqtt/type/requestType.js +0 -4
  22. package/lib/mqtt/useDevInfo.d.ts +7 -2
  23. package/lib/mqtt/useDevInfo.js +9 -25
  24. package/lib/mqtt/useHistoryMap.d.ts +21 -13
  25. package/lib/mqtt/useHistoryMap.js +32 -82
  26. package/lib/mqtt/usePartDivision.d.ts +7 -5
  27. package/lib/mqtt/usePartDivision.js +16 -41
  28. package/lib/mqtt/usePartMerge.d.ts +7 -5
  29. package/lib/mqtt/usePartMerge.js +18 -36
  30. package/lib/mqtt/usePassword.js +28 -59
  31. package/lib/mqtt/useQuiteHours.d.ts +24 -9
  32. package/lib/mqtt/useQuiteHours.js +52 -95
  33. package/lib/mqtt/useResetMap.d.ts +7 -10
  34. package/lib/mqtt/useResetMap.js +11 -40
  35. package/lib/mqtt/useRoomProperty.js +16 -23
  36. package/lib/mqtt/useSchedule.d.ts +4 -17
  37. package/lib/mqtt/useSchedule.js +49 -101
  38. package/lib/mqtt/useSelectRoomClean.d.ts +16 -20
  39. package/lib/mqtt/useSelectRoomClean.js +49 -145
  40. package/lib/mqtt/useSpotClean.d.ts +3 -3
  41. package/lib/mqtt/useSpotClean.js +51 -71
  42. package/lib/mqtt/useVirtualArea.d.ts +9 -6
  43. package/lib/mqtt/useVirtualArea.js +42 -112
  44. package/lib/mqtt/useVirtualWall.d.ts +10 -13
  45. package/lib/mqtt/useVirtualWall.js +34 -97
  46. package/lib/mqtt/useVoice.d.ts +6 -3
  47. package/lib/mqtt/useVoice.js +33 -73
  48. package/lib/mqtt/useWifiMap.js +18 -34
  49. package/lib/mqtt/useZoneClean.d.ts +13 -13
  50. package/lib/mqtt/useZoneClean.js +76 -149
  51. package/lib/utils/index.d.ts +7 -18
  52. package/lib/utils/index.js +13 -15
  53. package/package.json +1 -1
  54. package/lib/ttt/index.d.ts +0 -153
  55. package/lib/ttt/index.js +0 -458
@@ -13,7 +13,7 @@ class MyError extends Error {
13
13
  }
14
14
  }
15
15
 
16
- // 2. 定义 Message 类型(兼容 MQTT 响应格式)
16
+ // 2. 定义 Message 类型
17
17
 
18
18
  // 3. 定义 PromiseWithRejection 类型
19
19
 
@@ -28,20 +28,15 @@ export function normalResolve(reqType, taskId) {
28
28
  }));
29
29
  }, 10 * 1000);
30
30
  const handle = message => {
31
- var _message$errCode;
32
- // 通过 taskId 匹配响应
33
31
  if (`${message.taskId}` !== `${taskId}`) {
34
32
  return;
35
33
  }
36
34
  clearTimeout(timer);
37
-
38
- // 优先使用 errCode,如果没有则使用 success 字段判断
39
- const errCode = (_message$errCode = message.errCode) !== null && _message$errCode !== void 0 ? _message$errCode : message.success === false ? -1 : 0;
40
- if (errCode === 0) {
35
+ if (message.errCode === 0) {
41
36
  resolve(message);
42
37
  } else {
43
38
  reject(new MyError('Request failed', {
44
- errCode,
39
+ errCode: message.errCode,
45
40
  reqType
46
41
  }));
47
42
  }
@@ -6,15 +6,6 @@ export interface BaseResponse {
6
6
  version: string;
7
7
  taskId: string;
8
8
  }
9
- /**
10
- * MQTT 协议号枚举
11
- */
12
- export declare enum ProtocolEnum {
13
- /** 面板下发 */
14
- appToRobot = 64,
15
- /** 设备上报 */
16
- robotToApp = 65
17
- }
18
9
  export declare enum PasswordEnum {
19
10
  query = "passwordQry",
20
11
  set = "passwordSet",
@@ -1,14 +1,6 @@
1
1
  export * from './requestType';
2
2
  // 设备接口响应的统一标准结构
3
3
 
4
- /**
5
- * MQTT 协议号枚举
6
- */
7
- export let ProtocolEnum = /*#__PURE__*/function (ProtocolEnum) {
8
- ProtocolEnum[ProtocolEnum["appToRobot"] = 64] = "appToRobot";
9
- ProtocolEnum[ProtocolEnum["robotToApp"] = 65] = "robotToApp";
10
- return ProtocolEnum;
11
- }({});
12
4
  export let PasswordEnum = /*#__PURE__*/function (PasswordEnum) {
13
5
  PasswordEnum["query"] = "passwordQry";
14
6
  PasswordEnum["set"] = "passwordSet";
@@ -70,6 +70,3 @@ export declare enum UseMapEnum {
70
70
  query = "useMapRst",
71
71
  set = "useMapSet"
72
72
  }
73
- export declare enum DevInfoEnum {
74
- query = "devInfoQry"
75
- }
@@ -104,8 +104,4 @@ export let UseMapEnum = /*#__PURE__*/function (UseMapEnum) {
104
104
  UseMapEnum["query"] = "useMapRst";
105
105
  UseMapEnum["set"] = "useMapSet";
106
106
  return UseMapEnum;
107
- }({});
108
- export let DevInfoEnum = /*#__PURE__*/function (DevInfoEnum) {
109
- DevInfoEnum["query"] = "devInfoQry";
110
- return DevInfoEnum;
111
107
  }({});
@@ -1,7 +1,12 @@
1
- import { BaseResponse } from './type';
2
- export interface DevInfoResponse extends BaseResponse {
1
+ interface DevInfoResponse {
2
+ reqType?: string;
3
+ version?: string;
3
4
  info: string;
5
+ success?: boolean;
6
+ errCode?: number;
7
+ taskId?: string;
4
8
  }
5
9
  export declare const useDevInfo: (devId: string) => {
6
10
  requestDevInfo: () => Promise<DevInfoResponse>;
7
11
  };
12
+ export {};
@@ -1,12 +1,12 @@
1
- import { hexToUriDecodedString } from '@ray-js/robot-protocol';
2
1
  import { useContext } from 'react';
3
2
  import { createSetCommonParams } from './createCommonOptions';
4
3
  import { SingletonContext } from './mqttProvider';
5
4
  import { normalResolve } from './promise';
6
- import { DevInfoEnum } from './type';
7
-
8
- // 设备信息响应类型
9
-
5
+ import { hexToUriDecodedString } from '@ray-js/robot-protocol';
6
+ var DevInfoEnum = /*#__PURE__*/function (DevInfoEnum) {
7
+ DevInfoEnum["query"] = "devInfoQry";
8
+ return DevInfoEnum;
9
+ }(DevInfoEnum || {});
10
10
  // 请求设备信息
11
11
  export const useDevInfo = devId => {
12
12
  const {
@@ -27,26 +27,10 @@ export const useDevInfo = devId => {
27
27
  } = params.message;
28
28
  return normalResolve(DevInfoEnum.query, taskId);
29
29
  }
30
-
31
- // 非 MQTT 模式:从设备属性中获取设备信息
32
- try {
33
- var _devices$common$model;
34
- const dpDevInfo = (_devices$common$model = devices.common.model.props) === null || _devices$common$model === void 0 ? void 0 : _devices$common$model.device_info;
35
- if (!dpDevInfo) {
36
- return Promise.reject(new Error('Device info is not available in device properties'));
37
- }
38
- const info = hexToUriDecodedString(dpDevInfo);
39
- return Promise.resolve({
40
- info,
41
- success: true,
42
- errCode: 0,
43
- reqType: DevInfoEnum.query,
44
- version: '1.0.0',
45
- taskId: `${Date.now()}`
46
- });
47
- } catch (error) {
48
- return Promise.reject(error instanceof Error ? error : new Error('Failed to get device info from device properties'));
49
- }
30
+ const dpDevInfo = devices.common.model.props.device_info;
31
+ return Promise.resolve({
32
+ info: hexToUriDecodedString(dpDevInfo)
33
+ });
50
34
  }
51
35
  };
52
36
  };
@@ -1,18 +1,26 @@
1
- import { BaseResponse, DeleteMapEnum, SaveCurrentMapEnum, UseMapEnum } from './type';
2
- interface DeleteMapResponse extends BaseResponse {
3
- reqType: DeleteMapEnum.rst;
4
- }
5
- interface SaveMapResponse extends BaseResponse {
6
- reqType: SaveCurrentMapEnum.query;
1
+ type TDeleteHistoryMap = (mapId: number) => Promise<{
2
+ success: boolean;
3
+ errCode: number;
4
+ reqType: string;
5
+ version: string;
6
+ taskId: string;
7
+ }>;
8
+ type TChangeCurrentMap = (mapId: number, url: string) => Promise<{
9
+ success: boolean;
10
+ errCode: number;
11
+ reqType: string;
7
12
  mapId: number;
8
- }
9
- interface UseMapResponse extends BaseResponse {
10
- reqType: UseMapEnum.query;
13
+ version: string;
14
+ taskId: string;
15
+ }>;
16
+ type TSaveMap = () => Promise<{
17
+ success: boolean;
18
+ errCode: number;
19
+ reqType: string;
11
20
  mapId: number;
12
- }
13
- type TDeleteHistoryMap = (mapId: number) => Promise<DeleteMapResponse>;
14
- type TSaveMap = () => Promise<SaveMapResponse>;
15
- type TChangeCurrentMap = (mapId: number, url: string) => Promise<UseMapResponse>;
21
+ version: string;
22
+ taskId: string;
23
+ } | void>;
16
24
  /**
17
25
  * 自定义 Hook,用于管理历史地图
18
26
  * @param devId 设备ID
@@ -6,16 +6,8 @@ import { DeleteMapEnum, SaveCurrentMapEnum, UseMapEnum } from './type';
6
6
  import { SingletonContext } from './mqttProvider';
7
7
  import { encodeDeleteMap0x2c, encodeSaveMap0x2a, encodeUseMap0x2e } from '@ray-js/robot-protocol';
8
8
 
9
- // 删除历史地图响应类型
10
-
11
- // 保存地图响应类型
12
-
13
- // 更改当前地图响应类型
14
-
15
9
  // 删除历史地图函数类型定义
16
10
 
17
- // 保存当前地图函数类型定义
18
-
19
11
  // 更改当前使用的地图函数类型定义
20
12
 
21
13
  /**
@@ -26,36 +18,32 @@ import { encodeDeleteMap0x2c, encodeSaveMap0x2a, encodeUseMap0x2e } from '@ray-j
26
18
  export const useHistoryMap = devId => {
27
19
  const {
28
20
  useMqtt,
29
- devices,
30
- commandVersion
21
+ devices
31
22
  } = useContext(SingletonContext);
32
-
33
23
  /**
34
24
  * 删除历史地图
35
25
  * @param mapId 地图ID
36
- * @returns Promise<DeleteMapResponse> 响应结果
26
+ * @returns Promise<{ success: boolean; errCode: number; reqType: string; version: string; taskId: string; }> 响应结果
37
27
  */
38
28
 
39
29
  /**
40
30
  * 保存当前地图
41
- * @returns Promise<SaveMapResponse> 响应结果
31
+ * @returns Promise<void> 响应结果
42
32
  */
43
33
 
44
34
  /**
45
35
  * 更改当前使用的地图
46
36
  * @param mapId 地图ID
47
37
  * @param url 地图URL
48
- * @returns Promise<UseMapResponse> 响应结果
38
+ * @returns Promise<{ success: boolean; errCode: number; reqType: string; mapId: number; version: string; taskId: string; }> 响应结果
49
39
  */
50
40
 
51
41
  return {
52
42
  deleteHistoryMap: async mapId => {
53
- // 参数验证
54
- if (!mapId || typeof mapId !== 'number') {
55
- throw new Error('mapId is required and must be a number');
56
- }
57
43
  try {
58
- // 先删除地图文件
44
+ if (!mapId) {
45
+ return Promise.reject(new Error('mapId is required'));
46
+ }
59
47
  await deleteMultipleMapFile(mapId, devId);
60
48
  if (useMqtt) {
61
49
  const params = createSetCommonParams({
@@ -71,41 +59,28 @@ export const useHistoryMap = devId => {
71
59
  } = params.message;
72
60
  return normalResolve(DeleteMapEnum.rst, taskId);
73
61
  }
74
-
75
- // 非 MQTT 模式:使用命令传输
76
62
  const command = encodeDeleteMap0x2c({
77
63
  id: mapId
78
64
  });
79
65
  devices.common.model.actions.command_trans.set(command);
80
- return Promise.resolve({
81
- success: true,
82
- errCode: 0,
83
- reqType: DeleteMapEnum.rst,
84
- version: commandVersion,
85
- taskId: `${Date.now()}`
86
- });
87
- } catch (error) {
88
- throw error instanceof Error ? error : new Error('Failed to delete history map');
66
+ return Promise.resolve();
67
+ } catch (err) {
68
+ return Promise.reject(err);
89
69
  }
90
70
  },
91
71
  changeCurrentMap: async (mapId, url) => {
92
- // 参数验证
93
- if (!mapId || typeof mapId !== 'number') {
94
- throw new Error('mapId is required and must be a number');
95
- }
96
- if (!url || typeof url !== 'string') {
97
- throw new Error('url is required and must be a string');
98
- }
99
72
  try {
100
73
  if (useMqtt) {
74
+ const sendData = {
75
+ reqType: UseMapEnum.set,
76
+ mapId,
77
+ url,
78
+ urlLen: url.length
79
+ };
101
80
  const params = createSetCommonParams({
102
81
  deviceId: devId,
103
82
  reqType: UseMapEnum.set,
104
- message: {
105
- mapId,
106
- url,
107
- urlLen: url.length // URL 长度
108
- }
83
+ message: sendData
109
84
  });
110
85
  ty.device.sendMqttMessage(params);
111
86
  const {
@@ -113,56 +88,31 @@ export const useHistoryMap = devId => {
113
88
  } = params.message;
114
89
  return normalResolve(UseMapEnum.query, taskId);
115
90
  }
116
-
117
- // 非 MQTT 模式:使用命令传输
118
91
  const command = encodeUseMap0x2e({
119
92
  mapId,
120
93
  url
121
94
  });
122
95
  devices.common.model.actions.command_trans.set(command);
123
- return Promise.resolve({
124
- success: true,
125
- errCode: 0,
126
- reqType: UseMapEnum.query,
127
- version: commandVersion,
128
- taskId: `${Date.now()}`,
129
- mapId
130
- });
131
- } catch (error) {
132
- throw error instanceof Error ? error : new Error('Failed to change current map');
96
+ return Promise.resolve();
97
+ } catch (err) {
98
+ return Promise.reject(err);
133
99
  }
134
100
  },
135
101
  saveMap: () => {
136
- try {
137
- if (useMqtt) {
138
- const params = createSetCommonParams({
139
- deviceId: devId,
140
- reqType: SaveCurrentMapEnum.set,
141
- message: {
142
- oper: 0 // 操作类型:0 表示保存
143
- }
144
- });
145
- ty.device.sendMqttMessage(params);
146
- const {
147
- taskId
148
- } = params.message;
149
- return normalResolve(SaveCurrentMapEnum.query, taskId);
150
- }
151
-
152
- // 非 MQTT 模式:使用命令传输
153
- const command = encodeSaveMap0x2a(1);
154
- devices.common.model.actions.command_trans.set(command);
155
- return Promise.resolve({
156
- success: true,
157
- errCode: 0,
158
- reqType: SaveCurrentMapEnum.query,
159
- version: commandVersion,
160
- taskId: `${Date.now()}`,
161
- mapId: 0 // 非 MQTT 模式下无法获取 mapId
102
+ if (useMqtt) {
103
+ const params = createSetCommonParams({
104
+ deviceId: devId,
105
+ reqType: SaveCurrentMapEnum.set,
106
+ message: {
107
+ oper: 0
108
+ }
162
109
  });
163
- } catch (error) {
164
- throw error instanceof Error ? error : new Error('Failed to save current map');
110
+ ty.device.sendMqttMessage(params);
111
+ return normalResolve(SaveCurrentMapEnum.query, params.message.taskId);
165
112
  }
113
+ const command = encodeSaveMap0x2a(1);
114
+ devices.common.model.actions.command_trans.set(command);
115
+ return Promise.resolve();
166
116
  }
167
117
  };
168
118
  };
@@ -1,9 +1,11 @@
1
1
  import { Point } from '../utils';
2
- import { BaseResponse, PartDivisionEnum } from './type';
3
- interface PartDivisionResponse extends BaseResponse {
4
- reqType: PartDivisionEnum.query;
5
- }
6
- type TSetPartDivision = (points: Point[], roomId: number, origin: Point) => Promise<PartDivisionResponse>;
2
+ type TSetPartDivision = (points: Point[], roomId: number, origin: Point) => Promise<{
3
+ success: boolean;
4
+ errCode: number;
5
+ reqType: string;
6
+ version: string;
7
+ taskId: string;
8
+ } | void>;
7
9
  /**
8
10
  * 自定义 Hook,用于房间分隔
9
11
  * @param devId 设备ID
@@ -7,8 +7,6 @@ import { PartDivisionEnum } from './type';
7
7
  import { SingletonContext } from './mqttProvider';
8
8
  import { encodePartitionDivision0x1c } from '@ray-js/robot-protocol';
9
9
 
10
- // 房间分隔响应类型
11
-
12
10
  // 设置房间分隔函数类型定义
13
11
 
14
12
  /**
@@ -26,61 +24,38 @@ export const usePartDivision = devId => {
26
24
  /**
27
25
  * 设置房间分隔
28
26
  * @param points 分隔点数组,SDK方法抛出来的坐标直接传入即可
29
- * @param roomId 房间ID,当前要分隔的房间
27
+ * @param roomId 房间ID,当前要分隔的房间
30
28
  * @param origin 地图原点坐标
31
- * @returns Promise<PartDivisionResponse> 响应结果
29
+ * @returns Promise<Response> 响应结果
32
30
  */
33
31
 
34
32
  return {
35
33
  setPartDivision: (points, roomId, origin) => {
36
- // 参数验证
37
- if (!Array.isArray(points) || points.length === 0) {
38
- throw new Error('points is required and must be a non-empty array');
39
- }
40
- if (typeof roomId !== 'number' || isNaN(roomId)) {
41
- throw new Error('roomId is required and must be a valid number');
42
- }
43
- if (!origin || typeof origin.x !== 'number' || typeof origin.y !== 'number') {
44
- throw new Error('origin is required and must be a valid Point object with x and y properties');
45
- }
46
- try {
47
- if (useMqtt) {
48
- // 将点数组转换为字符串格式
34
+ if (useMqtt) {
35
+ try {
49
36
  const pointStr = pointsToString(points, origin);
50
37
  const params = createSetCommonParams({
51
38
  deviceId: devId,
52
39
  reqType: PartDivisionEnum.set,
53
40
  message: {
54
41
  lines: [pointStr],
55
- // 分隔线数组
56
- ids: [roomId] // 房间ID数组
42
+ ids: [roomId]
57
43
  }
58
44
  });
59
45
  ty.device.sendMqttMessage(params);
60
- const {
61
- taskId
62
- } = params.message;
63
- return normalResolve(PartDivisionEnum.query, taskId);
46
+ return normalResolve(PartDivisionEnum.query, params.message.taskId);
47
+ } catch (e) {
48
+ throw new Error('房间分隔失败');
64
49
  }
65
-
66
- // 非 MQTT 模式:使用命令传输
67
- const command = encodePartitionDivision0x1c({
68
- version: commandVersion,
69
- origin,
70
- points,
71
- roomId
72
- });
73
- devices.common.model.actions.command_trans.set(command);
74
- return Promise.resolve({
75
- success: true,
76
- errCode: 0,
77
- reqType: PartDivisionEnum.query,
78
- version: commandVersion,
79
- taskId: `${Date.now()}`
80
- });
81
- } catch (error) {
82
- throw error instanceof Error ? error : new Error('Failed to set part division');
83
50
  }
51
+ const command = encodePartitionDivision0x1c({
52
+ version: commandVersion,
53
+ origin,
54
+ points,
55
+ roomId
56
+ });
57
+ devices.common.model.actions.command_trans.set(command);
58
+ return Promise.resolve();
84
59
  }
85
60
  };
86
61
  };
@@ -1,8 +1,10 @@
1
- import { BaseResponse, PartMergeEnum } from './type';
2
- interface PartMergeResponse extends BaseResponse {
3
- reqType: PartMergeEnum.query;
4
- }
5
- type TSetPartMerge = (ids: number[]) => Promise<PartMergeResponse>;
1
+ type TSetPartMerge = (ids: number[]) => Promise<{
2
+ success: boolean;
3
+ errCode: number;
4
+ reqType: string;
5
+ version: string;
6
+ taskId: string;
7
+ } | void>;
6
8
  /**
7
9
  * 自定义 Hook,用于分区合并
8
10
  * @param devId 设备ID
@@ -8,8 +8,6 @@ import { PartMergeEnum } from './type';
8
8
  import { SingletonContext } from './mqttProvider';
9
9
  import { encodePartitionMerge0x1e } from '@ray-js/robot-protocol';
10
10
 
11
- // 分区合并响应类型
12
-
13
11
  // 设置分区合并函数类型定义
14
12
 
15
13
  /**
@@ -26,50 +24,34 @@ export const usePartMerge = devId => {
26
24
  /**
27
25
  * 设置分区合并
28
26
  * @param ids 要合并的分区ID数组
29
- * @returns Promise<PartMergeResponse> 响应结果
27
+ * @returns Promise<Response> 响应结果
30
28
  */
31
29
 
32
30
  return {
33
31
  setPartMerge: ids => {
34
- // 参数验证
35
32
  if (!ids || ids.length < 2) {
36
- throw new Error('ids is required and length must be greater than 1');
33
+ return Promise.reject(new Error('ids is required and length must be greater than 1'));
37
34
  }
38
35
  if (ids.some(id => typeof id !== 'number')) {
39
- throw new Error('ids must be an array of numbers');
36
+ return Promise.reject(new Error('ids must be an array of numbers'));
40
37
  }
41
- try {
42
- if (useMqtt) {
43
- const params = createSetCommonParams({
44
- deviceId: devId,
45
- reqType: PartMergeEnum.set,
46
- message: {
47
- ids
48
- }
49
- });
50
- ty.device.sendMqttMessage(params);
51
- const {
52
- taskId
53
- } = params.message;
54
- return normalResolve(PartMergeEnum.query, taskId);
55
- }
56
-
57
- // 非 MQTT 模式:使用命令传输
58
- const command = encodePartitionMerge0x1e({
59
- version: commandVersion,
60
- roomIds: ids
61
- });
62
- devices.common.model.actions.command_trans.set(command);
63
- return Promise.resolve({
64
- success: true,
65
- errCode: 0,
66
- reqType: PartMergeEnum.query,
67
- version: commandVersion,
68
- taskId: `${Date.now()}`
38
+ if (useMqtt) {
39
+ const params = createSetCommonParams({
40
+ deviceId: devId,
41
+ reqType: PartMergeEnum.set,
42
+ message: {
43
+ ids
44
+ }
69
45
  });
70
- } catch (error) {
71
- throw error instanceof Error ? error : new Error('Failed to set part merge');
46
+ ty.device.sendMqttMessage(params);
47
+ return normalResolve(PartMergeEnum.query, params.message.taskId);
72
48
  }
49
+ const command = encodePartitionMerge0x1e({
50
+ version: commandVersion,
51
+ roomIds: ids
52
+ });
53
+ devices.common.model.actions.command_trans.set(command);
54
+ return Promise.resolve();
73
55
  }
74
56
  };
75
57
  };