feat(plugin): 优化EMQX插件功能并增强设备管理

- 在application.yml中将运行模式从prod改为dev
- 在application-dev.yml中添加generate_statistics配置项以关闭统计信息
- 在AuthVerticle.java中添加MQTT ACL主题路径转换逻辑
- 在DeviceInfoDataCache.java和DeviceInfoDataImpl.java中增加设备状态查询方法
- 在DeviceInfoExpordVo和DeviceInfoImportVo中新增site字段用于设备位置导出导入
- 在DeviceInstallInfo.java中添加多个图片相关字段如泡沫水测漏图片、设备信息图片、门牌号图片
- 在DeviceInstallInfoDataImpl.java中实现findById方法
- 在DeviceInstallInfoExpordVo和DeviceInstallInfoVo中添加切断阀编号和报警器编号导出功能
- 在DeviceInstallInfoServiceImpl.java中完善安装信息查询逻辑
- 在DeviceManagerServiceImpl.java中支持设备状态查询参数
- 在DeviceQueryBo.java中新增deviceStatus字段用于设备状态筛选
- 在feijialuo-emqx-plugin中优化线程池配置并提升并发处理能力
- 在iot-iita-emqx-plugin中调整设备识别规则适配不同平台需求
master
alsszer 6 months ago
parent febc6291b8
commit 2402bd81df

@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>iot-iita-plugins</artifactId> <artifactId>iot-iita-plugins</artifactId>
<groupId>cc.iotkit.plugins</groupId> <groupId>cc.iotkit.plugins</groupId>
<version>2.10.18</version> <version>2.10.30</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
@ -83,4 +83,4 @@
</plugins> </plugins>
</build> </build>
</project> </project>

@ -36,10 +36,7 @@ import org.springframework.stereotype.Service;
import javax.annotation.PostConstruct; import javax.annotation.PostConstruct;
import java.nio.charset.StandardCharsets; import java.nio.charset.StandardCharsets;
import java.util.*; import java.util.*;
import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.*;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.ScheduledThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
import static cc.iotkit.plugins.emqx.conf.BCDClockGenerator.formatBCDToHex; import static cc.iotkit.plugins.emqx.conf.BCDClockGenerator.formatBCDToHex;
import static cc.iotkit.plugins.emqx.conf.BCDClockGenerator.generateBCDTime; import static cc.iotkit.plugins.emqx.conf.BCDClockGenerator.generateBCDTime;
@ -89,6 +86,18 @@ public class EmqxPlugin implements PluginCloseListener, IPlugin, Runnable {
public static final Map<String, Set<String>> CLIENT_DEVICE_MAP = new HashMap<>(); public static final Map<String, Set<String>> CLIENT_DEVICE_MAP = new HashMap<>();
//定义一个线程池线程池大小时cpu的2倍
// 创建线程池大小为CPU核心数的2倍
private static ExecutorService statusThreadPool = Executors.newFixedThreadPool(Runtime.getRuntime().availableProcessors() * 2);
// 创建线程池大小为CPU核心数的2倍
private static ExecutorService threadPool = Executors.newFixedThreadPool(Runtime.getRuntime().availableProcessors() * 2);
// 创建线程池大小为CPU核心数的2倍
private static ExecutorService sxsbThreadPool = Executors.newFixedThreadPool(Runtime.getRuntime().availableProcessors() * 2);
// 创建线程池大小为CPU核心数的2倍
private static ExecutorService onlineThreadPool = Executors.newFixedThreadPool(Runtime.getRuntime().availableProcessors() * 2);
@PostConstruct @PostConstruct
public void init() { public void init() {
vertx = Vertx.vertx(); vertx = Vertx.vertx();
@ -175,6 +184,12 @@ public class EmqxPlugin implements PluginCloseListener, IPlugin, Runnable {
log.error("client connect fail: ", s.cause()); log.error("client connect fail: ", s.cause());
} }
}).publishHandler(msg -> { }).publishHandler(msg -> {
// 获取当前线程对象
Thread currentThread = Thread.currentThread();
// 获取当前线程的 ID
long threadId = currentThread.getId();
long start = System.currentTimeMillis() ;
log.info("threadId=189{}",threadId+":"+start);
String topic = msg.topicName(); String topic = msg.topicName();
log.info("topic={}",topic); log.info("topic={}",topic);
if (topic.contains("/request/")) { if (topic.contains("/request/")) {
@ -183,15 +198,15 @@ public class EmqxPlugin implements PluginCloseListener, IPlugin, Runnable {
if (topic != null && topic.startsWith("FIGARO/")){ if (topic != null && topic.startsWith("FIGARO/")){
String s = Arrays.asList(topic.split("/")).get(2); String s = Arrays.asList(topic.split("/")).get(2);
topic = "FIGARO/post/*/"+s; topic = "FIGARO/post/*/"+s;
// log.info("Client received message on [{}] payload [{}] with QoS [{}]", topic, msg.payload().toJsonObject(), msg.qosLevel()); // log.info("Client received message on [{}] payload [{}] with QoS [{}]", topic, msg.payload().toJsonObject(), msg.qosLevel());
} }
// JsonObject payload =msg.payload().toJsonObject(); // JsonObject payload =msg.payload().toJsonObject();
// JsonObject payload = parseFrame(msg.payload().getBytes()); // JsonObject payload = parseFrame(msg.payload().getBytes());
JsonObject payload = parseFrame(processToBytes(msg.payload().getBytes())); JsonObject payload = parseFrame(processToBytes(msg.payload().getBytes()));
System.out.println("payload原始数据++++++++++++++++++++" + payload); System.out.println("payload原始数据++++++++++++++++++++" + payload);
if(ObjectUtil.isEmpty(payload)){ if(ObjectUtil.isEmpty(payload)){
return; return;
} }
try { try {
//客户端连接断开 //客户端连接断开
if (topic.equals("/sys/client/disconnected")) { if (topic.equals("/sys/client/disconnected")) {
@ -203,7 +218,8 @@ public class EmqxPlugin implements PluginCloseListener, IPlugin, Runnable {
if (device == null) { if (device == null) {
return; return;
} }
long start0 = System.currentTimeMillis() ;
log.info("threadId=222{}",threadId+":"+start0);
//有消息上报-设备上线 //有消息上报-设备上线
online("*", device.getDeviceName()); online("*", device.getDeviceName());
@ -213,7 +229,8 @@ public class EmqxPlugin implements PluginCloseListener, IPlugin, Runnable {
if(StringUtils.isBlank(method)){ if(StringUtils.isBlank(method)){
method = "thing.event.property.post"; method = "thing.event.property.post";
} }
long start1 = System.currentTimeMillis() ;
log.info("threadId=229{}",threadId+":"+start1);
if (StringUtils.isBlank(method)) { if (StringUtils.isBlank(method)) {
return; return;
} }
@ -231,94 +248,121 @@ public class EmqxPlugin implements PluginCloseListener, IPlugin, Runnable {
mapRaw.put("rawHex", rawHex); mapRaw.put("rawHex", rawHex);
mapRaw.put("replyHex", replyHex); mapRaw.put("replyHex", replyHex);
Map<String, Object> result = new HashMap<>(mapRaw); Map<String, Object> result = new HashMap<>(mapRaw);
long start2 = System.currentTimeMillis() ;
log.info("threadId=248{}",threadId+":"+start2);
if(ObjectUtils.isNotEmpty(cmd)&& ObjectUtils.isNotEmpty(data)){ if(ObjectUtils.isNotEmpty(cmd)&& ObjectUtils.isNotEmpty(data)){
if(cmd.equals("0x11")){ if(cmd.equals("0x11")){
//4.1 状态信息上报命令码0x11 //4.1 状态信息上报命令码0x11
DeviceStatusParser.parseStatusReportToMap(data).forEach( DeviceStatusParser.parseStatusReportToMap(data).forEach(
(key, value) -> result.merge(key, value, (v1, v2) -> v2) // 冲突时保留后者 (key, value) -> result.merge(key, value, (v1, v2) -> v2) // 冲突时保留后者
); );
// params= payload.getJsonObject(DeviceStatusParser.parseStatusReportToMap(data),defParams); // params= payload.getJsonObject(DeviceStatusParser.parseStatusReportToMap(data),defParams);
payload.put("params",result); payload.put("params",result);
device.setDeviceName(result.get("imei").toString()); device.setDeviceName(result.get("imei").toString());
switch(result.get("deviceType").toString()) { switch(result.get("deviceType").toString()) {
case "0": case "0":
device.setProductKey("CEMpmANABN7Tt6Jh"); device.setProductKey("CEMpmANABN7Tt6Jh");
//家用报警器 //家用报警器
break; break;
case "1": case "1":
device.setProductKey("XmXYxjzihseT76As"); device.setProductKey("XmXYxjzihseT76As");
//独立式报警器 //独立式报警器
break; break;
case "2": case "2":
device.setProductKey("bAASX8tBjYQjBGFP"); device.setProductKey("bAASX8tBjYQjBGFP");
//工商业控制器 //工商业控制器
break; break;
case "3": case "3":
//动火离人设备 //动火离人设备
device.setProductKey("WfpZZFkMxxbGfRca"); device.setProductKey("WfpZZFkMxxbGfRca");
case "4": case "4":
//联动控制箱设备 //联动控制箱设备
System.out.println("联动控制箱设备注册++++++++++++++++++++++++++++++++++++++++++"); System.out.println("联动控制箱设备注册++++++++++++++++++++++++++++++++++++++++++");
device.setProductKey("MQFejp7cyDMH3enG"); device.setProductKey("MQFejp7cyDMH3enG");
break; break;
} }
//注册 //注册
IDeviceAction action1 = DeviceRegister.builder() IDeviceAction action1 = DeviceRegister.builder()
.model("FIGARO") .model("FIGARO")
.id(UUID.randomUUID().toString()) .id(UUID.randomUUID().toString())
.deviceName(device.getDeviceName()) .deviceName(device.getDeviceName())
.productKey(device.getProductKey()) .productKey(device.getProductKey())
.params(result) .params(result)
.time(System.currentTimeMillis()) .time(System.currentTimeMillis())
.build(); .build();
thingService.post(pluginInfo.getPluginId(), action1); long start3= System.currentTimeMillis() ;
log.info("threadId=291{}",threadId+":"+start3);
statusThreadPool.submit(new Runnable() {
}else if(cmd.equals("0x12")){ @Override
//4.2 燃气报警器物联网模块数据上报0x12 public void run() {
GasAlarmDataParser.parseHexDataToList(data).forEach( thingService.post(pluginInfo.getPluginId(), action1);
(key, value) -> result.merge(key, value, (v1, v2) -> v2)); }
payload.put("params",result); });
// GasAlarmDataParser.parseHexDataToList(data); long start4= System.currentTimeMillis() ;
}else if(cmd.equals("0x14")){ log.info("threadId=299{}",threadId+":"+start4);
//动火离人数据上报与事件上报 }else if(cmd.equals("0x12")){
FireSafetyDataReceiver.handleHexData(data).forEach( //4.2 燃气报警器物联网模块数据上报0x12
(key, value) -> result.merge(key, value, (v1, v2) -> v2)); GasAlarmDataParser.parseHexDataToList(data).forEach(
payload.put("params",result); (key, value) -> result.merge(key, value, (v1, v2) -> v2));
}else if(cmd.equals("0x15")){ payload.put("params",result);
//联动控制箱设备状态及参数数据上报 long start5= System.currentTimeMillis() ;
LinkageControlDataParser.parseHexDataToList(data).forEach( log.info("threadId=306{}",threadId+":"+start5);
(key, value) -> result.merge(key, value, (v1, v2) -> v2)); // GasAlarmDataParser.parseHexDataToList(data);
payload.put("params",result); }else if(cmd.equals("0x14")){
} //动火离人数据上报与事件上报
else if(cmd.equals("0x23")){ FireSafetyDataReceiver.handleHexData(data).forEach(
flag=false; (key, value) -> result.merge(key, value, (v1, v2) -> v2));
IoTConfigProtocol.parseReadResponse(data).forEach( payload.put("params",result);
(key, value) -> result.merge(key, value, (v1, v2) -> v2)); long start6= System.currentTimeMillis() ;
//读取配置数据 log.info("threadId=314{}",threadId+":"+start6);
payload.put("params",result); }else if(cmd.equals("0x15")){
//联动控制箱设备状态及参数数据上报
//读取配置 LinkageControlDataParser.parseHexDataToList(data).forEach(
DeviceConfig config = DeviceConfig.builder() (key, value) -> result.merge(key, value, (v1, v2) -> v2));
.id(UUID.randomUUID().toString()) payload.put("params",result);
.deviceName(device.getDeviceName()) long start7= System.currentTimeMillis() ;
.productKey(device.getProductKey()) log.info("threadId=321{}",threadId+":"+start7);
.time(System.currentTimeMillis()) }
.config(payload.getJsonObject("params", defParams).getMap()) else if(cmd.equals("0x23")){
.build(); flag=false;
thingService.post(pluginInfo.getPluginId(), config); IoTConfigProtocol.parseReadResponse(data).forEach(
(key, value) -> result.merge(key, value, (v1, v2) -> v2));
//读取配置数据
} payload.put("params",result);
else if(cmd.equals("0x24")){
flag=false; //读取配置
//下发配置数据的回复 DeviceConfig config = DeviceConfig.builder()
// payload.put("params", FireSafetyDataReceiver.handleHexData(data)); .id(UUID.randomUUID().toString())
} .deviceName(device.getDeviceName())
.productKey(device.getProductKey())
.time(System.currentTimeMillis())
.config(payload.getJsonObject("params", defParams).getMap())
.build();
long start8= System.currentTimeMillis() ;
log.info("threadId=339{}",threadId+":"+start8);
threadPool.submit(new Runnable() {
@Override
public void run() {
thingService.post(pluginInfo.getPluginId(), config);
}
});
long start9= System.currentTimeMillis() ;
log.info("threadId=347{}",threadId+":"+start9);
}
else if(cmd.equals("0x24")){
flag=false;
//下发配置数据的回复
// Map<String, Object> mapConfig = FireSafetyDataReceiver.handleHexConfigData(data);
// if(!mapConfig.isEmpty()) {
// payload.put("params", mapConfig);
// }
// long start10= System.currentTimeMillis() ;
// log.info("threadId=357{}",threadId+":"+start10);
}
} }
// params = // params =
//解析设备数据 //解析设备数据
} }
@ -328,16 +372,15 @@ public class EmqxPlugin implements PluginCloseListener, IPlugin, Runnable {
if (ObjectUtil.isNull(params) || params.isEmpty()){ if (ObjectUtil.isNull(params) || params.isEmpty()){
return; return;
} }
// System.out.println(payload.getJsonObject("data", defParams)); // System.out.println(payload.getJsonObject("data", defParams));
if (ObjectUtils.isNotEmpty(method) && "thing.lifetime.register".equalsIgnoreCase(method)) { if (ObjectUtils.isNotEmpty(method) && "thing.lifetime.register".equalsIgnoreCase(method)) {
//子设备注册 //子设备注册
String subPk = params.getString("productKey"); String subPk = params.getString("productKey");
String subDn = params.getString("deviceName"); String subDn = params.getString("deviceName");
String subModel = params.getString("model"); String subModel = params.getString("model");
long start11= System.currentTimeMillis() ;
ActionResult regResult = thingService.post( log.info("threadId=378{}",threadId+":"+start11);
pluginInfo.getPluginId(), ActionResult regResult = thingService.post(pluginInfo.getPluginId(),fillAction(
fillAction(
SubDeviceRegister.builder() SubDeviceRegister.builder()
.productKey(device.getProductKey()) .productKey(device.getProductKey())
.deviceName(device.getDeviceName()) .deviceName(device.getDeviceName())
@ -352,6 +395,8 @@ public class EmqxPlugin implements PluginCloseListener, IPlugin, Runnable {
.build() .build()
) )
); );
long start12= System.currentTimeMillis() ;
log.info("threadId=395{}",threadId+":"+start12);
if (regResult.getCode() == 0) { if (regResult.getCode() == 0) {
//注册成功 //注册成功
reply(topic, payload, 0); reply(topic, payload, 0);
@ -379,7 +424,8 @@ public class EmqxPlugin implements PluginCloseListener, IPlugin, Runnable {
.params(params.getMap()) .params(params.getMap())
.build(); .build();
} }
long start13= System.currentTimeMillis() ;
log.info("threadId=424{}",threadId+":"+start13);
try { try {
if(flag) { if(flag) {
reply1(replyHex,device.getDeviceName(), payload); reply1(replyHex,device.getDeviceName(), payload);
@ -395,8 +441,17 @@ public class EmqxPlugin implements PluginCloseListener, IPlugin, Runnable {
action.setProductKey(device.getProductKey()); action.setProductKey(device.getProductKey());
action.setDeviceName(device.getDeviceName()); action.setDeviceName(device.getDeviceName());
action.setTime(System.currentTimeMillis()); action.setTime(System.currentTimeMillis());
thingService.post(pluginInfo.getPluginId(), action); long start14= System.currentTimeMillis() ;
log.info("threadId=441{}",threadId+":"+start14);
IDeviceAction finalAction = action;
sxsbThreadPool.submit(new Runnable() {
@Override
public void run() {
thingService.post(pluginInfo.getPluginId(), finalAction);
}
});
long start15= System.currentTimeMillis() ;
log.info("threadId=450{}",threadId+":"+start15);
} catch (Exception e) { } catch (Exception e) {
log.error("message is illegal.", e); log.error("message is illegal.", e);
} }
@ -429,17 +484,22 @@ public class EmqxPlugin implements PluginCloseListener, IPlugin, Runnable {
return; return;
}*/ }*/
//上线 onlineThreadPool.submit(new Runnable() {
thingService.post( @Override
pluginInfo.getPluginId(), public void run() {
fillAction(DeviceStateChange.builder() //上线
.productKey(pk) thingService.post(
.deviceName(dn) pluginInfo.getPluginId(),
.state(DeviceState.ONLINE) fillAction(DeviceStateChange.builder()
.build() .productKey(pk)
) .deviceName(dn)
); .state(DeviceState.ONLINE)
DEVICE_ONLINE.put(dn, true); .build()
)
);
DEVICE_ONLINE.put(dn, true);
}
});
} }
public void offline(String clientId) { public void offline(String clientId) {
@ -502,7 +562,7 @@ public class EmqxPlugin implements PluginCloseListener, IPlugin, Runnable {
// System.out.println("BCD Time: " + formatBCDToHex(generateBCDTime())); // System.out.println("BCD Time: " + formatBCDToHex(generateBCDTime()));
String replyMessage = buildFrame("01", "01", String replyMessage = buildFrame("01", "01",
mid, cmd, "00" + formatBCDToHex(generateBCDTime())); mid, cmd, "00" + formatBCDToHex(generateBCDTime()));
return replyMessage; return replyMessage;
} }
public static String formatHexByte(String input) { public static String formatHexByte(String input) {
// 移除0x前缀并保留纯十六进制字符 // 移除0x前缀并保留纯十六进制字符
@ -515,8 +575,8 @@ public class EmqxPlugin implements PluginCloseListener, IPlugin, Runnable {
} }
/** /**
* *
*/ */
private void reply1(String replyMessage,String deviceName, JsonObject payload) { private void reply1(String replyMessage,String deviceName, JsonObject payload) {
Map<String, Object> payloadReply = new HashMap<>(); Map<String, Object> payloadReply = new HashMap<>();
if(ObjectUtil.isNull(replyMessage)) { if(ObjectUtil.isNull(replyMessage)) {
@ -543,7 +603,7 @@ public class EmqxPlugin implements PluginCloseListener, IPlugin, Runnable {
System.out.println("cmd" + cmd); System.out.println("cmd" + cmd);
// System.out.println(mid + "re++++++++++++++++++++++++++++++++++++++++++++++++++" + cmd); // System.out.println(mid + "re++++++++++++++++++++++++++++++++++++++++++++++++++" + cmd);
// System.out.println("BCD Time: " + formatBCDToHex(generateBCDTime())); // System.out.println("BCD Time: " + formatBCDToHex(generateBCDTime()));
replyMessage = buildFrame("01", "01", replyMessage = buildFrame("01", "01",
mid, cmd, "00" + formatBCDToHex(generateBCDTime())); mid, cmd, "00" + formatBCDToHex(generateBCDTime()));
} }
payloadReply.put("data", replyMessage); payloadReply.put("data", replyMessage);
@ -565,11 +625,11 @@ public class EmqxPlugin implements PluginCloseListener, IPlugin, Runnable {
private void reply(String topic, JsonObject payload, int code) { private void reply(String topic, JsonObject payload, int code) {
Map<String, Object> payloadReply = new HashMap<>(); Map<String, Object> payloadReply = new HashMap<>();
// System.out.println("BCD Time: " + formatBCDToHex(generateBCDTime())); // System.out.println("BCD Time: " + formatBCDToHex(generateBCDTime()));
String replyMessage = buildFrame("01","01", String replyMessage = buildFrame("01","01",
"00","01","01"+formatBCDToHex(generateBCDTime())); "00","01","01"+formatBCDToHex(generateBCDTime()));
if( StringUtils.isBlank(payload.getString("method"))){ if( StringUtils.isBlank(payload.getString("method"))){
payloadReply.put("id", payload.getString("messageID")); payloadReply.put("id", payload.getString("messageID"));
payloadReply.put("method", "thing.event.property.post_reply"); payloadReply.put("method", "thing.event.property.post_reply");
payloadReply.put("code", code); payloadReply.put("code", code);
@ -578,25 +638,25 @@ public class EmqxPlugin implements PluginCloseListener, IPlugin, Runnable {
JsonObject params = null; JsonObject params = null;
JsonObject defParams = JsonObject.mapFrom(new HashMap<>(0)); JsonObject defParams = JsonObject.mapFrom(new HashMap<>(0));
params = payload.getJsonObject("params", defParams); params = payload.getJsonObject("params", defParams);
// JsonArray attribute = payload.getJsonArray("params", new JsonArray()); // 提供默认值:ml-citation{ref="1" data="citationList"} // JsonArray attribute = payload.getJsonArray("params", new JsonArray()); // 提供默认值:ml-citation{ref="1" data="citationList"}
JsonArray attribute = new JsonArray(); JsonArray attribute = new JsonArray();
// JsonObject jsonObject = payload.getMap().get("params").getJsonObject("params", defParams); // JsonObject jsonObject = payload.getMap().get("params").getJsonObject("params", defParams);
attribute.add(payload.getMap().get("params")); // 回退处理为单元素数组:ml-citation{ref="8" data="citationList"} attribute.add(payload.getMap().get("params")); // 回退处理为单元素数组:ml-citation{ref="8" data="citationList"}
// JsonArray attribute = payload.getJsonArray("params"); // JsonArray attribute = payload.getJsonArray("params");
List points = attribute.getList(); List points = attribute.getList();
Map<String, Object> attrMap = (Map<String, Object>) points.get(0); Map<String, Object> attrMap = (Map<String, Object>) points.get(0);
List<Map<String, Object>>arrList = (List<Map<String, Object>>) attrMap.get("points"); List<Map<String, Object>>arrList = (List<Map<String, Object>>) attrMap.get("points");
Map<String,Object> map = new HashMap<>(); Map<String,Object> map = new HashMap<>();
if(ObjectUtils.isEmpty(arrList)){ if(ObjectUtils.isEmpty(arrList)){
payloadReply.put("data", attrMap); payloadReply.put("data", attrMap);
}else{ }else{
arrList.forEach(s->{ arrList.forEach(s->{
map.put((String) s.get("name"),s.get("value")); map.put((String) s.get("name"),s.get("value"));
}); });
payloadReply.put("data", map); payloadReply.put("data", map);
} }
topic = topic.replace("/s/", "/c/") + "_reply"; topic = topic.replace("/s/", "/c/") + "_reply";
}else{ }else{
payloadReply.put("id", payload.getString("id")); payloadReply.put("id", payload.getString("id"));
@ -623,7 +683,7 @@ public class EmqxPlugin implements PluginCloseListener, IPlugin, Runnable {
public Map<String, Object> getConfigMap(JsonObject payload) { public Map<String, Object> getConfigMap(JsonObject payload) {
JsonArray attribute = new JsonArray(); JsonArray attribute = new JsonArray();
attribute.add(payload.getMap().get("params")); attribute.add(payload.getMap().get("params"));
// JsonArray attribute = payload.getJsonArray("params"); // JsonArray attribute = payload.getJsonArray("params");
List points = attribute.getList(); List points = attribute.getList();
Map<String, Object> attrMap = (Map<String, Object>) points.get(0); Map<String, Object> attrMap = (Map<String, Object>) points.get(0);
List<Map<String, Object>>arrList = (List<Map<String, Object>>) attrMap.get("points"); List<Map<String, Object>>arrList = (List<Map<String, Object>>) attrMap.get("points");
@ -678,3 +738,4 @@ public class EmqxPlugin implements PluginCloseListener, IPlugin, Runnable {
return null; return null;
} }
} }

@ -1,5 +1,5 @@
plugin: plugin:
runMode: prod runMode: dev
mainPackage: cc.iotkit.plugin mainPackage: cc.iotkit.plugin
emqx: emqx:

@ -20,7 +20,7 @@
<version>2.7.11</version> <version>2.7.11</version>
<relativePath/> <relativePath/>
</parent> </parent>
<version>2.10.18</version> <version>2.10.30</version>
<groupId>cc.iotkit.plugins</groupId> <groupId>cc.iotkit.plugins</groupId>
<artifactId>iot-iita-plugins</artifactId> <artifactId>iot-iita-plugins</artifactId>
@ -93,4 +93,4 @@
</dependencies> </dependencies>
</project> </project>

Loading…
Cancel
Save