用规则引擎保存订阅的payload消息到TDenginne数据库的问题

我是安装的Ubuntu server系统EMQX企业版5.8.
设置一个规则引擎,订阅主题“pub/values/interval1”后,将消息中的values项目保存到TDengine数据库中。我的SQL规则是SELECT

payload.values as payload

FROM
“pub/values/interval1”
选择插入数据的动作是:INSERT INTO 松丰运行参数.机柜
USING 松丰运行参数.智能一体化电源柜 TAGS (
‘UPS电源柜1’,
‘柜编号1’,
‘备注1’
)
VALUES (
now,
‘状态1’,
‘状态2’,
220.0,
220.0,
220.0,
220.0,
220.0,
220.0,
‘状态3’,
‘状态4’,
220.0,
220.0,
220.0,
220.0,
220.0,
220.0,
‘状态5’,
‘状态6’,
220.0,
220.0,
220.0,
220.0,
220.0,
220.0,
220.0,
220.0,
10.0,
100.0,
0.9,
50.0,
110.0,
220.0,
220.0,
10.0,
100.0,
0.9,
50.0,
110.0,
220.0,
220.0,
10.0,
0.0,
100.0,
0.9,
50.0,
110.0,
220.0,
220.0,
10.0,
50.0,
0.9,
50.0,
110.0,
50.0,
220.0,
220.0,
220.0,
50.0,
0.9,
50.0,
110.0,
220.0,
220.0,
10.0,
100.0,
0.9,
50.0,
110.0,
220.0,
220.0,
10.0,
0.0,
100.0,
0.9,
50.0,
110.0,
220.0,
220.0,
10.0,
50.0,
0.9,
50.0,
110.0,
50.0,
220.0,
220.0,
220.0,
50.0,
0.9,
50.0,
110.0,
220.0,
220.0,
10.0,
100.0,
0.9,
50.0,
110.0,
220.0,
220.0,
10.0,
0.0,
100.0,
0.9,
50.0,
110.0,
220.0,
220.0,
10.0,
50.0,
0.9,
50.0,
110.0,
50.0,
220.0,
220.0,
220.0,
50.0,
0.9,
50.0,
110.0,
220.0,
220.0,
10.0,
100.0,
0.9,
50.0,
110.0,
220.0,
220.0,
10.0,
0.0,
100.0,
0.9,
50.0,
110.0,
220.0,
220.0,
10.0,
50.0,
0.9,
50.0,
110.0,
50.0,
220.0,
220.0,
220.0,
50.0,
0.9,
50.0,
110.0,
220.0,
220.0,
10.0,
100.0,
0.9,
50.0,
110.0,
220.0,
220.0,
10.0,
0.0,
100.0,
0.9,
50.0,
110.0,
220.0,
220.0,
10.0,
50.0,
0.9,
50.0,
110.0,
50.0,
220.0,
220.0,
220.0,
${payload.“UPS电池剩余时间”},
${payload.UPS}

我订阅主题pub/values/interval的payload内容是:
{
“device”: “设备名称2”,
“sendtime”: 1727506811016,
“values”: {
“A10主路开关状态”: “ON”,
“A10备路开关状态”: “OFF”,
“A10主路UAB线电压”: 230.69,
“A10主路UBC线电压”: 202.55,
“A10主路UCA线电压”: 221.8,
“A10备路UAB线电压”: 230.89,
“A10备路UBC线电压”: 232.33,
“A10备路UCA线电压”: 228.75,
“A11主路开关状态”: “ON”,
“A11备路开关状态”: “OFF”,
“A11主路UAB线电压”: 209.37,
“A11主路UBC线电压”: 220.85,
“A11主路UCA线电压”: 235.43,
“A11备路UAB线电压”: 234.12,
“A11备路UBC线电压”: 210.81,
“A11备路UCA线电压”: 230.48,
“A12主路开关状态”: “ON”,
“A12备路开关状态”: “OFF”,
“A12主路UAB线电压”: 229.93,
“A12主路UBC线电压”: 238.48,
“A12主路UCA线电压”: 229.63,
“A12备路UAB线电压”: 225.59,
“A12备路UBC线电压”: 222.44,
“A12备路UCA线电压”: 228.99,
“隔离输入相电压Ua”: 230.36,
“隔离输入线电压Uca”: 229.37,
“隔离输入A相电流”: 7.26,
“隔离输入A相有功功率”: 99.78,
“隔离输入A相功率因数”: 0.17,
“隔离输入A相无功功率”: 579.32,
“隔离输入A相视在功率”: 252.05,
“隔离输入相电压Ub”: 221.88,
“隔离输入线电压Uab”: 223.95,
“隔离输入B相电流”: 8.78,
“隔离输入B相有功功率”: 663.21,
“隔离输入B相功率因数”: 0.55,
“隔离输入B相无功功率”: 675.14,
“隔离输入B相视在功率”: 992.95,
“隔离输入相电压Uc”: 230.21,
“隔离输入线电压Ubc”: 229.57,
“隔离输入C相电流”: 4.74,
“隔离输入零地电压”: 3.58,
“隔离输入C相有功功率”: 20.62,
“隔离输入C相功率因数”: 0.85,
“隔离输入C相无功功率”: 584.08,
“隔离输入C相视在功率”: 300.04,
“隔离输入三相平均线电压”: 207.55,
“隔离输入三相平均相电压”: 227.51,
“隔离输入三相平均相电流”: 3.12,
“隔离输入频率”: 51.31,
“隔离输入三相总有功功率”: 153.3,
“隔离输入三相总功率因数”: 0.64,
“隔离输入三相总无功功率”: 1386.3,
“隔离输入三相总视在功率”: 199.23,
“市电输出相电压Ua”: 223.51,
“市电输出线电压Uca”: 213.61,
“市电输出A相电流”: 8.11,
“市电输出A相有功功率”: 385.58,
“市电输出A相功率因数”: 0.73,
“市电输出A相无功功率”: 507.65,
“市电输出A相视在功率”: 677.67,
“市电输出相电压Ub”: 206.69,
“市电输出线电压Uab”: 227.64,
“市电输出B相电流”: 9.58,
“市电输出B相有功功率”: 525.86,
“市电输出B相功率因数”: 0.14,
“市电输出B相无功功率”: 536.9,
“市电输出B相视在功率”: 776.68,
“市电输出相电压Uc”: 215.7,
“市电输出线电压Ubc”: 223.36,
“市电输出C相电流”: 0.5,
“市电输出零地电压”: 8.94,
“市电输出C相有功功率”: 765.14,
“市电输出C相功率因数”: 0.48,
“市电输出C相无功功率”: 734.16,
“市电输出C相视在功率”: 82.16,
“市电输出三相平均线电压”: 238.34,
“市电输出三相平均相电压”: 225.06,
“市电输出三相平均相电流”: 2.95,
“市电输出频率”: 45.07,
“市电输出三相总有功功率”: 197.1,
“市电输出三相总功率因数”: 0.09,
“市电输出三相总无功功率”: 1587.33,
“市电输出三相总视在功率”: 2214,
“隔离单元旁路输出”: 88.08,
“隔离单元隔离输出”: 56.89,
“稳压单元旁路输出”: 48.85,
“稳压单元稳压输出”: 40.05,
“稳压器输出频率”: 47.64,
“稳压器输出C相电流”: 6.59,
“稳压器输出B相电流”: 2.14,
“稳压器输出A相电流”: 7.78,
“稳压器输出C相电压”: 238.5,
“稳压器输出B相电压”: 219.91,
“稳压器输出A相电压”: 203.17,
“稳压器工作状态指示”: “OFF”,
“稳压器A相过压指示”: “ON”,
“稳压器B相过压指示”: “OFF”,
“稳压器C相过压指示”: “OFF”,
“稳压器A相欠压指示”: “ON”,
“稳压器B相欠压指示”: “ON”,
“稳压器C相欠压指示”: “ON”,
“稳压器A相熔丝告警指示”: “ON”,
“稳压器B相熔丝告警指示”: “ON”,
“稳压器C相熔丝告警指示”: “ON”,
“稳压器A相过载告警指示”: “ON”,
“稳压器B相过载告警指示”: “ON”,
“稳压器C相过载告警指示”: “OFF”,
“稳压器A相T1浪涌保护器告警”: “ON”,
“稳压器A相T2浪涌保护器告警”: “ON”,
“稳压器A相T3浪涌保护器告警”: “OFF”,
“稳压器B相T1浪涌保护器告警”: “OFF”,
“稳压器B相T2浪涌保护器告警”: “ON”,
“稳压器B相T3浪涌保护器告警”: “ON”,
“稳压器C相T1浪涌保护器告警”: “ON”,
“稳压器C相T2浪涌保护器告警”: “OFF”,
“稳压器C相T3浪涌保护器告警”: “ON”,
“稳压器缺相三相不平衡告警”: “ON”,
“稳压器相序错误告警”: “ON”,
“稳压器综合告警”: “OFF”,
“稳压器A相负载百分比”: 53.95,
“稳压器B相负载百分比”: 54.42,
“稳压器C相负载百分比”: 37.08,
“UPS交流旁路电压A”: 232.61,
“UPS交流旁路电压B”: 216.77,
“UPS交流旁路电压C”: 221.13,
“UPS交流旁路电流A”: 7.08,
“UPS交流旁路电流B”: 1.37,
“UPS交流旁路电流C”: 0.08,
“UPS交流旁路频率A”: 47.63,
“UPS交流旁路频率B”: 50.22,
“UPS交流旁路频率C”: 45.48,
“UPS交流旁路A功率因数”: 0.72,
“UPS交流旁路B功率因数”: 0.46,
“UPS交流旁路C功率因数”: 0.53,
“UPS交流输入电压A”: 200.85,
“UPS交流输入电压B”: 211.73,
“UPS交流输入电压C”: 200.62,
“UPS交流输入电流A”: 1.74,
“UPS交流输入电流B”: 4.86,
“UPS交流输入电流C”: 6.16,
“UPS交流输入频率A”: 48.19,
“UPS交流输入频率B”: 46.42,
“UPS交流输入频率C”: 53.96,
“UPS交流输入A功率因数”: 0.41,
“UPS交流输入B功率因数”: 0.91,
“UPS交流输入C功率因数”: 0,
“UPS交流输出电压A”: 215.43,
“UPS交流输出电压B”: 239.71,
“UPS交流输出电压C”: 239.65,
“UPS交流输出电流A”: 5.64,
“UPS交流输出电流B”: 5.43,
“UPS交流输出电流C”: 5.84,
“UPS交流输出频率A”: 54.52,
“UPS交流输出频率B”: 50.08,
“UPS交流输出频率C”: 47.88,
“UPS交流输出A功率因数”: 0.94,
“UPS交流输出B功率因数”: 0.71,
“UPS交流输出C功率因数”: 0.17,
“UPS输出视在功率A”: 185.22,
“UPS输出视在功率B”: 154.16,
“UPS输出视在功率C”: 482.08,
“UPS输出有功功率A”: 904.66,
“UPS输出有功功率B”: 517.61,
“UPS输出有功功率C”: 617.21,
“UPS输出无功功率A”: 789.68,
“UPS输出无功功率B”: 112.77,
“UPS输出无功功率C”: 372.73,
“UPS负载百分数A”: 45.65,
“UPS负载百分数B”: 52.81,
“UPS负载百分数C”: 3.98,
“UPS环境温度”: 6.39,
“UPS正电池组电压”: 229.64,
“UPS负电池组电压”: 226.16,
“UPS正电池组电流”: 8.1,
“UPS负电池组电流”: 9.81,
“UPS电池温度”: 5.71,
“UPS电池剩余时间”: 880.77,
“UPS”: 59.21
}
}

发现的问题:1:使用规则测试的时候,得到选择结果中“键值对”的顺序打乱了。不是输入时的顺序了,变成:
{
“payload”: {
“隔离输入A相有功功率”: 498.72,
“隔离输入线电压Uab”: 225.49,
“A11备路UBC线电压”: 202.39,
“UPS交流输出电压A”: 221.07,
“UPS电池剩余时间”: 329.69,
“A11主路UCA线电压”: 224.67,
“稳压器输出B相电流”: 9.15,
“隔离输入C相电流”: 1.01,
“UPS交流输出电流B”: 9.6,
“隔离输入三相总有功功率”: 789.73,
“A10主路UCA线电压”: 219.81,
“隔离输入A相功率因数”: 0.71,
“UPS交流输入频率B”: 45.5,
“市电输出B相有功功率”: 469.32,
“市电输出B相功率因数”: 0.77,
“稳压器A相负载百分比”: 85.36,
“市电输出A相有功功率”: 110.89,
“A10主路开关状态”: “OFF”,
“UPS交流旁路电流A”: 0.98,
“UPS负载百分数C”: 96.8,
“UPS交流旁路B功率因数”: 0.62,
“UPS”: 77.6,
“UPS输出有功功率C”: 973.36,
“市电输出C相功率因数”: 0.03,
“市电输出B相无功功率”: 228.77,
“UPS交流输出电流C”: 1.32,
“稳压器A相熔丝告警指示”: “ON”,
“市电输出相电压Ub”: 204.87,
“稳压器输出频率”: 48.89,
“稳压器输出B相电压”: 213.49,
“UPS交流旁路电流B”: 7.13,
“市电输出A相视在功率”: 329.93,
“稳压器相序错误告警”: “ON”,
“UPS输出无功功率A”: 855.36,
“市电输出线电压Uca”: 205.99,
“UPS输出视在功率C”: 30.76,
“A10备路开关状态”: “OFF”,
“隔离输入B相电流”: 4.43,
“UPS交流输出频率B”: 53.79,
“UPS交流输入电压C”: 222.44,
“稳压器B相过载告警指示”: “ON”,
“市电输出频率”: 46.12,
“市电输出A相功率因数”: 0.01,
“隔离输入三相总功率因数”: 0.62,
“市电输出三相总无功功率”: 2700.91,
“市电输出B相视在功率”: 941.55,
“UPS负电池组电流”: 2.87,
“UPS输出有功功率B”: 787.54,
“A11备路UAB线电压”: 205.39,
“UPS交流输入电流B”: 1.86,
“A12主路UCA线电压”: 228.68,
“隔离输入C相视在功率”: 515.05,
“A11主路UAB线电压”: 223.29,
“稳压器输出A相电流”: 2.41,
“隔离输入B相有功功率”: 282.14,
“隔离输入C相有功功率”: 695.2,
“隔离单元隔离输出”: 35.78,
“市电输出相电压Uc”: 232.79,
“稳压器B相欠压指示”: “ON”,
“稳压器输出C相电压”: 237.39,
“市电输出三相平均相电压”: 211.44,
“UPS交流旁路频率B”: 54.64,
“隔离输入相电压Ub”: 207.69,
“UPS交流输出电压C”: 222.54,
“市电输出C相电流”: 3.95,
“隔离输入三相平均相电压”: 222.02,
“UPS负载百分数A”: 6.79,
“隔离输入相电压Ua”: 232.4,
“UPS交流输出电流A”: 6.12,
“UPS负载百分数B”: 94.04,
“UPS交流输入电压A”: 228.24,
“UPS交流输入A功率因数”: 0.1,
“隔离输入三相总视在功率”: 2118.87,
“稳压器C相T1浪涌保护器告警”: “ON”,
“稳压器综合告警”: “OFF”,
“A11备路开关状态”: “ON”,
“隔离输入线电压Uca”: 227.3,
“UPS交流输入频率A”: 50.1,
“UPS环境温度”: 0.54,
“市电输出C相有功功率”: 964.71,
“稳压器输出C相电流”: 9.46,
“UPS交流旁路电压B”: 206.86,
“UPS正电池组电压”: 223.92,
“UPS正电池组电流”: 1.09,
“稳压单元旁路输出”: 62.82,
“隔离输入B相无功功率”: 200.89,
“UPS交流旁路电压A”: 216.09,
“稳压器C相熔丝告警指示”: “OFF”,
“A12备路UBC线电压”: 201.14,
“稳压器A相过载告警指示”: “OFF”,
“UPS交流旁路电流C”: 8.93,
“UPS输出视在功率A”: 181.86,
“稳压器A相T2浪涌保护器告警”: “ON”,
“市电输出B相电流”: 7.96,
“稳压器B相T2浪涌保护器告警”: “ON”,
“市电输出线电压Uab”: 214.03,
“UPS交流输出A功率因数”: 0.92,
“稳压器C相过载告警指示”: “OFF”,
“UPS交流旁路频率C”: 45.35,
“隔离输入C相功率因数”: 0.52,
“UPS交流输入C功率因数”: 0.66,
“隔离输入线电压Ubc”: 205.22,
“隔离单元旁路输出”: 55.85,
“稳压器工作状态指示”: “ON”,
“UPS交流输出频率A”: 49.93,
“市电输出三相总视在功率”: 947.28,
“UPS交流输入频率C”: 54.82,
“UPS电池温度”: 13.18,
“A10主路UAB线电压”: 201.35,
“UPS交流输出频率C”: 48.95,
“A11备路UCA线电压”: 219.91,
“稳压器A相过压指示”: “ON”,
“市电输出C相视在功率”: 515.8,
“A10备路UBC线电压”: 222.8,
“UPS输出无功功率C”: 373.38,
“稳压器A相T1浪涌保护器告警”: “OFF”,
“A11主路开关状态”: “ON”,
“稳压器C相欠压指示”: “OFF”,
“稳压器C相T3浪涌保护器告警”: “OFF”,
“A10主路UBC线电压”: 200.37,
“A12主路开关状态”: “ON”,
“隔离输入B相视在功率”: 222.09,
“稳压器C相T2浪涌保护器告警”: “OFF”,
“市电输出三相平均相电流”: 1.88,
“UPS交流输入B功率因数”: 0.68,
“稳压器B相过压指示”: “ON”,
“稳压器B相熔丝告警指示”: “ON”,
“市电输出三相平均线电压”: 232.52,
“A12备路UCA线电压”: 230.26,
“稳压器B相T1浪涌保护器告警”: “OFF”,
“A10备路UAB线电压”: 213.84,
“稳压器B相负载百分比”: 49.14,
“稳压器A相T3浪涌保护器告警”: “ON”,
“稳压器输出A相电压”: 233.95,
“市电输出三相总功率因数”: 0.54,
“UPS交流输出C功率因数”: 0.38,
“稳压器缺相三相不平衡告警”: “OFF”,
“A10备路UCA线电压”: 202.7,
“UPS交流输出电压B”: 210.7,
“A12主路UAB线电压”: 216.87,
“隔离输入B相功率因数”: 0.49,
“隔离输入A相电流”: 0.29,
“市电输出零地电压”: 5.98,
“市电输出相电压Ua”: 221.35,
“稳压器A相欠压指示”: “OFF”,
“UPS交流输入电流A”: 4.93,
“UPS输出有功功率A”: 561.81,
“UPS交流旁路C功率因数”: 0.95,
“隔离输入相电压Uc”: 203.9,
“市电输出A相无功功率”: 216,
“市电输出线电压Ubc”: 213.7,
“UPS输出视在功率B”: 661.51,
“UPS交流输入电流C”: 8.19,
“UPS交流输出B功率因数”: 0.75,
“UPS交流旁路电压C”: 230.26,
“UPS交流输入电压B”: 218.3,
“隔离输入A相无功功率”: 912.49,
“隔离输入C相无功功率”: 581.49,
“隔离输入频率”: 47.81,
“A11主路UBC线电压”: 204.7,
“UPS交流旁路A功率因数”: 0.74,
“A12主路UBC线电压”: 217.27,
“隔离输入三相总无功功率”: 1436.38,
“稳压器B相T3浪涌保护器告警”: “ON”,
“UPS交流旁路频率A”: 49.36,
“隔离输入三相平均线电压”: 209.25,
“A12备路开关状态”: “OFF”,
“稳压器C相过压指示”: “ON”,
“市电输出C相无功功率”: 407.71,
“UPS负电池组电压”: 201.69,
“稳压器C相负载百分比”: 93.54,
“UPS输出无功功率B”: 973.87,
“稳压单元稳压输出”: 7.03,
“隔离输入A相视在功率”: 315.02,
“隔离输入三相平均相电流”: 4.97,
“市电输出三相总有功功率”: 2197.59,
“隔离输入零地电压”: 3.51,
“A12备路UAB线电压”: 211.2,
“市电输出A相电流”: 7.06
}
}
第二个问题是:获取values中的键值对中如果键名是包括汉字时,获取不到数据。也就是用${payload.UPS}能正常获取键值存盘,而${payload.UPS电池剩余电量}则没有获取到相应的键值,键名加了括号 ${payload.“UPS电池剩余时间”},也一样获取不到数值。

求大神们看看是啥原因?