diff --git a/http-plugin/src/main/java/cc/iotkit/plugins/http/service/HttpDevice.java b/http-plugin/src/main/java/cc/iotkit/plugins/http/service/HttpDevice.java
index 561d57a..348ac70 100755
--- a/http-plugin/src/main/java/cc/iotkit/plugins/http/service/HttpDevice.java
+++ b/http-plugin/src/main/java/cc/iotkit/plugins/http/service/HttpDevice.java
@@ -1,14 +1,11 @@
package cc.iotkit.plugins.http.service;
-import cc.iotkit.common.enums.ErrCode;
-import cc.iotkit.common.exception.BizException;
import cc.iotkit.plugin.core.thing.IDevice;
import cc.iotkit.plugin.core.thing.actions.ActionResult;
import cc.iotkit.plugin.core.thing.actions.down.DeviceConfig;
import cc.iotkit.plugin.core.thing.actions.down.PropertyGet;
import cc.iotkit.plugin.core.thing.actions.down.PropertySet;
import cc.iotkit.plugin.core.thing.actions.down.ServiceInvoke;
-import io.vertx.core.json.JsonObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@@ -30,54 +27,17 @@ public class HttpDevice implements IDevice {
@Override
public ActionResult propertyGet(PropertyGet action) {
- String topic = String.format("/sys/%s/%s/c/service/property/get", action.getProductKey(), action.getDeviceName());
- return send(
- topic,
- action.getDeviceName(),
- new JsonObject()
- .put("id", action.getId())
- .put("method", "thing.service.property.get")
- .put("params", action.getKeys())
- .toString()
- );
+ throw new UnsupportedOperationException("不支持该功能");
}
@Override
public ActionResult propertySet(PropertySet action) {
- String topic = String.format("/sys/%s/%s/c/service/property/set", action.getProductKey(), action.getDeviceName());
- return send(
- topic,
- action.getDeviceName(),
- new JsonObject()
- .put("id", action.getId())
- .put("method", "thing.service.property.set")
- .put("params", action.getParams())
- .toString()
- );
+ throw new UnsupportedOperationException("不支持该功能");
}
@Override
public ActionResult serviceInvoke(ServiceInvoke action) {
- String topic = String.format("/sys/%s/%s/c/service/%s", action.getProductKey(), action.getDeviceName(), action.getName());
- return send(
- topic,
- action.getDeviceName(),
- new JsonObject()
- .put("id", action.getId())
- .put("method", "thing.service." + action.getName())
- .put("params", action.getParams())
- .toString()
- );
- }
-
- private ActionResult send(String topic, String deviceName, String payload) {
- try {
- return ActionResult.builder().code(0).reason("").build();
- } catch (BizException e) {
- return ActionResult.builder().code(e.getCode()).reason(e.getMessage()).build();
- } catch (Exception e) {
- return ActionResult.builder().code(ErrCode.UNKNOWN_EXCEPTION.getKey()).reason(e.getMessage()).build();
- }
+ throw new UnsupportedOperationException("不支持该功能");
}
}
diff --git a/http-plugin/src/main/resources/script.js b/http-plugin/src/main/resources/script.js
new file mode 100644
index 0000000..e69de29
diff --git a/modbus-plugin/src/main/java/cc/iotkit/plugins/modbus/conf/BeanConfig.java b/modbus-plugin/src/main/java/cc/iotkit/plugins/modbus/conf/BeanConfig.java
index f81d639..11fa414 100755
--- a/modbus-plugin/src/main/java/cc/iotkit/plugins/modbus/conf/BeanConfig.java
+++ b/modbus-plugin/src/main/java/cc/iotkit/plugins/modbus/conf/BeanConfig.java
@@ -25,7 +25,7 @@ public class BeanConfig {
@Bean
@ConditionalOnProperty(name = "plugin.runMode", havingValue = "dev")
IPluginScript getPluginScript() {
- return new LocalPluginScript("test.js");
+ return new LocalPluginScript("script.js");
}
@Bean
diff --git a/modbus-plugin/src/main/resources/test.js b/modbus-plugin/src/main/resources/script.js
similarity index 100%
rename from modbus-plugin/src/main/resources/test.js
rename to modbus-plugin/src/main/resources/script.js
diff --git a/pom.xml b/pom.xml
index a69115d..073d9c9 100755
--- a/pom.xml
+++ b/pom.xml
@@ -8,7 +8,6 @@
http-plugin
modbus-plugin
tcp-plugin
- tcp-plugin2
diff --git a/tcp-plugin/src/main/resources/test.js b/tcp-plugin/src/main/resources/script.js
similarity index 100%
rename from tcp-plugin/src/main/resources/test.js
rename to tcp-plugin/src/main/resources/script.js