homebridge-midea-platform 1.2.7-beta.2 → 1.2.7

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.
@@ -1,4681 +0,0 @@
1
- -- 集中采暖A&P系列线控器+WIFI协议解析
2
- -- author: sunpeng,nieyj
3
- -- email :sunpeng9@midea.com
4
- -- date : 2023-05-06
5
- -- 命名规范: 全大写字母为常量
6
- -- 修改记录
7
- -- 2022-10-9 在两联供-T_0000_CF_000H120H_8.lua基础上修改文件名T_0000_C3_171H120F_1.lua
8
- -- 2022-10-18 dataToJson修改能量参数中电量值,热量值;
9
- -- 2022-10-20 1.V01版本基础上修改参数命名,数字放后,2.修改控制指令createControlCmd函数字节1-bit.band改为bit.bor;
10
- -- 2022-10-21 修改silence_set_state为silence_on_state,增加eco_on_state,boostertbh_en;
11
- -- 2022-10-24 修改totalelectricity0等计算方式,LUA5.1不支持位‘<<’直接操作;
12
- -- 2022-11-02/03 增加protocol_newfunction_en字段,杀菌指令设置和查询,区域2定时信息(日定时、周定时,Holiday home);
13
- -- 2022-11-08 增加安装设定参数查询指令;
14
- -- 2022-11-11/12 增加主机机组运行参数查询指令,线控器参数查询;
15
- -- 2022-11-15 增加安装设定参数控制指令,当前可控制参数见协议中对应指令绿色底纹部分;
16
- -- 2022-11-16 修订线控器参数查询指令,增加历史故障和服务商电话信息;
17
- -- 2022-11-22 修订1.线控器查询参数-0x04外出休假,增加功能开关;2.线控器安装设定,线控器参数指令部分定义字段(key),七处
18
- -- 2022-11-23 修订'run_mode'为‘run_mode_set’,修订消息体子指令-0x01基本控制 增加区域1/2 温度曲线选择,0x07 ECO命令,增加ECO温度曲线;;
19
- -- 2022-11-25 根据"protocol_newfunction_en"区分on-表示新版本,off-旧版本(不支持区域2控制解析);当前LUA兼容已投产机型;
20
- -- 2022-11-25 增加机组参数主动上报指令解析0x04-05,修改反馈控制回复解析问题;
21
- -- 2022-11-30 增加机组参数主动上报指令解析0x04-05 系统能耗分析参数上报,安装设定参数指令增加上报时间设置;
22
- -- 2022-12-1 增加机组参数主动上报指令解析0x04-05 pwmPumpOut参数,解决控制下发模式'dhw'解析异常;
23
- -- 2022-12-2 删掉上报0402-解析"MSG_TYPE_UP_POWER2",现有电控设备正常不会上报0402,但市场上报0402数据不清楚对应什么协议;
24
- -- 2022-12-5 区分区域1/2 设定水温设定温度最大,最小值字段;
25
- -- 2022-12-19 根据"protocol_newfunction_en"区分查询回复指令软件是否支持区域2定时信息,兼容已投产机型,protocol_newfunction_en为on-支持区域2定时信息;
26
- -- 2023-01-31 室温设定温度room_temp_set,room_max_set_temp,room_min_set_temp,timeT4FreshC,timeT4FreshH,tPumpiDelay发送值=实际值*2改为LUA脚本处理,上行除以2,下行乘以2,同理gasCost,eleCost;
27
- -- 2023-02-07 增加上行有符号整数数据处理;
28
- -- 2023-02-08 增加增加主动上报命令子类型字段msg_up_type;
29
- -- 2023-02-08 控制指令下发protocol_newfunction_en控制下发ON,针对新升级WIFI电控软件(V50A及以后)解析,off为兼容已投产软件(V49A)解析.
30
- -- 2023-03-01 增加区分模式的能耗分析参数数据上报,系统支持能耗分析计算标志
31
- -- 2023-03-06 1.安装设定参数指令增加 tbhEnFunc,2.新增控制指令增加protocol_newfunction_en对应字节解析,区分兼容新老插件;3.增加机组类型字段machVersion
32
- -- 2023-03-12 1.protocol_newfunction_en 代表支持WiFi通讯协议V1.2-20230312版本,通过查询电控回复长度确认协议;2.修改04外出休假指令-byte 1新增开关标志位为byte8。
33
- -- 2023-03-14 上版本boostertbh_en是否支持控制TBH解析误删,补充;
34
- -- 2023-03-25 1.修改fanSpeed属性*10,2.powerIbh1,powerIbh2,powerTbh数据转化处理,3.有符号温度值数据处理,4.tbhEnFunc控制设定修改,5.增加房间温控器roomTherSetModeEn,dualroomThermostatEn设定
35
- -- 2023-03-29 新增制热,冷,制热水模式 日、周、月、年 能耗数据。
36
- -- 2023-04-15 增加 tank_actual_temp 参数处理
37
- -- 2023-04-26 增加 线控器能耗分析设置-HMIEnergyAnaSetEN 参数上报
38
- -- 2023-05-06 增加 线控器能耗分析设置-HMIEnergyAnaSetEN 参数基本参数回复,和主动上报
39
- local JSON = require "cjson"
40
- -- 版本号
41
- local JSON_VERSION = "20"
42
-
43
- -- bit0
44
- local BIT0 = 0x01
45
- -- bit1
46
- local BIT1 = 0x02
47
- -- bit2
48
- local BIT2 = 0x04
49
- -- bit3
50
- local BIT3 = 0x08
51
- -- bit4
52
- local BIT4 = 0x10
53
- -- bit5
54
- local BIT5 = 0x20
55
- -- bit6
56
- local BIT6 = 0x40
57
- -- bit7
58
- local BIT7 = 0x80
59
-
60
- --------------------------------------------------------------------- 通讯,均为整形变量 -----------------------
61
- local cmdTable = {
62
- -- 设备类型(0xC3-集中采暖控制器,0xCF-中央空调暖家)
63
- ["DEVICE_TYPE"] = 0xC3,
64
- -- M-smart协议头
65
- ["PROTOCOL_HEAD"] = 0xAA,
66
- -- M-smart协议头长度
67
- ["PROTOCOL_LENGTH"] = 0x0A,
68
-
69
- -- 设备控制命令
70
- ["MSG_TYPE_CONTROL"] = 0x02,
71
- -- 设备控制命令-基本控制命令
72
- ["MSG_TYPE_CONTROL_BASIC"] = 0x01,
73
- -- 设备控制命令-日定时控制命令
74
- ["MSG_TYPE_CONTROL_DAY_TIMER"] = 0x02,
75
- -- 设备控制命令-周定时控制命令
76
- ["MSG_TYPE_CONTROL_WEEKS_TIMER"] = 0x03,
77
- -- 设备控制命令-外出休假控制命令
78
- ["MSG_TYPE_CONTROL_HOLIDAY_AWAY"] = 0x04,
79
- -- 设备控制命令-静音控制命令
80
- ["MSG_TYPE_CONTROL_SILENCE"] = 0x05,
81
- -- 设备控制命令-在家休假控制命令
82
- ["MSG_TYPE_CONTROL_HOLIDAY_HOME"] = 0x06,
83
- -- 设备控制命令-ECO控制命令
84
- ["MSG_TYPE_CONTROL_ECO"] = 0x07,
85
- -- 设备控制命令-安装设定参数控制命令
86
- ["MSG_TYPE_CONTROL_INSTALL"] = 0x08,
87
- -- 设备控制命令-杀菌控制命令
88
- ["MSG_TYPE_CONTROL_DISINFECT"] = 0x09,
89
-
90
- -- 设备查询命令
91
- ["MSG_TYPE_QUERY"] = 0x03,
92
- -- 设备查询命令-基本控制命令
93
- ["MSG_TYPE_QUERY_BASIC"] = 0x01,
94
- -- 设备查询命令-日定时控制命令
95
- ["MSG_TYPE_QUERY_DAY_TIME"] = 0x02,
96
- -- 设备查询命令-周定时控制命令
97
- ["MSG_TYPE_QUERY_WEEKS_TIME"] = 0x03,
98
- -- 设备查询命令-外出休假控制命令
99
- ["MSG_TYPE_QUERY_HOLIDAY_AWAY"] = 0x04,
100
- -- 设备查询命令-静音控制命令
101
- ["MSG_TYPE_QUERY_SILENCE"] = 0x05,
102
- -- 设备查询命令-在家休假控制命令
103
- ["MSG_TYPE_QUERY_HOLIDAY_HOME"] = 0x06,
104
- -- 设备查询命令-ECO设置查询
105
- ["MSG_TYPE_QUERY_ECO"] = 0x07,
106
- -- 设备查询命令-安装设定参数查询命令03-0x08
107
- ["MSG_TYPE_QUERY_INSTALL"] = 0x08,
108
- -- 设备查询命令-DISINFECT设置查询
109
- ["MSG_TYPE_QUERY_DISINFECT"] = 0x09,
110
- -- 设备查询命令-线控器设置/计算参数查询
111
- ["MSG_TYPE_QUERY_HMIPARA"] = 0x0a,
112
- -- 设备查询命令-主机机组运行参数查询
113
- ["MSG_TYPE_QUERY_UNITPARA"] = 0x10,
114
-
115
- -- 设备运行参数上报,无须应答
116
- ["MSG_TYPE_UP"] = 0x04,
117
- -- 设备运行参数上报-基本运行参数
118
- ["MSG_TYPE_UP_BASIC"] = 0x01,
119
- --设备运行参数上报-能量消耗上报
120
- --["MSG_TYPE_UP_POWER2"] = 0x02,
121
- ["MSG_TYPE_UP_POWER3"] = 0x03,
122
- ["MSG_TYPE_UP_POWER4"] = 0x04,
123
- ["MSG_TYPE_UP_UNITPARA"] = 0x05,
124
- }
125
- --------------------------------------------------------------------- 变量单位,此表值不可变 -----------------------------
126
- local unitTable = {
127
- -- 控制命令
128
- ["str_control"] = "control",
129
- -- 查询命令
130
- ["str_query"] = "query",
131
- -- 状态命令
132
- ["str_status"] = "status",
133
- -- 控制类型
134
- ["str_control_type"] = "control_type",
135
- -- 查询类型
136
- ["str_query_type"] = "query_type",
137
- -- 数值无效
138
- ["u8_invalid"] = 0xff,
139
- ["str_u8_invalid"] = "0xff",
140
- ["s8_invalid"] = 0x7f,
141
- ["str_s8_invalid"] = "0x7f",
142
- -- 自动
143
- ["auto"] = 1,
144
- ["str_auto"] = "auto",
145
- -- 制冷
146
- ["cool"] = 2,
147
- ["str_cool"] = "cool",
148
- -- 制热
149
- ["heat"] = 3,
150
- ["str_heat"] = "heat",
151
- -- 制热水
152
- ["dhw"] = 5,
153
- ["str_dhw"] = "dhw",
154
- -- 关
155
- ["off"] = 0,
156
- ["str_off"] = "off",
157
- -- 开
158
- ["on"] = 1,
159
- ["str_on"] = "on",
160
- -- 风盘
161
- ["fan_coil"] = 0,
162
- ["str_fan_coil"] = "fan_coil",
163
- -- 散热器
164
- ["radiatior"] = 1,
165
- ["str_radiatior"] = "radiatior",
166
- -- 地暖
167
- ["floor_heat"] = 2,
168
- ["str_floor_heat"] = "floor_heat",
169
- -- 等级1
170
- ["level_1"] = 0,
171
- ["str_level_1"] = "level_1",
172
- -- 等级2
173
- ["level_2"] = 0,
174
- ["str_level_2"] = "level_2",
175
- -- 气温
176
- ["room_temperature_type"] = 0,
177
- ["str_room_temperature_type"] = "room_temperature_type",
178
- -- 水温
179
- ["water_temperature_type"] = 1,
180
- ["str_water_temperature_type"] = "water_temperature_type",
181
- }
182
- --------------------------------------------------------------------- 定义属性变量--------------------
183
- -- 变量列表
184
- local myTable = {
185
- ---------------------- 网络校时 ------------------------------------
186
- ["time_sync"] = 0,
187
- ---------------------- 基本控制指令 ------------------------------------
188
- -- 区域1开/关机 0:关 1:开
189
- ["zone1_power_state"] = 0,
190
- -- 区域2开/关机 0:关 1:开
191
- ["zone2_power_state"] = 0,
192
- -- 制热水开/关机 0:关 1:开
193
- ["dhw_power_state"] = 0,
194
- -- 区域1气候曲线 开/关机 0:关 1:开
195
- ["zone1_curve_state"] = 0,
196
- -- 区域2气候曲线 开/关机 0:关 1:开
197
- ["zone2_curve_state"] = 0,
198
-
199
- -- 强制TBH 开/关机 0:关 1:开
200
- ["forcetbh_state"] = 0,
201
- -- 快速制热水 开/关机 0:关 1:开
202
- ["fastdhw_state"] = 0,
203
- --远程开关 0:关 1:开
204
- ["remote_onoff"] = 0,
205
-
206
- -- 制热模式使能 0:无效 1:有效
207
- ["heat_enable"] = 0,
208
- -- 制冷模式使能 0:无效 1:有效
209
- ["cool_enable"] = 0,
210
- -- 制热水模式使能 0:无效 1:有效
211
- ["dhw_enable"] = 0,
212
- -- 双区域使能 0:无效 1:有效
213
- ["double_zone_enable"] = 0,
214
- -- 区域1温度类型选择 0:气温 1:水温
215
- ["zone1_temp_type"] = 0,
216
- -- 区域2温度类型选择 0:气温 1:水温
217
- ["zone2_temp_type"] = 0,
218
- --支持房间温控器使能标志
219
- ["room_thermalen_state"] = 0, --sp
220
- --房间温控器使能标志
221
- ["room_thermalmode_state"] = 0, --sp
222
-
223
- -- Schedule定时图标 0:关 1:开
224
- ["time_set_state"] = 0,
225
- -- Slient图标开启 0:关 1:开
226
- ["silence_on_state"] = 0,
227
- -- Holiday ON 运行图标 0:关 1:开
228
- ["holiday_on_state"] = 0,
229
- -- eco ON 运行图标 0:关 1:开
230
- ["eco_on_state"] = 0,
231
- -- 区域1末端类型 0:风盘 1:散热器 2:地暖
232
- ["zone1_terminal_type"] = 0,
233
- -- 区域2末端类型 0:风盘 1:散热器 2:地暖
234
- ["zone2_terminal_type"] = 0,
235
-
236
- -- 设定模式 1: 自动 2:制冷 3:制热
237
- ["run_mode_set"] = 2,
238
- -- 自动模式下线控器运行模式
239
- ["runmode_under_auto"] = 2,
240
- -- 区域1水温设定温度 单位:1 ℃
241
- ["zone1_temp_set"] = 24,
242
- -- 区域2水温设定温度
243
- ["zone2_temp_set"] = 24,
244
- -- 制热水设定温度 单位:1℃
245
- ["dhw_temp_set"] = 24,
246
- -- 室温设定温度 单位:单位:0.5 ℃
247
- ["room_temp_set"] = 48,
248
-
249
- -- 区域1制热 设定温度最大值(水温/气温) 单位:1 ℃
250
- ["zone1_heat_max_set_temp"] = 0,
251
- -- 区域1制热设定温度最小值(水温/气温) 单位:1 ℃
252
- ["zone1_heat_min_set_temp"] = 0,
253
- -- 区域1制冷设定温度最大值(水温/气温) 单位:1 ℃
254
- ["zone1_cool_max_set_temp"] = 0,
255
- -- 区域1制冷设定温度最小值(水温/气温) 单位:1 ℃
256
- ["zone1_cool_min_set_temp"] = 0,
257
- -- 区域2制热 设定温度最大值(水温/气温) 单位:1 ℃
258
- ["zone2_heat_max_set_temp"] = 0,
259
- -- 区域2制热设定温度最小值(水温/气温) 单位:1 ℃
260
- ["zone2_heat_min_set_temp"] = 0,
261
- -- 区域2制冷设定温度最大值(水温/气温) 单位:1 ℃
262
- ["zone2_cool_max_set_temp"] = 0,
263
- -- 区域2制冷设定温度最小值(水温/气温) 单位:1 ℃
264
- ["zone2_cool_min_set_temp"] = 0,
265
- -- 室温Ta设定温度最大值 单位:0.5 ℃
266
- ["room_max_set_temp"] = 0,
267
- -- 室温Ta设定温度最小值(水温/气温)单位:0.5 ℃
268
- ["room_min_set_temp"] = 0,
269
- --制热水(生活热水)设定温度最大值
270
- ["dhw_max_set_temp"] = 0,
271
- --制热水(生活热水)设定温度最小值
272
- ["dhw_min_set_temp"] = 0,
273
- -- 水箱实际温度 单位:1 ℃(有符号型)故障数据0xFF
274
- ["tank_actual_temp"] = 0,
275
- -- 当前故障序号
276
- ["error_code"] = 0,
277
- --当前协议是否支持杀菌功能,区域2定时信息等新功能
278
- ["protocol_newfunction_en"] = 0,
279
- -- 是否支持控制TBH使能标志
280
- ["boostertbh_en"] = 0,
281
- --区域1温度曲线选择
282
- ["zone1_curve_type"] = 3,
283
- --区域2温度曲线选择
284
- ["zone2_curve_type"] = 3,
285
-
286
- --主动上报命令子类型23-2-8
287
- ["msg_up_type"] = 0,
288
-
289
- ---------------------- 日定时控制命令 ----------------------------------
290
- -- 日定时定时1-6使能标志
291
- ["daytimer_timer1en"] = 0,
292
- ["daytimer_timer2en"] = 0,
293
- ["daytimer_timer3en"] = 0,
294
- ["daytimer_timer4en"] = 0,
295
- ["daytimer_timer5en"] = 0,
296
- ["daytimer_timer6en"] = 0,
297
- -- 日定时定时1-6设定模式
298
- ["daytimer_timer1_mode"] = 0,
299
- ["daytimer_timer2_mode"] = 0,
300
- ["daytimer_timer3_mode"] = 0,
301
- ["daytimer_timer4_mode"] = 0,
302
- ["daytimer_timer5_mode"] = 0,
303
- ["daytimer_timer6_mode"] = 0,
304
- -- 日定时日定时1-6设定温度
305
- ["daytimer_timer1_temp"] = 0,
306
- ["daytimer_timer2_temp"] = 0,
307
- ["daytimer_timer3_temp"] = 0,
308
- ["daytimer_timer4_temp"] = 0,
309
- ["daytimer_timer5_temp"] = 0,
310
- ["daytimer_timer6_temp"] = 0,
311
- -- 日定时定时1-6开始时间
312
- ["daytimer_timer1_openhour"] = 0,
313
- ["daytimer_timer1_openmin"] = 0,
314
- ["daytimer_timer2_openhour"] = 0,
315
- ["daytimer_timer2_openmin"] = 0,
316
- ["daytimer_timer3_openhour"] = 0,
317
- ["daytimer_timer3_openmin"] = 0,
318
- ["daytimer_timer4_openhour"] = 0,
319
- ["daytimer_timer4_openmin"] = 0,
320
- ["daytimer_timer5_openhour"] = 0,
321
- ["daytimer_timer5_openmin"] = 0,
322
- ["daytimer_timer6_openhour"] = 0,
323
- ["daytimer_timer6_openmin"] = 0,
324
- -- 日定时定时1-6结束时间
325
- ["daytimer_timer1_closehour"] = 0,
326
- ["daytimer_timer1_closemin"] = 0,
327
- ["daytimer_timer2_closehour"] = 0,
328
- ["daytimer_timer2_closemin"] = 0,
329
- ["daytimer_timer3_closehour"] = 0,
330
- ["daytimer_timer3_closemin"] = 0,
331
- ["daytimer_timer4_closehour"] = 0,
332
- ["daytimer_timer4_closemin"] = 0,
333
- ["daytimer_timer5_closehour"] = 0,
334
- ["daytimer_timer5_closemin"] = 0,
335
- ["daytimer_timer6_closehour"] = 0,
336
- ["daytimer_timer6_closemin"] = 0,
337
-
338
- -- 日定时区域2-zone2定时1-6使能标志
339
- ["zone2daytimer_timer1en"] = 0,
340
- ["zone2daytimer_timer2en"] = 0,
341
- ["zone2daytimer_timer3en"] = 0,
342
- ["zone2daytimer_timer4en"] = 0,
343
- ["zone2daytimer_timer5en"] = 0,
344
- ["zone2daytimer_timer6en"] = 0,
345
- -- 日定时区域2-zone2定时1-6设定模式
346
- ["zone2daytimer_timer1_mode"] = 0,
347
- ["zone2daytimer_timer2_mode"] = 0,
348
- ["zone2daytimer_timer3_mode"] = 0,
349
- ["zone2daytimer_timer4_mode"] = 0,
350
- ["zone2daytimer_timer5_mode"] = 0,
351
- ["zone2daytimer_timer6_mode"] = 0,
352
- -- 日定时区域2-zone2日定时1-6设定温度
353
- ["zone2daytimer_timer1_temp"] = 0,
354
- ["zone2daytimer_timer2_temp"] = 0,
355
- ["zone2daytimer_timer3_temp"] = 0,
356
- ["zone2daytimer_timer4_temp"] = 0,
357
- ["zone2daytimer_timer5_temp"] = 0,
358
- ["zone2daytimer_timer6_temp"] = 0,
359
- -- 日定时区域2-zone2定时1-6开始时间
360
- ["zone2daytimer_timer1_openhour"] = 0,
361
- ["zone2daytimer_timer1_openmin"] = 0,
362
- ["zone2daytimer_timer2_openhour"] = 0,
363
- ["zone2daytimer_timer2_openmin"] = 0,
364
- ["zone2daytimer_timer3_openhour"] = 0,
365
- ["zone2daytimer_timer3_openmin"] = 0,
366
- ["zone2daytimer_timer4_openhour"] = 0,
367
- ["zone2daytimer_timer4_openmin"] = 0,
368
- ["zone2daytimer_timer5_openhour"] = 0,
369
- ["zone2daytimer_timer5_openmin"] = 0,
370
- ["zone2daytimer_timer6_openhour"] = 0,
371
- ["zone2daytimer_timer6_openmin"] = 0,
372
- -- 日定时区域2-zone2定时1-6结束时间
373
- ["zone2daytimer_timer1_closehour"] = 0,
374
- ["zone2daytimer_timer1_closemin"] = 0,
375
- ["zone2daytimer_timer2_closehour"] = 0,
376
- ["zone2daytimer_timer2_closemin"] = 0,
377
- ["zone2daytimer_timer3_closehour"] = 0,
378
- ["zone2daytimer_timer3_closemin"] = 0,
379
- ["zone2daytimer_timer4_closehour"] = 0,
380
- ["zone2daytimer_timer4_closemin"] = 0,
381
- ["zone2daytimer_timer5_closehour"] = 0,
382
- ["zone2daytimer_timer5_closemin"] = 0,
383
- ["zone2daytimer_timer6_closehour"] = 0,
384
- ["zone2daytimer_timer6_closemin"] = 0,
385
- ---------------------- 周定时控制命令 ----------------------------------
386
- -- 当前设置星期(读写)
387
- ["weektimer_setday"] = 0,
388
- -- 当前设置星期(只读,查询)
389
- ["weektimer_weeken"] = 0,
390
- -- 周定时定时1-6段使能标志
391
- ["weektimer_timer1en"] = 0,
392
- ["weektimer_timer2en"] = 0,
393
- ["weektimer_timer3en"] = 0,
394
- ["weektimer_timer4en"] = 0,
395
- ["weektimer_timer5en"] = 0,
396
- ["weektimer_timer6en"] = 0,
397
- -- 周定时定时1-6设定模式
398
- ["weektimer_timer1_mode"] = 0,
399
- ["weektimer_timer2_mode"] = 0,
400
- ["weektimer_timer3_mode"] = 0,
401
- ["weektimer_timer4_mode"] = 0,
402
- ["weektimer_timer5_mode"] = 0,
403
- ["weektimer_timer6_mode"] = 0,
404
- -- 周定时定时1-6设定温度
405
- ["weektimer_timer1_temp"] = 0,
406
- ["weektimer_timer2_temp"] = 0,
407
- ["weektimer_timer3_temp"] = 0,
408
- ["weektimer_timer4_temp"] = 0,
409
- ["weektimer_timer5_temp"] = 0,
410
- ["weektimer_timer6_temp"] = 0,
411
- -- 周定时定时1-6开始时间
412
- ["weektimer_timer1_openhour"] = 0,
413
- ["weektimer_timer1_openmin"] = 0,
414
- ["weektimer_timer2_openhour"] = 0,
415
- ["weektimer_timer2_openmin"] = 0,
416
- ["weektimer_timer3_openhour"] = 0,
417
- ["weektimer_timer3_openmin"] = 0,
418
- ["weektimer_timer4_openhour"] = 0,
419
- ["weektimer_timer4_openmin"] = 0,
420
- ["weektimer_timer5_openhour"] = 0,
421
- ["weektimer_timer5_openmin"] = 0,
422
- ["weektimer_timer6_openhour"] = 0,
423
- ["weektimer_timer6_openmin"] = 0,
424
- -- 周定时定时1-6结束时间
425
- ["weektimer_timer1_closehour"] = 0,
426
- ["weektimer_timer1_closemin"] = 0,
427
- ["weektimer_timer2_closehour"] = 0,
428
- ["weektimer_timer2_closemin"] = 0,
429
- ["weektimer_timer3_closehour"] = 0,
430
- ["weektimer_timer3_closemin"] = 0,
431
- ["weektimer_timer4_closehour"] = 0,
432
- ["weektimer_timer4_closemin"] = 0,
433
- ["weektimer_timer5_closehour"] = 0,
434
- ["weektimer_timer5_closemin"] = 0,
435
- ["weektimer_timer6_closehour"] = 0,
436
- ["weektimer_timer6_closemin"] = 0,
437
-
438
- -- 当前设置区域2星期(读写)
439
- ["zone2weektimer_setday"] = 0,
440
- -- 当前设置区域2星期(只读,查询)
441
- ["zone2weektimer_weeken"] = 0,
442
- -- 周定时区域2定时1-6段段使能标志
443
- ["zone2weektimer_timer1en"] = 0,
444
- ["zone2weektimer_timer2en"] = 0,
445
- ["zone2weektimer_timer3en"] = 0,
446
- ["zone2weektimer_timer4en"] = 0,
447
- ["zone2weektimer_timer5en"] = 0,
448
- ["zone2weektimer_timer6en"] = 0,
449
- -- 周定时区域2定时1-6段设定模式
450
- ["zone2weektimer_timer1_mode"] = 0,
451
- ["zone2weektimer_timer2_mode"] = 0,
452
- ["zone2weektimer_timer3_mode"] = 0,
453
- ["zone2weektimer_timer4_mode"] = 0,
454
- ["zone2weektimer_timer5_mode"] = 0,
455
- ["zone2weektimer_timer6_mode"] = 0,
456
- -- 周定时区域2定时1-6段设定温度
457
- ["zone2weektimer_timer1_temp"] = 0,
458
- ["zone2weektimer_timer2_temp"] = 0,
459
- ["zone2weektimer_timer3_temp"] = 0,
460
- ["zone2weektimer_timer4_temp"] = 0,
461
- ["zone2weektimer_timer5_temp"] = 0,
462
- ["zone2weektimer_timer6_temp"] = 0,
463
- -- 周定时区域2定时1-6段开始时间
464
- ["zone2weektimer_timer1_openhour"] = 0,
465
- ["zone2weektimer_timer1_openmin"] = 0,
466
- ["zone2weektimer_timer2_openhour"] = 0,
467
- ["zone2weektimer_timer2_openmin"] = 0,
468
- ["zone2weektimer_timer3_openhour"] = 0,
469
- ["zone2weektimer_timer3_openmin"] = 0,
470
- ["zone2weektimer_timer4_openhour"] = 0,
471
- ["zone2weektimer_timer4_openmin"] = 0,
472
- ["zone2weektimer_timer5_openhour"] = 0,
473
- ["zone2weektimer_timer5_openmin"] = 0,
474
- ["zone2weektimer_timer6_openhour"] = 0,
475
- ["zone2weektimer_timer6_openmin"] = 0,
476
- -- 周定时区域2定时1-6段结束时间
477
- ["zone2weektimer_timer1_closehour"] = 0,
478
- ["zone2weektimer_timer1_closemin"] = 0,
479
- ["zone2weektimer_timer2_closehour"] = 0,
480
- ["zone2weektimer_timer2_closemin"] = 0,
481
- ["zone2weektimer_timer3_closehour"] = 0,
482
- ["zone2weektimer_timer3_closemin"] = 0,
483
- ["zone2weektimer_timer4_closehour"] = 0,
484
- ["zone2weektimer_timer4_closemin"] = 0,
485
- ["zone2weektimer_timer5_closehour"] = 0,
486
- ["zone2weektimer_timer5_closemin"] = 0,
487
- ["zone2weektimer_timer6_closehour"] = 0,
488
- ["zone2weektimer_timer6_closemin"] = 0,
489
-
490
- ---------------------- 外出休假控制命令----------------------------------
491
- ["holidayaway_state"] = 0,
492
- ["holidayaway_heat_state"] = 0,
493
- ["holidayaway_dhw_state"] = 0,
494
- ["holidayaway_disinfect_state"] = 0,
495
- ["holidayaway_startyear"] = 0,
496
- ["holidayaway_startmonth"] = 0,
497
- ["holidayaway_startdate"] = 0,
498
- ["holidayaway_endyear"] = 0,
499
- ["holidayaway_endmonth"] = 0,
500
- ["holidayaway_enddate"] = 0,
501
- ---------------------- 静音功能控制 ----------------------------------
502
- -- 静音功能开关
503
- ["silence_function_state"] = 0,
504
- -- 静音等级
505
- ["silence_function_level"] = 0,
506
- -- 静音定时1
507
- ["silence_timer1_state"] = 0,
508
- ["silence_timer1_starthour"] = 0,
509
- ["silence_timer1_startmin"] = 0,
510
- ["silence_timer1_endhour"] = 0,
511
- ["silence_timer1_endmin"] = 0,
512
- -- 静音定时2
513
- ["silence_timer2_state"] = 0,
514
- ["silence_timer2_starthour"] = 0,
515
- ["silence_timer2_startmin"] = 0,
516
- ["silence_timer2_endhour"] = 0,
517
- ["silence_timer2_endmin"] = 0,
518
- ---------------------- 在家休假HOLIDAY HOME控制命令 2022-10-13 ----------------------------------
519
- ["holidayhome_state"] = 0,
520
- ["holidayhome_startyear"] = 0,
521
- ["holidayhome_startmonth"] = 0,
522
- ["holidayhome_startdate"] = 0,
523
- ["holidayhome_endyear"] = 0,
524
- ["holidayhome_endmonth"] = 0,
525
- ["holidayhome_enddate"] = 0,
526
- -- HOLIDAY HOME定时1-6使能标志
527
- ["holhometimer_timer1en"] = 0,
528
- ["holhometimer_timer2en"] = 0,
529
- ["holhometimer_timer3en"] = 0,
530
- ["holhometimer_timer4en"] = 0,
531
- ["holhometimer_timer5en"] = 0,
532
- ["holhometimer_timer6en"] = 0,
533
- -- HOLIDAY HOME定时定时1-6设定模式
534
- ["holhometimer_timer1_mode"] = 0,
535
- ["holhometimer_timer2_mode"] = 0,
536
- ["holhometimer_timer3_mode"] = 0,
537
- ["holhometimer_timer4_mode"] = 0,
538
- ["holhometimer_timer5_mode"] = 0,
539
- ["holhometimer_timer6_mode"] = 0,
540
- -- HOLIDAY HOME定时日定时1-6设定温度
541
- ["holhometimer_timer1_temp"] = 0,
542
- ["holhometimer_timer2_temp"] = 0,
543
- ["holhometimer_timer3_temp"] = 0,
544
- ["holhometimer_timer4_temp"] = 0,
545
- ["holhometimer_timer5_temp"] = 0,
546
- ["holhometimer_timer6_temp"] = 0,
547
- -- HOLIDAY HOME定时定时1-6开始时间
548
- ["holhometimer_timer1_openhour"] = 0,
549
- ["holhometimer_timer1_openmin"] = 0,
550
- ["holhometimer_timer2_openhour"] = 0,
551
- ["holhometimer_timer2_openmin"] = 0,
552
- ["holhometimer_timer3_openhour"] = 0,
553
- ["holhometimer_timer3_openmin"] = 0,
554
- ["holhometimer_timer4_openhour"] = 0,
555
- ["holhometimer_timer4_openmin"] = 0,
556
- ["holhometimer_timer5_openhour"] = 0,
557
- ["holhometimer_timer5_openmin"] = 0,
558
- ["holhometimer_timer6_openhour"] = 0,
559
- ["holhometimer_timer6_openmin"] = 0,
560
- -- HOLIDAY HOME定时定时1-6结束时间
561
- ["holhometimer_timer1_closehour"] = 0,
562
- ["holhometimer_timer1_closemin"] = 0,
563
- ["holhometimer_timer2_closehour"] = 0,
564
- ["holhometimer_timer2_closemin"] = 0,
565
- ["holhometimer_timer3_closehour"] = 0,
566
- ["holhometimer_timer3_closemin"] = 0,
567
- ["holhometimer_timer4_closehour"] = 0,
568
- ["holhometimer_timer4_closemin"] = 0,
569
- ["holhometimer_timer5_closehour"] = 0,
570
- ["holhometimer_timer5_closemin"] = 0,
571
- ["holhometimer_timer6_closehour"] = 0,
572
- ["holhometimer_timer6_closemin"] = 0,
573
-
574
- -- HOLIDAY HOME区域2日定时1-6使能标志
575
- ["zone2holhometimer_timer1en"] = 0,
576
- ["zone2holhometimer_timer2en"] = 0,
577
- ["zone2holhometimer_timer3en"] = 0,
578
- ["zone2holhometimer_timer4en"] = 0,
579
- ["zone2holhometimer_timer5en"] = 0,
580
- ["zone2holhometimer_timer6en"] = 0,
581
- -- HOLIDAY HOME区域2日定时定时1-6设定模式
582
- ["zone2holhometimer_timer1_mode"] = 0,
583
- ["zone2holhometimer_timer2_mode"] = 0,
584
- ["zone2holhometimer_timer3_mode"] = 0,
585
- ["zone2holhometimer_timer4_mode"] = 0,
586
- ["zone2holhometimer_timer5_mode"] = 0,
587
- ["zone2holhometimer_timer6_mode"] = 0,
588
- -- HOLIDAY HOME区域2日定时日定时1-6设定温度
589
- ["zone2holhometimer_timer1_temp"] = 0,
590
- ["zone2holhometimer_timer2_temp"] = 0,
591
- ["zone2holhometimer_timer3_temp"] = 0,
592
- ["zone2holhometimer_timer4_temp"] = 0,
593
- ["zone2holhometimer_timer5_temp"] = 0,
594
- ["zone2holhometimer_timer6_temp"] = 0,
595
- -- HOLIDAY HOME区域2日定时定时1-6开始时间
596
- ["zone2holhometimer_timer1_openhour"] = 0,
597
- ["zone2holhometimer_timer1_openmin"] = 0,
598
- ["zone2holhometimer_timer2_openhour"] = 0,
599
- ["zone2holhometimer_timer2_openmin"] = 0,
600
- ["zone2holhometimer_timer3_openhour"] = 0,
601
- ["zone2holhometimer_timer3_openmin"] = 0,
602
- ["zone2holhometimer_timer4_openhour"] = 0,
603
- ["zone2holhometimer_timer4_openmin"] = 0,
604
- ["zone2holhometimer_timer5_openhour"] = 0,
605
- ["zone2holhometimer_timer5_openmin"] = 0,
606
- ["zone2holhometimer_timer6_openhour"] = 0,
607
- ["zone2holhometimer_timer6_openmin"] = 0,
608
- -- HOLIDAY HOME区域2日定时定时1-6结束时间
609
- ["zone2holhometimer_timer1_closehour"] = 0,
610
- ["zone2holhometimer_timer1_closemin"] = 0,
611
- ["zone2holhometimer_timer2_closehour"] = 0,
612
- ["zone2holhometimer_timer2_closemin"] = 0,
613
- ["zone2holhometimer_timer3_closehour"] = 0,
614
- ["zone2holhometimer_timer3_closemin"] = 0,
615
- ["zone2holhometimer_timer4_closehour"] = 0,
616
- ["zone2holhometimer_timer4_closemin"] = 0,
617
- ["zone2holhometimer_timer5_closehour"] = 0,
618
- ["zone2holhometimer_timer5_closemin"] = 0,
619
- ["zone2holhometimer_timer6_closehour"] = 0,
620
- ["zone2holhometimer_timer6_closemin"] = 0,
621
-
622
- ---------------------- ECO功能控制-07命令 22-10-13----------------------------------
623
- -- ECO功能开关
624
- ["eco_function_state"] = 0,
625
- -- ECO定时开关状态
626
- ["eco_timer_state"] = 0,
627
- -- ECO定时1
628
- ["eco_timer_starthour"] = 0,
629
- ["eco_timer_startmin"] = 0,
630
- ["eco_timer_endhour"] = 0,
631
- ["eco_timer_endmin"] = 0,
632
- ["eco_curve_type"] = 3,
633
-
634
- ---------------------- 杀菌功能控制/查询命令-09命令 22-10-13----------------------------------
635
- -- 杀菌开/关机 0:关 1:开
636
- ["disinfect_function_state"] = 0,
637
- -- 机组杀菌运行状态 0:关 1:开
638
- ["disinfect_run_state"] = 0,
639
- -- 杀菌设置日期 0:关 1:开
640
- ["disinfect_setweekday"] = 0,
641
- -- 杀菌开启 时 0:关 1:开
642
- ["disinfect_starthour"] = 0,
643
- --杀菌开启 分 0:关 1:开
644
- ["disinfect_startmin"] = 0,
645
-
646
-
647
- ---------------------- 主动上报能量参数04-03/04 22-10-14----------------------------------
648
- -- 制热运行状态0:关 1:开
649
- ["isheatrun0"] = 0,
650
- -- 制冷运行状态 0:关 1:开
651
- ["iscoolrun0"] = 0,
652
- -- 制热水DHW运行状态 0:关 1:开
653
- ["isdhwrun0"] = 0,
654
- -- TBH运行状态 0:关 1:开
655
- ["istbhrun0"] = 0,
656
- -- IBH运行状态0:关 1:开
657
- ["isibhrun0"] = 0,
658
- -- SMART GRID运行状态 0:关 1:开
659
- ["issmartgrid0"] = 0,
660
- -- 高价电运行状态 0:关 1:开
661
- ["ishighprices0"] = 0,
662
- -- 低价/免费电 运行状态 0:关 1:开
663
- ["isbottomprices0"] = 0,
664
- --
665
- ["totalelectricity0"] = 0,
666
- --
667
- ["totalthermal0"] = 0,
668
- --
669
- ["t4"] = 0,
670
- --
671
- ["t1s"] = 0,
672
- --
673
- ["t1s2"] = 0,
674
- --
675
- ["t5s"] = 0,
676
- --
677
- ["tas"] = 0,
678
- --
679
- ["newt1s1"] = 0,
680
- --
681
- ["newt1s2"] = 0,
682
- --
683
- ["isonline0"] = 0,
684
- ["isonline1"] = 0,
685
- ["isonline2"] = 0,
686
- ["isonline3"] = 0,
687
- ["isonline4"] = 0,
688
- ["isonline5"] = 0,
689
- ["isonline6"] = 0,
690
- ["isonline7"] = 0,
691
- ["isonline8"] = 0,
692
- ["isonline9"] = 0,
693
- ["isonline10"] = 0,
694
- ["isonline11"] = 0,
695
- ["isonline12"] = 0,
696
- ["isonline13"] = 0,
697
- ["isonline14"] = 0,
698
- ["isonline15"] = 0,
699
-
700
- ["isheatrun1"] = 0,
701
- ["isheatrun2"] = 0,
702
- ["isheatrun3"] = 0,
703
- ["isheatrun4"] = 0,
704
- ["isheatrun5"] = 0,
705
- ["isheatrun6"] = 0,
706
- ["isheatrun7"] = 0,
707
- ["isheatrun8"] = 0,
708
- ["isheatrun9"] = 0,
709
- ["isheatrun10"] = 0,
710
- ["isheatrun11"] = 0,
711
- ["isheatrun12"] = 0,
712
- ["isheatrun13"] = 0,
713
- ["isheatrun14"] = 0,
714
- ["isheatrun15"] = 0,
715
-
716
- ["iscoolrun1"] = 0,
717
- ["iscoolrun2"] = 0,
718
- ["iscoolrun3"] = 0,
719
- ["iscoolrun4"] = 0,
720
- ["iscoolrun5"] = 0,
721
- ["iscoolrun6"] = 0,
722
- ["iscoolrun7"] = 0,
723
- ["iscoolrun8"] = 0,
724
- ["iscoolrun9"] = 0,
725
- ["iscoolrun10"] = 0,
726
- ["iscoolrun11"] = 0,
727
- ["iscoolrun12"] = 0,
728
- ["iscoolrun13"] = 0,
729
- ["iscoolrun14"] = 0,
730
- ["iscoolrun15"] = 0,
731
-
732
- ["isdhwrun1"] = 0,
733
- ["isdhwrun2"] = 0,
734
- ["isdhwrun3"] = 0,
735
- ["isdhwrun4"] = 0,
736
- ["isdhwrun5"] = 0,
737
- ["isdhwrun6"] = 0,
738
- ["isdhwrun7"] = 0,
739
- ["isdhwrun8"] = 0,
740
- ["isdhwrun9"] = 0,
741
- ["isdhwrun10"] = 0,
742
- ["isdhwrun11"] = 0,
743
- ["isdhwrun12"] = 0,
744
- ["isdhwrun13"] = 0,
745
- ["isdhwrun14"] = 0,
746
- ["isdhwrun15"] = 0,
747
-
748
- ["istbhrun1"] = 0,
749
- ["istbhrun2"] = 0,
750
- ["istbhrun3"] = 0,
751
- ["istbhrun4"] = 0,
752
- ["istbhrun5"] = 0,
753
- ["istbhrun6"] = 0,
754
- ["istbhrun7"] = 0,
755
- ["istbhrun8"] = 0,
756
- ["istbhrun9"] = 0,
757
- ["istbhrun10"] = 0,
758
- ["istbhrun11"] = 0,
759
- ["istbhrun12"] = 0,
760
- ["istbhrun13"] = 0,
761
- ["istbhrun14"] = 0,
762
- ["istbhrun15"] = 0,
763
-
764
- ["isibhrun1"] = 0,
765
- ["isibhrun2"] = 0,
766
- ["isibhrun3"] = 0,
767
- ["isibhrun4"] = 0,
768
- ["isibhrun5"] = 0,
769
- ["isibhrun6"] = 0,
770
- ["isibhrun7"] = 0,
771
- ["isibhrun8"] = 0,
772
- ["isibhrun9"] = 0,
773
- ["isibhrun10"] = 0,
774
- ["isibhrun11"] = 0,
775
- ["isibhrun12"] = 0,
776
- ["isibhrun13"] = 0,
777
- ["isibhrun14"] = 0,
778
- ["isibhrun15"] = 0,
779
-
780
- ["totalelectricity1"] = 0,
781
- ["totalelectricity2"] = 0,
782
- ["totalelectricity3"] = 0,
783
- ["totalelectricity4"] = 0,
784
- ["totalelectricity5"] = 0,
785
- ["totalelectricity6"] = 0,
786
- ["totalelectricity7"] = 0,
787
- ["totalelectricity8"] = 0,
788
- ["totalelectricity9"] = 0,
789
- ["totalelectricity10"] = 0,
790
- ["totalelectricity11"] = 0,
791
- ["totalelectricity12"] = 0,
792
- ["totalelectricity13"] = 0,
793
- ["totalelectricity14"] = 0,
794
- ["totalelectricity15"] = 0,
795
-
796
- ["totalthermal1"] = 0,
797
- ["totalthermal2"] = 0,
798
- ["totalthermal3"] = 0,
799
- ["totalthermal4"] = 0,
800
- ["totalthermal5"] = 0,
801
- ["totalthermal6"] = 0,
802
- ["totalthermal7"] = 0,
803
- ["totalthermal8"] = 0,
804
- ["totalthermal9"] = 0,
805
- ["totaltherma10"] = 0,
806
- ["totalthermal11"] = 0,
807
- ["totalthermal12"] = 0,
808
- ["totalthermal13"] = 0,
809
- ["totalthermal14"] = 0,
810
- ["totalthermal15"] = 0,
811
-
812
- ["isibh2run1 "] = 0,
813
- ["isibh2run2 "] = 0,
814
- ["isibh2run3 "] = 0,
815
- ["isibh2run4 "] = 0,
816
- ["isibh2run5 "] = 0,
817
- ["isibh2run6 "] = 0,
818
- ["isibh2run7 "] = 0,
819
- ["isibh2run8 "] = 0,
820
- ["isibh2run9 "] = 0,
821
- ["isibh2run10 "] = 0,
822
- ["isibh2run11 "] = 0,
823
- ["isibh2run12 "] = 0,
824
- ["isibh2run13 "] = 0,
825
- ["isibh2run14 "] = 0,
826
- ["isibh2run15 "] = 0,
827
-
828
- ["voltage0"] = 0,
829
- ["voltage1"] = 0,
830
- ["voltage2"] = 0,
831
- ["voltage3"] = 0,
832
- ["voltage4"] = 0,
833
- ["voltage5"] = 0,
834
- ["voltage6"] = 0,
835
- ["voltage7"] = 0,
836
- ["voltage8"] = 0,
837
- ["voltage9"] = 0,
838
- ["voltage10"] = 0,
839
- ["voltage11"] = 0,
840
- ["voltage12"] = 0,
841
- ["voltage13"] = 0,
842
- ["voltage14"] = 0,
843
- ["voltage15"] = 0,
844
-
845
- ["power_ibh1"] = 0,
846
- ["power_ibh2"] = 0,
847
- ["power_tbh"] = 0,
848
- ---------------------- 安装设定参数控制查询-08命令 22-10-13----------------------------------
849
- ["dhwEnable"] = 0,
850
- ["boostertbhEn"] = 0,
851
- ["disinfectEnable"] = 0,
852
- ["dhwPumpEnable"] = 0,
853
- ["dhwPriorityTime"] = 0,
854
- ["dhwPumpDIEnable"] = 0,
855
- ["coolEnable"] = 0,
856
- ["fgZone1CoolTempHigh"] = 0,
857
- ["heatEnable"] = 0,
858
- ["fgZone1HeatTempHigh"] = 0,
859
- ["pumpiSliModeEn"] = 0,
860
- ["roomSensorEn"] = 0,
861
- ["roomTherEn"] = 0,
862
- ["roomTherSetModeEn"] = 0,
863
- ["dualroomThermostatEn"] = 0,
864
- ["fgdhwPriorEn"] = 0,
865
- ["acsEnable "] = 0,
866
- ["dhwHeaterAhsEn"] = 0,
867
- ["tempPcbEn"] = 0,
868
- ["tbt2ProbeEn"] = 0,
869
- ["pipeExceed10m"] = 0,
870
- ["solarCn18En"] = 0,
871
- ["fgOwnSolarEn"] = 0,
872
- ["fgInputDhwHeater"] = 0,
873
- ["smartgridEn"] = 0,
874
- ["t1bProbeEn"] = 0,
875
- ["fgZone2CoolTempHigh"] = 0,
876
- ["fgZone2HeatTempHigh"] = 0,
877
- ["doubleZoneEn"] = 0,
878
- ["fgTaProbeIdu"] = 0,
879
- ["tbt1ProbeEn"] = 0,
880
- ["fgIbhInTank"] = 0,
881
- ["roomTherType"] = 0,
882
- ["dT5On"] = 5,
883
- ["dT1S5"] = 10,
884
- ["tIntervaDhw"] = 0,
885
- ["t4Dhwmax"] = 43,
886
- ["t4Dhwmin"] = 0xF6,
887
- ["tTBHdelay"] = 0,
888
- ["dT5STBHoff"] = 0,
889
- ["t4TBHon"] = 5,
890
- ["t5sDI"] = 0,
891
- ["tDImax"] = 0,
892
- ["tDIhightemp"] = 0,
893
- ["tIntervalC"] = 0,
894
- ["dT1SC"] = 5,
895
- ["dTSC"] = 2,
896
- ["t4Cmax"] = 43,
897
- ["t4Cmin"] = 20,
898
- ["tIntervalH"] = 0,
899
- ["dT1SH"] = 5,
900
- ["dTSH"] = 2,
901
- ["t4Hmax"] = 25,
902
- ["t4Hmin"] = 0XF1,
903
- ["t4IBHon"] = 0XFB,
904
- ["dT1IBHon"] = 0,
905
- ["tIBHdelay"] = 0,
906
- ["tIBH12delay"] = 0,
907
- ["t4AHSon"] = 0,
908
- ["dT1AHSon"] = 0,
909
- ["dT1AHSoff"] = 0,
910
- ["tAHSdelay"] = 0,
911
- ["tDHWHPmax"] = 0,
912
- ["tDHWHPrestrict"] = 0,
913
- ["t4autocmin"] = 25,
914
- ["t4autohmax"] = 17,
915
- ["t1sHolHeat"] = 0,
916
- ["t5SHolDhw"] = 0,
917
- ["perStart"] = 0,
918
- ["timeAdjust"] = 0,
919
- ["dTbt2"] = 0,
920
- ["powerIbh1"] = 0,
921
- ["powerIbh2"] = 0,
922
- ["powerTbh"] = 0,
923
- ["ecoHeatT1s"] = 0,
924
- ["ecoHeatTs"] = 0,
925
- ["tDryup"] = 0,
926
- ["tDrypeak"] = 0,
927
- ["tdrydown"] = 0,
928
- ["tempDrypeak"] = 0,
929
- ["timePreheatFloor"] = 0,
930
- ["t1SPreheatFloor"] = 0,
931
- ["t1SetC1"] = 10,
932
- ["t1SetC2"] = 16,
933
- ["t4C1"] = 35,
934
- ["t4C2"] = 25,
935
- ["t1SetH1"] = 35,
936
- ["t1SetH2"] = 28,
937
- ["t4H1"] = 0XFB,
938
- ["t4H2"] = 7,
939
- ["typeVolLmt"] = 0,
940
- ["timeT4FreshC"] = 0,
941
- ["timeT4FreshH"] = 0,
942
- ["tPumpiDelay"] = 0,
943
- ["deltaTsloar"] = 0,
944
- ["solarFunction"] = 0,
945
- ["enSwitchPDC"] = 0,
946
- ["gasCost"] = 0,
947
- ["eleCost"] = 0,
948
- ["ahsSetTempMax"] = 0,
949
- ["ahsSetTempMin"] = 0,
950
- ["ahsSetTempMaxVolt"] = 0,
951
- ["ahsSetTempMinVolt"] = 0,
952
- ["t2AntiSVRun"] = 0,
953
- ["dftPortFuncEn"] = 0,
954
- ["t1AntiPump"] = 0,
955
- ["t2AntiPumpRun"] = 0,
956
- ["t1AntiLockSV"] = 0,
957
- ["tbhEnFunc"] = 0,
958
- ["ibhEnFunc"] = 0,
959
- ["ahsEnFunc"] = 0,
960
- ["ahsPumpiControl"] = 0,
961
- ["modeSetPri"] = 0,
962
- ["pumpType"] = 0,
963
- ["pumpiSilentOutput"] = 0,
964
- ["timeReportSet"] = 10,
965
- ---------------------- 线控器参数查询-0x0A命令 22-10-13----------------------------------
966
- ["hmiVersionNum"] = 0,
967
- ["compRunCurTime0"] = 0,
968
- ["compRunTotalTime0"] = 0,
969
- ["fanRunTotalTime0"] = 0,
970
- ["pumpiRunTotalTime0"] = 0,
971
- ["ibh1RunTotalTime0"] = 0,
972
- ["ibh2RunTotalTime0"] = 0,
973
- ["tbhRunTotalTime0"] = 0,
974
- ["ahsRunTotalTime0"] = 0,
975
- ["arrayServiceTel0"] = 0,
976
- ["arrayServiceTel1"] = 0,
977
- ["arrayServiceTel2"] = 0,
978
- ["arrayServiceTel3"] = 0,
979
- ["arrayServiceTel4"] = 0,
980
- ["arrayServiceTel5"] = 0,
981
- ["arrayServiceTel6"] = 0,
982
- ["arrayServiceTel7"] = 0,
983
- ["arrayServiceTel8"] = 0,
984
- ["arrayServiceTel9"] = 0,
985
- ["arrayServiceTel10"] = 0,
986
- ["arrayServiceTel11"] = 0,
987
- ["arrayServiceTel12"] = 0,
988
- ["ArrayServiceCel0"] = 0,
989
- ["ArrayServiceCel1"] = 0,
990
- ["ArrayServiceCel2"] = 0,
991
- ["ArrayServiceCel3"] = 0,
992
- ["ArrayServiceCel4"] = 0,
993
- ["ArrayServiceCel5"] = 0,
994
- ["ArrayServiceCel6"] = 0,
995
- ["ArrayServiceCel7"] = 0,
996
- ["ArrayServiceCel8"] = 0,
997
- ["ArrayServiceCel9"] = 0,
998
- ["ArrayServiceCel10"] = 0,
999
- ["ArrayServiceCel11"] = 0,
1000
- ["ArrayServiceCel12"] = 0,
1001
- ["u8warnTotal"] = 0,
1002
- ["codeErrProt1"] = 0,
1003
- ["warnAddress1"] = 0,
1004
- ["warnHour1"] = 0,
1005
- ["warnMin1"] = 0,
1006
- ["warnYear1"] = 0,
1007
- ["warnMonth1"] = 0,
1008
- ["warnDate1"] = 0,
1009
- ["codeErrProt2"] = 0,
1010
- ["warnAddress2"] = 0,
1011
- ["warnHour2"] = 0,
1012
- ["warnMin2"] = 0,
1013
- ["warnYear2"] = 0,
1014
- ["warnMonth2"] = 0,
1015
- ["warnDate2"] = 0,
1016
- ["codeErrProt3"] = 0,
1017
- ["warnAddress3"] = 0,
1018
- ["warnHour3"] = 0,
1019
- ["warnMin3"] = 0,
1020
- ["warnYear3"] = 0,
1021
- ["warnMonth3"] = 0,
1022
- ["warnDate3"] = 0,
1023
- ["codeErrProt4"] = 0,
1024
- ["warnAddress4"] = 0,
1025
- ["warnHour4"] = 0,
1026
- ["warnMin4"] = 0,
1027
- ["warnYear4"] = 0,
1028
- ["warnMonth4"] = 0,
1029
- ["warnDate4"] = 0,
1030
- ["codeErrProt5"] = 0,
1031
- ["warnAddress5"] = 0,
1032
- ["warnHour5"] = 0,
1033
- ["warnMin5"] = 0,
1034
- ["warnYear5"] = 0,
1035
- ["warnMonth5"] = 0,
1036
- ["warnDate5"] = 0,
1037
- ["codeErrProt6"] = 0,
1038
- ["warnAddress6"] = 0,
1039
- ["warnHour6"] = 0,
1040
- ["warnMin6"] = 0,
1041
- ["warnYear6"] = 0,
1042
- ["warnMonth6"] = 0,
1043
- ["warnDate6"] = 0,
1044
- ["codeErrProt7"] = 0,
1045
- ["warnAddress7"] = 0,
1046
- ["warnHour7"] = 0,
1047
- ["warnMin7"] = 0,
1048
- ["warnYear7"] = 0,
1049
- ["warnMonth7"] = 0,
1050
- ["warnDate7"] = 0,
1051
- ["codeErrProt8"] = 0,
1052
- ["warnAddress8"] = 0,
1053
- ["warnHour8"] = 0,
1054
- ["warnMin8"] = 0,
1055
- ["warnYear8"] = 0,
1056
- ["warnMonth8"] = 0,
1057
- ["warnDate8"] = 0,
1058
-
1059
-
1060
- ---------------------- 主机运行参数查询-0x10命令 22-10-13----------------------------------
1061
- ["compRunFreq"] = 0,
1062
- ["unitModeRun"] = 0,
1063
- ["fanSpeed"] = 0,
1064
- ["machVersion"] = 0,
1065
- ["capacityNeed"] = 0,
1066
- ["fgCapacityNeed"] = 0,
1067
- ["tempset"] = 0,
1068
- ["tempT3"] = 0,
1069
- ["tempT4"] = 0,
1070
- ["tempTp"] = 0,
1071
- ["tempTwin"] = 0,
1072
- ["tempTwout"] = 0,
1073
- ["tempTsolar"] = 0,
1074
- ["hydboxSubtype"] = 0,
1075
- ["fgUSBInfoConnect"] = 0,
1076
- ["usbIndexMax"] = 0,
1077
- ["p6ErrCode"] = 0,
1078
- ["oduCompCurrent"] = 0,
1079
- ["oduVoltage"] = 0,
1080
- ["exvCurrent"] = 0,
1081
- ["oduModel"] = 0,
1082
- ["unitonlineNum"] = 0,
1083
- ["currentCode"] = 0,
1084
- ["u8Code1"] = 0,
1085
- ["u8Code2"] = 0,
1086
- ["u8Code3"] = 0,
1087
- ["fgReqParaSet"] = 0,
1088
- ["fgReqVerAsk"] = 0,
1089
- ["fgReqSNAsk"] = 0,
1090
- ["fgUnitLockSignal"] = 0,
1091
- ["fgEVUSignal"] = 0,
1092
- ["fgSGSignal"] = 0,
1093
- ["fgTankAntiFreeze"] = 0,
1094
- ["fgSolarInput"] = 0,
1095
- ["fgRoomTherCoolRun"] = 0,
1096
- ["fgRoomTherHeatRun"] = 0,
1097
- ["fgOutDoorTestMode"] = 0,
1098
- ["fgRemoteOnOff"] = 0,
1099
- ["fgBackOil"] = 0,
1100
- ["fgAntiFreezeRun"] = 0,
1101
- ["fgDefrost"] = 0,
1102
- ["fgIsSlaveUnit"] = 0,
1103
- ["fgTBHEnable"] = 0,
1104
- ["fgAHSIsOwn"] = 0,
1105
- ["fgCapTestEnable"] = 0,
1106
- ["fgT1BSensorEnable"] = 0,
1107
- ["fgAHSDHWMode"] = 0,
1108
- ["fgIBH1Enable"] = 0,
1109
- ["fgT1SensorEnable"] = 0,
1110
- ["fgEdgeVersionType"] = 0,
1111
- ["fgFactReqTherHeatOn"] = 0,
1112
- ["fgDHWRun"] = 0,
1113
- ["fgHeatRun"] = 0,
1114
- ["fgCoolRun"] = 0,
1115
- ["fgFactReqTherCoolOn"] = 0,
1116
- ["fgFactReqSolarOn"] = 0,
1117
- ["fgFactoryRun"] = 0,
1118
- ["fgDefValveOn"] = 0,
1119
- ["fgAHSValveOn"] = 0,
1120
- ["fgRunValveOn"] = 0,
1121
- ["fgAlmValveOn"] = 0,
1122
- ["fgPumpSolarOn"] = 0,
1123
- ["fgHeat4ValveOn"] = 0,
1124
- ["fgSV3Output"] = 0,
1125
- ["fgMixedPumpValveOn"] = 0,
1126
- ["fgPumpDHWOn"] = 0,
1127
- ["fgPumpOOn"] = 0,
1128
- ["fgSV2On"] = 0,
1129
- ["fgSV1On"] = 0,
1130
- ["fgPumpIOutput"] = 0,
1131
- ["fgTBHOutput"] = 0,
1132
- ["fgIBH2Output"] = 0,
1133
- ["fgIBH1Output"] = 0,
1134
- ["tempT1"] = 0,
1135
- ["tempTw2"] = 0,
1136
- ["tempT2"] = 0,
1137
- ["tempT2b"] = 0,
1138
- ["tempT5"] = 0,
1139
- ["tempTa"] = 0,
1140
- ["tempTbt1"] = 0,
1141
- ["tempTbt2"] = 0,
1142
- ["hydroboxCapacity"] = 0,
1143
- ["pressureHigh"] = 0,
1144
- ["pressureLow"] = 0,
1145
- ["tempTh"] = 0,
1146
- ["machineType"] = 0,
1147
- ["oduTargetFre"] = 0,
1148
- ["dcCurrent"] = 0,
1149
- ["dcVoltage"] = 0,
1150
- ["tempTf"] = 0,
1151
- ["iduT1s1"] = 0,
1152
- ["iduT1s2"] = 0,
1153
- ["waterFlow"] = 0,
1154
- ["oduPlanVolLmt"] = 0,
1155
- ["currentUnitCapacity"] = 0,
1156
- ["spheraAHSVoltage"] = 0,
1157
- ["tempT4Aver"] = 0,
1158
- ["waterPressure"] = 0,
1159
- ["roomRelHum"] = 0,
1160
- ["pwmPumpOut"] = 0,
1161
- ["fgUnitStopT4Out"] = 0,
1162
- ["heatElecTotConsum0"] = 0,
1163
- ["heatTotCapacity0"] = 0,
1164
- ["instantPower0"] = 0,
1165
- ["instantRenewPower0"] = 0,
1166
- ["totalRenewPower0"] = 0,
1167
- ["iduVersionNum"] = 0,
1168
- ["oduVersionNum"] = 0,
1169
- ["iduSNCode0"] = 0,
1170
- ["iduSNCode1"] = 0,
1171
- ["iduSNCode2"] = 0,
1172
- ["iduSNCode3"] = 0,
1173
- ["iduSNCode4"] = 0,
1174
- ["iduSNCode5"] = 0,
1175
- ["iduSNCode6"] = 0,
1176
- ["iduSNCode7"] = 0,
1177
- ["iduSNCode8"] = 0,
1178
- ["iduSNCode9"] = 0,
1179
- ["iduSNCode10"] = 0,
1180
- ["iduSNCode11"] = 0,
1181
- ["iduSNCode12"] = 0,
1182
- ["iduSNCode13"] = 0,
1183
- ["iduSNCode14"] = 0,
1184
- ["iduSNCode15"] = 0,
1185
- ["iduSNCode16"] = 0,
1186
- ["iduSNCode17"] = 0,
1187
- ["iduSNCode18"] = 0,
1188
- ["iduSNCode19"] = 0,
1189
- ["iduSNCode20"] = 0,
1190
- ["iduSNCode21"] = 0,
1191
- ["iduSNCode22"] = 0,
1192
- ["iduSNCode23"] = 0,
1193
- ["iduSNCode24"] = 0,
1194
- ["iduSNCode25"] = 0,
1195
- ["iduSNCode26"] = 0,
1196
- ["iduSNCode27"] = 0,
1197
- ["iduSNCode28"] = 0,
1198
- ["iduSNCode29"] = 0,
1199
- ["iduSNCode30"] = 0,
1200
- ["iduSNCode31"] = 0,
1201
- ["oduSNCode0"] = 0,
1202
- ["oduSNCode1"] = 0,
1203
- ["oduSNCode2"] = 0,
1204
- ["oduSNCode3"] = 0,
1205
- ["oduSNCode4"] = 0,
1206
- ["oduSNCode5"] = 0,
1207
- ["oduSNCode6"] = 0,
1208
- ["oduSNCode7"] = 0,
1209
- ["oduSNCode8"] = 0,
1210
- ["oduSNCode9"] = 0,
1211
- ["oduSNCode10"] = 0,
1212
- ["oduSNCode11"] = 0,
1213
- ["oduSNCode12"] = 0,
1214
- ["oduSNCode13"] = 0,
1215
- ["oduSNCode14"] = 0,
1216
- ["oduSNCode15"] = 0,
1217
- ["oduSNCode16"] = 0,
1218
- ["oduSNCode17"] = 0,
1219
- ["oduSNCode18"] = 0,
1220
- ["oduSNCode19"] = 0,
1221
- ["oduSNCode20"] = 0,
1222
- ["oduSNCode21"] = 0,
1223
- ["oduSNCode22"] = 0,
1224
- ["oduSNCode23"] = 0,
1225
- ["oduSNCode24"] = 0,
1226
- ["oduSNCode25"] = 0,
1227
- ["oduSNCode26"] = 0,
1228
- ["oduSNCode27"] = 0,
1229
- ["oduSNCode28"] = 0,
1230
- ["oduSNCode29"] = 0,
1231
- ["oduSNCode30"] = 0,
1232
- ["oduSNCode31"] = 0,
1233
- ["hmiSNCode0"] = 0,
1234
- ["hmiSNCode1"] = 0,
1235
- ["hmiSNCode2"] = 0,
1236
- ["hmiSNCode3"] = 0,
1237
- ["hmiSNCode4"] = 0,
1238
- ["hmiSNCode5"] = 0,
1239
- ["hmiSNCode6"] = 0,
1240
- ["hmiSNCode7"] = 0,
1241
- ["hmiSNCode8"] = 0,
1242
- ["hmiSNCode9"] = 0,
1243
- ["hmiSNCode10"] = 0,
1244
- ["hmiSNCode11"] = 0,
1245
- ["hmiSNCode12"] = 0,
1246
- ["hmiSNCode13"] = 0,
1247
- ["hmiSNCode14"] = 0,
1248
- ["hmiSNCode15"] = 0,
1249
- ["hmiSNCode16"] = 0,
1250
- ["hmiSNCode17"] = 0,
1251
- ["hmiSNCode18"] = 0,
1252
- ["hmiSNCode19"] = 0,
1253
- ["hmiSNCode20"] = 0,
1254
- ["hmiSNCode21"] = 0,
1255
- ["hmiSNCode22"] = 0,
1256
- ["hmiSNCode23"] = 0,
1257
- ["hmiSNCode24"] = 0,
1258
- ["hmiSNCode25"] = 0,
1259
- ["hmiSNCode26"] = 0,
1260
- ["hmiSNCode27"] = 0,
1261
- ["hmiSNCode28"] = 0,
1262
- ["hmiSNCode29"] = 0,
1263
- ["hmiSNCode30"] = 0,
1264
- ["hmiSNCode31"] = 0,
1265
-
1266
- ["SysInstantHPCapacity"] = 0,
1267
- ["SysInstantRenewPower"] = 0,
1268
- ["SysInstantPower"] = 0,
1269
- ["SysInstantCopEER"] = 0,
1270
- ["SysTotalHPCapacity"] = 0,
1271
- ["SysTotalHeatCapacity"] = 0,
1272
- ["SysTotalRenewPower"] = 0,
1273
- ["SysTotalPowerConsum"] = 0,
1274
- ["SysTotalHeatElecConsum"] = 0,
1275
- ["SysTotalCOPEER"] = 0,
1276
- --2023-03-02
1277
- ["SysEnergyAnaEN"] = 0,
1278
- ["HMIEnergyAnaSetEN"] = 0,
1279
- ["SysHeatInsHPCapacity"] = 0,
1280
- ["SysHeatInsRenewPower"] = 0,
1281
- ["SysHeatInsPower"] = 0,
1282
- ["SysHeatInsCopEER"] = 0,
1283
- ["SysHeatCapacity"] = 0,
1284
- ["SysHeatRenewPower"] = 0,
1285
- ["SysHeatElecConsum"] = 0,
1286
- ["SysHeatCOPEER"] = 0,
1287
- ["SysCoolInsHPCapacity"] = 0,
1288
- ["SysCoolInsRenewPower"] = 0,
1289
- ["SysCoolInsPower"] = 0,
1290
- ["SysCoolInsCopEER"] = 0,
1291
- ["SysCoolCapacity"] = 0,
1292
- ["SysCoolRenewPower"] = 0,
1293
- ["SysCoolElecConsum"] = 0,
1294
- ["SysCoolCOPEER"] = 0,
1295
- ["SysDhwInsHPCapacity"] = 0,
1296
- ["SysDhwInsRenewPower"] = 0,
1297
- ["SysDhwInsPower"] = 0,
1298
- ["SysDhwInsCopEER"] = 0,
1299
- ["SysDhwCapacity"] = 0,
1300
- ["SysDhwRenewPower"] = 0,
1301
- ["SysDhwElecConsum"] = 0,
1302
- ["SysDhwCOPEER"] = 0,
1303
- --2023-3-29 新增制热,冷,制热水 日、周、月、年 能耗数据
1304
- ["SysHeatDayCapacity"] = 0,
1305
- ["SysHeatDayRenewPower"] = 0,
1306
- ["SysHeatDayElecConsum"] = 0,
1307
- ["SysHeatDayCOPEER"] = 0,
1308
-
1309
- ["SysHeatWeekCapacity"] = 0,
1310
- ["SysHeatWeekRenewPower"] = 0,
1311
- ["SysHeatWeekElecConsum"] = 0,
1312
- ["SysHeatWeekCOPEER"] = 0,
1313
-
1314
- ["SysHeatMonthCapacity"] = 0,
1315
- ["SysHeatMonthRenewPower"] = 0,
1316
- ["SysHeatMonthElecConsum"] = 0,
1317
- ["SysHeatMonthCOPEER"] = 0,
1318
-
1319
- ["SysHeatYearCapacity"] = 0,
1320
- ["SysHeatYearRenewPower"] = 0,
1321
- ["SysHeatYearElecConsum"] = 0,
1322
- ["SysHeatYearCOPEER"] = 0,
1323
-
1324
- ["SysCoolDayCapacity"] = 0,
1325
- ["SysCoolDayRenewPower"] = 0,
1326
- ["SysCoolDayElecConsum"] = 0,
1327
- ["SysCoolDayCOPEER"] = 0,
1328
-
1329
- ["SysCoolWeekCapacity"] = 0,
1330
- ["SysCoolWeekRenewPower"] = 0,
1331
- ["SysCoolWeekElecConsum"] = 0,
1332
- ["SysCoolWeekCOPEER"] = 0,
1333
-
1334
- ["SysCoolMonthCapacity"] = 0,
1335
- ["SysCoolMonthRenewPower"] = 0,
1336
- ["SysCoolMonthElecConsum"] = 0,
1337
- ["SysCoolMonthCOPEER"] = 0,
1338
-
1339
- ["SysCoolYearCapacity"] = 0,
1340
- ["SysCoolYearRenewPower"] = 0,
1341
- ["SysCoolYearElecConsum"] = 0,
1342
- ["SysCoolYearCOPEER"] = 0,
1343
-
1344
- ["SysDhwDayCapacity"] = 0,
1345
- ["SysDhwDayRenewPower"] = 0,
1346
- ["SysDhwDayElecConsum"] = 0,
1347
- ["SysDhwDayCOPEER"] = 0,
1348
-
1349
- ["SysDhwWeekCapacity"] = 0,
1350
- ["SysDhwWeekRenewPower"] = 0,
1351
- ["SysDhwWeekElecConsum"] = 0,
1352
- ["SysDhwWeekCOPEER"] = 0,
1353
-
1354
- ["SysDhwMonthCapacity"] = 0,
1355
- ["SysDhwMonthRenewPower"] = 0,
1356
- ["SysDhwMonthElecConsum"] = 0,
1357
- ["SysDhwMonthCOPEER"] = 0,
1358
-
1359
- ["SysDhwYearCapacity"] = 0,
1360
- ["SysDhwYearRenewPower"] = 0,
1361
- ["SysDhwYearElecConsum"] = 0,
1362
- ["SysDhwYearCOPEER"] = 0,
1363
-
1364
-
1365
- }
1366
-
1367
-
1368
-
1369
- ---------------公共的函数---------------
1370
-
1371
- -- 打印 table 表
1372
- local function print_lua_table(lua_table, indent)
1373
- indent = indent or 0
1374
-
1375
- for k, v in pairs(lua_table) do
1376
- if type(k) == "string" then
1377
- k = string.format("%q", k)
1378
- end
1379
-
1380
- local szSuffix = ""
1381
-
1382
- if type(v) == "table" then
1383
- szSuffix = "{"
1384
- end
1385
-
1386
- local szPrefix = string.rep(" ", indent)
1387
- local formatting = szPrefix .. "[" .. k .. "]" .. " = " .. szSuffix
1388
-
1389
- if type(v) == "table" then
1390
- print(formatting)
1391
-
1392
- print_lua_table(v, indent + 1)
1393
-
1394
- print(szPrefix .. "},")
1395
- else
1396
- local szValue = ""
1397
-
1398
- if type(v) == "string" then
1399
- szValue = string.format("%q", v)
1400
- else
1401
- szValue = tostring(v)
1402
- end
1403
-
1404
- print(formatting .. szValue .. ",")
1405
- end
1406
- end
1407
- end
1408
-
1409
- -- 检查取值是否超过边界
1410
- local function checkBoundary(data, min, max)
1411
- if (not data) then
1412
- data = 0
1413
- end
1414
-
1415
- data = tonumber(data)
1416
-
1417
- if (data == nil) then
1418
- data = 0
1419
- end
1420
-
1421
- if ((data >= min) and (data <= max)) then
1422
- return data
1423
- else
1424
- if (data < min) then
1425
- return min
1426
- else
1427
- return max
1428
- end
1429
- end
1430
- end
1431
-
1432
- -- String转int
1433
- local function string2Int(data)
1434
- if (not data) then
1435
- data = tonumber("0")
1436
- end
1437
- data = tonumber(data)
1438
- if (data == nil) then
1439
- data = 0
1440
- end
1441
- return data
1442
- end
1443
-
1444
- -- int转String
1445
- local function int2String(data)
1446
- if (not data) then
1447
- data = tostring(0)
1448
- end
1449
- data = tostring(data)
1450
- if (data == nil) then
1451
- data = "0"
1452
- end
1453
- return data
1454
- end
1455
-
1456
- -- table 转 string
1457
- local function table2string(cmd)
1458
- local ret = ""
1459
- local i
1460
-
1461
- for i = 1, #cmd do
1462
- ret = ret .. string.char(cmd[i])
1463
- end
1464
-
1465
- return ret
1466
- end
1467
-
1468
- -- 十六进制 string 转 table
1469
- local function string2table(hexstr)
1470
- local tb = {}
1471
- local i = 1
1472
- local j = 1
1473
-
1474
- for i = 1, #hexstr - 1, 2 do
1475
- local doublebytestr = string.sub(hexstr, i, i + 1)
1476
- tb[j] = tonumber(doublebytestr, 16)
1477
- j = j + 1
1478
- end
1479
-
1480
- return tb
1481
- end
1482
-
1483
- -- 十六进制 string 输出
1484
- local function string2hexstring(str)
1485
- local ret = ""
1486
-
1487
- for i = 1, #str do
1488
- ret = ret .. string.format("%02x", str:byte(i))
1489
- end
1490
-
1491
- return ret
1492
- end
1493
-
1494
- -- table 转 json
1495
- local function encode(cmd)
1496
- local tb
1497
-
1498
- if JSON == nil then
1499
- JSON = require "cjson"
1500
- end
1501
-
1502
- tb = JSON.encode(cmd)
1503
-
1504
- return tb
1505
- end
1506
-
1507
- -- json 转 table
1508
- local function decode(cmd)
1509
- local tb
1510
-
1511
- if JSON == nil then
1512
- JSON = require "cjson"
1513
- end
1514
-
1515
- tb = JSON.decode(cmd)
1516
-
1517
- return tb
1518
- end
1519
-
1520
- -- CRC表
1521
- local crc8_854_table = {
1522
- 0, 94, 188, 226, 97, 63, 221, 131, 194, 156, 126, 32, 163, 253, 31, 65,
1523
- 157, 195, 33, 127, 252, 162, 64, 30, 95, 1, 227, 189, 62, 96, 130, 220,
1524
- 35, 125, 159, 193, 66, 28, 254, 160, 225, 191, 93, 3, 128, 222, 60, 98,
1525
- 190, 224, 2, 92, 223, 129, 99, 61, 124, 34, 192, 158, 29, 67, 161, 255,
1526
- 70, 24, 250, 164, 39, 121, 155, 197, 132, 218, 56, 102, 229, 187, 89, 7,
1527
- 219, 133, 103, 57, 186, 228, 6, 88, 25, 71, 165, 251, 120, 38, 196, 154,
1528
- 101, 59, 217, 135, 4, 90, 184, 230, 167, 249, 27, 69, 198, 152, 122, 36,
1529
- 248, 166, 68, 26, 153, 199, 37, 123, 58, 100, 134, 216, 91, 5, 231, 185,
1530
- 140, 210, 48, 110, 237, 179, 81, 15, 78, 16, 242, 172, 47, 113, 147, 205,
1531
- 17, 79, 173, 243, 112, 46, 204, 146, 211, 141, 111, 49, 178, 236, 14, 80,
1532
- 175, 241, 19, 77, 206, 144, 114, 44, 109, 51, 209, 143, 12, 82, 176, 238,
1533
- 50, 108, 142, 208, 83, 13, 239, 177, 240, 174, 76, 18, 145, 207, 45, 115,
1534
- 202, 148, 118, 40, 171, 245, 23, 73, 8, 86, 180, 234, 105, 55, 213, 139,
1535
- 87, 9, 235, 181, 54, 104, 138, 212, 149, 203, 41, 119, 244, 170, 72, 22,
1536
- 233, 183, 85, 11, 136, 214, 52, 106, 43, 117, 151, 201, 74, 20, 246, 168,
1537
- 116, 42, 200, 150, 21, 75, 169, 247, 182, 232, 10, 84, 215, 137, 107, 53
1538
- }
1539
-
1540
- -- CRC校验
1541
- local function crc8_854(dataBuf, start_pos, end_pos)
1542
- local crc = 0
1543
-
1544
- for si = start_pos, end_pos do
1545
- crc = crc8_854_table[bit.band(bit.bxor(crc, dataBuf[si]), 0xFF) + 1]
1546
- end
1547
-
1548
- return crc
1549
- end
1550
-
1551
- -- sum校验
1552
- local function makeSum(tmpbuf, start_pos, end_pos)
1553
- local resVal = 0
1554
- for si = start_pos, end_pos do
1555
- resVal = resVal + tmpbuf[si]
1556
- end
1557
- resVal = bit.bnot(resVal) + 1
1558
- resVal = bit.band(resVal, 0x00ff)
1559
- return resVal
1560
- end
1561
-
1562
- ---------------通讯处理函数---------------
1563
-
1564
- -- 根据消息体+消息体类型,构造成协议帧,并返回
1565
- local function getTotalMsg(bodyData, cType)
1566
- local bodyLength = #bodyData --变长
1567
-
1568
- local msgLength = bodyLength + cmdTable["PROTOCOL_LENGTH"] + 1 --变长
1569
-
1570
- local msgBytes = {}
1571
-
1572
- for i = 0, msgLength do --变长
1573
- msgBytes[i] = 0
1574
- end
1575
-
1576
- -- 构造消息部分
1577
- msgBytes[0] = cmdTable["PROTOCOL_HEAD"]
1578
-
1579
- msgBytes[1] = bodyLength + cmdTable["PROTOCOL_LENGTH"] + 1
1580
-
1581
- msgBytes[2] = cmdTable["DEVICE_TYPE"]
1582
-
1583
- msgBytes[9] = cType
1584
-
1585
- -- body
1586
- for i = 0, bodyLength do
1587
- msgBytes[i + cmdTable["PROTOCOL_LENGTH"]] = bodyData[i]
1588
- end
1589
-
1590
- msgBytes[msgLength] = makeSum(msgBytes, 1, msgLength - 1)
1591
-
1592
- local msgFinal = {}
1593
-
1594
- for i = 1, msgLength + 1 do
1595
- msgFinal[i] = msgBytes[i - 1]
1596
- end
1597
- return msgFinal
1598
- end
1599
-
1600
- -- 判定键是否为 on,off 类型
1601
- local function isStrOnOff(strKey)
1602
- if ("zone1_power_state" == strKey) or
1603
- ("zone2_power_state" == strKey) or
1604
- ("dhw_power_state" == strKey) or
1605
- ("zone1_curve_state" == strKey) or
1606
- ("zone2_curve_state" == strKey) or
1607
- ("forcetbh_state" == strKey) or
1608
- ("fastdhw_state" == strKey) or
1609
-
1610
- ("heat_enable" == strKey) or
1611
- ("cool_enable" == strKey) or
1612
- ("dhw_enable" == strKey) or
1613
- ("double_zone_enable" == strKey) or
1614
- ("silence_on_state" == strKey) or
1615
- ("holiday_on_state" == strKey) or
1616
- ("eco_on_state" == strKey) or
1617
- ("remote_onoff" == strKey) or
1618
- ("room_thermalen_state" == strKey) or
1619
- ("room_thermalmode_state" == strKey) or
1620
- ("time_set_state" == strKey) or
1621
- ("protocol_newfunction_en" == strKey) or
1622
- ("boostertbh_en" == strKey) or
1623
- ("daytimer_timer1en" == strKey) or
1624
- ("daytimer_timer2en" == strKey) or
1625
- ("daytimer_timer3en" == strKey) or
1626
- ("daytimer_timer4en" == strKey) or
1627
- ("daytimer_timer5en" == strKey) or
1628
- ("daytimer_timer6en" == strKey) or
1629
- --区域2日定时
1630
- ("zone2daytimer_timer1en" == strKey) or
1631
- ("zone2daytimer_timer2en" == strKey) or
1632
- ("zone2daytimer_timer3en" == strKey) or
1633
- ("zone2daytimer_timer4en" == strKey) or
1634
- ("zone2daytimer_timer5en" == strKey) or
1635
- ("zone2daytimer_timer6en" == strKey) or
1636
- --周定时段使能
1637
- ("weektimer_timer1en" == strKey) or
1638
- ("weektimer_timer2en" == strKey) or
1639
- ("weektimer_timer3en" == strKey) or
1640
- ("weektimer_timer4en" == strKey) or
1641
- ("weektimer_timer5en" == strKey) or
1642
- ("weektimer_timer6en" == strKey) or
1643
- --周定时区域2时段
1644
- ("zone2weektimer_timer1en" == strKey) or
1645
- ("zone2weektimer_timer2en" == strKey) or
1646
- ("zone2weektimer_timer3en" == strKey) or
1647
- ("zone2weektimer_timer4en" == strKey) or
1648
- ("zone2weektimer_timer5en" == strKey) or
1649
- ("zone2weektimer_timer6en" == strKey) or
1650
-
1651
- ("holidayaway_state" == strKey) or
1652
- ("holidayaway_heat_state" == strKey) or
1653
- ("holidayaway_dhw_state" == strKey) or
1654
- ("holidayaway_disinfect_state" == strKey) or
1655
- ("silence_function_state" == strKey) or
1656
- ("silence_timer1_state" == strKey) or
1657
- ("silence_timer2_state" == strKey) or
1658
- ("holidayhome_state" == strKey) or
1659
- --在家休假
1660
- ("holhometimer_timer1en" == strKey) or
1661
- ("holhometimer_timer2en" == strKey) or
1662
- ("holhometimer_timer3en" == strKey) or
1663
- ("holhometimer_timer4en" == strKey) or
1664
- ("holhometimer_timer5en" == strKey) or
1665
- ("holhometimer_timer6en" == strKey) or
1666
- --在家休假区域2
1667
- ("zone2holhometimer_timer1en" == strKey) or
1668
- ("zone2holhometimer_timer2en" == strKey) or
1669
- ("zone2holhometimer_timer3en" == strKey) or
1670
- ("zone2holhometimer_timer4en" == strKey) or
1671
- ("zone2holhometimer_timer5en" == strKey) or
1672
- ("zone2holhometimer_timer6en" == strKey) or
1673
-
1674
- ("eco_function_state" == strKey) or
1675
- ("eco_timer_state" == strKey) or
1676
- -- DISINFECT
1677
- ("disinfect_function_state" == strKey) or
1678
- ("disinfect_run_state" == strKey) or
1679
- --能量消耗参数on/off类型
1680
- ("isheatrun0" == strKey) or
1681
- ("iscoolrun0" == strKey) or
1682
- ("isdhwrun0" == strKey) or
1683
- ("istbhrun0" == strKey) or
1684
- ("isibhrun0" == strKey) or
1685
- ("issmartgrid0" == strKey) or
1686
- ("ishighprices0" == strKey) or
1687
- ("isbottomprices0" == strKey) or
1688
-
1689
- ("isonline0" == strKey) or
1690
- ("isonline1" == strKey) or
1691
- ("isonline2" == strKey) or
1692
- ("isonline3" == strKey) or
1693
- ("isonline4" == strKey) or
1694
- ("isonline5" == strKey) or
1695
- ("isonline6" == strKey) or
1696
- ("isonline7" == strKey) or
1697
- ("isonline8" == strKey) or
1698
- ("isonline9" == strKey) or
1699
- ("isonline10" == strKey) or
1700
- ("isonline11" == strKey) or
1701
- ("isonline12" == strKey) or
1702
- ("isonline13" == strKey) or
1703
- ("isonline14" == strKey) or
1704
- ("isonline15" == strKey) or
1705
- ("isheatrun1" == strKey) or
1706
- ("isheatrun2" == strKey) or
1707
- ("isheatrun3" == strKey) or
1708
- ("isheatrun4" == strKey) or
1709
- ("isheatrun5" == strKey) or
1710
- ("isheatrun6" == strKey) or
1711
- ("isheatrun7" == strKey) or
1712
- ("isheatrun8" == strKey) or
1713
- ("isheatrun9" == strKey) or
1714
- ("isheatrun10" == strKey) or
1715
- ("isheatrun11" == strKey) or
1716
- ("isheatrun12" == strKey) or
1717
- ("isheatrun13" == strKey) or
1718
- ("isheatrun14" == strKey) or
1719
- ("isheatrun15" == strKey) or
1720
- ("iscoolrun1" == strKey) or
1721
- ("iscoolrun2" == strKey) or
1722
- ("iscoolrun3" == strKey) or
1723
- ("iscoolrun4" == strKey) or
1724
- ("iscoolrun5" == strKey) or
1725
- ("iscoolrun6" == strKey) or
1726
- ("iscoolrun7" == strKey) or
1727
- ("iscoolrun8" == strKey) or
1728
- ("iscoolrun9" == strKey) or
1729
- ("iscoolrun10" == strKey) or
1730
- ("iscoolrun11" == strKey) or
1731
- ("iscoolrun12" == strKey) or
1732
- ("iscoolrun13" == strKey) or
1733
- ("iscoolrun14" == strKey) or
1734
- ("iscoolrun15" == strKey) or
1735
- ("isdhwrun1" == strKey) or
1736
- ("isdhwrun2" == strKey) or
1737
- ("isdhwrun3" == strKey) or
1738
- ("isdhwrun4" == strKey) or
1739
- ("isdhwrun5" == strKey) or
1740
- ("isdhwrun6" == strKey) or
1741
- ("isdhwrun7" == strKey) or
1742
- ("isdhwrun8" == strKey) or
1743
- ("isdhwrun9" == strKey) or
1744
- ("isdhwrun10" == strKey) or
1745
- ("isdhwrun11" == strKey) or
1746
- ("isdhwrun12" == strKey) or
1747
- ("isdhwrun13" == strKey) or
1748
- ("isdhwrun14" == strKey) or
1749
- ("isdhwrun15" == strKey) or
1750
- ("istbhrun1" == strKey) or
1751
- ("istbhrun2" == strKey) or
1752
- ("istbhrun3" == strKey) or
1753
- ("istbhrun4" == strKey) or
1754
- ("istbhrun5" == strKey) or
1755
- ("istbhrun6" == strKey) or
1756
- ("istbhrun7" == strKey) or
1757
- ("istbhrun8" == strKey) or
1758
- ("istbhrun9" == strKey) or
1759
- ("istbhrun10" == strKey) or
1760
- ("istbhrun11" == strKey) or
1761
- ("istbhrun12" == strKey) or
1762
- ("istbhrun13" == strKey) or
1763
- ("istbhrun14" == strKey) or
1764
- ("istbhrun15" == strKey) or
1765
-
1766
- ("isibhrun1" == strKey) or
1767
- ("isibhrun2" == strKey) or
1768
- ("isibhrun3" == strKey) or
1769
- ("isibhrun4" == strKey) or
1770
- ("isibhrun5" == strKey) or
1771
- ("isibhrun6" == strKey) or
1772
- ("isibhrun7" == strKey) or
1773
- ("isibhrun8" == strKey) or
1774
- ("isibhrun9" == strKey) or
1775
- ("isibhrun10" == strKey) or
1776
- ("isibhrun11" == strKey) or
1777
- ("isibhrun12" == strKey) or
1778
- ("isibhrun13" == strKey) or
1779
- ("isibhrun14" == strKey) or
1780
- ("isibhrun15" == strKey) or
1781
-
1782
- ("isibh2run1 " == strKey) or
1783
- ("isibh2run2 " == strKey) or
1784
- ("isibh2run3 " == strKey) or
1785
- ("isibh2run4 " == strKey) or
1786
- ("isibh2run5 " == strKey) or
1787
- ("isibh2run6 " == strKey) or
1788
- ("isibh2run7 " == strKey) or
1789
- ("isibh2run8 " == strKey) or
1790
- ("isibh2run9 " == strKey) or
1791
- ("isibh2run10 " == strKey) or
1792
- ("isibh2run11 " == strKey) or
1793
- ("isibh2run12 " == strKey) or
1794
- ("isibh2run13 " == strKey) or
1795
- ("isibh2run14 " == strKey) or
1796
- ("isibh2run15 " == strKey) or
1797
- --安装设定参数查询0x08
1798
- ("dhwEnable" == strKey) or
1799
- ("boostertbhEn" == strKey) or
1800
- ("disinfectEnable" == strKey) or
1801
- ("dhwPumpEnable" == strKey) or
1802
- ("dhwPriorityTime" == strKey) or
1803
- ("dhwPumpDIEnable" == strKey) or
1804
- ("coolEnable" == strKey) or
1805
- ("fgZone1CoolTempHigh" == strKey) or
1806
- ("heatEnable" == strKey) or
1807
- ("fgZone1HeatTempHigh" == strKey) or
1808
- ("pumpiSliModeEn" == strKey) or
1809
- ("roomSensorEn" == strKey) or
1810
- ("roomTherEn" == strKey) or
1811
- ("roomTherSetModeEn" == strKey) or
1812
- ("dualroomThermostatEn" == strKey) or
1813
- ("fgdhwPriorEn" == strKey) or
1814
- ("acsEnable" == strKey) or
1815
- ("dhwHeaterAhsEn" == strKey) or
1816
- ("tempPcbEn" == strKey) or
1817
- ("tbt2ProbeEn" == strKey) or
1818
- ("pipeExceed10m" == strKey) or
1819
- ("solarCn18En" == strKey) or
1820
- ("fgOwnSolarEn" == strKey) or
1821
- ("fgInputDhwHeater" == strKey) or
1822
- ("smartgridEn" == strKey) or
1823
- ("t1bProbeEn" == strKey) or
1824
- ("fgZone2CoolTempHigh" == strKey) or
1825
- ("fgZone2HeatTempHigh" == strKey) or
1826
- ("doubleZoneEn" == strKey) or
1827
- ("fgTaProbeIdu" == strKey) or
1828
- ("tbt1ProbeEn" == strKey) or
1829
- ("fgIbhInTank" == strKey) or
1830
- --("tbhEnFunc" == strKey) or
1831
- --0x10主机查询参数 on/off
1832
- ("fgReqParaSet" == strKey) or
1833
- ("fgReqVerAsk" == strKey) or
1834
- ("fgReqSNAsk" == strKey) or
1835
- ("fgUnitLockSignal" == strKey) or
1836
- ("fgEVUSignal" == strKey) or
1837
- ("fgSGSignal" == strKey) or
1838
- ("fgTankAntiFreeze" == strKey) or
1839
- ("fgSolarInput" == strKey) or
1840
- ("fgRoomTherCoolRun" == strKey) or
1841
- ("fgRoomTherHeatRun" == strKey) or
1842
- ("fgOutDoorTestMode" == strKey) or
1843
- ("fgRemoteOnOff" == strKey) or
1844
- ("fgBackOil" == strKey) or
1845
- ("fgAntiFreezeRun" == strKey) or
1846
- ("fgDefrost" == strKey) or
1847
- ("fgIsSlaveUnit" == strKey) or
1848
- ("fgTBHEnable" == strKey) or
1849
- ("fgAHSIsOwn" == strKey) or
1850
- ("fgCapTestEnable" == strKey) or
1851
- ("fgT1BSensorEnable" == strKey) or
1852
- ("fgAHSDHWMode" == strKey) or
1853
- ("fgIBH1Enable" == strKey) or
1854
- ("fgT1SensorEnable" == strKey) or
1855
- ("fgEdgeVersionType" == strKey) or
1856
- ("fgFactReqTherHeatOn" == strKey) or
1857
- ("fgDHWRun" == strKey) or
1858
- ("fgHeatRun" == strKey) or
1859
- ("fgCoolRun" == strKey) or
1860
- ("fgFactReqTherCoolOn" == strKey) or
1861
- ("fgFactReqSolarOn" == strKey) or
1862
- ("fgFactoryRun" == strKey) or
1863
- ("fgDefValveOn" == strKey) or
1864
- ("fgAHSValveOn" == strKey) or
1865
- ("fgRunValveOn" == strKey) or
1866
- ("fgAlmValveOn" == strKey) or
1867
- ("fgPumpSolarOn" == strKey) or
1868
- ("fgHeat4ValveOn" == strKey) or
1869
- ("fgSV3Output" == strKey) or
1870
- ("fgMixedPumpValveOn" == strKey) or
1871
- ("fgPumpDHWOn" == strKey) or
1872
- ("fgPumpOOn" == strKey) or
1873
- ("fgSV2On" == strKey) or
1874
- ("fgSV1On" == strKey) or
1875
- ("fgPumpIOutput" == strKey) or
1876
- ("fgTBHOutput" == strKey) or
1877
- ("fgIBH2Output" == strKey) or
1878
- ("fgIBH1Output" == strKey) or
1879
- ("HMIEnergyAnaSetEN" == strKey) or
1880
- ("SysEnergyAnaEN" == strKey)
1881
- then
1882
- return true
1883
- else
1884
- return false
1885
- end
1886
- end
1887
-
1888
- -- 判定键是否为 on,off,0xff 类型
1889
- local function isStrOnOffInvalid(strKey)
1890
- if ("pre_heat" == strKey) then
1891
- return true
1892
- else
1893
- return false
1894
- end
1895
- end
1896
-
1897
- -- 判定键是否为 auto,cool,heat 类型
1898
- local function isStrMode(strKey)
1899
- if ("run_mode_set" == strKey) or
1900
- ("runmode_under_auto" == strKey) or
1901
- --日定时模式
1902
- ("daytimer_timer1_mode" == strKey) or
1903
- ("daytimer_timer2_mode" == strKey) or
1904
- ("daytimer_timer3_mode" == strKey) or
1905
- ("daytimer_timer4_mode" == strKey) or
1906
- ("daytimer_timer5_mode" == strKey) or
1907
- ("daytimer_timer6_mode" == strKey) or
1908
- --区域2日定时模式
1909
- ("zone2daytimer_timer1_mode" == strKey) or
1910
- ("zone2daytimer_timer2_mode" == strKey) or
1911
- ("zone2daytimer_timer3_mode" == strKey) or
1912
- ("zone2daytimer_timer4_mode" == strKey) or
1913
- ("zone2daytimer_timer5_mode" == strKey) or
1914
- ("zone2daytimer_timer6_mode" == strKey) or
1915
- --周定时模式
1916
- ("weektimer_timer1_mode" == strKey) or
1917
- ("weektimer_timer2_mode" == strKey) or
1918
- ("weektimer_timer3_mode" == strKey) or
1919
- ("weektimer_timer4_mode" == strKey) or
1920
- ("weektimer_timer5_mode" == strKey) or
1921
- ("weektimer_timer6_mode" == strKey) or
1922
- --周定时区域2模式
1923
- ("zone2weektimer_timer1_mode" == strKey) or
1924
- ("zone2weektimer_timer2_mode" == strKey) or
1925
- ("zone2weektimer_timer3_mode" == strKey) or
1926
- ("zone2weektimer_timer4_mode" == strKey) or
1927
- ("zone2weektimer_timer5_mode" == strKey) or
1928
- ("zone2weektimer_timer6_mode" == strKey) or
1929
-
1930
- ("holhometimer_timer1_mode" == strKey) or
1931
- ("holhometimer_timer2_mode" == strKey) or
1932
- ("holhometimer_timer3_mode" == strKey) or
1933
- ("holhometimer_timer4_mode" == strKey) or
1934
- ("holhometimer_timer5_mode" == strKey) or
1935
- ("holhometimer_timer6_mode" == strKey) or
1936
- --holhome 区域2
1937
- ("zone2holhometimer_timer1_mode" == strKey) or
1938
- ("zone2holhometimer_timer2_mode" == strKey) or
1939
- ("zone2holhometimer_timer3_mode" == strKey) or
1940
- ("zone2holhometimer_timer4_mode" == strKey) or
1941
- ("zone2holhometimer_timer5_mode" == strKey) or
1942
- ("zone2holhometimer_timer6_mode" == strKey)
1943
- then
1944
- return true
1945
- else
1946
- return false
1947
- end
1948
- end
1949
- -- 判定键是否为 气温,水温控制 类型
1950
- local function isStrWaterRoomType(strKey)
1951
- if ("zone1_temp_type" == strKey) or
1952
- ("zone2_temp_type" == strKey) then
1953
- return true
1954
- else
1955
- return false
1956
- end
1957
- end
1958
- -- 判定键是否为 末端类型 类型
1959
- local function isStrTerminalType(strKey)
1960
- if ("zone1_terminal_type" == strKey) or
1961
- ("zone2_terminal_type" == strKey) then
1962
- return true
1963
- else
1964
- return false
1965
- end
1966
- end
1967
-
1968
- -- 判定键是否为 等级 类型
1969
- local function isStrLevelType(strKey)
1970
- if ("silence_function_level" == strKey) then
1971
- return true
1972
- else
1973
- return false
1974
- end
1975
- end
1976
-
1977
- --单字节字符串有符号整形数据负数转换
1978
- local function isStrSignedByteType(strKey)
1979
- if ("t4" == strKey) or
1980
- ("tempT3" == strKey) or
1981
- ("tempT4" == strKey) or
1982
- ("tempTp" == strKey) or
1983
- ("tempTwin" == strKey) or
1984
- ("tempTwout" == strKey) or
1985
- ("tempT1" == strKey) or
1986
- ("tempTw2" == strKey) or
1987
- ("tempT2" == strKey) or
1988
- ("tempT2b" == strKey) or
1989
- ("tempT5" == strKey) or
1990
- ("tempTh" == strKey) or
1991
- ("tempTa" == strKey) or
1992
- ("tank_actual_temp" == strKey) or
1993
- ("tempTh" == strKey)
1994
- then
1995
- -- ("zone2_terminal_type" == strKey) then
1996
- return true
1997
- else
1998
- return false
1999
- end
2000
- end
2001
-
2002
- --双字节字节有符号整形数据
2003
- local function isStrSignedDoubleByteType(strKey)
2004
- if ("t4Dhwmin" == strKey) or
2005
- ("t4TBHon" == strKey) or
2006
- ("t4Cmin" == strKey) or
2007
- ("t4Hmin" == strKey) or
2008
- ("t4IBHon" == strKey) or
2009
- ("t4AHSon" == strKey) or
2010
- ("dT1AHSoff" == strKey) or
2011
- ("t4C1" == strKey) or
2012
- ("t4C2" == strKey) or
2013
- ("t4H1" == strKey) or
2014
- ("t4H2" == strKey) or
2015
- ("t4Cmin" == strKey) or
2016
- ("t4Hmin" == strKey) or
2017
-
2018
- ("t4IBHon" == strKey)
2019
- then
2020
- return true
2021
- else
2022
- return false
2023
- end
2024
- end
2025
- -- 更新 intvalue 值至 整型变量 myTable[strKey] 及 字符型变量 pvar_out[strKey]中
2026
- -- pvar_out[strKey] 为输出类型
2027
- -- 若 myTable[strKey] 为位变量,则 bitx 对应 value 的位, 否则为 nil
2028
- local function binToModel(pvar_out, strKey, intvalue, bitx)
2029
- local _intvalue = intvalue
2030
- local _strvalue = ""
2031
-
2032
- if myTable[strKey] ~= nil then
2033
- if isStrOnOff(strKey) then
2034
- if bitx ~= nil then
2035
- if (bit.band(_intvalue, bitx) > 0) then
2036
- _intvalue = unitTable["on"]
2037
- _strvalue = unitTable["str_on"]
2038
- else
2039
- _intvalue = unitTable["off"]
2040
- _strvalue = unitTable["str_off"]
2041
- end
2042
- end
2043
- elseif isStrMode(strKey) then
2044
- if unitTable["auto"] == _intvalue then
2045
- _strvalue = unitTable["str_auto"]
2046
- elseif unitTable["cool"] == _intvalue then
2047
- _strvalue = unitTable["str_cool"]
2048
- elseif unitTable["heat"] == _intvalue then
2049
- _strvalue = unitTable["str_heat"]
2050
- elseif unitTable["dhw"] == _intvalue then
2051
- _strvalue = unitTable["str_dhw"]
2052
- end
2053
- elseif isStrLevelType(strKey) then
2054
- if bitx ~= nil then
2055
- if ((bit.band(_intvalue, bitx)) > 0) then
2056
- _intvalue = unitTable["level_2"]
2057
- _strvalue = unitTable["str_level_2"]
2058
- else
2059
- _intvalue = unitTable["level_1"]
2060
- _strvalue = unitTable["str_level_1"]
2061
- end
2062
- end
2063
- elseif isStrWaterRoomType(strKey) then
2064
- if bitx ~= nil then
2065
- if ((bit.band(_intvalue, bitx)) > 0) then
2066
- _intvalue = unitTable["water_temperature_type"]
2067
- _strvalue = unitTable["str_water_temperature_type"]
2068
- else
2069
- _intvalue = unitTable["room_temperature_type"]
2070
- _strvalue = unitTable["str_room_temperature_type"]
2071
- end
2072
- end
2073
- elseif "zone1_terminal_type" == strKey then
2074
- --_intvalue = (_intvalue >>4) & 0x03 --取intvalue bit4,5;注意测试 bit.rshift(bit.band(messageBytes[2], 0x30),4)、(_intvalue >>4) & 0x03
2075
- _intvalue = bit.rshift(bit.band(_intvalue, 0x30), 4)
2076
- if unitTable["fan_coil"] == _intvalue then
2077
- _strvalue = unitTable["str_fan_coil"]
2078
- elseif unitTable["floor_heat"] == _intvalue then
2079
- _strvalue = unitTable["str_floor_heat"]
2080
- elseif unitTable["radiatior"] == _intvalue then
2081
- _strvalue = unitTable["str_radiatior"]
2082
- end
2083
- elseif "zone2_terminal_type" == strKey then
2084
- --_intvalue = (_intvalue >>6) & 0x03 --取intvalue bit6,7;注意测试 bit.rshift(bit.band(messageBytes[2], 0xC0),6)
2085
- _intvalue = bit.rshift(bit.band(_intvalue, 0xC0), 6)
2086
- if unitTable["fan_coil"] == _intvalue then
2087
- _strvalue = unitTable["str_fan_coil"]
2088
- elseif unitTable["floor_heat"] == _intvalue then
2089
- _strvalue = unitTable["str_floor_heat"]
2090
- elseif unitTable["radiatior"] == _intvalue then
2091
- _strvalue = unitTable["str_radiatior"]
2092
- end
2093
- elseif isStrOnOffInvalid(strKey) then
2094
- if bitx ~= nil then
2095
- if (bit.band(_intvalue, bitx) > 0) then
2096
- _intvalue = unitTable["on"]
2097
- _strvalue = unitTable["str_on"]
2098
- else
2099
- _intvalue = unitTable["off"]
2100
- _strvalue = unitTable["str_off"]
2101
- end
2102
- end
2103
- elseif "pre_heat_flag" == strKey then
2104
- if bitx ~= nil then
2105
- if (bit.band(_intvalue, bitx) > 0) then -- 特殊处理,1为无效,0为有效
2106
- _intvalue = unitTable["off"]
2107
- _strvalue = unitTable["str_off"]
2108
- else
2109
- _intvalue = unitTable["on"]
2110
- _strvalue = unitTable["str_on"]
2111
- end
2112
- end
2113
- elseif isStrSignedByteType(strKey) then
2114
- --2023-2-7
2115
- if intvalue > 127 then
2116
- _intvalue = intvalue - 256
2117
- else
2118
- _intvalue = intvalue
2119
- end
2120
- _strvalue = int2String(_intvalue)
2121
- elseif isStrSignedDoubleByteType(strKey) then
2122
- if intvalue > 32768 then
2123
- _intvalue = intvalue - 65536
2124
- else
2125
- _intvalue = intvalue
2126
- end
2127
- _strvalue = int2String(_intvalue)
2128
- else
2129
- _strvalue = int2String(intvalue) -- 数值类型,将数值转为字符
2130
- end
2131
-
2132
- -- 更新参数值
2133
- pvar_out[strKey] = _strvalue
2134
- myTable[strKey] = _intvalue
2135
- end
2136
- end
2137
-
2138
- -- 更新 pvar[strKey] 值至 myTable[strKey] 中
2139
- -- 若 myTable[strKey] 为位变量,则 bitx 对应 value 的位, 否则为 nil
2140
- local function modelToBin(pvar, strKey, bitx)
2141
- local _strValue = pvar[strKey]
2142
- if isStrOnOff(strKey) then
2143
- if bitx ~= nil then
2144
- if (_strValue == unitTable["str_on"]) then
2145
- myTable[strKey] = bitx
2146
- elseif (_strValue == unitTable["str_off"]) then
2147
- myTable[strKey] = 0
2148
- end
2149
- end
2150
- elseif isStrMode(strKey) then
2151
- if _strValue == unitTable["str_auto"] then
2152
- myTable[strKey] = unitTable["auto"]
2153
- elseif _strValue == unitTable["str_cool"] then
2154
- myTable[strKey] = unitTable["cool"]
2155
- elseif _strValue == unitTable["str_heat"] then
2156
- myTable[strKey] = unitTable["heat"]
2157
- elseif _strValue == unitTable["str_dhw"] then
2158
- myTable[strKey] = unitTable["dhw"]
2159
- end
2160
- elseif isStrLevelType(strKey) then
2161
- if bitx ~= nil then
2162
- if (_strValue == unitTable["str_level_2"]) then
2163
- myTable[strKey] = bitx
2164
- elseif (_strValue == unitTable["str_level_1"]) then
2165
- myTable[strKey] = unitTable["off"]
2166
- end
2167
- end
2168
- elseif isStrOnOffInvalid(strKey) then
2169
- if bitx ~= nil then
2170
- if (_strValue == unitTable["str_on"]) then
2171
- myTable[strKey] = bitx
2172
- elseif (_strValue == unitTable["str_off"]) then
2173
- myTable[strKey] = unitTable["off"]
2174
- else
2175
- myTable[strKey] = unitTable["u8_invalid"]
2176
- end
2177
- end
2178
- else
2179
- if _strValue ~= nil then
2180
- local _prop_val = string2Int(_strValue)
2181
- if _prop_val < 0 then
2182
- _prop_val = bit.lshift(0x1, 1 * 8) + _prop_val
2183
- end
2184
- myTable[strKey] = _prop_val
2185
- end
2186
- end
2187
- end
2188
-
2189
- -- 根据 json 属性变量转存至 myTable
2190
- -- 用于解析云字符含义
2191
- local function jsonToModel(jsonCmd)
2192
- local _controlcmd = jsonCmd
2193
- -- 基本控制
2194
- --protocol_newfunction_en控制下发ON,针对新升级WIFI电控软件解析,off为兼容已投产软件解析.
2195
- modelToBin(_controlcmd, "protocol_newfunction_en", BIT0)
2196
-
2197
- modelToBin(_controlcmd, "zone1_power_state", BIT0)
2198
- modelToBin(_controlcmd, "zone2_power_state", BIT1)
2199
- modelToBin(_controlcmd, "dhw_power_state", BIT2)
2200
-
2201
- modelToBin(_controlcmd, "run_mode_set", nil)
2202
- modelToBin(_controlcmd, "zone1_temp_set", nil)
2203
- modelToBin(_controlcmd, "zone2_temp_set", nil)
2204
- modelToBin(_controlcmd, "dhw_temp_set", nil)
2205
- modelToBin(_controlcmd, "room_temp_set", nil)
2206
-
2207
- modelToBin(_controlcmd, "zone1_curve_state", BIT0)
2208
- modelToBin(_controlcmd, "zone2_curve_state", BIT1)
2209
- modelToBin(_controlcmd, "forcetbh_state", BIT2)
2210
- modelToBin(_controlcmd, "fastdhw_state", BIT3)
2211
- modelToBin(_controlcmd, "zone1_curve_type", nil)
2212
- modelToBin(_controlcmd, "zone2_curve_type", nil)
2213
-
2214
- -- 日定时1
2215
- modelToBin(_controlcmd, "daytimer_timer1en", BIT0)
2216
- modelToBin(_controlcmd, "daytimer_timer1_mode", nil)
2217
- modelToBin(_controlcmd, "daytimer_timer1_temp", nil)
2218
- modelToBin(_controlcmd, "daytimer_timer1_openhour", nil)
2219
- modelToBin(_controlcmd, "daytimer_timer1_openmin", nil)
2220
- modelToBin(_controlcmd, "daytimer_timer1_closehour", nil)
2221
- modelToBin(_controlcmd, "daytimer_timer1_closemin", nil)
2222
- -- 日定时2
2223
- modelToBin(_controlcmd, "daytimer_timer2en", BIT1)
2224
- modelToBin(_controlcmd, "daytimer_timer2_mode", nil)
2225
- modelToBin(_controlcmd, "daytimer_timer2_temp", nil)
2226
- modelToBin(_controlcmd, "daytimer_timer2_openhour", nil)
2227
- modelToBin(_controlcmd, "daytimer_timer2_openmin", nil)
2228
- modelToBin(_controlcmd, "daytimer_timer2_closehour", nil)
2229
- modelToBin(_controlcmd, "daytimer_timer2_closemin", nil)
2230
- -- 日定时3
2231
- modelToBin(_controlcmd, "daytimer_timer3en", BIT2)
2232
- modelToBin(_controlcmd, "daytimer_timer3_mode", nil)
2233
- modelToBin(_controlcmd, "daytimer_timer3_temp", nil)
2234
- modelToBin(_controlcmd, "daytimer_timer3_openhour", nil)
2235
- modelToBin(_controlcmd, "daytimer_timer3_openmin", nil)
2236
- modelToBin(_controlcmd, "daytimer_timer3_closehour", nil)
2237
- modelToBin(_controlcmd, "daytimer_timer3_closemin", nil)
2238
- -- 日定时4
2239
- modelToBin(_controlcmd, "daytimer_timer4en", BIT3)
2240
- modelToBin(_controlcmd, "daytimer_timer4_mode", nil)
2241
- modelToBin(_controlcmd, "daytimer_timer4_temp", nil)
2242
- modelToBin(_controlcmd, "daytimer_timer4_openhour", nil)
2243
- modelToBin(_controlcmd, "daytimer_timer4_openmin", nil)
2244
- modelToBin(_controlcmd, "daytimer_timer4_closehour", nil)
2245
- modelToBin(_controlcmd, "daytimer_timer4_closemin", nil)
2246
- -- 日定时5
2247
- modelToBin(_controlcmd, "daytimer_timer5en", BIT4)
2248
- modelToBin(_controlcmd, "daytimer_timer5_mode", nil)
2249
- modelToBin(_controlcmd, "daytimer_timer5_temp", nil)
2250
- modelToBin(_controlcmd, "daytimer_timer5_openhour", nil)
2251
- modelToBin(_controlcmd, "daytimer_timer5_openmin", nil)
2252
- modelToBin(_controlcmd, "daytimer_timer5_closehour", nil)
2253
- modelToBin(_controlcmd, "daytimer_timer5_closemin", nil)
2254
- -- 日定时6
2255
- modelToBin(_controlcmd, "daytimer_timer6en", BIT5)
2256
- modelToBin(_controlcmd, "daytimer_timer6_mode", nil)
2257
- modelToBin(_controlcmd, "daytimer_timer6_temp", nil)
2258
- modelToBin(_controlcmd, "daytimer_timer6_openhour", nil)
2259
- modelToBin(_controlcmd, "daytimer_timer6_openmin", nil)
2260
- modelToBin(_controlcmd, "daytimer_timer6_closehour", nil)
2261
- modelToBin(_controlcmd, "daytimer_timer6_closemin", nil)
2262
-
2263
- -- 区域2日定时1
2264
- modelToBin(_controlcmd, "zone2daytimer_timer1en", BIT0)
2265
- modelToBin(_controlcmd, "zone2daytimer_timer1_mode", nil)
2266
- modelToBin(_controlcmd, "zone2daytimer_timer1_temp", nil)
2267
- modelToBin(_controlcmd, "zone2daytimer_timer1_openhour", nil)
2268
- modelToBin(_controlcmd, "zone2daytimer_timer1_openmin", nil)
2269
- modelToBin(_controlcmd, "zone2daytimer_timer1_closehour", nil)
2270
- modelToBin(_controlcmd, "zone2daytimer_timer1_closemin", nil)
2271
- -- 日定时2
2272
- modelToBin(_controlcmd, "zone2daytimer_timer2en", BIT1)
2273
- modelToBin(_controlcmd, "zone2daytimer_timer2_mode", nil)
2274
- modelToBin(_controlcmd, "zone2daytimer_timer2_temp", nil)
2275
- modelToBin(_controlcmd, "zone2daytimer_timer2_openhour", nil)
2276
- modelToBin(_controlcmd, "zone2daytimer_timer2_openmin", nil)
2277
- modelToBin(_controlcmd, "zone2daytimer_timer2_closehour", nil)
2278
- modelToBin(_controlcmd, "zone2daytimer_timer2_closemin", nil)
2279
- -- 日定时3
2280
- modelToBin(_controlcmd, "zone2daytimer_timer3en", BIT2)
2281
- modelToBin(_controlcmd, "zone2daytimer_timer3_mode", nil)
2282
- modelToBin(_controlcmd, "zone2daytimer_timer3_temp", nil)
2283
- modelToBin(_controlcmd, "zone2daytimer_timer3_openhour", nil)
2284
- modelToBin(_controlcmd, "zone2daytimer_timer3_openmin", nil)
2285
- modelToBin(_controlcmd, "zone2daytimer_timer3_closehour", nil)
2286
- modelToBin(_controlcmd, "zone2daytimer_timer3_closemin", nil)
2287
- -- 日定时4
2288
- modelToBin(_controlcmd, "zone2daytimer_timer4en", BIT3)
2289
- modelToBin(_controlcmd, "zone2daytimer_timer4_mode", nil)
2290
- modelToBin(_controlcmd, "zone2daytimer_timer4_temp", nil)
2291
- modelToBin(_controlcmd, "zone2daytimer_timer4_openhour", nil)
2292
- modelToBin(_controlcmd, "zone2daytimer_timer4_openmin", nil)
2293
- modelToBin(_controlcmd, "zone2daytimer_timer4_closehour", nil)
2294
- modelToBin(_controlcmd, "zone2daytimer_timer4_closemin", nil)
2295
- -- 日定时5
2296
- modelToBin(_controlcmd, "zone2daytimer_timer5en", BIT4)
2297
- modelToBin(_controlcmd, "zone2daytimer_timer5_mode", nil)
2298
- modelToBin(_controlcmd, "zone2daytimer_timer5_temp", nil)
2299
- modelToBin(_controlcmd, "zone2daytimer_timer5_openhour", nil)
2300
- modelToBin(_controlcmd, "zone2daytimer_timer5_openmin", nil)
2301
- modelToBin(_controlcmd, "zone2daytimer_timer5_closehour", nil)
2302
- modelToBin(_controlcmd, "zone2daytimer_timer5_closemin", nil)
2303
- -- 日定时6
2304
- modelToBin(_controlcmd, "zone2daytimer_timer6en", BIT5)
2305
- modelToBin(_controlcmd, "zone2daytimer_timer6_mode", nil)
2306
- modelToBin(_controlcmd, "zone2daytimer_timer6_temp", nil)
2307
- modelToBin(_controlcmd, "zone2daytimer_timer6_openhour", nil)
2308
- modelToBin(_controlcmd, "zone2daytimer_timer6_openmin", nil)
2309
- modelToBin(_controlcmd, "zone2daytimer_timer6_closehour", nil)
2310
- modelToBin(_controlcmd, "zone2daytimer_timer6_closemin", nil)
2311
-
2312
-
2313
- -- 周定时星期设置标志
2314
- modelToBin(_controlcmd, "weektimer_setday", nil)
2315
- -- 周定时1
2316
- modelToBin(_controlcmd, "weektimer_timer1en", BIT0)
2317
- modelToBin(_controlcmd, "weektimer_timer1_mode", nil)
2318
- modelToBin(_controlcmd, "weektimer_timer1_temp", nil)
2319
- modelToBin(_controlcmd, "weektimer_timer1_openhour", nil)
2320
- modelToBin(_controlcmd, "weektimer_timer1_openmin", nil)
2321
- modelToBin(_controlcmd, "weektimer_timer1_closehour", nil)
2322
- modelToBin(_controlcmd, "weektimer_timer1_closemin", nil)
2323
- -- 周定时2
2324
- modelToBin(_controlcmd, "weektimer_timer2en", BIT1)
2325
- modelToBin(_controlcmd, "weektimer_timer2_mode", nil)
2326
- modelToBin(_controlcmd, "weektimer_timer2_temp", nil)
2327
- modelToBin(_controlcmd, "weektimer_timer2_openhour", nil)
2328
- modelToBin(_controlcmd, "weektimer_timer2_openmin", nil)
2329
- modelToBin(_controlcmd, "weektimer_timer2_closehour", nil)
2330
- modelToBin(_controlcmd, "weektimer_timer2_closemin", nil)
2331
- -- 周定时3
2332
- modelToBin(_controlcmd, "weektimer_timer3en", BIT2)
2333
- modelToBin(_controlcmd, "weektimer_timer3_mode", nil)
2334
- modelToBin(_controlcmd, "weektimer_timer3_temp", nil)
2335
- modelToBin(_controlcmd, "weektimer_timer3_openhour", nil)
2336
- modelToBin(_controlcmd, "weektimer_timer3_openmin", nil)
2337
- modelToBin(_controlcmd, "weektimer_timer3_closehour", nil)
2338
- modelToBin(_controlcmd, "weektimer_timer3_closemin", nil)
2339
- -- 周定时4
2340
- modelToBin(_controlcmd, "weektimer_timer4en", BIT3)
2341
- modelToBin(_controlcmd, "weektimer_timer4_mode", nil)
2342
- modelToBin(_controlcmd, "weektimer_timer4_temp", nil)
2343
- modelToBin(_controlcmd, "weektimer_timer4_openhour", nil)
2344
- modelToBin(_controlcmd, "weektimer_timer4_openmin", nil)
2345
- modelToBin(_controlcmd, "weektimer_timer4_closehour", nil)
2346
- modelToBin(_controlcmd, "weektimer_timer4_closemin", nil)
2347
- -- 周定时5
2348
- modelToBin(_controlcmd, "weektimer_timer5en", BIT4)
2349
- modelToBin(_controlcmd, "weektimer_timer5_mode", nil)
2350
- modelToBin(_controlcmd, "weektimer_timer5_temp", nil)
2351
- modelToBin(_controlcmd, "weektimer_timer5_openhour", nil)
2352
- modelToBin(_controlcmd, "weektimer_timer5_openmin", nil)
2353
- modelToBin(_controlcmd, "weektimer_timer5_closehour", nil)
2354
- modelToBin(_controlcmd, "weektimer_timer5_closemin", nil)
2355
- -- 周定时6
2356
- modelToBin(_controlcmd, "weektimer_timer6en", BIT5)
2357
- modelToBin(_controlcmd, "weektimer_timer6_mode", nil)
2358
- modelToBin(_controlcmd, "weektimer_timer6_temp", nil)
2359
- modelToBin(_controlcmd, "weektimer_timer6_openhour", nil)
2360
- modelToBin(_controlcmd, "weektimer_timer6_openmin", nil)
2361
- modelToBin(_controlcmd, "weektimer_timer6_closehour", nil)
2362
- modelToBin(_controlcmd, "weektimer_timer6_closemin", nil)
2363
- -- 区域2周定时星期设置标志
2364
- modelToBin(_controlcmd, "zone2weektimer_setday", nil)
2365
- -- 区域2周定时1
2366
- modelToBin(_controlcmd, "zone2weektimer_timer1en", BIT0)
2367
- modelToBin(_controlcmd, "zone2weektimer_timer1_mode", nil)
2368
- modelToBin(_controlcmd, "zone2weektimer_timer1_temp", nil)
2369
- modelToBin(_controlcmd, "zone2weektimer_timer1_openhour", nil)
2370
- modelToBin(_controlcmd, "zone2weektimer_timer1_openmin", nil)
2371
- modelToBin(_controlcmd, "zone2weektimer_timer1_closehour", nil)
2372
- modelToBin(_controlcmd, "zone2weektimer_timer1_closemin", nil)
2373
- -- 区域2周定时2
2374
- modelToBin(_controlcmd, "zone2weektimer_timer2en", BIT1)
2375
- modelToBin(_controlcmd, "zone2weektimer_timer2_mode", nil)
2376
- modelToBin(_controlcmd, "zone2weektimer_timer2_temp", nil)
2377
- modelToBin(_controlcmd, "zone2weektimer_timer2_openhour", nil)
2378
- modelToBin(_controlcmd, "zone2weektimer_timer2_openmin", nil)
2379
- modelToBin(_controlcmd, "zone2weektimer_timer2_closehour", nil)
2380
- modelToBin(_controlcmd, "zone2weektimer_timer2_closemin", nil)
2381
- -- 区域2周定时3
2382
- modelToBin(_controlcmd, "zone2weektimer_timer3en", BIT2)
2383
- modelToBin(_controlcmd, "zone2weektimer_timer3_mode", nil)
2384
- modelToBin(_controlcmd, "zone2weektimer_timer3_temp", nil)
2385
- modelToBin(_controlcmd, "zone2weektimer_timer3_openhour", nil)
2386
- modelToBin(_controlcmd, "zone2weektimer_timer3_openmin", nil)
2387
- modelToBin(_controlcmd, "zone2weektimer_timer3_closehour", nil)
2388
- modelToBin(_controlcmd, "zone2weektimer_timer3_closemin", nil)
2389
- -- 区域2周定时4
2390
- modelToBin(_controlcmd, "zone2weektimer_timer4en", BIT3)
2391
- modelToBin(_controlcmd, "zone2weektimer_timer4_mode", nil)
2392
- modelToBin(_controlcmd, "zone2weektimer_timer4_temp", nil)
2393
- modelToBin(_controlcmd, "zone2weektimer_timer4_openhour", nil)
2394
- modelToBin(_controlcmd, "zone2weektimer_timer4_openmin", nil)
2395
- modelToBin(_controlcmd, "zone2weektimer_timer4_closehour", nil)
2396
- modelToBin(_controlcmd, "zone2weektimer_timer4_closemin", nil)
2397
- -- 区域2周定时5
2398
- modelToBin(_controlcmd, "zone2weektimer_timer5en", BIT4)
2399
- modelToBin(_controlcmd, "zone2weektimer_timer5_mode", nil)
2400
- modelToBin(_controlcmd, "zone2weektimer_timer5_temp", nil)
2401
- modelToBin(_controlcmd, "zone2weektimer_timer5_openhour", nil)
2402
- modelToBin(_controlcmd, "zone2weektimer_timer5_openmin", nil)
2403
- modelToBin(_controlcmd, "zone2weektimer_timer5_closehour", nil)
2404
- modelToBin(_controlcmd, "zone2weektimer_timer5_closemin", nil)
2405
- -- 区域2周定时6
2406
- modelToBin(_controlcmd, "zone2weektimer_timer6en", BIT5)
2407
- modelToBin(_controlcmd, "zone2weektimer_timer6_mode", nil)
2408
- modelToBin(_controlcmd, "zone2weektimer_timer6_temp", nil)
2409
- modelToBin(_controlcmd, "zone2weektimer_timer6_openhour", nil)
2410
- modelToBin(_controlcmd, "zone2weektimer_timer6_openmin", nil)
2411
- modelToBin(_controlcmd, "zone2weektimer_timer6_closehour", nil)
2412
- modelToBin(_controlcmd, "zone2weektimer_timer6_closemin", nil)
2413
-
2414
- -- 外出休假HOLIDAY AWAY
2415
- modelToBin(_controlcmd, "holidayaway_state", BIT0)
2416
- modelToBin(_controlcmd, "holidayaway_startyear", nil)
2417
- modelToBin(_controlcmd, "holidayaway_startmonth", nil)
2418
- modelToBin(_controlcmd, "holidayaway_startdate", nil)
2419
- modelToBin(_controlcmd, "holidayaway_endyear", nil)
2420
- modelToBin(_controlcmd, "holidayaway_endmonth", nil)
2421
- modelToBin(_controlcmd, "holidayaway_enddate", nil)
2422
- modelToBin(_controlcmd, "holidayaway_heat_state", BIT0)
2423
- modelToBin(_controlcmd, "holidayaway_dhw_state", BIT1)
2424
- modelToBin(_controlcmd, "holidayaway_disinfect_state", BIT2)
2425
- -- 静音控制
2426
- modelToBin(_controlcmd, "silence_function_state", BIT0)
2427
- modelToBin(_controlcmd, "silence_function_level", BIT1)
2428
- modelToBin(_controlcmd, "silence_timer1_state", BIT2)
2429
- modelToBin(_controlcmd, "silence_timer2_state", BIT3)
2430
- modelToBin(_controlcmd, "silence_timer1_starthour", nil)
2431
- modelToBin(_controlcmd, "silence_timer1_startmin", nil)
2432
- modelToBin(_controlcmd, "silence_timer1_endhour", nil)
2433
- modelToBin(_controlcmd, "silence_timer1_endmin", nil)
2434
- modelToBin(_controlcmd, "silence_timer2_starthour", nil)
2435
- modelToBin(_controlcmd, "silence_timer2_startmin", nil)
2436
- modelToBin(_controlcmd, "silence_timer2_endhour", nil)
2437
- modelToBin(_controlcmd, "silence_timer2_endmin", nil)
2438
- -- 在家休假HOLIDAY HOME
2439
- modelToBin(_controlcmd, "holidayhome_state", BIT0)
2440
- modelToBin(_controlcmd, "holidayhome_startyear", nil)
2441
- modelToBin(_controlcmd, "holidayhome_startmonth", nil)
2442
- modelToBin(_controlcmd, "holidayhome_startdate", nil)
2443
- modelToBin(_controlcmd, "holidayhome_endyear", nil)
2444
- modelToBin(_controlcmd, "holidayhome_endmonth", nil)
2445
- modelToBin(_controlcmd, "holidayhome_enddate", nil)
2446
- -- HOLIDAY HOME定时1
2447
- modelToBin(_controlcmd, "holhometimer_timer1en", BIT0)
2448
- modelToBin(_controlcmd, "holhometimer_timer1_mode", nil)
2449
- modelToBin(_controlcmd, "holhometimer_timer1_temp", nil)
2450
- modelToBin(_controlcmd, "holhometimer_timer1_openhour", nil)
2451
- modelToBin(_controlcmd, "holhometimer_timer1_openmin", nil)
2452
- modelToBin(_controlcmd, "holhometimer_timer1_closehour", nil)
2453
- modelToBin(_controlcmd, "holhometimer_timer1_closemin", nil)
2454
- -- HOLIDAY HOME日定时2
2455
- modelToBin(_controlcmd, "holhometimer_timer2en", BIT1)
2456
- modelToBin(_controlcmd, "holhometimer_timer2_mode", nil)
2457
- modelToBin(_controlcmd, "holhometimer_timer2_temp", nil)
2458
- modelToBin(_controlcmd, "holhometimer_timer2_openhour", nil)
2459
- modelToBin(_controlcmd, "holhometimer_timer2_openmin", nil)
2460
- modelToBin(_controlcmd, "holhometimer_timer2_closehour", nil)
2461
- modelToBin(_controlcmd, "holhometimer_timer2_closemin", nil)
2462
- -- HOLIDAY HOME定时3
2463
- modelToBin(_controlcmd, "holhometimer_timer3en", BIT2)
2464
- modelToBin(_controlcmd, "holhometimer_timer3_mode", nil)
2465
- modelToBin(_controlcmd, "holhometimer_timer3_temp", nil)
2466
- modelToBin(_controlcmd, "holhometimer_timer3_openhour", nil)
2467
- modelToBin(_controlcmd, "holhometimer_timer3_openmin", nil)
2468
- modelToBin(_controlcmd, "holhometimer_timer3_closehour", nil)
2469
- modelToBin(_controlcmd, "holhometimer_timer3_closemin", nil)
2470
- -- HOLIDAY HOME日定时4
2471
- modelToBin(_controlcmd, "holhometimer_timer4en", BIT3)
2472
- modelToBin(_controlcmd, "holhometimer_timer4_mode", nil)
2473
- modelToBin(_controlcmd, "holhometimer_timer4_temp", nil)
2474
- modelToBin(_controlcmd, "holhometimer_timer4_openhour", nil)
2475
- modelToBin(_controlcmd, "holhometimer_timer4_openmin", nil)
2476
- modelToBin(_controlcmd, "holhometimer_timer4_closehour", nil)
2477
- modelToBin(_controlcmd, "holhometimer_timer4_closemin", nil)
2478
- -- HOLIDAY HOME日定时5
2479
- modelToBin(_controlcmd, "holhometimer_timer5en", BIT4)
2480
- modelToBin(_controlcmd, "holhometimer_timer5_mode", nil)
2481
- modelToBin(_controlcmd, "holhometimer_timer5_temp", nil)
2482
- modelToBin(_controlcmd, "holhometimer_timer5_openhour", nil)
2483
- modelToBin(_controlcmd, "holhometimer_timer5_openmin", nil)
2484
- modelToBin(_controlcmd, "holhometimer_timer5_closehour", nil)
2485
- modelToBin(_controlcmd, "holhometimer_timer5_closemin", nil)
2486
- -- HOLIDAY HOME日定时6
2487
- modelToBin(_controlcmd, "holhometimer_timer6en", BIT5)
2488
- modelToBin(_controlcmd, "holhometimer_timer6_mode", nil)
2489
- modelToBin(_controlcmd, "holhometimer_timer6_temp", nil)
2490
- modelToBin(_controlcmd, "holhometimer_timer6_openhour", nil)
2491
- modelToBin(_controlcmd, "holhometimer_timer6_openmin", nil)
2492
- modelToBin(_controlcmd, "holhometimer_timer6_closehour", nil)
2493
- modelToBin(_controlcmd, "holhometimer_timer6_closemin", nil)
2494
-
2495
- -- HOLIDAY HOME区域2定时1
2496
- modelToBin(_controlcmd, "zone2holhometimer_timer1en", BIT0)
2497
- modelToBin(_controlcmd, "zone2holhometimer_timer1_mode", nil)
2498
- modelToBin(_controlcmd, "zone2holhometimer_timer1_temp", nil)
2499
- modelToBin(_controlcmd, "zone2holhometimer_timer1_openhour", nil)
2500
- modelToBin(_controlcmd, "zone2holhometimer_timer1_openmin", nil)
2501
- modelToBin(_controlcmd, "zone2holhometimer_timer1_closehour", nil)
2502
- modelToBin(_controlcmd, "zone2holhometimer_timer1_closemin", nil)
2503
- -- HOLIDAY HOME日区域2定时2
2504
- modelToBin(_controlcmd, "zone2holhometimer_timer2en", BIT1)
2505
- modelToBin(_controlcmd, "zone2holhometimer_timer2_mode", nil)
2506
- modelToBin(_controlcmd, "zone2holhometimer_timer2_temp", nil)
2507
- modelToBin(_controlcmd, "zone2holhometimer_timer2_openhour", nil)
2508
- modelToBin(_controlcmd, "zone2holhometimer_timer2_openmin", nil)
2509
- modelToBin(_controlcmd, "zone2holhometimer_timer2_closehour", nil)
2510
- modelToBin(_controlcmd, "zone2holhometimer_timer2_closemin", nil)
2511
- -- HOLIDAY HOME区域2定时3
2512
- modelToBin(_controlcmd, "zone2holhometimer_timer3en", BIT2)
2513
- modelToBin(_controlcmd, "zone2holhometimer_timer3_mode", nil)
2514
- modelToBin(_controlcmd, "zone2holhometimer_timer3_temp", nil)
2515
- modelToBin(_controlcmd, "zone2holhometimer_timer3_openhour", nil)
2516
- modelToBin(_controlcmd, "zone2holhometimer_timer3_openmin", nil)
2517
- modelToBin(_controlcmd, "zone2holhometimer_timer3_closehour", nil)
2518
- modelToBin(_controlcmd, "zone2holhometimer_timer3_closemin", nil)
2519
- -- HOLIDAY HOME日区域2定时4
2520
- modelToBin(_controlcmd, "zone2holhometimer_timer4en", BIT3)
2521
- modelToBin(_controlcmd, "zone2holhometimer_timer4_mode", nil)
2522
- modelToBin(_controlcmd, "zone2holhometimer_timer4_temp", nil)
2523
- modelToBin(_controlcmd, "zone2holhometimer_timer4_openhour", nil)
2524
- modelToBin(_controlcmd, "zone2holhometimer_timer4_openmin", nil)
2525
- modelToBin(_controlcmd, "zone2holhometimer_timer4_closehour", nil)
2526
- modelToBin(_controlcmd, "zone2holhometimer_timer4_closemin", nil)
2527
- -- HOLIDAY HOME日区域2定时5
2528
- modelToBin(_controlcmd, "zone2holhometimer_timer5en", BIT4)
2529
- modelToBin(_controlcmd, "zone2holhometimer_timer5_mode", nil)
2530
- modelToBin(_controlcmd, "zone2holhometimer_timer5_temp", nil)
2531
- modelToBin(_controlcmd, "zone2holhometimer_timer5_openhour", nil)
2532
- modelToBin(_controlcmd, "zone2holhometimer_timer5_openmin", nil)
2533
- modelToBin(_controlcmd, "zone2holhometimer_timer5_closehour", nil)
2534
- modelToBin(_controlcmd, "zone2holhometimer_timer5_closemin", nil)
2535
- -- HOLIDAY HOME日区域2定时6
2536
- modelToBin(_controlcmd, "zone2holhometimer_timer6en", BIT5)
2537
- modelToBin(_controlcmd, "zone2holhometimer_timer6_mode", nil)
2538
- modelToBin(_controlcmd, "zone2holhometimer_timer6_temp", nil)
2539
- modelToBin(_controlcmd, "zone2holhometimer_timer6_openhour", nil)
2540
- modelToBin(_controlcmd, "zone2holhometimer_timer6_openmin", nil)
2541
- modelToBin(_controlcmd, "zone2holhometimer_timer6_closehour", nil)
2542
- modelToBin(_controlcmd, "zone2holhometimer_timer6_closemin", nil)
2543
- -- ECO控制
2544
- modelToBin(_controlcmd, "eco_function_state", BIT0)
2545
- modelToBin(_controlcmd, "eco_timer_state", BIT1)
2546
- modelToBin(_controlcmd, "eco_timer_starthour", nil)
2547
- modelToBin(_controlcmd, "eco_timer_startmin", nil)
2548
- modelToBin(_controlcmd, "eco_timer_endhour", nil)
2549
- modelToBin(_controlcmd, "eco_timer_endmin", nil)
2550
- modelToBin(_controlcmd, "eco_curve_type", nil)
2551
- -- 杀菌控制
2552
- modelToBin(_controlcmd, "disinfect_function_state", BIT0)
2553
- modelToBin(_controlcmd, "disinfect_run_state", BIT1)
2554
- modelToBin(_controlcmd, "disinfect_setweekday", nil)
2555
- modelToBin(_controlcmd, "disinfect_starthour", nil)
2556
- modelToBin(_controlcmd, "disinfect_startmin", nil)
2557
-
2558
- --安装设定控制
2559
- modelToBin(_controlcmd, "dhwEnable", BIT7)
2560
- modelToBin(_controlcmd, "boostertbhEn", BIT6)
2561
- modelToBin(_controlcmd, "disinfectEnable", BIT5)
2562
- modelToBin(_controlcmd, "dhwPumpEnable", BIT4)
2563
-
2564
- modelToBin(_controlcmd, "coolEnable", BIT1)
2565
- modelToBin(_controlcmd, "heatEnable", BIT7)
2566
- modelToBin(_controlcmd, "dualroomThermostatEn", BIT1)
2567
- modelToBin(_controlcmd, "roomTherSetModeEn", BIT2)
2568
- modelToBin(_controlcmd, "roomTherEn", BIT3)
2569
- modelToBin(_controlcmd, "pipeExceed10m", BIT3)
2570
- modelToBin(_controlcmd, "smartgridEn", BIT7)
2571
- modelToBin(_controlcmd, "roomTherType", nil)
2572
- modelToBin(_controlcmd, "dT5On", nil)
2573
- modelToBin(_controlcmd, "dT1S5", nil)
2574
-
2575
- modelToBin(_controlcmd, "t4Dhwmax", nil)
2576
- modelToBin(_controlcmd, "t4Dhwmin", nil)
2577
-
2578
- modelToBin(_controlcmd, "t4TBHon", nil)
2579
-
2580
- modelToBin(_controlcmd, "dT1SC", nil)
2581
- modelToBin(_controlcmd, "dTSC", nil)
2582
- modelToBin(_controlcmd, "t4Cmax", nil)
2583
- modelToBin(_controlcmd, "t4Cmin", nil)
2584
-
2585
- modelToBin(_controlcmd, "dT1SH", nil)
2586
- modelToBin(_controlcmd, "dTSH", nil)
2587
- modelToBin(_controlcmd, "t4Hmax", nil)
2588
- modelToBin(_controlcmd, "t4Hmin", nil)
2589
- modelToBin(_controlcmd, "t4IBHon", nil)
2590
-
2591
- modelToBin(_controlcmd, "t4autocmin", nil)
2592
- modelToBin(_controlcmd, "t4autohmax", nil)
2593
-
2594
- modelToBin(_controlcmd, "powerIbh1", nil)
2595
- modelToBin(_controlcmd, "powerIbh2", nil)
2596
- modelToBin(_controlcmd, "powerTbh", nil)
2597
-
2598
- modelToBin(_controlcmd, "t1SetC1", nil)
2599
- modelToBin(_controlcmd, "t1SetC2", nil)
2600
- modelToBin(_controlcmd, "t4C1", nil)
2601
- modelToBin(_controlcmd, "t4C2", nil)
2602
- modelToBin(_controlcmd, "t1SetH1", nil)
2603
- modelToBin(_controlcmd, "t1SetH2", nil)
2604
- modelToBin(_controlcmd, "t4H1", nil)
2605
- modelToBin(_controlcmd, "t4H2", nil)
2606
- modelToBin(_controlcmd, "typeVolLmt", nil)
2607
- modelToBin(_controlcmd, "tbhEnFunc", nil)
2608
- modelToBin(_controlcmd, "ibhEnFunc", nil)
2609
- modelToBin(_controlcmd, "timeReportSet", nil)
2610
- end
2611
-
2612
- -- 根据 myTable 生成查询指令
2613
- local function createQueryCmd(intQueryType, msg)
2614
- local _bodyBytes = {}
2615
- -- 构造消息 body 部分
2616
- -- 查询命令类型
2617
- _bodyBytes[0] = intQueryType
2618
- if (intQueryType == cmdTable["MSG_TYPE_QUERY_BASIC"]) then
2619
- elseif (intQueryType == cmdTable["MSG_TYPE_QUERY_DAY_TIME"]) then
2620
- elseif (intQueryType == cmdTable["MSG_TYPE_QUERY_WEEKS_TIME"]) then
2621
- if (msg["queryweekday"] ~= nil) then
2622
- _bodyBytes[1] = string2Int(msg["queryweekday"])
2623
- if (_bodyBytes[1] ~= BIT0) and
2624
- (_bodyBytes[1] ~= BIT1) and
2625
- (_bodyBytes[1] ~= BIT2) and
2626
- (_bodyBytes[1] ~= BIT3) and
2627
- (_bodyBytes[1] ~= BIT4) and
2628
- (_bodyBytes[1] ~= BIT5) and
2629
- (_bodyBytes[1] ~= BIT6) then
2630
- _bodyBytes[1] = BIT0
2631
- end
2632
- else
2633
- _bodyBytes[1] = BIT0
2634
- end
2635
- if (msg["zone2queryweekday"] ~= nil) then
2636
- _bodyBytes[2] = string2Int(msg["zone2queryweekday"])
2637
- if (_bodyBytes[2] ~= BIT0) and
2638
- (_bodyBytes[2] ~= BIT1) and
2639
- (_bodyBytes[2] ~= BIT2) and
2640
- (_bodyBytes[2] ~= BIT3) and
2641
- (_bodyBytes[2] ~= BIT4) and
2642
- (_bodyBytes[2] ~= BIT5) and
2643
- (_bodyBytes[2] ~= BIT6) then
2644
- _bodyBytes[2] = BIT0
2645
- end
2646
- else
2647
- _bodyBytes[2] = BIT0
2648
- end
2649
- elseif (intQueryType == cmdTable["MSG_TYPE_QUERY_HOLIDAY_AWAY"]) then
2650
- elseif (intQueryType == cmdTable["MSG_TYPE_QUERY_SILENCE"]) then
2651
- elseif (intQueryType == cmdTable["MSG_TYPE_QUERY_HOLIDAY_HOME"]) then
2652
- elseif (intQueryType == cmdTable["MSG_TYPE_QUERY_ECO"]) then
2653
- elseif (intQueryType == cmdTable["MSG_TYPE_QUERY_DISINFECT"]) then
2654
- end
2655
- return getTotalMsg(_bodyBytes, cmdTable["MSG_TYPE_QUERY"])
2656
- end
2657
-
2658
- -- 根据 myTable 生成控制指令
2659
- local function createControlCmd(intControlType)
2660
- local _bodyBytes = {}
2661
-
2662
- -- 指令类型
2663
- _bodyBytes[0] = intControlType
2664
- if (_bodyBytes[0] == cmdTable["MSG_TYPE_CONTROL_BASIC"]) then
2665
- _bodyBytes[1] = 0
2666
- _bodyBytes[1] = bit.bor(_bodyBytes[1], myTable["zone1_power_state"])
2667
- _bodyBytes[1] = bit.bor(_bodyBytes[1], myTable["zone2_power_state"])
2668
- _bodyBytes[1] = bit.bor(_bodyBytes[1], myTable["dhw_power_state"])
2669
-
2670
- _bodyBytes[2] = myTable["run_mode_set"]
2671
- _bodyBytes[3] = myTable["zone1_temp_set"]
2672
- _bodyBytes[4] = myTable["zone2_temp_set"]
2673
- _bodyBytes[5] = myTable["dhw_temp_set"]
2674
- _bodyBytes[6] = myTable["room_temp_set"] * 2
2675
-
2676
- _bodyBytes[7] = 0
2677
- _bodyBytes[7] = bit.bor(_bodyBytes[7], myTable["zone1_curve_state"])
2678
- _bodyBytes[7] = bit.bor(_bodyBytes[7], myTable["zone2_curve_state"])
2679
- _bodyBytes[7] = bit.bor(_bodyBytes[7], myTable["forcetbh_state"])
2680
- _bodyBytes[7] = bit.bor(_bodyBytes[7], myTable["fastdhw_state"])
2681
- if (1 == myTable["protocol_newfunction_en"]) then
2682
- _bodyBytes[8] = myTable["zone1_curve_type"]
2683
- _bodyBytes[9] = myTable["zone2_curve_type"]
2684
- end
2685
- elseif (_bodyBytes[0] == cmdTable["MSG_TYPE_CONTROL_DAY_TIMER"]) then
2686
- -- 区域1日定时使能
2687
- _bodyBytes[1] = 0
2688
- _bodyBytes[1] = bit.bor(_bodyBytes[1], myTable["daytimer_timer1en"])
2689
- _bodyBytes[1] = bit.bor(_bodyBytes[1], myTable["daytimer_timer2en"])
2690
- _bodyBytes[1] = bit.bor(_bodyBytes[1], myTable["daytimer_timer3en"])
2691
- _bodyBytes[1] = bit.bor(_bodyBytes[1], myTable["daytimer_timer4en"])
2692
- _bodyBytes[1] = bit.bor(_bodyBytes[1], myTable["daytimer_timer5en"])
2693
- _bodyBytes[1] = bit.bor(_bodyBytes[1], myTable["daytimer_timer6en"])
2694
- -- 日定时1
2695
- _bodyBytes[2] = myTable["daytimer_timer1_mode"]
2696
- _bodyBytes[3] = myTable["daytimer_timer1_temp"]
2697
- _bodyBytes[4] = myTable["daytimer_timer1_openhour"]
2698
- _bodyBytes[5] = myTable["daytimer_timer1_openmin"]
2699
- _bodyBytes[6] = myTable["daytimer_timer1_closehour"]
2700
- _bodyBytes[7] = myTable["daytimer_timer1_closemin"]
2701
- -- 日定时2
2702
- _bodyBytes[8] = myTable["daytimer_timer2_mode"]
2703
- _bodyBytes[9] = myTable["daytimer_timer2_temp"]
2704
- _bodyBytes[10] = myTable["daytimer_timer2_openhour"]
2705
- _bodyBytes[11] = myTable["daytimer_timer2_openmin"]
2706
- _bodyBytes[12] = myTable["daytimer_timer2_closehour"]
2707
- _bodyBytes[13] = myTable["daytimer_timer2_closemin"]
2708
- -- 日定时3
2709
- _bodyBytes[14] = myTable["daytimer_timer3_mode"]
2710
- _bodyBytes[15] = myTable["daytimer_timer3_temp"]
2711
- _bodyBytes[16] = myTable["daytimer_timer3_openhour"]
2712
- _bodyBytes[17] = myTable["daytimer_timer3_openmin"]
2713
- _bodyBytes[18] = myTable["daytimer_timer3_closehour"]
2714
- _bodyBytes[19] = myTable["daytimer_timer3_closemin"]
2715
- -- 日定时4
2716
- _bodyBytes[20] = myTable["daytimer_timer4_mode"]
2717
- _bodyBytes[21] = myTable["daytimer_timer4_temp"]
2718
- _bodyBytes[22] = myTable["daytimer_timer4_openhour"]
2719
- _bodyBytes[23] = myTable["daytimer_timer4_openmin"]
2720
- _bodyBytes[24] = myTable["daytimer_timer4_closehour"]
2721
- _bodyBytes[25] = myTable["daytimer_timer4_closemin"]
2722
- -- 日定时5
2723
- _bodyBytes[26] = myTable["daytimer_timer5_mode"]
2724
- _bodyBytes[27] = myTable["daytimer_timer5_temp"]
2725
- _bodyBytes[28] = myTable["daytimer_timer5_openhour"]
2726
- _bodyBytes[29] = myTable["daytimer_timer5_openmin"]
2727
- _bodyBytes[30] = myTable["daytimer_timer5_closehour"]
2728
- _bodyBytes[31] = myTable["daytimer_timer5_closemin"]
2729
- -- 日定时6
2730
- _bodyBytes[32] = myTable["daytimer_timer6_mode"]
2731
- _bodyBytes[33] = myTable["daytimer_timer6_temp"]
2732
- _bodyBytes[34] = myTable["daytimer_timer6_openhour"]
2733
- _bodyBytes[35] = myTable["daytimer_timer6_openmin"]
2734
- _bodyBytes[36] = myTable["daytimer_timer6_closehour"]
2735
- _bodyBytes[37] = myTable["daytimer_timer6_closemin"]
2736
- --插件下发支持230312V1.2协议
2737
- if (1 == myTable["protocol_newfunction_en"]) then
2738
- -- 区域2日定时使能
2739
- _bodyBytes[38] = 0
2740
- _bodyBytes[38] = bit.bor(_bodyBytes[38], myTable["zone2daytimer_timer1en"])
2741
- _bodyBytes[38] = bit.bor(_bodyBytes[38], myTable["zone2daytimer_timer2en"])
2742
- _bodyBytes[38] = bit.bor(_bodyBytes[38], myTable["zone2daytimer_timer3en"])
2743
- _bodyBytes[38] = bit.bor(_bodyBytes[38], myTable["zone2daytimer_timer4en"])
2744
- _bodyBytes[38] = bit.bor(_bodyBytes[38], myTable["zone2daytimer_timer5en"])
2745
- _bodyBytes[38] = bit.bor(_bodyBytes[38], myTable["zone2daytimer_timer6en"])
2746
- -- 日定时1
2747
- _bodyBytes[39] = myTable["zone2daytimer_timer1_mode"]
2748
- _bodyBytes[40] = myTable["zone2daytimer_timer1_temp"]
2749
- _bodyBytes[41] = myTable["zone2daytimer_timer1_openhour"]
2750
- _bodyBytes[42] = myTable["zone2daytimer_timer1_openmin"]
2751
- _bodyBytes[43] = myTable["zone2daytimer_timer1_closehour"]
2752
- _bodyBytes[44] = myTable["zone2daytimer_timer1_closemin"]
2753
- -- 日定时2
2754
- _bodyBytes[45] = myTable["zone2daytimer_timer2_mode"]
2755
- _bodyBytes[46] = myTable["zone2daytimer_timer2_temp"]
2756
- _bodyBytes[47] = myTable["zone2daytimer_timer2_openhour"]
2757
- _bodyBytes[48] = myTable["zone2daytimer_timer2_openmin"]
2758
- _bodyBytes[49] = myTable["zone2daytimer_timer2_closehour"]
2759
- _bodyBytes[50] = myTable["zone2daytimer_timer2_closemin"]
2760
- -- 日定时3
2761
- _bodyBytes[51] = myTable["zone2daytimer_timer3_mode"]
2762
- _bodyBytes[52] = myTable["zone2daytimer_timer3_temp"]
2763
- _bodyBytes[53] = myTable["zone2daytimer_timer3_openhour"]
2764
- _bodyBytes[54] = myTable["zone2daytimer_timer3_openmin"]
2765
- _bodyBytes[55] = myTable["zone2daytimer_timer3_closehour"]
2766
- _bodyBytes[56] = myTable["zone2daytimer_timer3_closemin"]
2767
- -- 日定时4
2768
- _bodyBytes[57] = myTable["zone2daytimer_timer4_mode"]
2769
- _bodyBytes[58] = myTable["zone2daytimer_timer4_temp"]
2770
- _bodyBytes[59] = myTable["zone2daytimer_timer4_openhour"]
2771
- _bodyBytes[60] = myTable["zone2daytimer_timer4_openmin"]
2772
- _bodyBytes[61] = myTable["zone2daytimer_timer4_closehour"]
2773
- _bodyBytes[62] = myTable["zone2daytimer_timer4_closemin"]
2774
- -- 日定时5
2775
- _bodyBytes[63] = myTable["zone2daytimer_timer5_mode"]
2776
- _bodyBytes[64] = myTable["zone2daytimer_timer5_temp"]
2777
- _bodyBytes[65] = myTable["zone2daytimer_timer5_openhour"]
2778
- _bodyBytes[66] = myTable["zone2daytimer_timer5_openmin"]
2779
- _bodyBytes[67] = myTable["zone2daytimer_timer5_closehour"]
2780
- _bodyBytes[68] = myTable["zone2daytimer_timer5_closemin"]
2781
- -- 日定时6
2782
- _bodyBytes[69] = myTable["zone2daytimer_timer6_mode"]
2783
- _bodyBytes[70] = myTable["zone2daytimer_timer6_temp"]
2784
- _bodyBytes[71] = myTable["zone2daytimer_timer6_openhour"]
2785
- _bodyBytes[72] = myTable["zone2daytimer_timer6_openmin"]
2786
- _bodyBytes[73] = myTable["zone2daytimer_timer6_closehour"]
2787
- _bodyBytes[74] = myTable["zone2daytimer_timer6_closemin"]
2788
- end
2789
- elseif (_bodyBytes[0] == cmdTable["MSG_TYPE_CONTROL_WEEKS_TIMER"]) then
2790
- -- 周定时使能标志
2791
- _bodyBytes[1] = bit.band(0x7f, myTable["weektimer_setday"])
2792
- -- 周定时时间段使能标志
2793
- _bodyBytes[2] = 0
2794
- _bodyBytes[2] = bit.bor(_bodyBytes[2], myTable["weektimer_timer1en"])
2795
- _bodyBytes[2] = bit.bor(_bodyBytes[2], myTable["weektimer_timer2en"])
2796
- _bodyBytes[2] = bit.bor(_bodyBytes[2], myTable["weektimer_timer3en"])
2797
- _bodyBytes[2] = bit.bor(_bodyBytes[2], myTable["weektimer_timer4en"])
2798
- _bodyBytes[2] = bit.bor(_bodyBytes[2], myTable["weektimer_timer5en"])
2799
- _bodyBytes[2] = bit.bor(_bodyBytes[2], myTable["weektimer_timer6en"])
2800
- -- 周定时1
2801
- _bodyBytes[3] = myTable["weektimer_timer1_mode"]
2802
- _bodyBytes[4] = myTable["weektimer_timer1_temp"]
2803
- _bodyBytes[5] = myTable["weektimer_timer1_openhour"]
2804
- _bodyBytes[6] = myTable["weektimer_timer1_openmin"]
2805
- _bodyBytes[7] = myTable["weektimer_timer1_closehour"]
2806
- _bodyBytes[8] = myTable["weektimer_timer1_closemin"]
2807
- --周定时2
2808
- _bodyBytes[9] = myTable["weektimer_timer2_mode"]
2809
- _bodyBytes[10] = myTable["weektimer_timer2_temp"]
2810
- _bodyBytes[11] = myTable["weektimer_timer2_openhour"]
2811
- _bodyBytes[12] = myTable["weektimer_timer2_openmin"]
2812
- _bodyBytes[13] = myTable["weektimer_timer2_closehour"]
2813
- _bodyBytes[14] = myTable["weektimer_timer2_closemin"]
2814
- --周定时3
2815
- _bodyBytes[15] = myTable["weektimer_timer3_mode"]
2816
- _bodyBytes[16] = myTable["weektimer_timer3_temp"]
2817
- _bodyBytes[17] = myTable["weektimer_timer3_openhour"]
2818
- _bodyBytes[18] = myTable["weektimer_timer3_openmin"]
2819
- _bodyBytes[19] = myTable["weektimer_timer3_closehour"]
2820
- _bodyBytes[20] = myTable["weektimer_timer3_closemin"]
2821
- --周定时4
2822
- _bodyBytes[21] = myTable["weektimer_timer4_mode"]
2823
- _bodyBytes[22] = myTable["weektimer_timer4_temp"]
2824
- _bodyBytes[23] = myTable["weektimer_timer4_openhour"]
2825
- _bodyBytes[24] = myTable["weektimer_timer4_openmin"]
2826
- _bodyBytes[25] = myTable["weektimer_timer4_closehour"]
2827
- _bodyBytes[26] = myTable["weektimer_timer4_closemin"]
2828
- --周定时5
2829
- _bodyBytes[27] = myTable["weektimer_timer5_mode"]
2830
- _bodyBytes[28] = myTable["weektimer_timer5_temp"]
2831
- _bodyBytes[29] = myTable["weektimer_timer5_openhour"]
2832
- _bodyBytes[30] = myTable["weektimer_timer5_openmin"]
2833
- _bodyBytes[31] = myTable["weektimer_timer5_closehour"]
2834
- _bodyBytes[32] = myTable["weektimer_timer5_closemin"]
2835
- --周定时6
2836
- _bodyBytes[33] = myTable["weektimer_timer6_mode"]
2837
- _bodyBytes[34] = myTable["weektimer_timer6_temp"]
2838
- _bodyBytes[35] = myTable["weektimer_timer6_openhour"]
2839
- _bodyBytes[36] = myTable["weektimer_timer6_openmin"]
2840
- _bodyBytes[37] = myTable["weektimer_timer6_closehour"]
2841
- _bodyBytes[38] = myTable["weektimer_timer6_closemin"]
2842
- --插件下发支持230312V1.2协议
2843
- if (1 == myTable["protocol_newfunction_en"]) then
2844
- -- 区域2周定时设置日期使能标志
2845
- _bodyBytes[39] = bit.band(0x7f, myTable["zone2weektimer_setday"])
2846
- -- 区域2周定时时间段使能标志
2847
- _bodyBytes[40] = 0
2848
- _bodyBytes[40] = bit.bor(_bodyBytes[40], myTable["zone2weektimer_timer1en"])
2849
- _bodyBytes[40] = bit.bor(_bodyBytes[40], myTable["zone2weektimer_timer2en"])
2850
- _bodyBytes[40] = bit.bor(_bodyBytes[40], myTable["zone2weektimer_timer3en"])
2851
- _bodyBytes[40] = bit.bor(_bodyBytes[40], myTable["zone2weektimer_timer4en"])
2852
- _bodyBytes[40] = bit.bor(_bodyBytes[40], myTable["zone2weektimer_timer5en"])
2853
- _bodyBytes[40] = bit.bor(_bodyBytes[40], myTable["zone2weektimer_timer6en"])
2854
- -- 区域2周定时1
2855
- _bodyBytes[41] = myTable["zone2weektimer_timer1_mode"]
2856
- _bodyBytes[42] = myTable["zone2weektimer_timer1_temp"]
2857
- _bodyBytes[43] = myTable["zone2weektimer_timer1_openhour"]
2858
- _bodyBytes[44] = myTable["zone2weektimer_timer1_openmin"]
2859
- _bodyBytes[45] = myTable["zone2weektimer_timer1_closehour"]
2860
- _bodyBytes[46] = myTable["zone2weektimer_timer1_closemin"]
2861
- -- 区域2周定时2
2862
- _bodyBytes[47] = myTable["zone2weektimer_timer2_mode"]
2863
- _bodyBytes[48] = myTable["zone2weektimer_timer2_temp"]
2864
- _bodyBytes[49] = myTable["zone2weektimer_timer2_openhour"]
2865
- _bodyBytes[50] = myTable["zone2weektimer_timer2_openmin"]
2866
- _bodyBytes[51] = myTable["zone2weektimer_timer2_closehour"]
2867
- _bodyBytes[52] = myTable["zone2weektimer_timer2_closemin"]
2868
- -- 区域2周定时3
2869
- _bodyBytes[53] = myTable["zone2weektimer_timer3_mode"]
2870
- _bodyBytes[54] = myTable["zone2weektimer_timer3_temp"]
2871
- _bodyBytes[55] = myTable["zone2weektimer_timer3_openhour"]
2872
- _bodyBytes[56] = myTable["zone2weektimer_timer3_openmin"]
2873
- _bodyBytes[57] = myTable["zone2weektimer_timer3_closehour"]
2874
- _bodyBytes[58] = myTable["zone2weektimer_timer3_closemin"]
2875
- -- 区域2周定时4
2876
- _bodyBytes[59] = myTable["zone2weektimer_timer4_mode"]
2877
- _bodyBytes[60] = myTable["zone2weektimer_timer4_temp"]
2878
- _bodyBytes[61] = myTable["zone2weektimer_timer4_openhour"]
2879
- _bodyBytes[62] = myTable["zone2weektimer_timer4_openmin"]
2880
- _bodyBytes[63] = myTable["zone2weektimer_timer4_closehour"]
2881
- _bodyBytes[64] = myTable["zone2weektimer_timer4_closemin"]
2882
- -- 区域2周定时5
2883
- _bodyBytes[65] = myTable["zone2weektimer_timer5_mode"]
2884
- _bodyBytes[66] = myTable["zone2weektimer_timer5_temp"]
2885
- _bodyBytes[67] = myTable["zone2weektimer_timer5_openhour"]
2886
- _bodyBytes[68] = myTable["zone2weektimer_timer5_openmin"]
2887
- _bodyBytes[69] = myTable["zone2weektimer_timer5_closehour"]
2888
- _bodyBytes[70] = myTable["zone2weektimer_timer5_closemin"]
2889
- -- 区域2周定时6
2890
- _bodyBytes[71] = myTable["zone2weektimer_timer6_mode"]
2891
- _bodyBytes[72] = myTable["zone2weektimer_timer6_temp"]
2892
- _bodyBytes[73] = myTable["zone2weektimer_timer6_openhour"]
2893
- _bodyBytes[74] = myTable["zone2weektimer_timer6_openmin"]
2894
- _bodyBytes[75] = myTable["zone2weektimer_timer6_closehour"]
2895
- _bodyBytes[76] = myTable["zone2weektimer_timer6_closemin"]
2896
- end
2897
- elseif (_bodyBytes[0] == cmdTable["MSG_TYPE_CONTROL_HOLIDAY_AWAY"]) then
2898
- _bodyBytes[1] = 0
2899
- _bodyBytes[1] = bit.bor(_bodyBytes[1], myTable["holidayaway_state"])
2900
- _bodyBytes[2] = myTable["holidayaway_startyear"]
2901
- _bodyBytes[3] = myTable["holidayaway_startmonth"]
2902
- _bodyBytes[4] = myTable["holidayaway_startdate"]
2903
- _bodyBytes[5] = myTable["holidayaway_endyear"]
2904
- _bodyBytes[6] = myTable["holidayaway_endmonth"]
2905
- _bodyBytes[7] = myTable["holidayaway_enddate"]
2906
- --插件下发支持230312V1.2协议
2907
- if (1 == myTable["protocol_newfunction_en"]) then
2908
- --支持新协议
2909
- _bodyBytes[8] = 0
2910
- _bodyBytes[8] = bit.bor(_bodyBytes[8], myTable["holidayaway_heat_state"])
2911
- _bodyBytes[8] = bit.bor(_bodyBytes[8], myTable["holidayaway_dhw_state"])
2912
- _bodyBytes[8] = bit.bor(_bodyBytes[8], myTable["holidayaway_disinfect_state"])
2913
- end
2914
- elseif (_bodyBytes[0] == cmdTable["MSG_TYPE_CONTROL_SILENCE"]) then
2915
- _bodyBytes[1] = 0
2916
- _bodyBytes[1] = bit.bor(_bodyBytes[1], myTable["silence_function_state"])
2917
- _bodyBytes[1] = bit.bor(_bodyBytes[1], myTable["silence_function_level"])
2918
- _bodyBytes[1] = bit.bor(_bodyBytes[1], myTable["silence_timer1_state"])
2919
- _bodyBytes[1] = bit.bor(_bodyBytes[1], myTable["silence_timer2_state"])
2920
- -- 静音 定时1
2921
- _bodyBytes[2] = myTable["silence_timer1_starthour"]
2922
- _bodyBytes[3] = myTable["silence_timer1_startmin"]
2923
- _bodyBytes[4] = myTable["silence_timer1_endhour"]
2924
- _bodyBytes[5] = myTable["silence_timer1_endmin"]
2925
- -- 静音 定时2
2926
- _bodyBytes[6] = myTable["silence_timer2_starthour"]
2927
- _bodyBytes[7] = myTable["silence_timer2_startmin"]
2928
- _bodyBytes[8] = myTable["silence_timer2_endhour"]
2929
- _bodyBytes[9] = myTable["silence_timer2_endmin"]
2930
- elseif (_bodyBytes[0] == cmdTable["MSG_TYPE_CONTROL_HOLIDAY_HOME"]) then
2931
- _bodyBytes[1] = myTable["holidayhome_state"]
2932
- _bodyBytes[2] = myTable["holidayhome_startyear"]
2933
- _bodyBytes[3] = myTable["holidayhome_startmonth"]
2934
- _bodyBytes[4] = myTable["holidayhome_startdate"]
2935
- _bodyBytes[5] = myTable["holidayhome_endyear"]
2936
- _bodyBytes[6] = myTable["holidayhome_endmonth"]
2937
- _bodyBytes[7] = myTable["holidayhome_enddate"]
2938
- -- holidayhome 定时段使能
2939
- _bodyBytes[8] = 0
2940
- _bodyBytes[8] = bit.bor(_bodyBytes[8], myTable["holhometimer_timer1en"])
2941
- _bodyBytes[8] = bit.bor(_bodyBytes[8], myTable["holhometimer_timer2en"])
2942
- _bodyBytes[8] = bit.bor(_bodyBytes[8], myTable["holhometimer_timer3en"])
2943
- _bodyBytes[8] = bit.bor(_bodyBytes[8], myTable["holhometimer_timer4en"])
2944
- _bodyBytes[8] = bit.bor(_bodyBytes[8], myTable["holhometimer_timer5en"])
2945
- _bodyBytes[8] = bit.bor(_bodyBytes[8], myTable["holhometimer_timer6en"])
2946
- -- holidayhome定时1
2947
- _bodyBytes[9] = myTable["holhometimer_timer1_mode"]
2948
- _bodyBytes[10] = myTable["holhometimer_timer1_temp"]
2949
- _bodyBytes[11] = myTable["holhometimer_timer1_openhour"]
2950
- _bodyBytes[12] = myTable["holhometimer_timer1_openmin"]
2951
- _bodyBytes[13] = myTable["holhometimer_timer1_closehour"]
2952
- _bodyBytes[14] = myTable["holhometimer_timer1_closemin"]
2953
- -- holidayhome定时2
2954
- _bodyBytes[15] = myTable["holhometimer_timer2_mode"]
2955
- _bodyBytes[16] = myTable["holhometimer_timer2_temp"]
2956
- _bodyBytes[17] = myTable["holhometimer_timer2_openhour"]
2957
- _bodyBytes[18] = myTable["holhometimer_timer2_openmin"]
2958
- _bodyBytes[19] = myTable["holhometimer_timer2_closehour"]
2959
- _bodyBytes[20] = myTable["holhometimer_timer2_closemin"]
2960
- -- holidayhome定时3
2961
- _bodyBytes[21] = myTable["holhometimer_timer3_mode"]
2962
- _bodyBytes[22] = myTable["holhometimer_timer3_temp"]
2963
- _bodyBytes[23] = myTable["holhometimer_timer3_openhour"]
2964
- _bodyBytes[24] = myTable["holhometimer_timer3_openmin"]
2965
- _bodyBytes[25] = myTable["holhometimer_timer3_closehour"]
2966
- _bodyBytes[26] = myTable["holhometimer_timer3_closemin"]
2967
- -- holidayhome定时4
2968
- _bodyBytes[27] = myTable["holhometimer_timer4_mode"]
2969
- _bodyBytes[28] = myTable["holhometimer_timer4_temp"]
2970
- _bodyBytes[29] = myTable["holhometimer_timer4_openhour"]
2971
- _bodyBytes[30] = myTable["holhometimer_timer4_openmin"]
2972
- _bodyBytes[31] = myTable["holhometimer_timer4_closehour"]
2973
- _bodyBytes[32] = myTable["holhometimer_timer4_closemin"]
2974
- -- holidayhome定时5
2975
- _bodyBytes[33] = myTable["holhometimer_timer5_mode"]
2976
- _bodyBytes[34] = myTable["holhometimer_timer5_temp"]
2977
- _bodyBytes[35] = myTable["holhometimer_timer5_openhour"]
2978
- _bodyBytes[36] = myTable["holhometimer_timer5_openmin"]
2979
- _bodyBytes[37] = myTable["holhometimer_timer5_closehour"]
2980
- _bodyBytes[38] = myTable["holhometimer_timer5_closemin"]
2981
- -- holidayhome定时6
2982
- _bodyBytes[39] = myTable["holhometimer_timer6_mode"]
2983
- _bodyBytes[40] = myTable["holhometimer_timer6_temp"]
2984
- _bodyBytes[41] = myTable["holhometimer_timer6_openhour"]
2985
- _bodyBytes[42] = myTable["holhometimer_timer6_openmin"]
2986
- _bodyBytes[43] = myTable["holhometimer_timer6_closehour"]
2987
- _bodyBytes[44] = myTable["holhometimer_timer6_closemin"]
2988
- --插件下发支持230312V1.2协议
2989
- if (1 == myTable["protocol_newfunction_en"]) then
2990
- -- holidayhome 区域2定时段使能
2991
- _bodyBytes[45] = 0
2992
- _bodyBytes[45] = bit.bor(_bodyBytes[45], myTable["zone2holhometimer_timer1en"])
2993
- _bodyBytes[45] = bit.bor(_bodyBytes[45], myTable["zone2holhometimer_timer2en"])
2994
- _bodyBytes[45] = bit.bor(_bodyBytes[45], myTable["zone2holhometimer_timer3en"])
2995
- _bodyBytes[45] = bit.bor(_bodyBytes[45], myTable["zone2holhometimer_timer4en"])
2996
- _bodyBytes[45] = bit.bor(_bodyBytes[45], myTable["zone2holhometimer_timer5en"])
2997
- _bodyBytes[45] = bit.bor(_bodyBytes[45], myTable["zone2holhometimer_timer6en"])
2998
- -- holidayhome区域2定时1
2999
- _bodyBytes[46] = myTable["zone2holhometimer_timer1_mode"]
3000
- _bodyBytes[47] = myTable["zone2holhometimer_timer1_temp"]
3001
- _bodyBytes[48] = myTable["zone2holhometimer_timer1_openhour"]
3002
- _bodyBytes[49] = myTable["zone2holhometimer_timer1_openmin"]
3003
- _bodyBytes[50] = myTable["zone2holhometimer_timer1_closehour"]
3004
- _bodyBytes[51] = myTable["zone2holhometimer_timer1_closemin"]
3005
- -- holidayhome区域2定时2
3006
- _bodyBytes[52] = myTable["zone2holhometimer_timer2_mode"]
3007
- _bodyBytes[53] = myTable["zone2holhometimer_timer2_temp"]
3008
- _bodyBytes[54] = myTable["zone2holhometimer_timer2_openhour"]
3009
- _bodyBytes[55] = myTable["zone2holhometimer_timer2_openmin"]
3010
- _bodyBytes[56] = myTable["zone2holhometimer_timer2_closehour"]
3011
- _bodyBytes[57] = myTable["zone2holhometimer_timer2_closemin"]
3012
- -- holidayhome区域2定时3
3013
- _bodyBytes[58] = myTable["zone2holhometimer_timer3_mode"]
3014
- _bodyBytes[59] = myTable["zone2holhometimer_timer3_temp"]
3015
- _bodyBytes[60] = myTable["zone2holhometimer_timer3_openhour"]
3016
- _bodyBytes[61] = myTable["zone2holhometimer_timer3_openmin"]
3017
- _bodyBytes[62] = myTable["zone2holhometimer_timer3_closehour"]
3018
- _bodyBytes[63] = myTable["zone2holhometimer_timer3_closemin"]
3019
- -- holidayhome区域2定时4
3020
- _bodyBytes[64] = myTable["zone2holhometimer_timer4_mode"]
3021
- _bodyBytes[65] = myTable["zone2holhometimer_timer4_temp"]
3022
- _bodyBytes[66] = myTable["zone2holhometimer_timer4_openhour"]
3023
- _bodyBytes[67] = myTable["zone2holhometimer_timer4_openmin"]
3024
- _bodyBytes[68] = myTable["zone2holhometimer_timer4_closehour"]
3025
- _bodyBytes[69] = myTable["zone2holhometimer_timer4_closemin"]
3026
- -- holidayhome区域2定时5
3027
- _bodyBytes[70] = myTable["zone2holhometimer_timer5_mode"]
3028
- _bodyBytes[71] = myTable["zone2holhometimer_timer5_temp"]
3029
- _bodyBytes[72] = myTable["zone2holhometimer_timer5_openhour"]
3030
- _bodyBytes[73] = myTable["zone2holhometimer_timer5_openmin"]
3031
- _bodyBytes[74] = myTable["zone2holhometimer_timer5_closehour"]
3032
- _bodyBytes[75] = myTable["zone2holhometimer_timer5_closemin"]
3033
- -- holidayhome区域2定时6
3034
- _bodyBytes[76] = myTable["zone2holhometimer_timer6_mode"]
3035
- _bodyBytes[77] = myTable["zone2holhometimer_timer6_temp"]
3036
- _bodyBytes[78] = myTable["zone2holhometimer_timer6_openhour"]
3037
- _bodyBytes[79] = myTable["zone2holhometimer_timer6_openmin"]
3038
- _bodyBytes[80] = myTable["zone2holhometimer_timer6_closehour"]
3039
- _bodyBytes[81] = myTable["zone2holhometimer_timer6_closemin"]
3040
- end
3041
- elseif (_bodyBytes[0] == cmdTable["MSG_TYPE_CONTROL_ECO"]) then
3042
- _bodyBytes[1] = 0
3043
- _bodyBytes[1] = bit.bor(_bodyBytes[1], myTable["eco_function_state"])
3044
- _bodyBytes[1] = bit.bor(_bodyBytes[1], myTable["eco_timer_state"])
3045
- -- ECO 定时1
3046
- _bodyBytes[2] = myTable["eco_timer_starthour"]
3047
- _bodyBytes[3] = myTable["eco_timer_startmin"]
3048
- _bodyBytes[4] = myTable["eco_timer_endhour"]
3049
- _bodyBytes[5] = myTable["eco_timer_endmin"]
3050
- --插件下发支持230312V1.2协议
3051
- if (1 == myTable["protocol_newfunction_en"]) then
3052
- --支持新协议
3053
- _bodyBytes[6] = myTable["eco_curve_type"]
3054
- end
3055
- -- DISINFECT
3056
- elseif (_bodyBytes[0] == cmdTable["MSG_TYPE_CONTROL_DISINFECT"]) then
3057
- _bodyBytes[1] = 0
3058
- _bodyBytes[1] = bit.bor(_bodyBytes[1], myTable["disinfect_function_state"])
3059
- _bodyBytes[1] = bit.bor(_bodyBytes[1], myTable["disinfect_run_state"])
3060
- _bodyBytes[2] = bit.band(0xff, myTable["disinfect_setweekday"])
3061
- _bodyBytes[3] = myTable["disinfect_starthour"]
3062
- _bodyBytes[4] = myTable["disinfect_startmin"]
3063
- elseif (_bodyBytes[0] == cmdTable["MSG_TYPE_CONTROL_INSTALL"]) then
3064
- _bodyBytes[1] = 0
3065
- _bodyBytes[1] = bit.bor(_bodyBytes[1], myTable["dhwEnable"])
3066
- _bodyBytes[1] = bit.bor(_bodyBytes[1], myTable["boostertbhEn"])
3067
- _bodyBytes[1] = bit.bor(_bodyBytes[1], myTable["disinfectEnable"])
3068
- _bodyBytes[1] = bit.bor(_bodyBytes[1], myTable["dhwPumpEnable"])
3069
- _bodyBytes[1] = bit.bor(_bodyBytes[1], myTable["coolEnable"])
3070
- _bodyBytes[2] = 0
3071
- _bodyBytes[2] = bit.bor(_bodyBytes[2], myTable["heatEnable"])
3072
- _bodyBytes[2] = bit.bor(_bodyBytes[2], myTable["roomTherEn"])
3073
- _bodyBytes[2] = bit.bor(_bodyBytes[2], myTable["roomTherSetModeEn"])
3074
- _bodyBytes[2] = bit.bor(_bodyBytes[2], myTable["dualroomThermostatEn"])
3075
- _bodyBytes[3] = 0
3076
- _bodyBytes[3] = bit.bor(_bodyBytes[3], myTable["pipeExceed10m"])
3077
- _bodyBytes[4] = 0
3078
- _bodyBytes[4] = bit.bor(_bodyBytes[4], myTable["smartgridEn"])
3079
- _bodyBytes[5] = myTable["roomTherType"]
3080
- _bodyBytes[6] = myTable["dT5On"]
3081
- _bodyBytes[7] = 0
3082
- _bodyBytes[8] = myTable["dT1S5"]
3083
- _bodyBytes[9] = 255
3084
- _bodyBytes[10] = 255
3085
- _bodyBytes[11] = 0
3086
- _bodyBytes[12] = myTable["t4Dhwmax"]
3087
- _bodyBytes[13] = 0
3088
- _bodyBytes[14] = myTable["t4Dhwmin"]
3089
- _bodyBytes[15] = 255
3090
- _bodyBytes[16] = 255
3091
- _bodyBytes[17] = 255
3092
- _bodyBytes[18] = 255
3093
- _bodyBytes[19] = 0
3094
- _bodyBytes[20] = myTable["t4TBHon"]
3095
- _bodyBytes[21] = 255
3096
- _bodyBytes[22] = 255
3097
- _bodyBytes[23] = 255
3098
- _bodyBytes[24] = 255
3099
- _bodyBytes[25] = 255
3100
- _bodyBytes[26] = 255
3101
- _bodyBytes[27] = 255
3102
- _bodyBytes[28] = 255
3103
- _bodyBytes[29] = 0
3104
- _bodyBytes[30] = myTable["dT1SC"]
3105
- _bodyBytes[31] = 0
3106
- _bodyBytes[32] = myTable["dTSC"]
3107
- _bodyBytes[33] = 0
3108
- _bodyBytes[34] = myTable["t4Cmax"]
3109
- _bodyBytes[35] = 0
3110
- _bodyBytes[36] = myTable["t4Cmin"]
3111
- _bodyBytes[37] = 255
3112
- _bodyBytes[38] = 255
3113
- _bodyBytes[39] = 0
3114
- _bodyBytes[40] = myTable["dT1SH"]
3115
- _bodyBytes[41] = 0
3116
- _bodyBytes[42] = myTable["dTSH"]
3117
- _bodyBytes[43] = 0
3118
- _bodyBytes[44] = myTable["t4Hmax"]
3119
- _bodyBytes[45] = 0
3120
- _bodyBytes[46] = myTable["t4Hmin"]
3121
- _bodyBytes[47] = 0
3122
- _bodyBytes[48] = myTable["t4IBHon"]
3123
- _bodyBytes[49] = 255
3124
- _bodyBytes[50] = 255
3125
- _bodyBytes[51] = 255
3126
- _bodyBytes[52] = 255
3127
- _bodyBytes[53] = 255
3128
- _bodyBytes[54] = 255
3129
- _bodyBytes[55] = 255
3130
- _bodyBytes[56] = 255
3131
- _bodyBytes[57] = 255
3132
- _bodyBytes[58] = 255
3133
- _bodyBytes[59] = 255
3134
- _bodyBytes[60] = 255
3135
- _bodyBytes[61] = 255
3136
- _bodyBytes[62] = 255
3137
- _bodyBytes[63] = 255
3138
- _bodyBytes[64] = 255
3139
- _bodyBytes[65] = 255
3140
- _bodyBytes[66] = 255
3141
- _bodyBytes[67] = 0
3142
- _bodyBytes[68] = myTable["t4autocmin"]
3143
- _bodyBytes[69] = 0
3144
- _bodyBytes[70] = myTable["t4autohmax"]
3145
- _bodyBytes[71] = 255
3146
- _bodyBytes[72] = 255
3147
- _bodyBytes[73] = 255
3148
- _bodyBytes[74] = 255
3149
- _bodyBytes[75] = 255
3150
- _bodyBytes[76] = 255
3151
- _bodyBytes[77] = 255
3152
- _bodyBytes[78] = 255
3153
- _bodyBytes[79] = 255
3154
- _bodyBytes[80] = 255
3155
- _bodyBytes[81] = 0
3156
- _bodyBytes[82] = myTable["powerIbh1"] * 10
3157
- _bodyBytes[83] = 0
3158
- _bodyBytes[84] = myTable["powerIbh2"] * 10
3159
- _bodyBytes[85] = 0
3160
- _bodyBytes[86] = myTable["powerTbh"] * 10
3161
- _bodyBytes[87] = 255
3162
- _bodyBytes[88] = 255
3163
- _bodyBytes[89] = 255
3164
- _bodyBytes[90] = 255
3165
- _bodyBytes[91] = 255
3166
- _bodyBytes[92] = 255
3167
- _bodyBytes[93] = 255
3168
- _bodyBytes[94] = 255
3169
- _bodyBytes[95] = 255
3170
- _bodyBytes[96] = 255
3171
- _bodyBytes[97] = 255
3172
- _bodyBytes[98] = 255
3173
- _bodyBytes[99] = 255
3174
- _bodyBytes[100] = 255
3175
- _bodyBytes[101] = 255
3176
- _bodyBytes[102] = 255
3177
- _bodyBytes[103] = 0
3178
- _bodyBytes[103] = bit.bor(_bodyBytes[103], myTable["ibhEnFunc"])
3179
-
3180
- _bodyBytes[104] = 0
3181
- _bodyBytes[104] = bit.bor(_bodyBytes[104], myTable["tbhEnFunc"])
3182
- _bodyBytes[105] = myTable["timeReportSet"]
3183
- _bodyBytes[106] = 255
3184
- _bodyBytes[107] = 255
3185
- _bodyBytes[108] = 255
3186
- _bodyBytes[109] = 255
3187
- _bodyBytes[110] = 255
3188
- _bodyBytes[111] = 255
3189
- _bodyBytes[112] = 255
3190
- _bodyBytes[113] = 0
3191
- _bodyBytes[114] = myTable["t1SetC1"]
3192
- _bodyBytes[115] = 0
3193
- _bodyBytes[116] = myTable["t1SetC2"]
3194
- _bodyBytes[117] = 0
3195
- _bodyBytes[117] = 0
3196
- _bodyBytes[118] = myTable["t4C1"]
3197
- _bodyBytes[119] = 0
3198
- _bodyBytes[120] = myTable["t4C2"]
3199
- _bodyBytes[121] = 0
3200
- _bodyBytes[122] = myTable["t1SetH1"]
3201
- _bodyBytes[123] = 0
3202
- _bodyBytes[124] = myTable["t1SetH2"]
3203
- _bodyBytes[125] = 0
3204
- _bodyBytes[126] = myTable["t4H1"]
3205
- _bodyBytes[127] = 0
3206
- _bodyBytes[128] = myTable["t4H2"]
3207
- _bodyBytes[129] = 0
3208
- _bodyBytes[130] = myTable["typeVolLmt"]
3209
- _bodyBytes[131] = 0xff
3210
- _bodyBytes[132] = 0xff
3211
- _bodyBytes[133] = 0xff
3212
- _bodyBytes[134] = 0xff
3213
- _bodyBytes[135] = 0xff
3214
- _bodyBytes[136] = 0xff
3215
- _bodyBytes[137] = 0xff
3216
- _bodyBytes[138] = 0xff
3217
- _bodyBytes[139] = 0xff
3218
- _bodyBytes[140] = 0xff
3219
- end
3220
- -- 构造消息部分
3221
- return getTotalMsg(_bodyBytes, cmdTable["MSG_TYPE_CONTROL"])
3222
- end
3223
-
3224
- -- json转二进制,可传入原状态
3225
- function jsonToData(jsonCmd)
3226
- if (#jsonCmd == 0) then
3227
- return nil
3228
- end
3229
-
3230
- local _infoM = {}
3231
- local _json = decode(jsonCmd)
3232
- local _deviceSubType = _json["deviceinfo"]["deviceSubType"]
3233
-
3234
- -- 根据设备子类型来处理协议差异
3235
- if (_deviceSubType == 1) then
3236
-
3237
- end
3238
-
3239
- local _query = _json[unitTable["str_query"]]
3240
- local _control = _json[unitTable["str_control"]]
3241
- local _status = _json[unitTable["str_status"]]
3242
-
3243
- if (_query) then
3244
- if (_query[unitTable["str_query_type"]] ~= nil) then
3245
- _infoM = createQueryCmd(string2Int(_query[unitTable["str_query_type"]]), _query)
3246
- else
3247
- _infoM = createQueryCmd(cmdTable["MSG_TYPE_QUERY_BASIC"], _query) -- 默认
3248
- end
3249
- elseif (_control) then
3250
- -- 先将原始状态转为属性
3251
- if (_status) then
3252
- jsonToModel(_status)
3253
- end
3254
- -- 将用户控制jsion转换为属性
3255
- jsonToModel(_control)
3256
-
3257
- if (_control[unitTable["str_control_type"]] ~= nil) then
3258
- _infoM = createControlCmd(string2Int(_control[unitTable["str_control_type"]]))
3259
- else
3260
- _infoM = createControlCmd(cmdTable["MSG_TYPE_CONTROL_BASIC"]) -- 默认
3261
- end
3262
- end
3263
-
3264
- local ret = table2string(_infoM)
3265
- ret = string2hexstring(ret)
3266
- return ret
3267
- end
3268
-
3269
- -- 二进制转json
3270
- function dataToJson(jsonCmd)
3271
- if (not jsonCmd) then
3272
- return nil
3273
- end
3274
-
3275
- local _json = decode(jsonCmd)
3276
- local _deviceinfo = _json["deviceinfo"]
3277
- local _deviceSubType = _deviceinfo["deviceSubType"]
3278
-
3279
- -- 根据设备子类型来处理协议差异
3280
- if (_deviceSubType == 1) then
3281
-
3282
- end
3283
-
3284
- local _status = _json[unitTable["str_status"]]
3285
- if (_status) then
3286
- jsonToModel(_status)
3287
- end
3288
-
3289
- local binData = _json["msg"]["data"]
3290
- local info = {}
3291
- local msgBytes = { 0 }
3292
- local msgLength = 0
3293
- local _bodyBytes = {}
3294
- local bodyLength = 0
3295
- local _msgType = 0
3296
- local _msgBodyType = 0
3297
-
3298
- info = string2table(binData)
3299
-
3300
- for i = 1, #info do
3301
- msgBytes[i - 1] = info[i]
3302
- end
3303
-
3304
- msgLength = msgBytes[1] --length
3305
- bodyLength = msgLength - cmdTable["PROTOCOL_LENGTH"] - 1
3306
- -- 消息体类型
3307
- _msgType = msgBytes[9]
3308
- -- 消息体开头第一位,消息体类型
3309
- _msgBodyType = msgBytes[10]
3310
- -- 获取 body 部分
3311
- for i = 0, bodyLength do
3312
- _bodyBytes[i] = msgBytes[i + cmdTable["PROTOCOL_LENGTH"]]
3313
- end
3314
- --end
3315
-
3316
- -- 将属性值转换为最终 table
3317
- local streams = {}
3318
- -- 版本
3319
- streams["version"] = JSON_VERSION
3320
- -- 将二进制状态解析为属性值
3321
- if (((_msgType == cmdTable["MSG_TYPE_CONTROL"]) and (_msgBodyType == cmdTable["MSG_TYPE_CONTROL_BASIC"])) or
3322
- ((_msgType == cmdTable["MSG_TYPE_QUERY"]) and (_msgBodyType == cmdTable["MSG_TYPE_QUERY_BASIC"])) or
3323
- (_msgType == cmdTable["MSG_TYPE_UP"])) and (_msgBodyType == cmdTable["MSG_TYPE_UP_BASIC"]) then
3324
- -- 基本状态的控制回复02-01、查询03-01、上报04-01(电控回复数据组包)
3325
- binToModel(streams, "msg_up_type", cmdTable["MSG_TYPE_UP_BASIC"], nil)
3326
- binToModel(streams, "zone1_power_state", _bodyBytes[1], BIT0)
3327
- binToModel(streams, "zone2_power_state", _bodyBytes[1], BIT1)
3328
- binToModel(streams, "dhw_power_state", _bodyBytes[1], BIT2)
3329
- binToModel(streams, "zone1_curve_state", _bodyBytes[1], BIT3)
3330
- binToModel(streams, "zone2_curve_state", _bodyBytes[1], BIT4)
3331
- binToModel(streams, "forcetbh_state", _bodyBytes[1], BIT5)
3332
- binToModel(streams, "fastdhw_state", _bodyBytes[1], BIT6)
3333
- binToModel(streams, "remote_onoff", _bodyBytes[1], BIT7)
3334
-
3335
- binToModel(streams, "heat_enable", _bodyBytes[2], BIT0)
3336
- binToModel(streams, "cool_enable", _bodyBytes[2], BIT1)
3337
- binToModel(streams, "dhw_enable", _bodyBytes[2], BIT2)
3338
- binToModel(streams, "double_zone_enable", _bodyBytes[2], BIT3)
3339
- binToModel(streams, "zone1_temp_type", _bodyBytes[2], BIT4)
3340
- binToModel(streams, "zone2_temp_type", _bodyBytes[2], BIT5)
3341
- binToModel(streams, "room_thermalen_state", _bodyBytes[2], BIT6)
3342
- binToModel(streams, "room_thermalmode_state", _bodyBytes[2], BIT7)
3343
-
3344
- binToModel(streams, "time_set_state", _bodyBytes[3], BIT0)
3345
- binToModel(streams, "silence_on_state", _bodyBytes[3], BIT1)
3346
- binToModel(streams, "holiday_on_state", _bodyBytes[3], BIT2)
3347
- binToModel(streams, "eco_on_state", _bodyBytes[3], BIT3)
3348
- binToModel(streams, "zone1_terminal_type", _bodyBytes[3], nil)
3349
- binToModel(streams, "zone2_terminal_type", _bodyBytes[3], nil)
3350
-
3351
- binToModel(streams, "run_mode_set", _bodyBytes[4], nil)
3352
- binToModel(streams, "runmode_under_auto", _bodyBytes[5], nil)
3353
- binToModel(streams, "zone1_temp_set", _bodyBytes[6], nil)
3354
- binToModel(streams, "zone2_temp_set", _bodyBytes[7], nil)
3355
- binToModel(streams, "dhw_temp_set", _bodyBytes[8], nil)
3356
- binToModel(streams, "room_temp_set", _bodyBytes[9] / 2, nil)
3357
- --区域1设定温度范围
3358
- binToModel(streams, "zone1_heat_max_set_temp", _bodyBytes[10], nil)
3359
- binToModel(streams, "zone1_heat_min_set_temp", _bodyBytes[11], nil)
3360
- binToModel(streams, "zone1_cool_max_set_temp", _bodyBytes[12], nil)
3361
- binToModel(streams, "zone1_cool_min_set_temp", _bodyBytes[13], nil)
3362
- --区域2设定温度范围
3363
- binToModel(streams, "zone2_heat_max_set_temp", _bodyBytes[14], nil)
3364
- binToModel(streams, "zone2_heat_min_set_temp", _bodyBytes[15], nil)
3365
- binToModel(streams, "zone2_cool_max_set_temp", _bodyBytes[16], nil)
3366
- binToModel(streams, "zone2_cool_min_set_temp", _bodyBytes[17], nil)
3367
-
3368
- binToModel(streams, "room_max_set_temp", _bodyBytes[18] / 2, nil)
3369
- binToModel(streams, "room_min_set_temp", _bodyBytes[19] / 2, nil)
3370
- binToModel(streams, "dhw_max_set_temp", _bodyBytes[20], nil)
3371
- binToModel(streams, "dhw_min_set_temp", _bodyBytes[21], nil)
3372
- binToModel(streams, "tank_actual_temp", _bodyBytes[22], nil)
3373
- binToModel(streams, "error_code", _bodyBytes[23], nil)
3374
- binToModel(streams, "SysEnergyAnaEN", _bodyBytes[24], BIT5)
3375
- binToModel(streams, "HMIEnergyAnaSetEN", _bodyBytes[24], BIT6)
3376
- --binToModel(streams, "protocol_newfunction_en", _bodyBytes[24], BIT7)
3377
- binToModel(streams, "boostertbh_en", _bodyBytes[24], BIT7)
3378
- --回复支持230312V1.2协议
3379
- if (bodyLength > 24) then
3380
- binToModel(streams, "protocol_newfunction_en", 1, BIT0)
3381
- --新增温度曲线设定
3382
- binToModel(streams, "zone1_curve_type", _bodyBytes[25], nil)
3383
- binToModel(streams, "zone2_curve_type", _bodyBytes[26], nil)
3384
- else
3385
- binToModel(streams, "protocol_newfunction_en", 0, BIT0)
3386
- --新增温度曲线设定
3387
- end
3388
- elseif ((_msgType == cmdTable["MSG_TYPE_QUERY"]) and (_msgBodyType == cmdTable["MSG_TYPE_QUERY_DAY_TIME"])) then
3389
- -- 日定时查询
3390
- -- 区域1日定时使能
3391
- binToModel(streams, "daytimer_timer1en", _bodyBytes[1], BIT0)
3392
- binToModel(streams, "daytimer_timer2en", _bodyBytes[1], BIT1)
3393
- binToModel(streams, "daytimer_timer3en", _bodyBytes[1], BIT2)
3394
- binToModel(streams, "daytimer_timer4en", _bodyBytes[1], BIT3)
3395
- binToModel(streams, "daytimer_timer5en", _bodyBytes[1], BIT4)
3396
- binToModel(streams, "daytimer_timer6en", _bodyBytes[1], BIT5)
3397
- --22-12-19 增加protocol_newfunction_en
3398
- --binToModel(streams, "protocol_newfunction_en", _bodyBytes[1], BIT7)
3399
- -- 日定时 1
3400
- binToModel(streams, "daytimer_timer1_mode", _bodyBytes[2], nil)
3401
- binToModel(streams, "daytimer_timer1_temp", _bodyBytes[3], nil)
3402
- binToModel(streams, "daytimer_timer1_openhour", _bodyBytes[4], nil)
3403
- binToModel(streams, "daytimer_timer1_openmin", _bodyBytes[5], nil)
3404
- binToModel(streams, "daytimer_timer1_closehour", _bodyBytes[6], nil)
3405
- binToModel(streams, "daytimer_timer1_closemin", _bodyBytes[7], nil)
3406
- -- 日定时 2
3407
- binToModel(streams, "daytimer_timer2_mode", _bodyBytes[8], nil)
3408
- binToModel(streams, "daytimer_timer2_temp", _bodyBytes[9], nil)
3409
- binToModel(streams, "daytimer_timer2_openhour", _bodyBytes[10], nil)
3410
- binToModel(streams, "daytimer_timer2_openmin", _bodyBytes[11], nil)
3411
- binToModel(streams, "daytimer_timer2_closehour", _bodyBytes[12], nil)
3412
- binToModel(streams, "daytimer_timer2_closemin", _bodyBytes[13], nil)
3413
- -- 日定时 3
3414
- binToModel(streams, "daytimer_timer3_mode", _bodyBytes[14], nil)
3415
- binToModel(streams, "daytimer_timer3_temp", _bodyBytes[15], nil)
3416
- binToModel(streams, "daytimer_timer3_openhour", _bodyBytes[16], nil)
3417
- binToModel(streams, "daytimer_timer3_openmin", _bodyBytes[17], nil)
3418
- binToModel(streams, "daytimer_timer3_closehour", _bodyBytes[18], nil)
3419
- binToModel(streams, "daytimer_timer3_closemin", _bodyBytes[19], nil)
3420
- -- 日定时 4
3421
- binToModel(streams, "daytimer_timer4_mode", _bodyBytes[20], nil)
3422
- binToModel(streams, "daytimer_timer4_temp", _bodyBytes[21], nil)
3423
- binToModel(streams, "daytimer_timer4_openhour", _bodyBytes[22], nil)
3424
- binToModel(streams, "daytimer_timer4_openmin", _bodyBytes[23], nil)
3425
- binToModel(streams, "daytimer_timer4_closehour", _bodyBytes[24], nil)
3426
- binToModel(streams, "daytimer_timer4_closemin", _bodyBytes[25], nil)
3427
- -- 日定时 5
3428
- binToModel(streams, "daytimer_timer5_mode", _bodyBytes[26], nil)
3429
- binToModel(streams, "daytimer_timer5_temp", _bodyBytes[27], nil)
3430
- binToModel(streams, "daytimer_timer5_openhour", _bodyBytes[28], nil)
3431
- binToModel(streams, "daytimer_timer5_openmin", _bodyBytes[29], nil)
3432
- binToModel(streams, "daytimer_timer5_closehour", _bodyBytes[30], nil)
3433
- binToModel(streams, "daytimer_timer5_closemin", _bodyBytes[31], nil)
3434
- -- 日定时 6
3435
- binToModel(streams, "daytimer_timer6_mode", _bodyBytes[32], nil)
3436
- binToModel(streams, "daytimer_timer6_temp", _bodyBytes[33], nil)
3437
- binToModel(streams, "daytimer_timer6_openhour", _bodyBytes[34], nil)
3438
- binToModel(streams, "daytimer_timer6_openmin", _bodyBytes[35], nil)
3439
- binToModel(streams, "daytimer_timer6_closehour", _bodyBytes[36], nil)
3440
- binToModel(streams, "daytimer_timer6_closemin", _bodyBytes[37], nil)
3441
- --支持230312V1.2协议
3442
- if (bodyLength > 37) then
3443
- binToModel(streams, "protocol_newfunction_en", 1, BIT0)
3444
-
3445
- -- 区域2日定时使能
3446
- binToModel(streams, "zone2daytimer_timer1en", _bodyBytes[38], BIT0)
3447
- binToModel(streams, "zone2daytimer_timer2en", _bodyBytes[38], BIT1)
3448
- binToModel(streams, "zone2daytimer_timer3en", _bodyBytes[38], BIT2)
3449
- binToModel(streams, "zone2daytimer_timer4en", _bodyBytes[38], BIT3)
3450
- binToModel(streams, "zone2daytimer_timer5en", _bodyBytes[38], BIT4)
3451
- binToModel(streams, "zone2daytimer_timer6en", _bodyBytes[38], BIT5)
3452
- -- 区域2日定时 1
3453
- binToModel(streams, "zone2daytimer_timer1_mode", _bodyBytes[39], nil)
3454
- binToModel(streams, "zone2daytimer_timer1_temp", _bodyBytes[40], nil)
3455
- binToModel(streams, "zone2daytimer_timer1_openhour", _bodyBytes[41], nil)
3456
- binToModel(streams, "zone2daytimer_timer1_openmin", _bodyBytes[42], nil)
3457
- binToModel(streams, "zone2daytimer_timer1_closehour", _bodyBytes[43], nil)
3458
- binToModel(streams, "zone2daytimer_timer1_closemin", _bodyBytes[44], nil)
3459
- -- 区域2日定时 2
3460
- binToModel(streams, "zone2daytimer_timer2_mode", _bodyBytes[45], nil)
3461
- binToModel(streams, "zone2daytimer_timer2_temp", _bodyBytes[46], nil)
3462
- binToModel(streams, "zone2daytimer_timer2_openhour", _bodyBytes[47], nil)
3463
- binToModel(streams, "zone2daytimer_timer2_openmin", _bodyBytes[48], nil)
3464
- binToModel(streams, "zone2daytimer_timer2_closehour", _bodyBytes[49], nil)
3465
- binToModel(streams, "zone2daytimer_timer2_closemin", _bodyBytes[50], nil)
3466
- -- 区域2日定时 3
3467
- binToModel(streams, "zone2daytimer_timer3_mode", _bodyBytes[51], nil)
3468
- binToModel(streams, "zone2daytimer_timer3_temp", _bodyBytes[52], nil)
3469
- binToModel(streams, "zone2daytimer_timer3_openhour", _bodyBytes[53], nil)
3470
- binToModel(streams, "zone2daytimer_timer3_openmin", _bodyBytes[54], nil)
3471
- binToModel(streams, "zone2daytimer_timer3_closehour", _bodyBytes[55], nil)
3472
- binToModel(streams, "zone2daytimer_timer3_closemin", _bodyBytes[56], nil)
3473
- -- 区域2日定时 4
3474
- binToModel(streams, "zone2daytimer_timer4_mode", _bodyBytes[57], nil)
3475
- binToModel(streams, "zone2daytimer_timer4_temp", _bodyBytes[58], nil)
3476
- binToModel(streams, "zone2daytimer_timer4_openhour", _bodyBytes[59], nil)
3477
- binToModel(streams, "zone2daytimer_timer4_openmin", _bodyBytes[60], nil)
3478
- binToModel(streams, "zone2daytimer_timer4_closehour", _bodyBytes[61], nil)
3479
- binToModel(streams, "zone2daytimer_timer4_closemin", _bodyBytes[62], nil)
3480
- -- 区域2日定时 5
3481
- binToModel(streams, "zone2daytimer_timer5_mode", _bodyBytes[63], nil)
3482
- binToModel(streams, "zone2daytimer_timer5_temp", _bodyBytes[64], nil)
3483
- binToModel(streams, "zone2daytimer_timer5_openhour", _bodyBytes[65], nil)
3484
- binToModel(streams, "zone2daytimer_timer5_openmin", _bodyBytes[66], nil)
3485
- binToModel(streams, "zone2daytimer_timer5_closehour", _bodyBytes[67], nil)
3486
- binToModel(streams, "zone2daytimer_timer5_closemin", _bodyBytes[68], nil)
3487
- -- 区域2日定时 6
3488
- binToModel(streams, "zone2daytimer_timer6_mode", _bodyBytes[69], nil)
3489
- binToModel(streams, "zone2daytimer_timer6_temp", _bodyBytes[70], nil)
3490
- binToModel(streams, "zone2daytimer_timer6_openhour", _bodyBytes[71], nil)
3491
- binToModel(streams, "zone2daytimer_timer6_openmin", _bodyBytes[72], nil)
3492
- binToModel(streams, "zone2daytimer_timer6_closehour", _bodyBytes[73], nil)
3493
- binToModel(streams, "zone2daytimer_timer6_closemin", _bodyBytes[74], nil)
3494
- end
3495
- elseif ((_msgType == cmdTable["MSG_TYPE_QUERY"]) and (_msgBodyType == cmdTable["MSG_TYPE_QUERY_WEEKS_TIME"])) then
3496
- -- 周定时查询
3497
- -- 周定时使能
3498
- binToModel(streams, "weektimer_weeken", _bodyBytes[1], nil)
3499
- binToModel(streams, "weektimer_timer1en", _bodyBytes[2], BIT0)
3500
- binToModel(streams, "weektimer_timer2en", _bodyBytes[2], BIT1)
3501
- binToModel(streams, "weektimer_timer3en", _bodyBytes[2], BIT2)
3502
- binToModel(streams, "weektimer_timer4en", _bodyBytes[2], BIT3)
3503
- binToModel(streams, "weektimer_timer5en", _bodyBytes[2], BIT4)
3504
- binToModel(streams, "weektimer_timer6en", _bodyBytes[2], BIT5)
3505
- --22-12-19 增加protocol_newfunction_en
3506
- --binToModel(streams, "protocol_newfunction_en", _bodyBytes[2], BIT7)
3507
- -- 周定时 1
3508
- binToModel(streams, "weektimer_timer1_mode", _bodyBytes[3], nil)
3509
- binToModel(streams, "weektimer_timer1_temp", _bodyBytes[4], nil)
3510
- binToModel(streams, "weektimer_timer1_openhour", _bodyBytes[5], nil)
3511
- binToModel(streams, "weektimer_timer1_openmin", _bodyBytes[6], nil)
3512
- binToModel(streams, "weektimer_timer1_closehour", _bodyBytes[7], nil)
3513
- binToModel(streams, "weektimer_timer1_closemin", _bodyBytes[8], nil)
3514
- -- 周定时 2
3515
- binToModel(streams, "weektimer_timer2_mode", _bodyBytes[9], nil)
3516
- binToModel(streams, "weektimer_timer2_temp", _bodyBytes[10], nil)
3517
- binToModel(streams, "weektimer_timer2_openhour", _bodyBytes[11], nil)
3518
- binToModel(streams, "weektimer_timer2_openmin", _bodyBytes[12], nil)
3519
- binToModel(streams, "weektimer_timer2_closehour", _bodyBytes[13], nil)
3520
- binToModel(streams, "weektimer_timer2_closemin", _bodyBytes[14], nil)
3521
- -- 周定时 3
3522
- binToModel(streams, "weektimer_timer3_mode", _bodyBytes[15], nil)
3523
- binToModel(streams, "weektimer_timer3_temp", _bodyBytes[16], nil)
3524
- binToModel(streams, "weektimer_timer3_openhour", _bodyBytes[17], nil)
3525
- binToModel(streams, "weektimer_timer3_openmin", _bodyBytes[18], nil)
3526
- binToModel(streams, "weektimer_timer3_closehour", _bodyBytes[19], nil)
3527
- binToModel(streams, "weektimer_timer3_closemin", _bodyBytes[20], nil)
3528
- -- 周定时 4
3529
- binToModel(streams, "weektimer_timer4_mode", _bodyBytes[21], nil)
3530
- binToModel(streams, "weektimer_timer4_temp", _bodyBytes[22], nil)
3531
- binToModel(streams, "weektimer_timer4_openhour", _bodyBytes[23], nil)
3532
- binToModel(streams, "weektimer_timer4_openmin", _bodyBytes[24], nil)
3533
- binToModel(streams, "weektimer_timer4_closehour", _bodyBytes[25], nil)
3534
- binToModel(streams, "weektimer_timer4_closemin", _bodyBytes[26], nil)
3535
- -- 周定时 5
3536
- binToModel(streams, "weektimer_timer5_mode", _bodyBytes[27], nil)
3537
- binToModel(streams, "weektimer_timer5_temp", _bodyBytes[28], nil)
3538
- binToModel(streams, "weektimer_timer5_openhour", _bodyBytes[29], nil)
3539
- binToModel(streams, "weektimer_timer5_openmin", _bodyBytes[30], nil)
3540
- binToModel(streams, "weektimer_timer5_closehour", _bodyBytes[31], nil)
3541
- binToModel(streams, "weektimer_timer5_closemin", _bodyBytes[32], nil)
3542
- -- 周定时 6
3543
- binToModel(streams, "weektimer_timer6_mode", _bodyBytes[33], nil)
3544
- binToModel(streams, "weektimer_timer6_temp", _bodyBytes[34], nil)
3545
- binToModel(streams, "weektimer_timer6_openhour", _bodyBytes[35], nil)
3546
- binToModel(streams, "weektimer_timer6_openmin", _bodyBytes[36], nil)
3547
- binToModel(streams, "weektimer_timer6_closehour", _bodyBytes[37], nil)
3548
- binToModel(streams, "weektimer_timer6_closemin", _bodyBytes[38], nil)
3549
- --支持230312V1.2协议
3550
- if (bodyLength > 38) then
3551
- binToModel(streams, "protocol_newfunction_en", 1, BIT0)
3552
- --周定时区域2查询日期及时段使能
3553
- binToModel(streams, "zone2weektimer_weeken", _bodyBytes[39], nil)
3554
- binToModel(streams, "zone2weektimer_timer1en", _bodyBytes[40], BIT0)
3555
- binToModel(streams, "zone2weektimer_timer2en", _bodyBytes[40], BIT1)
3556
- binToModel(streams, "zone2weektimer_timer3en", _bodyBytes[40], BIT2)
3557
- binToModel(streams, "zone2weektimer_timer4en", _bodyBytes[40], BIT3)
3558
- binToModel(streams, "zone2weektimer_timer5en", _bodyBytes[40], BIT4)
3559
- binToModel(streams, "zone2weektimer_timer6en", _bodyBytes[40], BIT5)
3560
- --周定时区域2 1
3561
- binToModel(streams, "zone2weektimer_timer1_mode", _bodyBytes[41], nil)
3562
- binToModel(streams, "zone2weektimer_timer1_temp", _bodyBytes[42], nil)
3563
- binToModel(streams, "zone2weektimer_timer1_openhour", _bodyBytes[43], nil)
3564
- binToModel(streams, "zone2weektimer_timer1_openmin", _bodyBytes[44], nil)
3565
- binToModel(streams, "zone2weektimer_timer1_closehour", _bodyBytes[45], nil)
3566
- binToModel(streams, "zone2weektimer_timer1_closemin", _bodyBytes[46], nil)
3567
- --周定时区域2 2
3568
- binToModel(streams, "zone2weektimer_timer2_mode", _bodyBytes[47], nil)
3569
- binToModel(streams, "zone2weektimer_timer2_temp", _bodyBytes[48], nil)
3570
- binToModel(streams, "zone2weektimer_timer2_openhour", _bodyBytes[49], nil)
3571
- binToModel(streams, "zone2weektimer_timer2_openmin", _bodyBytes[50], nil)
3572
- binToModel(streams, "zone2weektimer_timer2_closehour", _bodyBytes[51], nil)
3573
- binToModel(streams, "zone2weektimer_timer2_closemin", _bodyBytes[52], nil)
3574
- --周定时区域2 3
3575
- binToModel(streams, "zone2weektimer_timer3_mode", _bodyBytes[53], nil)
3576
- binToModel(streams, "zone2weektimer_timer3_temp", _bodyBytes[54], nil)
3577
- binToModel(streams, "zone2weektimer_timer3_openhour", _bodyBytes[55], nil)
3578
- binToModel(streams, "zone2weektimer_timer3_openmin", _bodyBytes[56], nil)
3579
- binToModel(streams, "zone2weektimer_timer3_closehour", _bodyBytes[57], nil)
3580
- binToModel(streams, "zone2weektimer_timer3_closemin", _bodyBytes[58], nil)
3581
- --周定时区域2 4
3582
- binToModel(streams, "zone2weektimer_timer4_mode", _bodyBytes[59], nil)
3583
- binToModel(streams, "zone2weektimer_timer4_temp", _bodyBytes[60], nil)
3584
- binToModel(streams, "zone2weektimer_timer4_openhour", _bodyBytes[61], nil)
3585
- binToModel(streams, "zone2weektimer_timer4_openmin", _bodyBytes[62], nil)
3586
- binToModel(streams, "zone2weektimer_timer4_closehour", _bodyBytes[63], nil)
3587
- binToModel(streams, "zone2weektimer_timer4_closemin", _bodyBytes[64], nil)
3588
- --周定时区域2 5
3589
- binToModel(streams, "zone2weektimer_timer5_mode", _bodyBytes[65], nil)
3590
- binToModel(streams, "zone2weektimer_timer5_temp", _bodyBytes[66], nil)
3591
- binToModel(streams, "zone2weektimer_timer5_openhour", _bodyBytes[67], nil)
3592
- binToModel(streams, "zone2weektimer_timer5_openmin", _bodyBytes[68], nil)
3593
- binToModel(streams, "zone2weektimer_timer5_closehour", _bodyBytes[69], nil)
3594
- binToModel(streams, "zone2weektimer_timer5_closemin", _bodyBytes[70], nil)
3595
- --周定时区域2 6
3596
- binToModel(streams, "zone2weektimer_timer6_mode", _bodyBytes[71], nil)
3597
- binToModel(streams, "zone2weektimer_timer6_temp", _bodyBytes[72], nil)
3598
- binToModel(streams, "zone2weektimer_timer6_openhour", _bodyBytes[73], nil)
3599
- binToModel(streams, "zone2weektimer_timer6_openmin", _bodyBytes[74], nil)
3600
- binToModel(streams, "zone2weektimer_timer6_closehour", _bodyBytes[75], nil)
3601
- binToModel(streams, "zone2weektimer_timer6_closemin", _bodyBytes[76], nil)
3602
- end
3603
- elseif ((_msgType == cmdTable["MSG_TYPE_QUERY"]) and (_msgBodyType == cmdTable["MSG_TYPE_QUERY_HOLIDAY_AWAY"])) then
3604
- -- 外出休假设置查询
3605
- binToModel(streams, "holidayaway_state", _bodyBytes[1], BIT0)
3606
- --binToModel(streams, "protocol_newfunction_en", _bodyBytes[1], BIT7)
3607
- binToModel(streams, "holidayaway_startyear", _bodyBytes[2], nil)
3608
- binToModel(streams, "holidayaway_startmonth", _bodyBytes[3], nil)
3609
- binToModel(streams, "holidayaway_startdate", _bodyBytes[4], nil)
3610
- binToModel(streams, "holidayaway_endyear", _bodyBytes[5], nil)
3611
- binToModel(streams, "holidayaway_endmonth", _bodyBytes[6], nil)
3612
- binToModel(streams, "holidayaway_enddate", _bodyBytes[7], nil)
3613
- --支持230312V1.2协议
3614
- if (bodyLength > 7) then
3615
- binToModel(streams, "protocol_newfunction_en", 1, BIT0)
3616
- binToModel(streams, "holidayaway_heat_state", _bodyBytes[8], BIT0)
3617
- binToModel(streams, "holidayaway_dhw_state", _bodyBytes[8], BIT1)
3618
- binToModel(streams, "holidayaway_disinfect_state", _bodyBytes[8], BIT2)
3619
- end
3620
- elseif ((_msgType == cmdTable["MSG_TYPE_QUERY"]) and (_msgBodyType == cmdTable["MSG_TYPE_QUERY_SILENCE"])) then
3621
- -- 静音设置查询
3622
- -- 状态
3623
- binToModel(streams, "silence_function_state", _bodyBytes[1], BIT0)
3624
- binToModel(streams, "silence_timer1_state", _bodyBytes[1], BIT1)
3625
- binToModel(streams, "silence_timer2_state", _bodyBytes[1], BIT2)
3626
- binToModel(streams, "silence_function_level", _bodyBytes[1], BIT3)
3627
- -- 静音定时1
3628
- binToModel(streams, "silence_timer1_starthour", _bodyBytes[2], nil)
3629
- binToModel(streams, "silence_timer1_startmin", _bodyBytes[3], nil)
3630
- binToModel(streams, "silence_timer1_endhour", _bodyBytes[4], nil)
3631
- binToModel(streams, "silence_timer1_endmin", _bodyBytes[5], nil)
3632
- -- 静音定时2
3633
- binToModel(streams, "silence_timer2_starthour", _bodyBytes[6], nil)
3634
- binToModel(streams, "silence_timer2_startmin", _bodyBytes[7], nil)
3635
- binToModel(streams, "silence_timer2_endhour", _bodyBytes[8], nil)
3636
- binToModel(streams, "silence_timer2_endmin", _bodyBytes[9], nil)
3637
- elseif ((_msgType == cmdTable["MSG_TYPE_QUERY"]) and (_msgBodyType == cmdTable["MSG_TYPE_QUERY_HOLIDAY_HOME"])) then
3638
- -- 在家休假设置查询-holidayhome
3639
- binToModel(streams, "holidayhome_state", _bodyBytes[1], BIT0)
3640
- binToModel(streams, "holidayhome_startyear", _bodyBytes[2], nil)
3641
- binToModel(streams, "holidayhome_startmonth", _bodyBytes[3], nil)
3642
- binToModel(streams, "holidayhome_startdate", _bodyBytes[4], nil)
3643
- binToModel(streams, "holidayhome_endyear", _bodyBytes[5], nil)
3644
- binToModel(streams, "holidayhome_endmonth", _bodyBytes[6], nil)
3645
- binToModel(streams, "holidayhome_enddate", _bodyBytes[7], nil)
3646
- -- HOLIDAY_HOME 定时使能
3647
- binToModel(streams, "holhometimer_timer1en", _bodyBytes[8], BIT0)
3648
- binToModel(streams, "holhometimer_timer2en", _bodyBytes[8], BIT1)
3649
- binToModel(streams, "holhometimer_timer3en", _bodyBytes[8], BIT2)
3650
- binToModel(streams, "holhometimer_timer4en", _bodyBytes[8], BIT3)
3651
- binToModel(streams, "holhometimer_timer5en", _bodyBytes[8], BIT4)
3652
- binToModel(streams, "holhometimer_timer6en", _bodyBytes[8], BIT5)
3653
- --binToModel(streams, "protocol_newfunction_en", _bodyBytes[8], BIT7)
3654
- --HOLIDAY_HOME定时 1
3655
- binToModel(streams, "holhometimer_timer1_mode", _bodyBytes[9], nil)
3656
- binToModel(streams, "holhometimer_timer1_temp", _bodyBytes[10], nil)
3657
- binToModel(streams, "holhometimer_timer1_openhour", _bodyBytes[11], nil)
3658
- binToModel(streams, "holhometimer_timer1_openmin", _bodyBytes[12], nil)
3659
- binToModel(streams, "holhometimer_timer1_closehour", _bodyBytes[13], nil)
3660
- binToModel(streams, "holhometimer_timer1_closemin", _bodyBytes[14], nil)
3661
- -- HOLIDAY_HOME 定时 2
3662
- binToModel(streams, "holhometimer_timer2_mode", _bodyBytes[15], nil)
3663
- binToModel(streams, "holhometimer_timer2_temp", _bodyBytes[16], nil)
3664
- binToModel(streams, "holhometimer_timer2_openhour", _bodyBytes[17], nil)
3665
- binToModel(streams, "holhometimer_timer2_openmin", _bodyBytes[18], nil)
3666
- binToModel(streams, "holhometimer_timer2_closehour", _bodyBytes[19], nil)
3667
- binToModel(streams, "holhometimer_timer2_closemin", _bodyBytes[20], nil)
3668
- -- HOLIDAY_HOME定时 3
3669
- binToModel(streams, "holhometimer_timer3_mode", _bodyBytes[21], nil)
3670
- binToModel(streams, "holhometimer_timer3_temp", _bodyBytes[22], nil)
3671
- binToModel(streams, "holhometimer_timer3_openhour", _bodyBytes[23], nil)
3672
- binToModel(streams, "holhometimer_timer3_openmin", _bodyBytes[24], nil)
3673
- binToModel(streams, "holhometimer_timer3_closehour", _bodyBytes[25], nil)
3674
- binToModel(streams, "holhometimer_timer3_closemin", _bodyBytes[26], nil)
3675
- -- HOLIDAY_HOME定时 4
3676
- binToModel(streams, "holhometimer_timer4_mode", _bodyBytes[27], nil)
3677
- binToModel(streams, "holhometimer_timer4_temp", _bodyBytes[28], nil)
3678
- binToModel(streams, "holhometimer_timer4_openhour", _bodyBytes[29], nil)
3679
- binToModel(streams, "holhometimer_timer4_openmin", _bodyBytes[30], nil)
3680
- binToModel(streams, "holhometimer_timer4_closehour", _bodyBytes[31], nil)
3681
- binToModel(streams, "holhometimer_timer4_closemin", _bodyBytes[32], nil)
3682
- -- HOLIDAY_HOME定时 5
3683
- binToModel(streams, "holhometimer_timer5_mode", _bodyBytes[33], nil)
3684
- binToModel(streams, "holhometimer_timer5_temp", _bodyBytes[34], nil)
3685
- binToModel(streams, "holhometimer_timer5_openhour", _bodyBytes[35], nil)
3686
- binToModel(streams, "holhometimer_timer5_openmin", _bodyBytes[36], nil)
3687
- binToModel(streams, "holhometimer_timer5_closehour", _bodyBytes[37], nil)
3688
- binToModel(streams, "holhometimer_timer5_closemin", _bodyBytes[38], nil)
3689
- -- HOLIDAY_HOME定时 6
3690
- binToModel(streams, "holhometimer_timer6_mode", _bodyBytes[39], nil)
3691
- binToModel(streams, "holhometimer_timer6_temp", _bodyBytes[40], nil)
3692
- binToModel(streams, "holhometimer_timer6_openhour", _bodyBytes[41], nil)
3693
- binToModel(streams, "holhometimer_timer6_openmin", _bodyBytes[42], nil)
3694
- binToModel(streams, "holhometimer_timer6_closehour", _bodyBytes[43], nil)
3695
- binToModel(streams, "holhometimer_timer6_closemin", _bodyBytes[44], nil)
3696
- --支持230312V1.2协议
3697
- if (bodyLength > 44) then
3698
- binToModel(streams, "protocol_newfunction_en", 1, BIT0)
3699
- -- HOLIDAY_HOME 区域2定时使能
3700
- binToModel(streams, "zone2holhometimer_timer1en", _bodyBytes[45], BIT0)
3701
- binToModel(streams, "zone2holhometimer_timer2en", _bodyBytes[45], BIT1)
3702
- binToModel(streams, "zone2holhometimer_timer3en", _bodyBytes[45], BIT2)
3703
- binToModel(streams, "zone2holhometimer_timer4en", _bodyBytes[45], BIT3)
3704
- binToModel(streams, "zone2holhometimer_timer5en", _bodyBytes[45], BIT4)
3705
- binToModel(streams, "zone2holhometimer_timer6en", _bodyBytes[45], BIT5)
3706
- --HOLIDAY_HOME区域2定时 1
3707
- binToModel(streams, "zone2holhometimer_timer1_mode", _bodyBytes[46], nil)
3708
- binToModel(streams, "zone2holhometimer_timer1_temp", _bodyBytes[47], nil)
3709
- binToModel(streams, "zone2holhometimer_timer1_openhour", _bodyBytes[48], nil)
3710
- binToModel(streams, "zone2holhometimer_timer1_openmin", _bodyBytes[49], nil)
3711
- binToModel(streams, "zone2holhometimer_timer1_closehour", _bodyBytes[50], nil)
3712
- binToModel(streams, "zone2holhometimer_timer1_closemin", _bodyBytes[51], nil)
3713
- -- HOLIDAY_HOME 区域2定时 2
3714
- binToModel(streams, "zone2holhometimer_timer2_mode", _bodyBytes[52], nil)
3715
- binToModel(streams, "zone2holhometimer_timer2_temp", _bodyBytes[53], nil)
3716
- binToModel(streams, "zone2holhometimer_timer2_openhour", _bodyBytes[54], nil)
3717
- binToModel(streams, "zone2holhometimer_timer2_openmin", _bodyBytes[55], nil)
3718
- binToModel(streams, "zone2holhometimer_timer2_closehour", _bodyBytes[56], nil)
3719
- binToModel(streams, "zone2holhometimer_timer2_closemin", _bodyBytes[57], nil)
3720
- -- HOLIDAY_HOME区域2定时 3
3721
- binToModel(streams, "zone2holhometimer_timer3_mode", _bodyBytes[58], nil)
3722
- binToModel(streams, "zone2holhometimer_timer3_temp", _bodyBytes[59], nil)
3723
- binToModel(streams, "zone2holhometimer_timer3_openhour", _bodyBytes[60], nil)
3724
- binToModel(streams, "zone2holhometimer_timer3_openmin", _bodyBytes[61], nil)
3725
- binToModel(streams, "zone2holhometimer_timer3_closehour", _bodyBytes[62], nil)
3726
- binToModel(streams, "zone2holhometimer_timer3_closemin", _bodyBytes[63], nil)
3727
- -- HOLIDAY_HOME区域2定时 4
3728
- binToModel(streams, "zone2holhometimer_timer4_mode", _bodyBytes[64], nil)
3729
- binToModel(streams, "zone2holhometimer_timer4_temp", _bodyBytes[65], nil)
3730
- binToModel(streams, "zone2holhometimer_timer4_openhour", _bodyBytes[66], nil)
3731
- binToModel(streams, "zone2holhometimer_timer4_openmin", _bodyBytes[67], nil)
3732
- binToModel(streams, "zone2holhometimer_timer4_closehour", _bodyBytes[68], nil)
3733
- binToModel(streams, "zone2holhometimer_timer4_closemin", _bodyBytes[69], nil)
3734
- -- HOLIDAY_HOME区域2定时 5
3735
- binToModel(streams, "zone2holhometimer_timer5_mode", _bodyBytes[70], nil)
3736
- binToModel(streams, "zone2holhometimer_timer5_temp", _bodyBytes[71], nil)
3737
- binToModel(streams, "zone2holhometimer_timer5_openhour", _bodyBytes[72], nil)
3738
- binToModel(streams, "zone2holhometimer_timer5_openmin", _bodyBytes[73], nil)
3739
- binToModel(streams, "zone2holhometimer_timer5_closehour", _bodyBytes[74], nil)
3740
- binToModel(streams, "zone2holhometimer_timer5_closemin", _bodyBytes[75], nil)
3741
- -- HOLIDAY_HOME区域2定时 6
3742
- binToModel(streams, "zone2holhometimer_timer6_mode", _bodyBytes[76], nil)
3743
- binToModel(streams, "zone2holhometimer_timer6_temp", _bodyBytes[77], nil)
3744
- binToModel(streams, "zone2holhometimer_timer6_openhour", _bodyBytes[78], nil)
3745
- binToModel(streams, "zone2holhometimer_timer6_openmin", _bodyBytes[79], nil)
3746
- binToModel(streams, "zone2holhometimer_timer6_closehour", _bodyBytes[80], nil)
3747
- binToModel(streams, "zone2holhometimer_timer6_closemin", _bodyBytes[81], nil)
3748
- end
3749
- elseif ((_msgType == cmdTable["MSG_TYPE_QUERY"]) and (_msgBodyType == cmdTable["MSG_TYPE_QUERY_ECO"])) then
3750
- -- ECO设置查询
3751
- binToModel(streams, "eco_function_state", _bodyBytes[1], BIT0)
3752
- binToModel(streams, "eco_timer_state", _bodyBytes[1], BIT1)
3753
- -- 静音定时1
3754
- binToModel(streams, "eco_timer_starthour", _bodyBytes[2], nil)
3755
- binToModel(streams, "eco_timer_startmin", _bodyBytes[3], nil)
3756
- binToModel(streams, "eco_timer_endhour", _bodyBytes[4], nil)
3757
- binToModel(streams, "eco_timer_endmin", _bodyBytes[5], nil)
3758
- --支持230312V1.2协议
3759
- if (bodyLength > 5) then
3760
- binToModel(streams, "eco_curve_type", _bodyBytes[6], nil)
3761
- end
3762
- elseif ((_msgType == cmdTable["MSG_TYPE_QUERY"]) and (_msgBodyType == cmdTable["MSG_TYPE_QUERY_DISINFECT"])) then
3763
- -- DISINFECT 设置查询
3764
- binToModel(streams, "disinfect_function_state", _bodyBytes[1], BIT0)
3765
- binToModel(streams, "disinfect_run_state", _bodyBytes[1], BIT1)
3766
- -- DISINFECT定时
3767
- binToModel(streams, "disinfect_setweekday", _bodyBytes[2], nil)
3768
- binToModel(streams, "disinfect_starthour", _bodyBytes[3], nil)
3769
- binToModel(streams, "disinfect_startmin", _bodyBytes[4], nil)
3770
- elseif ((_msgType == cmdTable["MSG_TYPE_UP"]) and (_msgBodyType == cmdTable["MSG_TYPE_UP_POWER3"])) then
3771
- binToModel(streams, "msg_up_type", cmdTable["MSG_TYPE_UP_POWER3"], nil)
3772
- binToModel(streams, "isheatrun0", _bodyBytes[1], BIT0)
3773
- binToModel(streams, "iscoolrun0", _bodyBytes[1], BIT1)
3774
- binToModel(streams, "isdhwrun0", _bodyBytes[1], BIT2)
3775
- binToModel(streams, "istbhrun0", _bodyBytes[1], BIT3)
3776
- binToModel(streams, "isibhrun0", _bodyBytes[1], BIT4)
3777
- binToModel(streams, "issmartgrid0", _bodyBytes[1], BIT5)
3778
- binToModel(streams, "ishighprices0", _bodyBytes[1], BIT6)
3779
- binToModel(streams, "isbottomprices0", _bodyBytes[1], BIT7)
3780
-
3781
- binToModel(streams, "totalelectricity0",
3782
- _bodyBytes[2] * 16777216 + _bodyBytes[3] * 65536 + _bodyBytes[4] * 256 + _bodyBytes[5], nil)
3783
- binToModel(streams, "totalthermal0", _bodyBytes[6] * 16777216 + _bodyBytes[7] * 65536 + _bodyBytes[8] * 256 +
3784
- _bodyBytes[9], nil)
3785
-
3786
- binToModel(streams, "t4", _bodyBytes[10], nil)
3787
- binToModel(streams, "zone1_temp_set", _bodyBytes[11], nil)
3788
- binToModel(streams, "zone2_temp_set", _bodyBytes[12], nil)
3789
- binToModel(streams, "t5s", _bodyBytes[13], nil)
3790
- binToModel(streams, "tas", _bodyBytes[14], nil)
3791
- elseif ((_msgType == cmdTable["MSG_TYPE_UP"]) and (_msgBodyType == cmdTable["MSG_TYPE_UP_POWER4"])) then
3792
- -- 上报04-04(电控主动上报能量数据组包)
3793
- binToModel(streams, "msg_up_type", cmdTable["MSG_TYPE_UP_POWER4"], nil)
3794
- binToModel(streams, "isheatrun0", _bodyBytes[1], BIT0)
3795
- binToModel(streams, "iscoolrun0", _bodyBytes[1], BIT1)
3796
- binToModel(streams, "isdhwrun0", _bodyBytes[1], BIT2)
3797
- binToModel(streams, "istbhrun0", _bodyBytes[1], BIT3)
3798
- binToModel(streams, "isibhrun0", _bodyBytes[1], BIT4)
3799
- binToModel(streams, "issmartgrid0", _bodyBytes[1], BIT5)
3800
- binToModel(streams, "ishighprices0", _bodyBytes[1], BIT6)
3801
- binToModel(streams, "isbottomprices0", _bodyBytes[1], BIT7)
3802
- binToModel(streams, "totalelectricity0",
3803
- _bodyBytes[2] * 16777216 + _bodyBytes[3] * 65536 + _bodyBytes[4] * 256 + _bodyBytes[5], nil)
3804
- binToModel(streams, "totalthermal0", _bodyBytes[6] * 16777216 + _bodyBytes[7] * 65536 + _bodyBytes[8] * 256 +
3805
- _bodyBytes[9], nil)
3806
- binToModel(streams, "t4", _bodyBytes[10], nil)
3807
- binToModel(streams, "zone1_temp_set", _bodyBytes[11], nil)
3808
- binToModel(streams, "zone2_temp_set", _bodyBytes[12], nil)
3809
- binToModel(streams, "t5s", _bodyBytes[13], nil)
3810
- binToModel(streams, "tas", _bodyBytes[14], nil)
3811
- binToModel(streams, "newt1s1", _bodyBytes[15], nil)
3812
- binToModel(streams, "newt1s2", _bodyBytes[16], nil)
3813
- binToModel(streams, "isonline0", _bodyBytes[17], BIT0)
3814
- binToModel(streams, "isonline1", _bodyBytes[17], BIT1)
3815
- binToModel(streams, "isonline2", _bodyBytes[17], BIT2)
3816
- binToModel(streams, "isonline3", _bodyBytes[17], BIT3)
3817
- binToModel(streams, "isonline4", _bodyBytes[17], BIT4)
3818
- binToModel(streams, "isonline5", _bodyBytes[17], BIT5)
3819
- binToModel(streams, "isonline6", _bodyBytes[17], BIT6)
3820
- binToModel(streams, "isonline7", _bodyBytes[17], BIT7)
3821
- binToModel(streams, "isonline8", _bodyBytes[18], BIT0)
3822
- binToModel(streams, "isonline9", _bodyBytes[18], BIT1)
3823
- binToModel(streams, "isonline10", _bodyBytes[18], BIT2)
3824
- binToModel(streams, "isonline11", _bodyBytes[18], BIT3)
3825
- binToModel(streams, "isonline12", _bodyBytes[18], BIT4)
3826
- binToModel(streams, "isonline13", _bodyBytes[18], BIT5)
3827
- binToModel(streams, "isonline14", _bodyBytes[18], BIT6)
3828
- binToModel(streams, "isonline15", _bodyBytes[18], BIT7)
3829
-
3830
- binToModel(streams, "isheatrun1", _bodyBytes[19], BIT0)
3831
- binToModel(streams, "iscoolrun1", _bodyBytes[19], BIT1)
3832
- binToModel(streams, "isdhwrun1", _bodyBytes[19], BIT2)
3833
- binToModel(streams, "istbhrun1", _bodyBytes[19], BIT3)
3834
- binToModel(streams, "isibhrun1", _bodyBytes[19], BIT4)
3835
- binToModel(streams, "totalelectricity1",
3836
- _bodyBytes[20] * 16777216 + _bodyBytes[21] * 65536 + _bodyBytes[22] * 256 + _bodyBytes[23], nil)
3837
- binToModel(streams, "totalthermal1",
3838
- _bodyBytes[24] * 16777216 + _bodyBytes[25] * 65536 + _bodyBytes[26] * 256 + _bodyBytes[27], nil)
3839
-
3840
- binToModel(streams, "isheatrun2", _bodyBytes[28], BIT0)
3841
- binToModel(streams, "iscoolrun2", _bodyBytes[28], BIT1)
3842
- binToModel(streams, "isdhwrun2", _bodyBytes[28], BIT2)
3843
- binToModel(streams, "istbhrun2", _bodyBytes[28], BIT3)
3844
- binToModel(streams, "isibhrun2", _bodyBytes[28], BIT4)
3845
- binToModel(streams, "totalelectricity2",
3846
- _bodyBytes[29] * 16777216 + _bodyBytes[30] * 65536 + _bodyBytes[31] * 256 + _bodyBytes[32], nil)
3847
- binToModel(streams, "totalthermal2",
3848
- _bodyBytes[33] * 16777216 + _bodyBytes[34] * 65536 + _bodyBytes[35] * 256 + _bodyBytes[36], nil)
3849
-
3850
- binToModel(streams, "isheatrun3", _bodyBytes[37], BIT0)
3851
- binToModel(streams, "iscoolrun3", _bodyBytes[37], BIT1)
3852
- binToModel(streams, "isdhwrun3", _bodyBytes[37], BIT2)
3853
- binToModel(streams, "istbhrun3", _bodyBytes[37], BIT3)
3854
- binToModel(streams, "isibhrun3", _bodyBytes[37], BIT4)
3855
- binToModel(streams, "totalelectricity3",
3856
- _bodyBytes[38] * 16777216 + _bodyBytes[39] * 65536 + _bodyBytes[40] * 256 + _bodyBytes[41], nil)
3857
- binToModel(streams, "totalthermal3",
3858
- _bodyBytes[42] * 16777216 + _bodyBytes[43] * 65536 + _bodyBytes[44] * 256 + _bodyBytes[45], nil)
3859
-
3860
- binToModel(streams, "isheatrun4", _bodyBytes[46], BIT0)
3861
- binToModel(streams, "iscoolrun4", _bodyBytes[46], BIT1)
3862
- binToModel(streams, "isdhwrun4", _bodyBytes[46], BIT2)
3863
- binToModel(streams, "istbhrun4", _bodyBytes[46], BIT3)
3864
- binToModel(streams, "isibhrun4", _bodyBytes[46], BIT4)
3865
- binToModel(streams, "totalelectricity4",
3866
- _bodyBytes[47] * 16777216 + _bodyBytes[48] * 65536 + _bodyBytes[49] * 256 + _bodyBytes[50], nil)
3867
- binToModel(streams, "totalthermal4",
3868
- _bodyBytes[51] * 16777216 + _bodyBytes[52] * 65536 + _bodyBytes[53] * 256 + _bodyBytes[54], nil)
3869
-
3870
- binToModel(streams, "isheatrun5", _bodyBytes[55], BIT0)
3871
- binToModel(streams, "iscoolrun5", _bodyBytes[55], BIT1)
3872
- binToModel(streams, "isdhwrun5", _bodyBytes[55], BIT2)
3873
- binToModel(streams, "istbhrun5", _bodyBytes[55], BIT3)
3874
- binToModel(streams, "isibhrun5", _bodyBytes[55], BIT4)
3875
- binToModel(streams, "totalelectricity5",
3876
- _bodyBytes[56] * 16777216 + _bodyBytes[57] * 65536 + _bodyBytes[58] * 256 + _bodyBytes[59], nil)
3877
- binToModel(streams, "totalthermal5",
3878
- _bodyBytes[60] * 16777216 + _bodyBytes[61] * 65536 + _bodyBytes[62] * 256 + _bodyBytes[63], nil)
3879
-
3880
- binToModel(streams, "isheatrun6", _bodyBytes[64], BIT0)
3881
- binToModel(streams, "iscoolrun6", _bodyBytes[64], BIT1)
3882
- binToModel(streams, "isdhwrun6", _bodyBytes[64], BIT2)
3883
- binToModel(streams, "istbhrun6", _bodyBytes[64], BIT3)
3884
- binToModel(streams, "isibhrun6", _bodyBytes[64], BIT4)
3885
- binToModel(streams, "totalelectricity6",
3886
- _bodyBytes[65] * 16777216 + _bodyBytes[66] * 65536 + _bodyBytes[67] * 256 + _bodyBytes[68], nil)
3887
- binToModel(streams, "totalthermal6",
3888
- _bodyBytes[69] * 16777216 + _bodyBytes[70] * 65536 + _bodyBytes[71] * 256 + _bodyBytes[72], nil)
3889
-
3890
- binToModel(streams, "isheatrun7", _bodyBytes[73], BIT0)
3891
- binToModel(streams, "iscoolrun7", _bodyBytes[73], BIT1)
3892
- binToModel(streams, "isdhwrun7", _bodyBytes[73], BIT2)
3893
- binToModel(streams, "istbhrun7", _bodyBytes[73], BIT3)
3894
- binToModel(streams, "isibhrun7", _bodyBytes[73], BIT4)
3895
- binToModel(streams, "totalelectricity7",
3896
- _bodyBytes[74] * 16777216 + _bodyBytes[75] * 65536 + _bodyBytes[76] * 256 + _bodyBytes[77], nil)
3897
- binToModel(streams, "totalthermal7",
3898
- _bodyBytes[78] * 16777216 + _bodyBytes[79] * 65536 + _bodyBytes[80] * 256 + _bodyBytes[81], nil)
3899
-
3900
- binToModel(streams, "isheatrun8", _bodyBytes[82], BIT0)
3901
- binToModel(streams, "iscoolrun8", _bodyBytes[82], BIT1)
3902
- binToModel(streams, "isdhwrun8", _bodyBytes[82], BIT2)
3903
- binToModel(streams, "istbhrun8", _bodyBytes[82], BIT3)
3904
- binToModel(streams, "isibhrun8", _bodyBytes[82], BIT4)
3905
- binToModel(streams, "totalelectricity8",
3906
- _bodyBytes[83] * 16777216 + _bodyBytes[84] * 65536 + _bodyBytes[85] * 256 + _bodyBytes[86], nil)
3907
- binToModel(streams, "totalthermal8",
3908
- _bodyBytes[87] * 16777216 + _bodyBytes[88] * 65536 + _bodyBytes[89] * 256 + _bodyBytes[90], nil)
3909
-
3910
- binToModel(streams, "isheatrun9", _bodyBytes[91], BIT0)
3911
- binToModel(streams, "iscoolrun9", _bodyBytes[91], BIT1)
3912
- binToModel(streams, "isdhwrun9", _bodyBytes[91], BIT2)
3913
- binToModel(streams, "istbhrun9", _bodyBytes[91], BIT3)
3914
- binToModel(streams, "isibhrun9", _bodyBytes[91], BIT4)
3915
- binToModel(streams, "totalelectricity9",
3916
- _bodyBytes[92] * 16777216 + _bodyBytes[93] * 65536 + _bodyBytes[94] * 256 + _bodyBytes[95], nil)
3917
- binToModel(streams, "totalthermal9",
3918
- _bodyBytes[96] * 16777216 + _bodyBytes[97] * 65536 + _bodyBytes[98] * 256 + _bodyBytes[99], nil)
3919
-
3920
- binToModel(streams, "isheatrun10", _bodyBytes[100], BIT0)
3921
- binToModel(streams, "iscoolrun10", _bodyBytes[100], BIT1)
3922
- binToModel(streams, "isdhwrun10", _bodyBytes[100], BIT2)
3923
- binToModel(streams, "istbhrun10", _bodyBytes[100], BIT3)
3924
- binToModel(streams, "isibhrun10", _bodyBytes[100], BIT4)
3925
- binToModel(streams, "totalelectricity10",
3926
- _bodyBytes[101] * 16777216 + _bodyBytes[102] * 65536 + _bodyBytes[103] * 256 + _bodyBytes[104], nil)
3927
- binToModel(streams, "totalthermal10",
3928
- _bodyBytes[105] * 16777216 + _bodyBytes[106] * 65536 + _bodyBytes[107] * 256 + _bodyBytes[108], nil)
3929
-
3930
- binToModel(streams, "isheatrun11", _bodyBytes[109], BIT0)
3931
- binToModel(streams, "iscoolrun11", _bodyBytes[109], BIT1)
3932
- binToModel(streams, "isdhwrun11", _bodyBytes[109], BIT2)
3933
- binToModel(streams, "istbhrun11", _bodyBytes[109], BIT3)
3934
- binToModel(streams, "isibhrun11", _bodyBytes[109], BIT4)
3935
- binToModel(streams, "totalelectricity11",
3936
- _bodyBytes[110] * 16777216 + _bodyBytes[111] * 65536 + _bodyBytes[112] * 256 + _bodyBytes[113], nil)
3937
- binToModel(streams, "totalthermal11",
3938
- _bodyBytes[114] * 16777216 + _bodyBytes[115] * 65536 + _bodyBytes[116] * 256 + _bodyBytes[117], nil)
3939
-
3940
- binToModel(streams, "isheatrun12", _bodyBytes[118], BIT0)
3941
- binToModel(streams, "iscoolrun12", _bodyBytes[118], BIT1)
3942
- binToModel(streams, "isdhwrun12", _bodyBytes[118], BIT2)
3943
- binToModel(streams, "istbhrun12", _bodyBytes[118], BIT3)
3944
- binToModel(streams, "isibhrun12", _bodyBytes[118], BIT4)
3945
- binToModel(streams, "totalelectricity12",
3946
- _bodyBytes[119] * 16777216 + _bodyBytes[120] * 65536 + _bodyBytes[121] * 256 + _bodyBytes[122], nil)
3947
- binToModel(streams, "totalthermal12",
3948
- _bodyBytes[123] * 16777216 + _bodyBytes[124] * 65536 + _bodyBytes[125] * 256 + _bodyBytes[126], nil)
3949
-
3950
- binToModel(streams, "isheatrun13", _bodyBytes[127], BIT0)
3951
- binToModel(streams, "iscoolrun13", _bodyBytes[127], BIT1)
3952
- binToModel(streams, "isdhwrun13", _bodyBytes[127], BIT2)
3953
- binToModel(streams, "istbhrun13", _bodyBytes[127], BIT3)
3954
- binToModel(streams, "isibhrun13", _bodyBytes[127], BIT4)
3955
- binToModel(streams, "totalelectricity13",
3956
- _bodyBytes[128] * 16777216 + _bodyBytes[129] * 65536 + _bodyBytes[130] * 256 + _bodyBytes[131], nil)
3957
- binToModel(streams, "totalthermal13",
3958
- _bodyBytes[132] * 16777216 + _bodyBytes[133] * 65536 + _bodyBytes[134] * 256 + _bodyBytes[135], nil)
3959
-
3960
- binToModel(streams, "isheatrun14", _bodyBytes[136], BIT0)
3961
- binToModel(streams, "iscoolrun14", _bodyBytes[136], BIT1)
3962
- binToModel(streams, "isdhwrun14", _bodyBytes[136], BIT2)
3963
- binToModel(streams, "istbhrun14", _bodyBytes[136], BIT3)
3964
- binToModel(streams, "isibhrun14", _bodyBytes[136], BIT4)
3965
- binToModel(streams, "totalelectricity14",
3966
- _bodyBytes[137] * 16777216 + _bodyBytes[138] * 65536 + _bodyBytes[139] * 256 + _bodyBytes[140], nil)
3967
- binToModel(streams, "totalthermal14",
3968
- _bodyBytes[141] * 16777216 + _bodyBytes[142] * 65536 + _bodyBytes[143] * 256 + _bodyBytes[144], nil)
3969
-
3970
- binToModel(streams, "isheatrun15", _bodyBytes[145], BIT0)
3971
- binToModel(streams, "iscoolrun15", _bodyBytes[145], BIT1)
3972
- binToModel(streams, "isdhwrun15", _bodyBytes[145], BIT2)
3973
- binToModel(streams, "istbhrun15", _bodyBytes[145], BIT3)
3974
- binToModel(streams, "isibhrun15", _bodyBytes[145], BIT4)
3975
- binToModel(streams, "totalelectricity15",
3976
- _bodyBytes[146] * 16777216 + _bodyBytes[147] * 65536 + _bodyBytes[148] * 256 + _bodyBytes[149], nil)
3977
- binToModel(streams, "totalthermal15",
3978
- _bodyBytes[150] * 16777216 + _bodyBytes[151] * 65536 + _bodyBytes[152] * 256 + _bodyBytes[153], nil)
3979
-
3980
- binToModel(streams, "isibh2run0", _bodyBytes[154], BIT0)
3981
- binToModel(streams, "isibh2run1 ", _bodyBytes[154], BIT1)
3982
- binToModel(streams, "isibh2run2 ", _bodyBytes[154], BIT2)
3983
- binToModel(streams, "isibh2run3 ", _bodyBytes[154], BIT3)
3984
- binToModel(streams, "isibh2run4 ", _bodyBytes[154], BIT4)
3985
- binToModel(streams, "isibh2run5 ", _bodyBytes[154], BIT5)
3986
- binToModel(streams, "isibh2run6 ", _bodyBytes[154], BIT6)
3987
- binToModel(streams, "isibh2run7 ", _bodyBytes[154], BIT7)
3988
- binToModel(streams, "isibh2run8 ", _bodyBytes[155], BIT0)
3989
- binToModel(streams, "isibh2run9 ", _bodyBytes[155], BIT1)
3990
- binToModel(streams, "isibh2run10 ", _bodyBytes[155], BIT2)
3991
- binToModel(streams, "isibh2run11 ", _bodyBytes[155], BIT3)
3992
- binToModel(streams, "isibh2run12 ", _bodyBytes[155], BIT4)
3993
- binToModel(streams, "isibh2run13 ", _bodyBytes[155], BIT5)
3994
- binToModel(streams, "isibh2run14 ", _bodyBytes[155], BIT6)
3995
- binToModel(streams, "isibh2run15 ", _bodyBytes[155], BIT7)
3996
-
3997
- binToModel(streams, "voltage0", _bodyBytes[156], nil)
3998
- binToModel(streams, "voltage1", _bodyBytes[157], nil)
3999
- binToModel(streams, "voltage2", _bodyBytes[158], nil)
4000
- binToModel(streams, "voltage3", _bodyBytes[159], nil)
4001
- binToModel(streams, "voltage4", _bodyBytes[160], nil)
4002
- binToModel(streams, "voltage5", _bodyBytes[161], nil)
4003
- binToModel(streams, "voltage6", _bodyBytes[162], nil)
4004
- binToModel(streams, "voltage7", _bodyBytes[163], nil)
4005
- binToModel(streams, "voltage8", _bodyBytes[164], nil)
4006
- binToModel(streams, "voltage9", _bodyBytes[165], nil)
4007
- binToModel(streams, "voltage10", _bodyBytes[166], nil)
4008
- binToModel(streams, "voltage11", _bodyBytes[167], nil)
4009
- binToModel(streams, "voltage12", _bodyBytes[168], nil)
4010
- binToModel(streams, "voltage13", _bodyBytes[169], nil)
4011
- binToModel(streams, "voltage14", _bodyBytes[170], nil)
4012
- binToModel(streams, "voltage15", _bodyBytes[171], nil)
4013
-
4014
- binToModel(streams, "power_ibh1", _bodyBytes[172], nil)
4015
- binToModel(streams, "power_ibh2", _bodyBytes[173], nil)
4016
- binToModel(streams, "power_tbh", _bodyBytes[174], nil)
4017
- elseif ((_msgType == cmdTable["MSG_TYPE_QUERY"]) and (_msgBodyType == cmdTable["MSG_TYPE_QUERY_INSTALL"])) then
4018
- -- 安装设定参数0x08查询
4019
- binToModel(streams, "dhwEnable", _bodyBytes[1], BIT7)
4020
- binToModel(streams, "boostertbhEn", _bodyBytes[1], BIT6)
4021
- binToModel(streams, "disinfectEnable", _bodyBytes[1], BIT5)
4022
- binToModel(streams, "dhwPumpEnable", _bodyBytes[1], BIT4)
4023
- binToModel(streams, "dhwPriorityTime", _bodyBytes[1], BIT3)
4024
- binToModel(streams, "dhwPumpDIEnable", _bodyBytes[1], BIT2)
4025
- binToModel(streams, "coolEnable", _bodyBytes[1], BIT1)
4026
- binToModel(streams, "fgZone1CoolTempHigh", _bodyBytes[1], BIT0)
4027
- binToModel(streams, "heatEnable", _bodyBytes[2], BIT7)
4028
- binToModel(streams, "fgZone1HeatTempHigh", _bodyBytes[2], BIT6)
4029
- binToModel(streams, "pumpiSliModeEn", _bodyBytes[2], BIT5)
4030
- binToModel(streams, "roomSensorEn", _bodyBytes[2], BIT4)
4031
- binToModel(streams, "roomTherEn", _bodyBytes[2], BIT3)
4032
- binToModel(streams, "roomTherSetModeEn", _bodyBytes[2], BIT2)
4033
- binToModel(streams, "dualroomThermostatEn", _bodyBytes[2], BIT1)
4034
- binToModel(streams, "fgdhwPriorEn", _bodyBytes[2], BIT0)
4035
- binToModel(streams, "acsEnable", _bodyBytes[3], BIT7)
4036
- binToModel(streams, "dhwHeaterAhsEn", _bodyBytes[3], BIT6)
4037
- binToModel(streams, "tempPcbEn", _bodyBytes[3], BIT5)
4038
- binToModel(streams, "tbt2ProbeEn", _bodyBytes[3], BIT4)
4039
- binToModel(streams, "pipeExceed10m", _bodyBytes[3], BIT3)
4040
- binToModel(streams, "solarCn18En", _bodyBytes[3], BIT2)
4041
- binToModel(streams, "fgOwnSolarEn", _bodyBytes[3], BIT1)
4042
- binToModel(streams, "fgInputDhwHeater", _bodyBytes[3], BIT0)
4043
- binToModel(streams, "smartgridEn", _bodyBytes[4], BIT7)
4044
- binToModel(streams, "t1bProbeEn", _bodyBytes[4], BIT6)
4045
- binToModel(streams, "fgZone2CoolTempHigh", _bodyBytes[4], BIT5)
4046
- binToModel(streams, "fgZone2HeatTempHigh", _bodyBytes[4], BIT4)
4047
- binToModel(streams, "doubleZoneEn", _bodyBytes[4], BIT3)
4048
- binToModel(streams, "fgTaProbeIdu", _bodyBytes[4], BIT2)
4049
- binToModel(streams, "tbt1ProbeEn", _bodyBytes[4], BIT1)
4050
- binToModel(streams, "fgIbhInTank", _bodyBytes[4], BIT0)
4051
- binToModel(streams, "dT5On", _bodyBytes[6], nil)
4052
- binToModel(streams, "dT5On", _bodyBytes[6], nil)
4053
- binToModel(streams, "dT1S5", _bodyBytes[8], nil)
4054
- binToModel(streams, "tIntervaDhw", _bodyBytes[10], nil)
4055
- binToModel(streams, "t4Dhwmax", _bodyBytes[12], nil)
4056
- binToModel(streams, "t4Dhwmin", _bodyBytes[13] * 256 + _bodyBytes[14], nil)
4057
- binToModel(streams, "tTBHdelay", _bodyBytes[15] * 256 + _bodyBytes[16], nil)
4058
- binToModel(streams, "dT5STBHoff", _bodyBytes[17] * 256 + _bodyBytes[18], nil)
4059
- binToModel(streams, "t4TBHon", _bodyBytes[19] * 256 + _bodyBytes[20], nil)
4060
- binToModel(streams, "t5sDI", _bodyBytes[21] * 256 + _bodyBytes[22], nil)
4061
- binToModel(streams, "tDImax", _bodyBytes[23] * 256 + _bodyBytes[24], nil)
4062
- binToModel(streams, "tDIhightemp", _bodyBytes[25] * 256 + _bodyBytes[26], nil)
4063
- binToModel(streams, "tIntervalC", _bodyBytes[27] * 256 + _bodyBytes[28], nil)
4064
- binToModel(streams, "dT1SC", _bodyBytes[29] * 256 + _bodyBytes[30], nil)
4065
- binToModel(streams, "dTSC", _bodyBytes[31] * 256 + _bodyBytes[32], nil)
4066
- binToModel(streams, "t4Cmax", _bodyBytes[33] * 256 + _bodyBytes[34], nil)
4067
- binToModel(streams, "t4Cmin", _bodyBytes[35] * 256 + _bodyBytes[36], nil)
4068
- binToModel(streams, "tIntervalH", _bodyBytes[37] * 256 + _bodyBytes[38], nil)
4069
- binToModel(streams, "dT1SH", _bodyBytes[39] * 256 + _bodyBytes[40], nil)
4070
- binToModel(streams, "dTSH", _bodyBytes[41] * 256 + _bodyBytes[42], nil)
4071
- binToModel(streams, "t4Hmax", _bodyBytes[43] * 256 + _bodyBytes[44], nil)
4072
- binToModel(streams, "t4Hmin", _bodyBytes[45] * 256 + _bodyBytes[46], nil)
4073
- binToModel(streams, "t4IBHon", _bodyBytes[47] * 256 + _bodyBytes[48], nil)
4074
- binToModel(streams, "dT1IBHon", _bodyBytes[49] * 256 + _bodyBytes[50], nil)
4075
- binToModel(streams, "tIBHdelay", _bodyBytes[51] * 256 + _bodyBytes[52], nil)
4076
- binToModel(streams, "tIBH12delay", _bodyBytes[53] * 256 + _bodyBytes[54], nil)
4077
- binToModel(streams, "t4AHSon", _bodyBytes[55] * 256 + _bodyBytes[56], nil)
4078
- binToModel(streams, "dT1AHSon", _bodyBytes[57] * 256 + _bodyBytes[58], nil)
4079
- binToModel(streams, "dT1AHSoff", _bodyBytes[59] * 256 + _bodyBytes[60], nil)
4080
- binToModel(streams, "tAHSdelay", _bodyBytes[61] * 256 + _bodyBytes[62], nil)
4081
- binToModel(streams, "tDHWHPmax", _bodyBytes[63] * 256 + _bodyBytes[64], nil)
4082
- binToModel(streams, "tDHWHPrestrict", _bodyBytes[65] * 256 + _bodyBytes[66], nil)
4083
- binToModel(streams, "t4autocmin", _bodyBytes[67] * 256 + _bodyBytes[68], nil)
4084
- binToModel(streams, "t4autohmax", _bodyBytes[69] * 256 + _bodyBytes[70], nil)
4085
- binToModel(streams, "t1sHolHeat", _bodyBytes[71] * 256 + _bodyBytes[72], nil)
4086
- binToModel(streams, "t5SHolDhw", _bodyBytes[73] * 256 + _bodyBytes[74], nil)
4087
- binToModel(streams, "perStart", _bodyBytes[75] * 256 + _bodyBytes[76], nil)
4088
- binToModel(streams, "timeAdjust", _bodyBytes[77] * 256 + _bodyBytes[78], nil)
4089
- binToModel(streams, "dTbt2", _bodyBytes[79] * 256 + _bodyBytes[80], nil)
4090
- binToModel(streams, "powerIbh1", (_bodyBytes[81] * 256 + _bodyBytes[82]) / 10, nil)
4091
- binToModel(streams, "powerIbh2", (_bodyBytes[83] * 256 + _bodyBytes[84]) / 10, nil)
4092
- binToModel(streams, "powerTbh", (_bodyBytes[85] * 256 + _bodyBytes[86]) / 10, nil)
4093
- binToModel(streams, "ecoHeatT1s", _bodyBytes[87] * 256 + _bodyBytes[88], nil)
4094
- binToModel(streams, "ecoHeatTs", _bodyBytes[89] * 256 + _bodyBytes[90], nil)
4095
- binToModel(streams, "tDryup", _bodyBytes[91] * 256 + _bodyBytes[92], nil)
4096
- binToModel(streams, "tDrypeak", _bodyBytes[93] * 256 + _bodyBytes[94], nil)
4097
- binToModel(streams, "tdrydown", _bodyBytes[95] * 256 + _bodyBytes[96], nil)
4098
- binToModel(streams, "tempDrypeak", _bodyBytes[97] * 256 + _bodyBytes[98], nil)
4099
- binToModel(streams, "timePreheatFloor", _bodyBytes[99] * 256 + _bodyBytes[100], nil)
4100
- binToModel(streams, "t1SPreheatFloor", _bodyBytes[101] * 256 + _bodyBytes[102], nil)
4101
- --103~112为空
4102
- binToModel(streams, "t1SetC1", _bodyBytes[113] * 256 + _bodyBytes[114], nil)
4103
- binToModel(streams, "t1SetC2", _bodyBytes[115] * 256 + _bodyBytes[116], nil)
4104
- binToModel(streams, "t4C1", _bodyBytes[117] * 256 + _bodyBytes[118], nil)
4105
- binToModel(streams, "t4C2", _bodyBytes[119] * 256 + _bodyBytes[120], nil)
4106
- binToModel(streams, "t1SetH1", _bodyBytes[121] * 256 + _bodyBytes[122], nil)
4107
- binToModel(streams, "t1SetH2", _bodyBytes[123] * 256 + _bodyBytes[124], nil)
4108
- binToModel(streams, "t4H1", _bodyBytes[125] * 256 + _bodyBytes[126], nil)
4109
- binToModel(streams, "t4H2", _bodyBytes[127] * 256 + _bodyBytes[128], nil)
4110
- binToModel(streams, "typeVolLmt", _bodyBytes[129] * 256 + _bodyBytes[130], nil)
4111
- binToModel(streams, "timeT4FreshC", _bodyBytes[131] / 2, nil)
4112
- binToModel(streams, "timeT4FreshH", _bodyBytes[132] / 2, nil)
4113
- binToModel(streams, "tPumpiDelay", (_bodyBytes[133] * 256 + _bodyBytes[134]) / 2, nil)
4114
- binToModel(streams, "deltaTsloar", _bodyBytes[135], nil)
4115
- binToModel(streams, "solarFunction", _bodyBytes[136], nil)
4116
- binToModel(streams, "enSwitchPDC", _bodyBytes[138], BIT0)
4117
- binToModel(streams, "gasCost", (_bodyBytes[139] * 256 + _bodyBytes[140]) / 100, nil)
4118
- binToModel(streams, "eleCost", (_bodyBytes[141] * 256 + _bodyBytes[142]) / 100, nil)
4119
- binToModel(streams, "ahsSetTempMax", _bodyBytes[143], nil)
4120
- binToModel(streams, "ahsSetTempMin", _bodyBytes[144], nil)
4121
- binToModel(streams, "ahsSetTempMaxVolt", _bodyBytes[145], nil)
4122
- binToModel(streams, "ahsSetTempMinVolt", _bodyBytes[146], nil)
4123
- binToModel(streams, "t2AntiSVRun", _bodyBytes[147] * 256 + _bodyBytes[148], nil)
4124
- binToModel(streams, "dftPortFuncEn", _bodyBytes[150], BIT0)
4125
- --_bodyBytes[150]~_bodyBytes[180]预留
4126
- binToModel(streams, "t1AntiPump", _bodyBytes[181] * 256 + _bodyBytes[182], nil)
4127
- binToModel(streams, "t2AntiPumpRun", _bodyBytes[183] * 256 + _bodyBytes[184], nil)
4128
- binToModel(streams, "t1AntiLockSV", _bodyBytes[185] * 256 + _bodyBytes[186], nil)
4129
- binToModel(streams, "tbhEnFunc", _bodyBytes[187] * 256 + _bodyBytes[188], nil)
4130
- binToModel(streams, "ibhEnFunc", _bodyBytes[189] * 256 + _bodyBytes[190], nil)
4131
- --binToModel(streams, "", _bodyBytes[191]* 256+_bodyBytes[192], nil)
4132
- binToModel(streams, "ahsEnFunc", _bodyBytes[193] * 256 + _bodyBytes[194], nil)
4133
- binToModel(streams, "ahsPumpiControl", _bodyBytes[195] * 256 + _bodyBytes[196], nil)
4134
- binToModel(streams, "modeSetPri", _bodyBytes[197] * 256 + _bodyBytes[198], nil)
4135
- binToModel(streams, "pumpType", _bodyBytes[199] * 256 + _bodyBytes[200], nil)
4136
- binToModel(streams, "pumpiSilentOutput", _bodyBytes[201] * 256 + _bodyBytes[202], nil)
4137
- elseif ((_msgType == cmdTable["MSG_TYPE_QUERY"]) and (_msgBodyType == cmdTable["MSG_TYPE_QUERY_HMIPARA"])) then
4138
- binToModel(streams, "hmiVersionNum", _bodyBytes[1], nil)
4139
- binToModel(streams, "compRunCurTime0", _bodyBytes[2] * 256 + _bodyBytes[3], nil)
4140
- binToModel(streams, "compRunTotalTime0", _bodyBytes[4] * 256 + _bodyBytes[5], nil)
4141
- binToModel(streams, "fanRunTotalTime0", _bodyBytes[6] * 256 + _bodyBytes[7], nil)
4142
- binToModel(streams, "pumpiRunTotalTime0", _bodyBytes[8] * 256 + _bodyBytes[9], nil)
4143
- binToModel(streams, "ibh1RunTotalTime0", _bodyBytes[10] * 256 + _bodyBytes[11], nil)
4144
- binToModel(streams, "ibh2RunTotalTime0", _bodyBytes[12] * 256 + _bodyBytes[13], nil)
4145
- binToModel(streams, "tbhRunTotalTime0", _bodyBytes[14] * 256 + _bodyBytes[15], nil)
4146
- binToModel(streams, "ahsRunTotalTime0", _bodyBytes[16] * 256 + _bodyBytes[17], nil)
4147
- binToModel(streams, "arrayServiceTel0", _bodyBytes[18], nil)
4148
- binToModel(streams, "arrayServiceTel1", _bodyBytes[19], nil)
4149
- binToModel(streams, "arrayServiceTel2", _bodyBytes[20], nil)
4150
- binToModel(streams, "arrayServiceTel3", _bodyBytes[21], nil)
4151
- binToModel(streams, "arrayServiceTel4", _bodyBytes[22], nil)
4152
- binToModel(streams, "arrayServiceTel5", _bodyBytes[23], nil)
4153
- binToModel(streams, "arrayServiceTel6", _bodyBytes[24], nil)
4154
- binToModel(streams, "arrayServiceTel7", _bodyBytes[25], nil)
4155
- binToModel(streams, "arrayServiceTel8", _bodyBytes[26], nil)
4156
- binToModel(streams, "arrayServiceTel9", _bodyBytes[27], nil)
4157
- binToModel(streams, "arrayServiceTel10", _bodyBytes[28], nil)
4158
- binToModel(streams, "arrayServiceTel11", _bodyBytes[29], nil)
4159
- binToModel(streams, "arrayServiceTel12", _bodyBytes[30], nil)
4160
- binToModel(streams, "ArrayServiceCel0", _bodyBytes[31], nil)
4161
- binToModel(streams, "ArrayServiceCel1", _bodyBytes[32], nil)
4162
- binToModel(streams, "ArrayServiceCel2", _bodyBytes[33], nil)
4163
- binToModel(streams, "ArrayServiceCel3", _bodyBytes[34], nil)
4164
- binToModel(streams, "ArrayServiceCel4", _bodyBytes[35], nil)
4165
- binToModel(streams, "ArrayServiceCel5", _bodyBytes[36], nil)
4166
- binToModel(streams, "ArrayServiceCel6", _bodyBytes[37], nil)
4167
- binToModel(streams, "ArrayServiceCel7", _bodyBytes[38], nil)
4168
- binToModel(streams, "ArrayServiceCel8", _bodyBytes[39], nil)
4169
- binToModel(streams, "ArrayServiceCel9", _bodyBytes[40], nil)
4170
- binToModel(streams, "ArrayServiceCel10", _bodyBytes[41], nil)
4171
- binToModel(streams, "ArrayServiceCel11", _bodyBytes[42], nil)
4172
- binToModel(streams, "ArrayServiceCel12", _bodyBytes[43], nil)
4173
- binToModel(streams, "u8warnTotal", _bodyBytes[44], nil)
4174
- binToModel(streams, "codeErrProt1", _bodyBytes[45], nil)
4175
- binToModel(streams, "warnAddress1", _bodyBytes[46], nil)
4176
- binToModel(streams, "warnHour1", _bodyBytes[47], nil)
4177
- binToModel(streams, "warnMin1", _bodyBytes[48], nil)
4178
- binToModel(streams, "warnYear1", _bodyBytes[49], nil)
4179
- binToModel(streams, "warnMonth1", _bodyBytes[50], nil)
4180
- binToModel(streams, "warnDate1", _bodyBytes[51], nil)
4181
- binToModel(streams, "codeErrProt2", _bodyBytes[52], nil)
4182
- binToModel(streams, "warnAddress2", _bodyBytes[53], nil)
4183
- binToModel(streams, "warnHour2", _bodyBytes[54], nil)
4184
- binToModel(streams, "warnMin2", _bodyBytes[55], nil)
4185
- binToModel(streams, "warnYear2", _bodyBytes[56], nil)
4186
- binToModel(streams, "warnMonth2", _bodyBytes[57], nil)
4187
- binToModel(streams, "warnDate2", _bodyBytes[58], nil)
4188
- binToModel(streams, "codeErrProt3", _bodyBytes[59], nil)
4189
- binToModel(streams, "warnAddress3", _bodyBytes[60], nil)
4190
- binToModel(streams, "warnHour3", _bodyBytes[61], nil)
4191
- binToModel(streams, "warnMin3", _bodyBytes[62], nil)
4192
- binToModel(streams, "warnYear3", _bodyBytes[63], nil)
4193
- binToModel(streams, "warnMonth3", _bodyBytes[64], nil)
4194
- binToModel(streams, "warnDate3", _bodyBytes[65], nil)
4195
- binToModel(streams, "codeErrProt4", _bodyBytes[66], nil)
4196
- binToModel(streams, "warnAddress4", _bodyBytes[67], nil)
4197
- binToModel(streams, "warnHour4", _bodyBytes[68], nil)
4198
- binToModel(streams, "warnMin4", _bodyBytes[69], nil)
4199
- binToModel(streams, "warnYear4", _bodyBytes[70], nil)
4200
- binToModel(streams, "warnMonth4", _bodyBytes[71], nil)
4201
- binToModel(streams, "warnDate4", _bodyBytes[72], nil)
4202
- binToModel(streams, "codeErrProt5", _bodyBytes[73], nil)
4203
- binToModel(streams, "warnAddress5", _bodyBytes[74], nil)
4204
- binToModel(streams, "warnHour5", _bodyBytes[75], nil)
4205
- binToModel(streams, "warnMin5", _bodyBytes[76], nil)
4206
- binToModel(streams, "warnYear5", _bodyBytes[77], nil)
4207
- binToModel(streams, "warnMonth5", _bodyBytes[78], nil)
4208
- binToModel(streams, "warnDate5", _bodyBytes[79], nil)
4209
- binToModel(streams, "codeErrProt6", _bodyBytes[80], nil)
4210
- binToModel(streams, "warnAddress6", _bodyBytes[81], nil)
4211
- binToModel(streams, "warnHour6", _bodyBytes[82], nil)
4212
- binToModel(streams, "warnMin6", _bodyBytes[83], nil)
4213
- binToModel(streams, "warnYear6", _bodyBytes[84], nil)
4214
- binToModel(streams, "warnMonth6", _bodyBytes[85], nil)
4215
- binToModel(streams, "warnDate6", _bodyBytes[86], nil)
4216
- binToModel(streams, "codeErrProt7", _bodyBytes[87], nil)
4217
- binToModel(streams, "warnAddress7", _bodyBytes[88], nil)
4218
- binToModel(streams, "warnHour7", _bodyBytes[89], nil)
4219
- binToModel(streams, "warnMin7", _bodyBytes[90], nil)
4220
- binToModel(streams, "warnYear7", _bodyBytes[91], nil)
4221
- binToModel(streams, "warnMonth7", _bodyBytes[92], nil)
4222
- binToModel(streams, "warnDate7", _bodyBytes[93], nil)
4223
- binToModel(streams, "codeErrProt8", _bodyBytes[94], nil)
4224
- binToModel(streams, "warnAddress8", _bodyBytes[95], nil)
4225
- binToModel(streams, "warnHour8", _bodyBytes[96], nil)
4226
- binToModel(streams, "warnMin8", _bodyBytes[97], nil)
4227
- binToModel(streams, "warnYear8", _bodyBytes[98], nil)
4228
- binToModel(streams, "warnMonth8", _bodyBytes[99], nil)
4229
- binToModel(streams, "warnDate8", _bodyBytes[100], nil)
4230
- elseif ((_msgType == cmdTable["MSG_TYPE_QUERY"]) and (_msgBodyType == cmdTable["MSG_TYPE_QUERY_UNITPARA"])) then
4231
- -- 主机运行参数0x10查询
4232
- binToModel(streams, "compRunFreq", _bodyBytes[1], nil)
4233
- binToModel(streams, "unitModeRun", _bodyBytes[2], nil)
4234
- binToModel(streams, "fanSpeed", _bodyBytes[3] * 10, nil)
4235
- binToModel(streams, "machVersion", _bodyBytes[4], nil)
4236
- binToModel(streams, "fgCapacityNeed", _bodyBytes[5], nil)
4237
- --binToModel(streams, "tempset", _bodyBytes[6], nil)
4238
- binToModel(streams, "tempT3", _bodyBytes[7], nil)
4239
- binToModel(streams, "tempT4", _bodyBytes[8], nil)
4240
- binToModel(streams, "tempTp", _bodyBytes[9], nil)
4241
- binToModel(streams, "tempTwin", _bodyBytes[10], nil)
4242
- binToModel(streams, "tempTwout", _bodyBytes[11], nil)
4243
- binToModel(streams, "tempTsolar", _bodyBytes[12], nil)
4244
- binToModel(streams, "hydboxSubtype", _bodyBytes[13], nil)
4245
- binToModel(streams, "fgUSBInfoConnect", _bodyBytes[14], nil)
4246
- binToModel(streams, "usbIndexMax", _bodyBytes[15], nil)
4247
- binToModel(streams, "p6ErrCode", _bodyBytes[16], nil)
4248
- binToModel(streams, "oduCompCurrent", _bodyBytes[17], nil)
4249
- binToModel(streams, "oduVoltage", _bodyBytes[18] * 256 + _bodyBytes[19], nil)
4250
- binToModel(streams, "exvCurrent", _bodyBytes[20] * 256 + _bodyBytes[21], nil)
4251
- binToModel(streams, "oduModel", _bodyBytes[22], nil)
4252
- binToModel(streams, "unitonlineNum", _bodyBytes[23], nil)
4253
- binToModel(streams, "currentCode", _bodyBytes[24], nil)
4254
- binToModel(streams, "u8Code1", _bodyBytes[25], nil)
4255
- binToModel(streams, "u8Code2", _bodyBytes[26], nil)
4256
- binToModel(streams, "u8Code3", _bodyBytes[27], nil)
4257
- binToModel(streams, "fgReqParaSet", _bodyBytes[28], BIT7)
4258
- binToModel(streams, "fgReqVerAsk", _bodyBytes[28], BIT6)
4259
- binToModel(streams, "fgReqSNAsk", _bodyBytes[28], BIT5)
4260
- binToModel(streams, "fgUnitLockSignal", _bodyBytes[28], BIT4)
4261
- binToModel(streams, "fgEVUSignal", _bodyBytes[28], BIT3)
4262
- binToModel(streams, "fgSGSignal", _bodyBytes[28], BIT2)
4263
- binToModel(streams, "fgTankAntiFreeze", _bodyBytes[28], BIT1)
4264
- binToModel(streams, "fgSolarInput", _bodyBytes[28], BIT0)
4265
- binToModel(streams, "fgRoomTherCoolRun", _bodyBytes[29], BIT7)
4266
- binToModel(streams, "fgRoomTherHeatRun", _bodyBytes[29], BIT6)
4267
- binToModel(streams, "fgOutDoorTestMode", _bodyBytes[29], BIT5)
4268
- binToModel(streams, "fgRemoteOnOff", _bodyBytes[29], BIT4)
4269
- binToModel(streams, "fgBackOil", _bodyBytes[29], BIT3)
4270
- binToModel(streams, "fgAntiFreezeRun", _bodyBytes[29], BIT2)
4271
- binToModel(streams, "fgDefrost", _bodyBytes[29], BIT1)
4272
- binToModel(streams, "fgIsSlaveUnit", _bodyBytes[29], BIT0)
4273
- binToModel(streams, "fgTBHEnable", _bodyBytes[30], BIT7)
4274
- binToModel(streams, "fgAHSIsOwn", _bodyBytes[30], BIT6)
4275
- binToModel(streams, "fgCapTestEnable", _bodyBytes[30], BIT5)
4276
- binToModel(streams, "fgT1BSensorEnable", _bodyBytes[30], BIT4)
4277
- binToModel(streams, "fgAHSDHWMode", _bodyBytes[30], BIT3)
4278
- binToModel(streams, "fgIBH1Enable", _bodyBytes[30], BIT2)
4279
- binToModel(streams, "fgT1SensorEnable", _bodyBytes[30], BIT1)
4280
- --binToModel(streams, "", _bodyBytes[30],BIT0)
4281
- binToModel(streams, "fgEdgeVersionType", _bodyBytes[31], BIT7)
4282
- binToModel(streams, "fgFactReqTherHeatOn", _bodyBytes[31], BIT6)
4283
- binToModel(streams, "fgDHWRun", _bodyBytes[31], BIT5)
4284
- binToModel(streams, "fgHeatRun", _bodyBytes[31], BIT4)
4285
- binToModel(streams, "fgCoolRun", _bodyBytes[31], BIT3)
4286
- binToModel(streams, "fgFactReqTherCoolOn", _bodyBytes[31], BIT2)
4287
- binToModel(streams, "fgFactReqSolarOn", _bodyBytes[31], BIT1)
4288
- binToModel(streams, "fgFactoryRun", _bodyBytes[30], BIT0)
4289
- binToModel(streams, "fgDefValveOn", _bodyBytes[32], BIT7)
4290
- binToModel(streams, "fgAHSValveOn", _bodyBytes[32], BIT6)
4291
- binToModel(streams, "fgRunValveOn", _bodyBytes[32], BIT5)
4292
- binToModel(streams, "fgAlmValveOn", _bodyBytes[32], BIT4)
4293
- binToModel(streams, "fgPumpSolarOn", _bodyBytes[32], BIT3)
4294
- binToModel(streams, "fgHeat4ValveOn", _bodyBytes[32], BIT2)
4295
- binToModel(streams, "fgSV3Output", _bodyBytes[32], BIT1)
4296
- binToModel(streams, "fgMixedPumpValveOn", _bodyBytes[32], BIT0)
4297
- binToModel(streams, "fgPumpDHWOn", _bodyBytes[33], BIT7)
4298
- binToModel(streams, "fgPumpOOn", _bodyBytes[33], BIT6)
4299
- binToModel(streams, "fgSV2On", _bodyBytes[33], BIT5)
4300
- binToModel(streams, "fgSV1On", _bodyBytes[33], BIT4)
4301
- binToModel(streams, "fgPumpIOutput", _bodyBytes[33], BIT3)
4302
- binToModel(streams, "fgTBHOutput", _bodyBytes[33], BIT2)
4303
- binToModel(streams, "fgIBH2Output", _bodyBytes[33], BIT1)
4304
- binToModel(streams, "fgIBH1Output", _bodyBytes[33], BIT0)
4305
- binToModel(streams, "tempT1", _bodyBytes[34], nil)
4306
- binToModel(streams, "tempTw2", _bodyBytes[35], nil)
4307
- binToModel(streams, "tempT2", _bodyBytes[36], nil)
4308
- binToModel(streams, "tempT2b", _bodyBytes[37], nil)
4309
- binToModel(streams, "tempT5", _bodyBytes[38], nil)
4310
- binToModel(streams, "tempTa", _bodyBytes[39], nil)
4311
- binToModel(streams, "tempTbt1", _bodyBytes[40], nil)
4312
- binToModel(streams, "tempTbt2", _bodyBytes[41], nil)
4313
- binToModel(streams, "hydroboxCapacity", _bodyBytes[42], nil)
4314
- binToModel(streams, "pressureHigh", _bodyBytes[43] * 256 + _bodyBytes[44], nil)
4315
-
4316
- binToModel(streams, "pressureLow", _bodyBytes[45] * 256 + _bodyBytes[46], nil)
4317
-
4318
- binToModel(streams, "tempTh", _bodyBytes[47], nil)
4319
- binToModel(streams, "machineType", _bodyBytes[48], nil)
4320
- binToModel(streams, "oduTargetFre", _bodyBytes[49], nil)
4321
- binToModel(streams, "dcCurrent", _bodyBytes[50], nil)
4322
- binToModel(streams, "dcVoltage", _bodyBytes[51], nil)
4323
- binToModel(streams, "tempTf", _bodyBytes[52], nil)
4324
- binToModel(streams, "iduT1s1", _bodyBytes[53], nil)
4325
- binToModel(streams, "iduT1s2", _bodyBytes[54], nil)
4326
- binToModel(streams, "waterFlow", _bodyBytes[55] * 256 + _bodyBytes[56], nil)
4327
-
4328
- binToModel(streams, "oduPlanVolLmt", _bodyBytes[57], nil)
4329
- binToModel(streams, "currentUnitCapacity", _bodyBytes[58] * 256 + _bodyBytes[59], nil)
4330
-
4331
- binToModel(streams, "spheraAHSVoltage", _bodyBytes[60], nil)
4332
- binToModel(streams, "tempT4Aver", _bodyBytes[61], nil)
4333
- binToModel(streams, "waterPressure", _bodyBytes[62] * 256 + _bodyBytes[63], nil)
4334
-
4335
- binToModel(streams, "roomRelHum", _bodyBytes[64], nil)
4336
- binToModel(streams, "pwmPumpOut", _bodyBytes[65], nil)
4337
- --66预留
4338
- binToModel(streams, "totalelectricity0",
4339
- _bodyBytes[67] * 16777216 + _bodyBytes[68] * 65536 + _bodyBytes[69] * 256 + _bodyBytes[70], nil)
4340
-
4341
- binToModel(streams, "totalthermal0",
4342
- _bodyBytes[71] * 16777216 + _bodyBytes[72] * 65536 + _bodyBytes[73] * 256 + _bodyBytes[74], nil)
4343
-
4344
- binToModel(streams, "heatElecTotConsum0",
4345
- _bodyBytes[75] * 16777216 + _bodyBytes[76] * 65536 + _bodyBytes[77] * 256 + _bodyBytes[78], nil)
4346
-
4347
- binToModel(streams, "heatTotCapacity0",
4348
- _bodyBytes[79] * 16777216 + _bodyBytes[80] * 65536 + _bodyBytes[81] * 256 + _bodyBytes[82], nil)
4349
-
4350
- binToModel(streams, "instantPower0", _bodyBytes[83] * 256 + _bodyBytes[84], nil)
4351
-
4352
- binToModel(streams, "instantRenewPower0", _bodyBytes[85] * 256 + _bodyBytes[86], nil)
4353
-
4354
- binToModel(streams, "totalRenewPower0",
4355
- _bodyBytes[87] * 16777216 + _bodyBytes[88] * 65536 + _bodyBytes[89] * 256 + _bodyBytes[90], nil)
4356
- --91-93预留
4357
- binToModel(streams, "iduVersionNum", _bodyBytes[94], nil)
4358
- binToModel(streams, "oduVersionNum", _bodyBytes[95], nil)
4359
- --iduSNCode0
4360
- binToModel(streams, "iduSNCode0", _bodyBytes[96], nil)
4361
- binToModel(streams, "iduSNCode1", _bodyBytes[97], nil)
4362
- binToModel(streams, "iduSNCode2", _bodyBytes[98], nil)
4363
- binToModel(streams, "iduSNCode3", _bodyBytes[99], nil)
4364
- binToModel(streams, "iduSNCode4", _bodyBytes[100], nil)
4365
- binToModel(streams, "iduSNCode5", _bodyBytes[101], nil)
4366
- binToModel(streams, "iduSNCode6", _bodyBytes[102], nil)
4367
- binToModel(streams, "iduSNCode7", _bodyBytes[103], nil)
4368
- binToModel(streams, "iduSNCode8", _bodyBytes[104], nil)
4369
- binToModel(streams, "iduSNCode9", _bodyBytes[105], nil)
4370
- binToModel(streams, "iduSNCode10", _bodyBytes[106], nil)
4371
- binToModel(streams, "iduSNCode11", _bodyBytes[107], nil)
4372
- binToModel(streams, "iduSNCode12", _bodyBytes[108], nil)
4373
- binToModel(streams, "iduSNCode13", _bodyBytes[109], nil)
4374
- binToModel(streams, "iduSNCode14", _bodyBytes[110], nil)
4375
- binToModel(streams, "iduSNCode15", _bodyBytes[111], nil)
4376
- binToModel(streams, "iduSNCode16", _bodyBytes[112], nil)
4377
- binToModel(streams, "iduSNCode17", _bodyBytes[113], nil)
4378
- binToModel(streams, "iduSNCode18", _bodyBytes[114], nil)
4379
- binToModel(streams, "iduSNCode19", _bodyBytes[115], nil)
4380
- binToModel(streams, "iduSNCode20", _bodyBytes[116], nil)
4381
- binToModel(streams, "iduSNCode21", _bodyBytes[117], nil)
4382
- binToModel(streams, "iduSNCode22", _bodyBytes[118], nil)
4383
- binToModel(streams, "iduSNCode23", _bodyBytes[119], nil)
4384
- binToModel(streams, "iduSNCode24", _bodyBytes[120], nil)
4385
- binToModel(streams, "iduSNCode25", _bodyBytes[121], nil)
4386
- binToModel(streams, "iduSNCode26", _bodyBytes[122], nil)
4387
- binToModel(streams, "iduSNCode27", _bodyBytes[123], nil)
4388
- binToModel(streams, "iduSNCode28", _bodyBytes[124], nil)
4389
- binToModel(streams, "iduSNCode29", _bodyBytes[125], nil)
4390
- binToModel(streams, "iduSNCode30", _bodyBytes[126], nil)
4391
- binToModel(streams, "iduSNCode31", _bodyBytes[127], nil)
4392
- --oduSNCode0
4393
- binToModel(streams, "oduSNCode0", _bodyBytes[128], nil)
4394
- binToModel(streams, "oduSNCode1", _bodyBytes[129], nil)
4395
- binToModel(streams, "oduSNCode2", _bodyBytes[130], nil)
4396
- binToModel(streams, "oduSNCode3", _bodyBytes[131], nil)
4397
- binToModel(streams, "oduSNCode4", _bodyBytes[132], nil)
4398
- binToModel(streams, "oduSNCode5", _bodyBytes[133], nil)
4399
- binToModel(streams, "oduSNCode6", _bodyBytes[134], nil)
4400
- binToModel(streams, "oduSNCode7", _bodyBytes[135], nil)
4401
- binToModel(streams, "oduSNCode8", _bodyBytes[136], nil)
4402
- binToModel(streams, "oduSNCode9", _bodyBytes[137], nil)
4403
- binToModel(streams, "oduSNCode10", _bodyBytes[138], nil)
4404
- binToModel(streams, "oduSNCode11", _bodyBytes[139], nil)
4405
- binToModel(streams, "oduSNCode12", _bodyBytes[140], nil)
4406
- binToModel(streams, "oduSNCode13", _bodyBytes[141], nil)
4407
- binToModel(streams, "oduSNCode14", _bodyBytes[142], nil)
4408
- binToModel(streams, "oduSNCode15", _bodyBytes[143], nil)
4409
- binToModel(streams, "oduSNCode16", _bodyBytes[144], nil)
4410
- binToModel(streams, "oduSNCode17", _bodyBytes[145], nil)
4411
- binToModel(streams, "oduSNCode18", _bodyBytes[146], nil)
4412
- binToModel(streams, "oduSNCode19", _bodyBytes[147], nil)
4413
- binToModel(streams, "oduSNCode20", _bodyBytes[148], nil)
4414
- binToModel(streams, "oduSNCode21", _bodyBytes[149], nil)
4415
- binToModel(streams, "oduSNCode22", _bodyBytes[150], nil)
4416
- binToModel(streams, "oduSNCode23", _bodyBytes[151], nil)
4417
- binToModel(streams, "oduSNCode24", _bodyBytes[152], nil)
4418
- binToModel(streams, "oduSNCode25", _bodyBytes[153], nil)
4419
- binToModel(streams, "oduSNCode26", _bodyBytes[154], nil)
4420
- binToModel(streams, "oduSNCode27", _bodyBytes[155], nil)
4421
- binToModel(streams, "oduSNCode28", _bodyBytes[156], nil)
4422
- binToModel(streams, "oduSNCode29", _bodyBytes[157], nil)
4423
- binToModel(streams, "oduSNCode30", _bodyBytes[158], nil)
4424
- binToModel(streams, "oduSNCode31", _bodyBytes[159], nil)
4425
- --hmiSNCode0
4426
- binToModel(streams, "hmiSNCode0", _bodyBytes[160], nil)
4427
- binToModel(streams, "hmiSNCode1", _bodyBytes[161], nil)
4428
- binToModel(streams, "hmiSNCode2", _bodyBytes[162], nil)
4429
- binToModel(streams, "hmiSNCode3", _bodyBytes[163], nil)
4430
- binToModel(streams, "hmiSNCode4", _bodyBytes[164], nil)
4431
- binToModel(streams, "hmiSNCode5", _bodyBytes[165], nil)
4432
- binToModel(streams, "hmiSNCode6", _bodyBytes[166], nil)
4433
- binToModel(streams, "hmiSNCode7", _bodyBytes[167], nil)
4434
- binToModel(streams, "hmiSNCode8", _bodyBytes[168], nil)
4435
- binToModel(streams, "hmiSNCode9", _bodyBytes[169], nil)
4436
- binToModel(streams, "hmiSNCode10", _bodyBytes[170], nil)
4437
- binToModel(streams, "hmiSNCode11", _bodyBytes[171], nil)
4438
- binToModel(streams, "hmiSNCode12", _bodyBytes[172], nil)
4439
- binToModel(streams, "hmiSNCode13", _bodyBytes[173], nil)
4440
- binToModel(streams, "hmiSNCode14", _bodyBytes[174], nil)
4441
- binToModel(streams, "hmiSNCode15", _bodyBytes[175], nil)
4442
- binToModel(streams, "hmiSNCode16", _bodyBytes[176], nil)
4443
- binToModel(streams, "hmiSNCode17", _bodyBytes[177], nil)
4444
- binToModel(streams, "hmiSNCode18", _bodyBytes[178], nil)
4445
- binToModel(streams, "hmiSNCode19", _bodyBytes[179], nil)
4446
- binToModel(streams, "hmiSNCode20", _bodyBytes[180], nil)
4447
- binToModel(streams, "hmiSNCode21", _bodyBytes[181], nil)
4448
- binToModel(streams, "hmiSNCode22", _bodyBytes[182], nil)
4449
- binToModel(streams, "hmiSNCode23", _bodyBytes[183], nil)
4450
- binToModel(streams, "hmiSNCode24", _bodyBytes[184], nil)
4451
- binToModel(streams, "hmiSNCode25", _bodyBytes[185], nil)
4452
- binToModel(streams, "hmiSNCode26", _bodyBytes[186], nil)
4453
- binToModel(streams, "hmiSNCode27", _bodyBytes[187], nil)
4454
- binToModel(streams, "hmiSNCode28", _bodyBytes[188], nil)
4455
- binToModel(streams, "hmiSNCode29", _bodyBytes[189], nil)
4456
- binToModel(streams, "hmiSNCode30", _bodyBytes[190], nil)
4457
- binToModel(streams, "hmiSNCode31", _bodyBytes[191], nil)
4458
- elseif ((_msgType == cmdTable["MSG_TYPE_UP"]) and (_msgBodyType == cmdTable["MSG_TYPE_UP_UNITPARA"])) then
4459
- binToModel(streams, "msg_up_type", cmdTable["MSG_TYPE_UP_UNITPARA"], nil)
4460
- binToModel(streams, "compRunFreq", _bodyBytes[1], nil)
4461
- binToModel(streams, "fanSpeed", _bodyBytes[2] * 10, nil)
4462
- binToModel(streams, "tempT3", _bodyBytes[3], nil)
4463
- binToModel(streams, "tempT4", _bodyBytes[4], nil)
4464
- binToModel(streams, "tempTp", _bodyBytes[5], nil)
4465
- binToModel(streams, "tempTwin", _bodyBytes[6], nil)
4466
- binToModel(streams, "tempTwout", _bodyBytes[7], nil)
4467
- binToModel(streams, "oduCompCurrent", _bodyBytes[8], nil)
4468
- binToModel(streams, "oduVoltage", _bodyBytes[9] * 256 + _bodyBytes[10], nil)
4469
- binToModel(streams, "tempT1", _bodyBytes[11], nil)
4470
- binToModel(streams, "tempTw2", _bodyBytes[12], nil)
4471
- binToModel(streams, "tempT2", _bodyBytes[13], nil)
4472
- binToModel(streams, "tempT2b", _bodyBytes[14], nil)
4473
- binToModel(streams, "tempT5", _bodyBytes[15], nil)
4474
- binToModel(streams, "tempTa", _bodyBytes[16], nil)
4475
- binToModel(streams, "pressureHigh", _bodyBytes[17] * 256 + _bodyBytes[18], nil)
4476
- binToModel(streams, "pressureLow", _bodyBytes[19] * 256 + _bodyBytes[20], nil)
4477
- binToModel(streams, "tempTh", _bodyBytes[21], nil)
4478
- binToModel(streams, "oduTargetFre", _bodyBytes[22], nil)
4479
- binToModel(streams, "tempTf", _bodyBytes[23], nil)
4480
- binToModel(streams, "iduT1s1", _bodyBytes[24], nil)
4481
- binToModel(streams, "iduT1s2", _bodyBytes[25], nil)
4482
- binToModel(streams, "waterFlow", _bodyBytes[26] * 256 + _bodyBytes[27], nil)
4483
- binToModel(streams, "currentUnitCapacity", _bodyBytes[28] * 256 + _bodyBytes[29], nil)
4484
- binToModel(streams, "waterPressure", _bodyBytes[30] * 256 + _bodyBytes[31], nil)
4485
- binToModel(streams, "roomRelHum", _bodyBytes[32], nil)
4486
- binToModel(streams, "totalelectricity0",
4487
- _bodyBytes[33] * 16777216 + _bodyBytes[34] * 65536 + _bodyBytes[35] * 256 + _bodyBytes[36], nil)
4488
- binToModel(streams, "totalthermal0",
4489
- _bodyBytes[37] * 16777216 + _bodyBytes[38] * 65536 + _bodyBytes[39] * 256 + _bodyBytes[40], nil)
4490
- --binToModel(streams, "heatElecTotConsum0", _bodyBytes[41] * 16777216 + _bodyBytes[42] * 65536 + _bodyBytes[43] * 256 + _bodyBytes[44], nil)
4491
- --binToModel(streams, "heatTotCapacity0", _bodyBytes[45] * 16777216 + _bodyBytes[46] * 65536 + _bodyBytes[47] * 256 + _bodyBytes[48], nil)
4492
- binToModel(streams, "SysHeatDayCapacity", _bodyBytes[41] * 256 + _bodyBytes[42], nil)
4493
-
4494
- binToModel(streams, "SysHeatDayRenewPower", _bodyBytes[43] * 256 + _bodyBytes[44], nil)
4495
-
4496
- binToModel(streams, "SysHeatDayElecConsum", _bodyBytes[45] * 256 + _bodyBytes[46], nil)
4497
-
4498
- binToModel(streams, "SysHeatDayCOPEER", _bodyBytes[47] * 256 + _bodyBytes[48], nil)
4499
-
4500
- binToModel(streams, "instantPower0", _bodyBytes[49] * 256 + _bodyBytes[50], nil)
4501
- binToModel(streams, "instantRenewPower0", _bodyBytes[51] * 256 + _bodyBytes[52], nil)
4502
- binToModel(streams, "totalRenewPower0",
4503
- _bodyBytes[53] * 16777216 + _bodyBytes[54] * 65536 + _bodyBytes[55] * 256 + _bodyBytes[56], nil)
4504
- binToModel(streams, "compRunTotalTime0", _bodyBytes[57] * 256 + _bodyBytes[58], nil)
4505
- binToModel(streams, "pwmPumpOut", _bodyBytes[59], nil)
4506
- binToModel(streams, "unitModeRun", _bodyBytes[60], nil)
4507
- binToModel(streams, "SysInstantHPCapacity", _bodyBytes[61] * 256 + _bodyBytes[62], nil)
4508
-
4509
- binToModel(streams, "SysInstantRenewPower", _bodyBytes[63] * 256 + _bodyBytes[64], nil)
4510
-
4511
- binToModel(streams, "SysInstantPower", _bodyBytes[65] * 256 + _bodyBytes[66], nil)
4512
-
4513
- binToModel(streams, "SysInstantCopEER", _bodyBytes[67] * 256 + _bodyBytes[68], nil)
4514
-
4515
- binToModel(streams, "SysTotalHPCapacity",
4516
- _bodyBytes[69] * 16777216 + _bodyBytes[70] * 65536 + _bodyBytes[71] * 256 + _bodyBytes[72], nil)
4517
-
4518
- --binToModel(streams, "SysTotalHeatCapacity", _bodyBytes[73] * 16777216 + _bodyBytes[74] * 65536 + _bodyBytes[75] * 256 + _bodyBytes[76], nil)
4519
-
4520
- binToModel(streams, "SysTotalRenewPower",
4521
- _bodyBytes[73] * 16777216 + _bodyBytes[74] * 65536 + _bodyBytes[75] * 256 + _bodyBytes[76], nil)
4522
-
4523
- binToModel(streams, "SysTotalPowerConsum",
4524
- _bodyBytes[77] * 16777216 + _bodyBytes[78] * 65536 + _bodyBytes[79] * 256 + _bodyBytes[80], nil)
4525
- --binToModel(streams, "SysTotalHeatElecConsum", _bodyBytes[81] * 16777216 + _bodyBytes[82] * 65536 + _bodyBytes[83] * 256 + _bodyBytes[84], nil)
4526
- binToModel(streams, "SysTotalCOPEER", _bodyBytes[81] * 256 + _bodyBytes[82], nil)
4527
- binToModel(streams, "SysHeatInsHPCapacity", _bodyBytes[83] * 256 + _bodyBytes[84], nil)
4528
-
4529
- binToModel(streams, "SysHeatInsRenewPower", _bodyBytes[85] * 256 + _bodyBytes[86], nil)
4530
-
4531
- binToModel(streams, "SysHeatInsPower", _bodyBytes[87] * 256 + _bodyBytes[88], nil)
4532
-
4533
- binToModel(streams, "SysHeatInsCopEER", _bodyBytes[89] * 256 + _bodyBytes[90], nil)
4534
-
4535
- binToModel(streams, "SysHeatCapacity",
4536
- _bodyBytes[91] * 16777216 + _bodyBytes[92] * 65536 + _bodyBytes[93] * 256 + _bodyBytes[94], nil)
4537
-
4538
- binToModel(streams, "SysHeatRenewPower",
4539
- _bodyBytes[95] * 16777216 + _bodyBytes[96] * 65536 + _bodyBytes[97] * 256 + _bodyBytes[98], nil)
4540
-
4541
- binToModel(streams, "SysHeatElecConsum",
4542
- _bodyBytes[99] * 16777216 + _bodyBytes[100] * 65536 + _bodyBytes[101] * 256 + _bodyBytes[102], nil)
4543
-
4544
- binToModel(streams, "SysHeatCOPEER", _bodyBytes[103] * 256 + _bodyBytes[104], nil)
4545
-
4546
- binToModel(streams, "SysCoolInsHPCapacity", _bodyBytes[105] * 256 + _bodyBytes[106], nil)
4547
-
4548
- binToModel(streams, "SysCoolInsRenewPower", _bodyBytes[107] * 256 + _bodyBytes[108], nil)
4549
-
4550
- binToModel(streams, "SysCoolInsPower", _bodyBytes[109] * 256 + _bodyBytes[110], nil)
4551
-
4552
- binToModel(streams, "SysCoolInsCopEER", _bodyBytes[111] * 256 + _bodyBytes[112], nil)
4553
-
4554
- binToModel(streams, "SysCoolCapacity",
4555
- _bodyBytes[113] * 16777216 + _bodyBytes[114] * 65536 + _bodyBytes[115] * 256 + _bodyBytes[116], nil)
4556
-
4557
- binToModel(streams, "SysCoolRenewPower",
4558
- _bodyBytes[117] * 16777216 + _bodyBytes[118] * 65536 + _bodyBytes[119] * 256 + _bodyBytes[120], nil)
4559
-
4560
- binToModel(streams, "SysCoolElecConsum",
4561
- _bodyBytes[121] * 16777216 + _bodyBytes[122] * 65536 + _bodyBytes[123] * 256 + _bodyBytes[124], nil)
4562
-
4563
- binToModel(streams, "SysCoolCOPEER", _bodyBytes[125] * 256 + _bodyBytes[126], nil)
4564
-
4565
- binToModel(streams, "SysDhwInsHPCapacity", _bodyBytes[127] * 256 + _bodyBytes[128], nil)
4566
-
4567
- binToModel(streams, "SysDhwInsRenewPower", _bodyBytes[129] * 256 + _bodyBytes[130], nil)
4568
-
4569
- binToModel(streams, "SysDhwInsPower", _bodyBytes[131] * 256 + _bodyBytes[132], nil)
4570
-
4571
- binToModel(streams, "SysDhwInsCopEER", _bodyBytes[133] * 256 + _bodyBytes[134], nil)
4572
-
4573
- binToModel(streams, "SysDhwCapacity",
4574
- _bodyBytes[135] * 16777216 + _bodyBytes[136] * 65536 + _bodyBytes[137] * 256 + _bodyBytes[138], nil)
4575
-
4576
- binToModel(streams, "SysDhwRenewPower",
4577
- _bodyBytes[139] * 16777216 + _bodyBytes[140] * 65536 + _bodyBytes[141] * 256 + _bodyBytes[142], nil)
4578
-
4579
- binToModel(streams, "SysDhwElecConsum",
4580
- _bodyBytes[143] * 16777216 + _bodyBytes[144] * 65536 + _bodyBytes[145] * 256 + _bodyBytes[146], nil)
4581
-
4582
-
4583
- binToModel(streams, "SysDhwCOPEER", _bodyBytes[147] * 256 + _bodyBytes[148], nil)
4584
-
4585
- binToModel(streams, "SysEnergyAnaEN", _bodyBytes[149], BIT0)
4586
- binToModel(streams, "HMIEnergyAnaSetEN", _bodyBytes[149], BIT1)
4587
-
4588
- binToModel(streams, "SysHeatWeekCapacity", _bodyBytes[150] * 256 + _bodyBytes[151], nil)
4589
-
4590
- binToModel(streams, "SysHeatWeekRenewPower", _bodyBytes[152] * 256 + _bodyBytes[153], nil)
4591
-
4592
- binToModel(streams, "SysHeatWeekElecConsum", _bodyBytes[154] * 256 + _bodyBytes[155], nil)
4593
-
4594
- binToModel(streams, "SysHeatWeekCOPEER", _bodyBytes[156] * 256 + _bodyBytes[157], nil)
4595
-
4596
- binToModel(streams, "SysHeatMonthCapacity", _bodyBytes[158] * 256 + _bodyBytes[159], nil)
4597
-
4598
- binToModel(streams, "SysHeatMonthRenewPower", _bodyBytes[160] * 256 + _bodyBytes[161], nil)
4599
-
4600
- binToModel(streams, "SysHeatMonthElecConsum", _bodyBytes[162] * 256 + _bodyBytes[163], nil)
4601
-
4602
- binToModel(streams, "SysHeatMonthCOPEER", _bodyBytes[164] * 256 + _bodyBytes[165], nil)
4603
-
4604
- binToModel(streams, "SysHeatYearCapacity", _bodyBytes[166] * 256 + _bodyBytes[167], nil)
4605
-
4606
- binToModel(streams, "SysHeatYearRenewPower", _bodyBytes[168] * 256 + _bodyBytes[169], nil)
4607
-
4608
- binToModel(streams, "SysHeatYearElecConsum", _bodyBytes[170] * 256 + _bodyBytes[171], nil)
4609
-
4610
- binToModel(streams, "SysHeatYearCOPEER", _bodyBytes[172] * 256 + _bodyBytes[173], nil)
4611
-
4612
- binToModel(streams, "SysCoolDayCapacity", _bodyBytes[174] * 256 + _bodyBytes[175], nil)
4613
-
4614
- binToModel(streams, "SysCoolDayRenewPower", _bodyBytes[176] * 256 + _bodyBytes[177], nil)
4615
-
4616
- binToModel(streams, "SysCoolDayElecConsum", _bodyBytes[178] * 256 + _bodyBytes[179], nil)
4617
-
4618
- binToModel(streams, "SysCoolDayCOPEER", _bodyBytes[180] * 256 + _bodyBytes[181], nil)
4619
-
4620
- binToModel(streams, "SysCoolWeekCapacity", _bodyBytes[182] * 256 + _bodyBytes[183], nil)
4621
-
4622
- binToModel(streams, "SysCoolWeekRenewPower", _bodyBytes[184] * 256 + _bodyBytes[185], nil)
4623
-
4624
- binToModel(streams, "SysCoolWeekElecConsum", _bodyBytes[186] * 256 + _bodyBytes[187], nil)
4625
-
4626
- binToModel(streams, "SysCoolWeekCOPEER", _bodyBytes[188] * 256 + _bodyBytes[189], nil)
4627
-
4628
- binToModel(streams, "SysCoolMonthCapacity", _bodyBytes[190] * 256 + _bodyBytes[191], nil)
4629
-
4630
- binToModel(streams, "SysCoolMonthRenewPower", _bodyBytes[192] * 256 + _bodyBytes[193], nil)
4631
-
4632
- binToModel(streams, "SysCoolMonthElecConsum", _bodyBytes[194] * 256 + _bodyBytes[195], nil)
4633
-
4634
- binToModel(streams, "SysCoolMonthCOPEER", _bodyBytes[196] * 256 + _bodyBytes[197], nil)
4635
-
4636
- binToModel(streams, "SysCoolYearCapacity", _bodyBytes[198] * 256 + _bodyBytes[199], nil)
4637
-
4638
- binToModel(streams, "SysCoolYearRenewPower", _bodyBytes[200] * 256 + _bodyBytes[201], nil)
4639
-
4640
- binToModel(streams, "SysCoolYearElecConsum", _bodyBytes[202] * 256 + _bodyBytes[203], nil)
4641
-
4642
- binToModel(streams, "SysCoolYearCOPEER", _bodyBytes[204] * 256 + _bodyBytes[205], nil)
4643
-
4644
- binToModel(streams, "SysDhwDayCapacity", _bodyBytes[206] * 256 + _bodyBytes[207], nil)
4645
-
4646
- binToModel(streams, "SysDhwDayRenewPower", _bodyBytes[208] * 256 + _bodyBytes[209], nil)
4647
-
4648
- binToModel(streams, "SysDhwDayElecConsum", _bodyBytes[210] * 256 + _bodyBytes[211], nil)
4649
-
4650
- binToModel(streams, "SysDhwDayCOPEER", _bodyBytes[212] * 256 + _bodyBytes[213], nil)
4651
-
4652
- binToModel(streams, "SysDhwWeekCapacity", _bodyBytes[214] * 256 + _bodyBytes[215], nil)
4653
-
4654
- binToModel(streams, "SysDhwWeekRenewPower", _bodyBytes[216] * 256 + _bodyBytes[217], nil)
4655
-
4656
- binToModel(streams, "SysDhwWeekElecConsum", _bodyBytes[218] * 256 + _bodyBytes[219], nil)
4657
-
4658
- binToModel(streams, "SysDhwWeekCOPEER", _bodyBytes[220] * 256 + _bodyBytes[221], nil)
4659
-
4660
- binToModel(streams, "SysDhwMonthCapacity", _bodyBytes[222] * 256 + _bodyBytes[223], nil)
4661
-
4662
- binToModel(streams, "SysDhwMonthRenewPower", _bodyBytes[224] * 256 + _bodyBytes[225], nil)
4663
-
4664
- binToModel(streams, "SysDhwMonthElecConsum", _bodyBytes[226] * 256 + _bodyBytes[227], nil)
4665
-
4666
- binToModel(streams, "SysDhwMonthCOPEER", _bodyBytes[228] * 256 + _bodyBytes[229], nil)
4667
-
4668
- binToModel(streams, "SysDhwYearCapacity", _bodyBytes[230] * 256 + _bodyBytes[231], nil)
4669
-
4670
- binToModel(streams, "SysDhwYearRenewPower", _bodyBytes[232] * 256 + _bodyBytes[233], nil)
4671
-
4672
- binToModel(streams, "SysDhwYearElecConsum", _bodyBytes[234] * 256 + _bodyBytes[235], nil)
4673
-
4674
- binToModel(streams, "SysDhwYearCOPEER", _bodyBytes[236] * 256 + _bodyBytes[237], nil)
4675
- end
4676
-
4677
- local retTable = {}
4678
- retTable[unitTable["str_status"]] = streams
4679
- local ret = encode(retTable)
4680
- return ret
4681
- end