From 3974ec775318b9e63935780d67a44dc0201ace13 Mon Sep 17 00:00:00 2001 From: ayyoob Date: Sat, 14 May 2016 00:34:36 +0530 Subject: [PATCH] refactored analytics scripts --- .../build.xml | 8 ++++-- .../build.xml | 8 +++--- .../pom.xml | 6 ++-- .../arduino_execution.siddhiql | 8 +++--- .../arduino_receiver/arduino_receiver.xml | 6 ++-- .../Arduino/arduino_stream/artifact.xml | 2 +- .../org.wso2.iot.arduino_1.0.0.json | 7 ++--- .../carbonapps/Arduino/artifacts.xml | 9 +++--- components/iot-plugins/arduino-plugin/pom.xml | 1 + .../build.xml | 28 ++++++++----------- .../temperature_sensor/artifacts.xml | 13 ++++----- .../temperature_publisher/artifact.xml | 4 +-- .../temperature_publisher.xml | 2 +- .../temperature_receiver/artifact.xml | 4 +-- .../temperature_script/artifact.xml | 4 +-- .../temperature_store/artifact.xml | 2 +- .../temperature_stream/artifact.xml | 2 +- .../adapter/extension/ContentValidator.java | 4 +-- .../http/util/HTTPEventAdapterConstants.java | 8 +++--- .../adapter/http/i18n/Resources.properties | 8 +++--- .../mqtt/util/MQTTAdapterListener.java | 2 +- .../mqtt/util/MQTTEventAdapterConstants.java | 10 +++---- .../adapter/mqtt/i18n/Resources.properties | 8 +++--- .../xmpp/util/XMPPEventAdapterConstants.java | 8 +++--- .../adapter/xmpp/i18n/Resources.properties | 8 +++--- .../build.xml | 6 ++-- .../carbonapps/raspberrypi/artifacts.xml | 8 +++--- .../raspberrypi_execution/artifact.xml | 4 +-- .../raspberrypi_execution.siddhiql | 12 ++++---- .../raspberrypi_receiver/artifact.xml | 4 +-- .../raspberrypi_receiver.xml | 17 ++++++----- .../org.wso2.iot.raspberrypi_1.0.0.json | 9 +++--- .../iot-plugins/raspberrypi-plugin/pom.xml | 1 + .../constants/VirtualFireAlarmConstants.java | 2 +- .../src/main/resources/p2.inf | 2 +- .../pom.xml | 12 ++++++++ .../src/main/resources/agent/Connect.ino | 4 --- .../src/main/resources/p2.inf | 3 ++ .../pom.xml | 12 ++++++++ .../src/main/resources/p2.inf | 3 ++ 40 files changed, 146 insertions(+), 123 deletions(-) diff --git a/components/iot-plugins/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/build.xml b/components/iot-plugins/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/build.xml index fa8c79f574..7753265876 100644 --- a/components/iot-plugins/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/build.xml +++ b/components/iot-plugins/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/build.xml @@ -17,13 +17,14 @@ ~ under the License. --> - + - + + @@ -34,5 +35,8 @@ + + + diff --git a/components/iot-plugins/arduino-plugin/org.wso2.carbon.device.mgt.iot.arduino.analytics/build.xml b/components/iot-plugins/arduino-plugin/org.wso2.carbon.device.mgt.iot.arduino.analytics/build.xml index fa8c79f574..fb9d9f5d74 100644 --- a/components/iot-plugins/arduino-plugin/org.wso2.carbon.device.mgt.iot.arduino.analytics/build.xml +++ b/components/iot-plugins/arduino-plugin/org.wso2.carbon.device.mgt.iot.arduino.analytics/build.xml @@ -17,13 +17,13 @@ ~ under the License. --> - + - + @@ -31,8 +31,8 @@ - - + + diff --git a/components/iot-plugins/arduino-plugin/org.wso2.carbon.device.mgt.iot.arduino.analytics/pom.xml b/components/iot-plugins/arduino-plugin/org.wso2.carbon.device.mgt.iot.arduino.analytics/pom.xml index 176413cff3..1f313170a0 100644 --- a/components/iot-plugins/arduino-plugin/org.wso2.carbon.device.mgt.iot.arduino.analytics/pom.xml +++ b/components/iot-plugins/arduino-plugin/org.wso2.carbon.device.mgt.iot.arduino.analytics/pom.xml @@ -21,15 +21,15 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> - androidsense-plugin + arduino-plugin org.wso2.carbon.devicemgt-plugins 2.1.0-SNAPSHOT ../pom.xml 4.0.0 - org.wso2.carbon.device.mgt.iot.androidsense.analytics - WSO2 Carbon - IoT Server Android Sense Analytics capp + org.wso2.carbon.device.mgt.iot.arduino.analytics + WSO2 Carbon - IoT Server Arduino Analytics capp pom diff --git a/components/iot-plugins/arduino-plugin/org.wso2.carbon.device.mgt.iot.arduino.analytics/src/main/resources/carbonapps/Arduino/arduino_execution/arduino_execution.siddhiql b/components/iot-plugins/arduino-plugin/org.wso2.carbon.device.mgt.iot.arduino.analytics/src/main/resources/carbonapps/Arduino/arduino_execution/arduino_execution.siddhiql index 17d75154ae..7ccf14e5cf 100644 --- a/components/iot-plugins/arduino-plugin/org.wso2.carbon.device.mgt.iot.arduino.analytics/src/main/resources/carbonapps/Arduino/arduino_execution/arduino_execution.siddhiql +++ b/components/iot-plugins/arduino-plugin/org.wso2.carbon.device.mgt.iot.arduino.analytics/src/main/resources/carbonapps/Arduino/arduino_execution/arduino_execution.siddhiql @@ -6,12 +6,12 @@ /* define streams/tables and write queries here ... */ +@Import('org.wso2.iot.arduino:1.0.0') +define stream arduino (meta_owner string, meta_deviceId string, temperature float); + @Export('org.wso2.iot.devices.temperature:1.0.0') define stream temperature (meta_owner string, meta_deviceType string, meta_deviceId string, meta_time long, temperature float); -@Import('org.wso2.iot.arduino:1.0.0') -define stream arduino (meta_owner string, string, meta_deviceId string, temperature float); - from arduino -select meta_owner, 'arduino' as meta_deviceType, meta_deviceId, timestampInMilliseconds () as meta_time, temperature +select meta_owner, 'arduino' as meta_deviceType, meta_deviceId, time:timestampInMilliseconds() as meta_time, temperature insert into temperature; diff --git a/components/iot-plugins/arduino-plugin/org.wso2.carbon.device.mgt.iot.arduino.analytics/src/main/resources/carbonapps/Arduino/arduino_receiver/arduino_receiver.xml b/components/iot-plugins/arduino-plugin/org.wso2.carbon.device.mgt.iot.arduino.analytics/src/main/resources/carbonapps/Arduino/arduino_receiver/arduino_receiver.xml index c38bf2808e..cd3507cdef 100644 --- a/components/iot-plugins/arduino-plugin/org.wso2.carbon.device.mgt.iot.arduino.analytics/src/main/resources/carbonapps/Arduino/arduino_receiver/arduino_receiver.xml +++ b/components/iot-plugins/arduino-plugin/org.wso2.carbon.device.mgt.iot.arduino.analytics/src/main/resources/carbonapps/Arduino/arduino_receiver/arduino_receiver.xml @@ -20,8 +20,8 @@ 2 admin - device_id_json_path:event.metaData.deviceId - org.wso2.carbon.device.mgt.iot.input.adapter.http.util.HTTPContentValidator + device_id_json_path:event.metaData.deviceId + org.wso2.carbon.device.mgt.iot.input.adapter.http.util.HTTPContentValidator default all 100 @@ -29,5 +29,5 @@ admin - + diff --git a/components/iot-plugins/arduino-plugin/org.wso2.carbon.device.mgt.iot.arduino.analytics/src/main/resources/carbonapps/Arduino/arduino_stream/artifact.xml b/components/iot-plugins/arduino-plugin/org.wso2.carbon.device.mgt.iot.arduino.analytics/src/main/resources/carbonapps/Arduino/arduino_stream/artifact.xml index aa1da9eb81..8ba90edaf3 100644 --- a/components/iot-plugins/arduino-plugin/org.wso2.carbon.device.mgt.iot.arduino.analytics/src/main/resources/carbonapps/Arduino/arduino_stream/artifact.xml +++ b/components/iot-plugins/arduino-plugin/org.wso2.carbon.device.mgt.iot.arduino.analytics/src/main/resources/carbonapps/Arduino/arduino_stream/artifact.xml @@ -17,7 +17,7 @@ ~ under the License. --> - + org.wso2.iot.arduino_1.0.0.json diff --git a/components/iot-plugins/arduino-plugin/org.wso2.carbon.device.mgt.iot.arduino.analytics/src/main/resources/carbonapps/Arduino/arduino_stream/org.wso2.iot.arduino_1.0.0.json b/components/iot-plugins/arduino-plugin/org.wso2.carbon.device.mgt.iot.arduino.analytics/src/main/resources/carbonapps/Arduino/arduino_stream/org.wso2.iot.arduino_1.0.0.json index 68f7c70362..71bd0e1bbd 100644 --- a/components/iot-plugins/arduino-plugin/org.wso2.carbon.device.mgt.iot.arduino.analytics/src/main/resources/carbonapps/Arduino/arduino_stream/org.wso2.iot.arduino_1.0.0.json +++ b/components/iot-plugins/arduino-plugin/org.wso2.carbon.device.mgt.iot.arduino.analytics/src/main/resources/carbonapps/Arduino/arduino_stream/org.wso2.iot.arduino_1.0.0.json @@ -1,7 +1,7 @@ { "name": "org.wso2.iot.arduino", "version": "1.0.0", - "nickName": "Arduino Data", + "nickName": "Arduino", "description": "Temperature data received from the Arduino", "metaData": [ {"name":"owner","type":"STRING"}, @@ -12,7 +12,4 @@ "name": "temperature","type": "FLOAT" } ] -} - - - +} \ No newline at end of file diff --git a/components/iot-plugins/arduino-plugin/org.wso2.carbon.device.mgt.iot.arduino.analytics/src/main/resources/carbonapps/Arduino/artifacts.xml b/components/iot-plugins/arduino-plugin/org.wso2.carbon.device.mgt.iot.arduino.analytics/src/main/resources/carbonapps/Arduino/artifacts.xml index 76ee9774c4..a39c227e5c 100644 --- a/components/iot-plugins/arduino-plugin/org.wso2.carbon.device.mgt.iot.arduino.analytics/src/main/resources/carbonapps/Arduino/artifacts.xml +++ b/components/iot-plugins/arduino-plugin/org.wso2.carbon.device.mgt.iot.arduino.analytics/src/main/resources/carbonapps/Arduino/artifacts.xml @@ -18,10 +18,9 @@ --> - - - - - + + + + diff --git a/components/iot-plugins/arduino-plugin/pom.xml b/components/iot-plugins/arduino-plugin/pom.xml index 09f6e7c898..09236b0ad9 100644 --- a/components/iot-plugins/arduino-plugin/pom.xml +++ b/components/iot-plugins/arduino-plugin/pom.xml @@ -37,6 +37,7 @@ org.wso2.carbon.device.mgt.iot.arduino.api org.wso2.carbon.device.mgt.iot.arduino.plugin org.wso2.carbon.device.mgt.iot.arduino.ui + org.wso2.carbon.device.mgt.iot.arduino.analytics diff --git a/components/iot-plugins/iot-analytics/org.wso2.carbon.device.mgt.iot.analytics/build.xml b/components/iot-plugins/iot-analytics/org.wso2.carbon.device.mgt.iot.analytics/build.xml index 85226558bf..acc6dc0e66 100644 --- a/components/iot-plugins/iot-analytics/org.wso2.carbon.device.mgt.iot.analytics/build.xml +++ b/components/iot-plugins/iot-analytics/org.wso2.carbon.device.mgt.iot.analytics/build.xml @@ -17,24 +17,23 @@ ~ under the License. --> - + - - - - - - - - - - - - + + + + + + + + + + + @@ -72,9 +71,6 @@ - - - diff --git a/components/iot-plugins/iot-analytics/org.wso2.carbon.device.mgt.iot.analytics/src/main/resources/carbonapps/temperature_sensor/artifacts.xml b/components/iot-plugins/iot-analytics/org.wso2.carbon.device.mgt.iot.analytics/src/main/resources/carbonapps/temperature_sensor/artifacts.xml index c4a8e430aa..fb4685ebd6 100644 --- a/components/iot-plugins/iot-analytics/org.wso2.carbon.device.mgt.iot.analytics/src/main/resources/carbonapps/temperature_sensor/artifacts.xml +++ b/components/iot-plugins/iot-analytics/org.wso2.carbon.device.mgt.iot.analytics/src/main/resources/carbonapps/temperature_sensor/artifacts.xml @@ -18,12 +18,11 @@ --> - - - - - - - + + + + + + diff --git a/components/iot-plugins/iot-analytics/org.wso2.carbon.device.mgt.iot.analytics/src/main/resources/carbonapps/temperature_sensor/temperature_publisher/artifact.xml b/components/iot-plugins/iot-analytics/org.wso2.carbon.device.mgt.iot.analytics/src/main/resources/carbonapps/temperature_sensor/temperature_publisher/artifact.xml index d473900b0e..752cb8c410 100644 --- a/components/iot-plugins/iot-analytics/org.wso2.carbon.device.mgt.iot.analytics/src/main/resources/carbonapps/temperature_sensor/temperature_publisher/artifact.xml +++ b/components/iot-plugins/iot-analytics/org.wso2.carbon.device.mgt.iot.analytics/src/main/resources/carbonapps/temperature_sensor/temperature_publisher/artifact.xml @@ -17,6 +17,6 @@ ~ under the License. --> - - EventPublisher_temperature.xml + + temperature_publisher.xml diff --git a/components/iot-plugins/iot-analytics/org.wso2.carbon.device.mgt.iot.analytics/src/main/resources/carbonapps/temperature_sensor/temperature_publisher/temperature_publisher.xml b/components/iot-plugins/iot-analytics/org.wso2.carbon.device.mgt.iot.analytics/src/main/resources/carbonapps/temperature_sensor/temperature_publisher/temperature_publisher.xml index 81ae64614a..3ab9a7d3f3 100644 --- a/components/iot-plugins/iot-analytics/org.wso2.carbon.device.mgt.iot.analytics/src/main/resources/carbonapps/temperature_sensor/temperature_publisher/temperature_publisher.xml +++ b/components/iot-plugins/iot-analytics/org.wso2.carbon.device.mgt.iot.analytics/src/main/resources/carbonapps/temperature_sensor/temperature_publisher/temperature_publisher.xml @@ -17,7 +17,7 @@ ~ under the License. --> - + diff --git a/components/iot-plugins/iot-analytics/org.wso2.carbon.device.mgt.iot.analytics/src/main/resources/carbonapps/temperature_sensor/temperature_receiver/artifact.xml b/components/iot-plugins/iot-analytics/org.wso2.carbon.device.mgt.iot.analytics/src/main/resources/carbonapps/temperature_sensor/temperature_receiver/artifact.xml index 25df56734b..f858a2efae 100644 --- a/components/iot-plugins/iot-analytics/org.wso2.carbon.device.mgt.iot.analytics/src/main/resources/carbonapps/temperature_sensor/temperature_receiver/artifact.xml +++ b/components/iot-plugins/iot-analytics/org.wso2.carbon.device.mgt.iot.analytics/src/main/resources/carbonapps/temperature_sensor/temperature_receiver/artifact.xml @@ -17,6 +17,6 @@ ~ under the License. --> - - EventReceiver_temperature.xml + + temperature_receiver.xml diff --git a/components/iot-plugins/iot-analytics/org.wso2.carbon.device.mgt.iot.analytics/src/main/resources/carbonapps/temperature_sensor/temperature_script/artifact.xml b/components/iot-plugins/iot-analytics/org.wso2.carbon.device.mgt.iot.analytics/src/main/resources/carbonapps/temperature_sensor/temperature_script/artifact.xml index 9b4228e30c..5d7cdee199 100644 --- a/components/iot-plugins/iot-analytics/org.wso2.carbon.device.mgt.iot.analytics/src/main/resources/carbonapps/temperature_sensor/temperature_script/artifact.xml +++ b/components/iot-plugins/iot-analytics/org.wso2.carbon.device.mgt.iot.analytics/src/main/resources/carbonapps/temperature_sensor/temperature_script/artifact.xml @@ -17,6 +17,6 @@ ~ under the License. --> - - Temperature_Sensor_Script.xml + + temperature_script.xml diff --git a/components/iot-plugins/iot-analytics/org.wso2.carbon.device.mgt.iot.analytics/src/main/resources/carbonapps/temperature_sensor/temperature_store/artifact.xml b/components/iot-plugins/iot-analytics/org.wso2.carbon.device.mgt.iot.analytics/src/main/resources/carbonapps/temperature_sensor/temperature_store/artifact.xml index ccfb3b3140..4863a47e9c 100644 --- a/components/iot-plugins/iot-analytics/org.wso2.carbon.device.mgt.iot.analytics/src/main/resources/carbonapps/temperature_sensor/temperature_store/artifact.xml +++ b/components/iot-plugins/iot-analytics/org.wso2.carbon.device.mgt.iot.analytics/src/main/resources/carbonapps/temperature_sensor/temperature_store/artifact.xml @@ -17,6 +17,6 @@ ~ under the License. --> - + org_wso2_iot_devices_temperature.xml diff --git a/components/iot-plugins/iot-analytics/org.wso2.carbon.device.mgt.iot.analytics/src/main/resources/carbonapps/temperature_sensor/temperature_stream/artifact.xml b/components/iot-plugins/iot-analytics/org.wso2.carbon.device.mgt.iot.analytics/src/main/resources/carbonapps/temperature_sensor/temperature_stream/artifact.xml index 27ec69702e..cc733b792e 100644 --- a/components/iot-plugins/iot-analytics/org.wso2.carbon.device.mgt.iot.analytics/src/main/resources/carbonapps/temperature_sensor/temperature_stream/artifact.xml +++ b/components/iot-plugins/iot-analytics/org.wso2.carbon.device.mgt.iot.analytics/src/main/resources/carbonapps/temperature_sensor/temperature_stream/artifact.xml @@ -17,7 +17,7 @@ ~ under the License. --> - + org.wso2.iot.devices.temperature_1.0.0.json diff --git a/components/iot-plugins/iot-base-plugin/org.wso2.carbon.device.mgt.iot.input.adapter.extension/src/main/java/org/wso2/carbon/device/mgt/iot/input/adapter/extension/ContentValidator.java b/components/iot-plugins/iot-base-plugin/org.wso2.carbon.device.mgt.iot.input.adapter.extension/src/main/java/org/wso2/carbon/device/mgt/iot/input/adapter/extension/ContentValidator.java index f53a0a7754..138df3cebf 100644 --- a/components/iot-plugins/iot-base-plugin/org.wso2.carbon.device.mgt.iot.input.adapter.extension/src/main/java/org/wso2/carbon/device/mgt/iot/input/adapter/extension/ContentValidator.java +++ b/components/iot-plugins/iot-base-plugin/org.wso2.carbon.device.mgt.iot.input.adapter.extension/src/main/java/org/wso2/carbon/device/mgt/iot/input/adapter/extension/ContentValidator.java @@ -25,9 +25,9 @@ import java.util.Map; */ public interface ContentValidator { /** - * @param contentValidationParams that related to input adapter. + * @param contentValidatorParams that related to input adapter. * @param dynamicParameter that message. * @return ContentInfo. */ - ContentInfo validate(Object message, Map contentValidationParams, Map dynamicParameter); + ContentInfo validate(Object message, Map contentValidatorParams, Map dynamicParameter); } diff --git a/components/iot-plugins/iot-base-plugin/org.wso2.carbon.device.mgt.iot.input.adapter.http/src/main/java/org/wso2/carbon/device/mgt/iot/input/adapter/http/util/HTTPEventAdapterConstants.java b/components/iot-plugins/iot-base-plugin/org.wso2.carbon.device.mgt.iot.input.adapter.http/src/main/java/org/wso2/carbon/device/mgt/iot/input/adapter/http/util/HTTPEventAdapterConstants.java index 5eb7ed4883..0193cc9cc9 100644 --- a/components/iot-plugins/iot-base-plugin/org.wso2.carbon.device.mgt.iot.input.adapter.http/src/main/java/org/wso2/carbon/device/mgt/iot/input/adapter/http/util/HTTPEventAdapterConstants.java +++ b/components/iot-plugins/iot-base-plugin/org.wso2.carbon.device.mgt.iot.input.adapter.http/src/main/java/org/wso2/carbon/device/mgt/iot/input/adapter/http/util/HTTPEventAdapterConstants.java @@ -64,10 +64,10 @@ public final class HTTPEventAdapterConstants { public static final String USERNAME_TAG = "username"; public static final String PAYLOAD_TAG = "payload"; public static final String DEVICE_ID_JSON_PATH = "device_id_json_path"; - public static final String ADAPTER_CONF_CONTENT_VALIDATOR_CLASSNAME = "contentValidation"; - public static final String ADAPTER_CONF_CONTENT_VALIDATOR_CLASSNAME_HINT = "contentValidation.hint"; - public static final String ADAPTER_CONF_CONTENT_VALIDATOR_PARAMS = "contentValidationParams"; - public static final String ADAPTER_CONF_CONTENT_VALIDATOR_PARAMS_HINT = "contentValidationParams.hint"; + public static final String ADAPTER_CONF_CONTENT_VALIDATOR_CLASSNAME = "contentValidator"; + public static final String ADAPTER_CONF_CONTENT_VALIDATOR_CLASSNAME_HINT = "contentValidator.hint"; + public static final String ADAPTER_CONF_CONTENT_VALIDATOR_PARAMS = "contentValidatorParams"; + public static final String ADAPTER_CONF_CONTENT_VALIDATOR_PARAMS_HINT = "contentValidatorParams.hint"; public static final String DEFAULT = "default"; public static final String HTTP_CONTENT_VALIDATION_DEFAULT_PARAMETERS = ""; public static final String ADAPTER_CONF_CONTENT_TRANSFORMER_CLASSNAME = "contentTransformer"; diff --git a/components/iot-plugins/iot-base-plugin/org.wso2.carbon.device.mgt.iot.input.adapter.http/src/main/resources/org/wso2/carbon/device/mgt/iot/input/adapter/http/i18n/Resources.properties b/components/iot-plugins/iot-base-plugin/org.wso2.carbon.device.mgt.iot.input.adapter.http/src/main/resources/org/wso2/carbon/device/mgt/iot/input/adapter/http/i18n/Resources.properties index f84f46ab1f..1e7b22ccbe 100644 --- a/components/iot-plugins/iot-base-plugin/org.wso2.carbon.device.mgt.iot.input.adapter.http/src/main/resources/org/wso2/carbon/device/mgt/iot/input/adapter/http/i18n/Resources.properties +++ b/components/iot-plugins/iot-base-plugin/org.wso2.carbon.device.mgt.iot.input.adapter.http/src/main/resources/org/wso2/carbon/device/mgt/iot/input/adapter/http/i18n/Resources.properties @@ -32,9 +32,9 @@ maximumTotalHttpConnection=maximumTotalHttpConnection maximumTotalHttpConnection.hint=Maximum Total connection to be made with the endpoint maximumHttpConnectionPerHost=maximumHttpConnectionPerHost maximumHttpConnectionPerHost.hint=Maximum Http connection per host. -contentValidation=contentValidation -contentValidation.hint=Class Name of the content Validation or 'default' to set default class, required to implement (if required) -contentValidationParams=contentValidationParams -contentValidationParams.hint=ContentValidationParams, comma seperated. (if required) +contentValidator=contentValidator +contentValidator.hint=Class Name of the content Validation or 'default' to set default class, required to implement (if required) +contentValidatorParams=contentValidationParams +contentValidatorParams.hint=ContentValidationParams, comma seperated. (if required) contentTransformer=contentTransformer contentTransformer.hint=Class Name of the content transformer or 'default' to set default class, required to implement (if required) \ No newline at end of file diff --git a/components/iot-plugins/iot-base-plugin/org.wso2.carbon.device.mgt.iot.input.adapter.mqtt/src/main/java/org/wso2/carbon/device/mgt/iot/input/adapter/mqtt/util/MQTTAdapterListener.java b/components/iot-plugins/iot-base-plugin/org.wso2.carbon.device.mgt.iot.input.adapter.mqtt/src/main/java/org/wso2/carbon/device/mgt/iot/input/adapter/mqtt/util/MQTTAdapterListener.java index 97f52cf31e..3053671416 100644 --- a/components/iot-plugins/iot-base-plugin/org.wso2.carbon.device.mgt.iot.input.adapter.mqtt/src/main/java/org/wso2/carbon/device/mgt/iot/input/adapter/mqtt/util/MQTTAdapterListener.java +++ b/components/iot-plugins/iot-base-plugin/org.wso2.carbon.device.mgt.iot.input.adapter.mqtt/src/main/java/org/wso2/carbon/device/mgt/iot/input/adapter/mqtt/util/MQTTAdapterListener.java @@ -267,8 +267,8 @@ public class MQTTAdapterListener implements MqttCallback, Runnable { try { MQTTEventAdapterConstants.initialReconnectDuration = MQTTEventAdapterConstants.initialReconnectDuration * MQTTEventAdapterConstants.reconnectionProgressionFactor; - startListener(); Thread.sleep(MQTTEventAdapterConstants.initialReconnectDuration); + startListener(); connectionSucceeded = true; log.info("MQTT Connection successful"); } catch (InterruptedException e) { diff --git a/components/iot-plugins/iot-base-plugin/org.wso2.carbon.device.mgt.iot.input.adapter.mqtt/src/main/java/org/wso2/carbon/device/mgt/iot/input/adapter/mqtt/util/MQTTEventAdapterConstants.java b/components/iot-plugins/iot-base-plugin/org.wso2.carbon.device.mgt.iot.input.adapter.mqtt/src/main/java/org/wso2/carbon/device/mgt/iot/input/adapter/mqtt/util/MQTTEventAdapterConstants.java index 27ff7acc4f..88ac43171b 100644 --- a/components/iot-plugins/iot-base-plugin/org.wso2.carbon.device.mgt.iot.input.adapter.mqtt/src/main/java/org/wso2/carbon/device/mgt/iot/input/adapter/mqtt/util/MQTTEventAdapterConstants.java +++ b/components/iot-plugins/iot-base-plugin/org.wso2.carbon.device.mgt.iot.input.adapter.mqtt/src/main/java/org/wso2/carbon/device/mgt/iot/input/adapter/mqtt/util/MQTTEventAdapterConstants.java @@ -32,10 +32,10 @@ public class MQTTEventAdapterConstants { public static final String ADAPTER_CONF_URL_HINT = "url.hint"; public static final String ADAPTER_CONF_DCR_URL = "dcrUrl"; public static final String ADAPTER_CONF_DCR_URL_HINT = "dcrUrl.hint"; - public static final String ADAPTER_CONF_CONTENT_VALIDATOR_CLASSNAME = "contentValidation"; - public static final String ADAPTER_CONF_CONTENT_VALIDATOR_CLASSNAME_HINT = "contentValidation.hint"; - public static final String ADAPTER_CONF_CONTENT_VALIDATOR_PARAMS = "contentValidationParams"; - public static final String ADAPTER_CONF_CONTENT_VALIDATOR_PARAMS_HINT = "contentValidationParams.hint"; + public static final String ADAPTER_CONF_CONTENT_VALIDATOR_CLASSNAME = "contentValidator"; + public static final String ADAPTER_CONF_CONTENT_VALIDATOR_CLASSNAME_HINT = "contentValidator.hint"; + public static final String ADAPTER_CONF_CONTENT_VALIDATOR_PARAMS = "contentValidatorParams"; + public static final String ADAPTER_CONF_CONTENT_VALIDATOR_PARAMS_HINT = "contentValidatorParams.hint"; public static final String ADAPTER_CONF_CONTENT_TRANSFORMER_CLASSNAME = "contentTransformer"; public static final String ADAPTER_CONF_CONTENT_TRANSFORMER_CLASSNAME_HINT = "contentTransformer.hint"; public static final String ADAPTER_MESSAGE_TOPIC = "topic"; @@ -47,7 +47,7 @@ public class MQTTEventAdapterConstants { public static final String ADAPTER_CONF_KEEP_ALIVE = "keepAlive"; public static final int ADAPTER_CONF_DEFAULT_KEEP_ALIVE = 60000; - public static int initialReconnectDuration = 10000; + public static int initialReconnectDuration = 2000; public static final int reconnectionProgressionFactor = 2; public static final String EMPTY_STRING = ""; diff --git a/components/iot-plugins/iot-base-plugin/org.wso2.carbon.device.mgt.iot.input.adapter.mqtt/src/main/resources/org/wso2/carbon/device/mgt/iot/input/adapter/mqtt/i18n/Resources.properties b/components/iot-plugins/iot-base-plugin/org.wso2.carbon.device.mgt.iot.input.adapter.mqtt/src/main/resources/org/wso2/carbon/device/mgt/iot/input/adapter/mqtt/i18n/Resources.properties index d1f6676ed5..dc644d5004 100644 --- a/components/iot-plugins/iot-base-plugin/org.wso2.carbon.device.mgt.iot.input.adapter.mqtt/src/main/resources/org/wso2/carbon/device/mgt/iot/input/adapter/mqtt/i18n/Resources.properties +++ b/components/iot-plugins/iot-base-plugin/org.wso2.carbon.device.mgt.iot.input.adapter.mqtt/src/main/resources/org/wso2/carbon/device/mgt/iot/input/adapter/mqtt/i18n/Resources.properties @@ -27,10 +27,10 @@ scopes=Scopes scopes.hint=Scopes required to connect to broker (if required) dcrUrl=dcrUrl dcrUrl.hint=dynamic client registration endpoint URL to create application (if required) eg: https://localhost:9443/dynamic-client-web/register -contentValidation=contentValidation -contentValidation.hint=Class Name of the content Validation or 'default' to set default class, required to implement (if required) -contentValidationParams=contentValidationParams -contentValidationParams.hint=ContentValidationParams, comma seperated. (if required) +contentValidator=contentValidation +contentValidator.hint=Class Name of the content Validation or 'default' to set default class, required to implement (if required) +contentValidatorParams=contentValidationParams +contentValidatorParams.hint=ContentValidationParams, comma seperated. (if required) url.hint=MQTT broker url tcp://localhost:1883 cleanSession=Clean Session cleanSession.hint=Persist topic subscriptions and ack positions across client sessions diff --git a/components/iot-plugins/iot-base-plugin/org.wso2.carbon.device.mgt.iot.input.adapter.xmpp/src/main/java/org/wso2/carbon/device/mgt/iot/input/adapter/xmpp/util/XMPPEventAdapterConstants.java b/components/iot-plugins/iot-base-plugin/org.wso2.carbon.device.mgt.iot.input.adapter.xmpp/src/main/java/org/wso2/carbon/device/mgt/iot/input/adapter/xmpp/util/XMPPEventAdapterConstants.java index 70ebf950af..8f94f96ac0 100644 --- a/components/iot-plugins/iot-base-plugin/org.wso2.carbon.device.mgt.iot.input.adapter.xmpp/src/main/java/org/wso2/carbon/device/mgt/iot/input/adapter/xmpp/util/XMPPEventAdapterConstants.java +++ b/components/iot-plugins/iot-base-plugin/org.wso2.carbon.device.mgt.iot.input.adapter.xmpp/src/main/java/org/wso2/carbon/device/mgt/iot/input/adapter/xmpp/util/XMPPEventAdapterConstants.java @@ -38,10 +38,10 @@ public class XMPPEventAdapterConstants { public static final String ADAPTER_CONF_RESOURCE_HINT = "resource.hint"; public static final String ADAPTER_CONF_TIMEOUT_INTERVAL = "timeoutInterval"; public static final String ADAPTER_CONF_TIMEOUT_INTERVAL_HINT = "timeoutInterval.hint"; - public static final String ADAPTER_CONF_CONTENT_VALIDATOR_CLASSNAME = "contentValidation"; - public static final String ADAPTER_CONF_CONTENT_VALIDATOR_CLASSNAME_HINT = "contentValidation.hint"; - public static final String ADAPTER_CONF_CONTENT_VALIDATOR_PARAMS = "contentValidationParams"; - public static final String ADAPTER_CONF_CONTENT_VALIDATOR_PARAMS_HINT = "contentValidationParams.hint"; + public static final String ADAPTER_CONF_CONTENT_VALIDATOR_CLASSNAME = "contentValidator"; + public static final String ADAPTER_CONF_CONTENT_VALIDATOR_CLASSNAME_HINT = "contentValidator.hint"; + public static final String ADAPTER_CONF_CONTENT_VALIDATOR_PARAMS = "contentValidatorParams"; + public static final String ADAPTER_CONF_CONTENT_VALIDATOR_PARAMS_HINT = "contentValidatorParams.hint"; public static final String ADAPTER_CONF_CONTENT_TRANSFORMER_CLASSNAME = "contentTransformer"; public static final String ADAPTER_CONF_CONTENT_TRANSFORMER_CLASSNAME_HINT = "contentTransformer.hint"; public static final String ADAPTER_CONF_RECIEVER_JID = "jid"; diff --git a/components/iot-plugins/iot-base-plugin/org.wso2.carbon.device.mgt.iot.input.adapter.xmpp/src/main/resources/org/wso2/carbon/device/mgt/iot/input/adapter/xmpp/i18n/Resources.properties b/components/iot-plugins/iot-base-plugin/org.wso2.carbon.device.mgt.iot.input.adapter.xmpp/src/main/resources/org/wso2/carbon/device/mgt/iot/input/adapter/xmpp/i18n/Resources.properties index 95a62ec036..359f4a50b4 100644 --- a/components/iot-plugins/iot-base-plugin/org.wso2.carbon.device.mgt.iot.input.adapter.xmpp/src/main/resources/org/wso2/carbon/device/mgt/iot/input/adapter/xmpp/i18n/Resources.properties +++ b/components/iot-plugins/iot-base-plugin/org.wso2.carbon.device.mgt.iot.input.adapter.xmpp/src/main/resources/org/wso2/carbon/device/mgt/iot/input/adapter/xmpp/i18n/Resources.properties @@ -28,10 +28,10 @@ timeoutInterval=Time out Interval timeoutInterval.hint=used by listeners to the server and for reconnection schedules. resource=Resource resource.hint=specific to the XMPP-Account to which the login is made to. -contentValidation=contentValidation -contentValidation.hint=Class Name of the content Validation or 'default' to set default class, required to implement (if required) -contentValidationParams=contentValidationParams -contentValidationParams.hint=ContentValidationParams, comma seperated. (if required) +contentValidator=contentValidation +contentValidator.hint=Class Name of the content Validation or 'default' to set default class, required to implement (if required) +contentValidatorParams=contentValidationParams +contentValidatorParams.hint=ContentValidationParams, comma seperated. (if required) jid=jid jid.hint=JID - XMPP Account Name. contentTransformer=contentTransformer diff --git a/components/iot-plugins/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.analytics/build.xml b/components/iot-plugins/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.analytics/build.xml index ff64397aca..4ae3e01fa3 100644 --- a/components/iot-plugins/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.analytics/build.xml +++ b/components/iot-plugins/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.analytics/build.xml @@ -23,7 +23,7 @@ - + @@ -31,8 +31,8 @@ - - + + diff --git a/components/iot-plugins/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.analytics/src/main/resources/carbonapps/raspberrypi/artifacts.xml b/components/iot-plugins/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.analytics/src/main/resources/carbonapps/raspberrypi/artifacts.xml index a39c227e5c..0828acf4db 100644 --- a/components/iot-plugins/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.analytics/src/main/resources/carbonapps/raspberrypi/artifacts.xml +++ b/components/iot-plugins/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.analytics/src/main/resources/carbonapps/raspberrypi/artifacts.xml @@ -18,9 +18,9 @@ --> - - - - + + + + diff --git a/components/iot-plugins/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.analytics/src/main/resources/carbonapps/raspberrypi/raspberrypi_execution/artifact.xml b/components/iot-plugins/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.analytics/src/main/resources/carbonapps/raspberrypi/raspberrypi_execution/artifact.xml index a67055590e..37663a5c83 100644 --- a/components/iot-plugins/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.analytics/src/main/resources/carbonapps/raspberrypi/raspberrypi_execution/artifact.xml +++ b/components/iot-plugins/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.analytics/src/main/resources/carbonapps/raspberrypi/raspberrypi_execution/artifact.xml @@ -17,7 +17,7 @@ ~ under the License. --> - - arduino_execution.siddhiql + + raspberrypi_execution.siddhiql diff --git a/components/iot-plugins/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.analytics/src/main/resources/carbonapps/raspberrypi/raspberrypi_execution/raspberrypi_execution.siddhiql b/components/iot-plugins/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.analytics/src/main/resources/carbonapps/raspberrypi/raspberrypi_execution/raspberrypi_execution.siddhiql index 7ccf14e5cf..6414e6f073 100644 --- a/components/iot-plugins/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.analytics/src/main/resources/carbonapps/raspberrypi/raspberrypi_execution/raspberrypi_execution.siddhiql +++ b/components/iot-plugins/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.analytics/src/main/resources/carbonapps/raspberrypi/raspberrypi_execution/raspberrypi_execution.siddhiql @@ -1,17 +1,17 @@ /* Enter a unique ExecutionPlan */ -@Plan:name('arduino_execution') +@Plan:name('raspberrypi_execution') /* Enter a unique description for ExecutionPlan */ --- @Plan:description('arduino_execution') +-- @Plan:description('raspberrypi_execution') /* define streams/tables and write queries here ... */ -@Import('org.wso2.iot.arduino:1.0.0') -define stream arduino (meta_owner string, meta_deviceId string, temperature float); +@Import('org.wso2.iot.raspberrypi:1.0.0') +define stream raspberrypi (meta_owner string, meta_deviceId string, meta_time long, temperature float); @Export('org.wso2.iot.devices.temperature:1.0.0') define stream temperature (meta_owner string, meta_deviceType string, meta_deviceId string, meta_time long, temperature float); -from arduino -select meta_owner, 'arduino' as meta_deviceType, meta_deviceId, time:timestampInMilliseconds() as meta_time, temperature +from raspberrypi +select meta_owner, 'raspberrypi' as meta_deviceType, meta_deviceId, meta_time, temperature insert into temperature; diff --git a/components/iot-plugins/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.analytics/src/main/resources/carbonapps/raspberrypi/raspberrypi_receiver/artifact.xml b/components/iot-plugins/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.analytics/src/main/resources/carbonapps/raspberrypi/raspberrypi_receiver/artifact.xml index b6ac56075b..5e7265fbc2 100644 --- a/components/iot-plugins/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.analytics/src/main/resources/carbonapps/raspberrypi/raspberrypi_receiver/artifact.xml +++ b/components/iot-plugins/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.analytics/src/main/resources/carbonapps/raspberrypi/raspberrypi_receiver/artifact.xml @@ -17,6 +17,6 @@ ~ under the License. --> - - arduino_receiver.xml + + raspberrypi_receiver.xml diff --git a/components/iot-plugins/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.analytics/src/main/resources/carbonapps/raspberrypi/raspberrypi_receiver/raspberrypi_receiver.xml b/components/iot-plugins/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.analytics/src/main/resources/carbonapps/raspberrypi/raspberrypi_receiver/raspberrypi_receiver.xml index b4b8f38623..0da104f1ff 100644 --- a/components/iot-plugins/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.analytics/src/main/resources/carbonapps/raspberrypi/raspberrypi_receiver/raspberrypi_receiver.xml +++ b/components/iot-plugins/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.analytics/src/main/resources/carbonapps/raspberrypi/raspberrypi_receiver/raspberrypi_receiver.xml @@ -17,17 +17,16 @@ ~ under the License. --> - - 2 + + carbon.super/raspberrypi/+/temperature admin - device_id_json_path:event.metaData.deviceId - org.wso2.carbon.device.mgt.iot.input.adapter.http.util.HTTPContentValidator + device_id_json_path:event.metaData.deviceId,device_id_topic_hierarchy_index:2 + org.wso2.carbon.device.mgt.iot.input.adapter.mqtt.util.MQTTContentValidator default - all - 100 - https://localhost:${carbon.https.port}/services/OAuth2TokenValidationService - admin + https://localhost:${carbon.https.port}/dynamic-client-web/register + tcp://${mqtt.broker.host}:${mqtt.broker.port} + true - + diff --git a/components/iot-plugins/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.analytics/src/main/resources/carbonapps/raspberrypi/raspberrypi_stream/org.wso2.iot.raspberrypi_1.0.0.json b/components/iot-plugins/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.analytics/src/main/resources/carbonapps/raspberrypi/raspberrypi_stream/org.wso2.iot.raspberrypi_1.0.0.json index 71bd0e1bbd..225db3d1c6 100644 --- a/components/iot-plugins/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.analytics/src/main/resources/carbonapps/raspberrypi/raspberrypi_stream/org.wso2.iot.raspberrypi_1.0.0.json +++ b/components/iot-plugins/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.analytics/src/main/resources/carbonapps/raspberrypi/raspberrypi_stream/org.wso2.iot.raspberrypi_1.0.0.json @@ -1,11 +1,12 @@ { - "name": "org.wso2.iot.arduino", + "name": "org.wso2.iot.raspberrypi", "version": "1.0.0", - "nickName": "Arduino", - "description": "Temperature data received from the Arduino", + "nickName": "raspberrypi", + "description": "Temperature data received from the raspberrypi", "metaData": [ {"name":"owner","type":"STRING"}, - {"name":"deviceId","type":"STRING"} + {"name":"deviceId","type":"STRING"}, + {"name":"time","type":"LONG"} ], "payloadData": [ { diff --git a/components/iot-plugins/raspberrypi-plugin/pom.xml b/components/iot-plugins/raspberrypi-plugin/pom.xml index 6642759956..e4eaf75072 100644 --- a/components/iot-plugins/raspberrypi-plugin/pom.xml +++ b/components/iot-plugins/raspberrypi-plugin/pom.xml @@ -36,6 +36,7 @@ org.wso2.carbon.device.mgt.iot.raspberrypi.plugin org.wso2.carbon.device.mgt.iot.raspberrypi.ui org.wso2.carbon.device.mgt.iot.raspberrypi.api + org.wso2.carbon.device.mgt.iot.raspberrypi.analytics diff --git a/components/iot-plugins/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.plugin/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/plugin/constants/VirtualFireAlarmConstants.java b/components/iot-plugins/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.plugin/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/plugin/constants/VirtualFireAlarmConstants.java index 09e3bb718f..64d4e50fd5 100644 --- a/components/iot-plugins/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.plugin/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/plugin/constants/VirtualFireAlarmConstants.java +++ b/components/iot-plugins/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.plugin/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/plugin/constants/VirtualFireAlarmConstants.java @@ -68,7 +68,7 @@ public class VirtualFireAlarmConstants { public static final String TOPIC = "topic"; public static final String SUBSCRIBED_TOPIC = "carbon.super/virtual_firealarm/+/publisher"; - public static final String CONTENT_VALIDATION = "contentValidation"; + public static final String CONTENT_VALIDATION = "contentValidator"; public static final String CONTENT_TRANSFORMATION = "contentTransformer"; public static final String RESOURCE = "resource"; diff --git a/features/iot-plugins-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.feature/src/main/resources/p2.inf b/features/iot-plugins-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.feature/src/main/resources/p2.inf index 4ee9278fef..ebc3a3162d 100644 --- a/features/iot-plugins-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.feature/src/main/resources/p2.inf +++ b/features/iot-plugins-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.feature/src/main/resources/p2.inf @@ -19,4 +19,4 @@ org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../con org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../database/AndroidSenseDM_DB.h2.db);\ org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../deployment/server/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android_sense.device-view);\ org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../deployment/server/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android_sense.type-view);\ -org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../deployment/server/carbonapps/Android_Sense.car);\ +org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../deployment/server/carbonapps/android_sense.car);\ diff --git a/features/iot-plugins-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.feature/pom.xml b/features/iot-plugins-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.feature/pom.xml index a13e3bb748..56b0114344 100644 --- a/features/iot-plugins-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.feature/pom.xml +++ b/features/iot-plugins-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.feature/pom.xml @@ -91,6 +91,18 @@ + + org.wso2.carbon.devicemgt-plugins + org.wso2.carbon.device.mgt.iot.arduino.analytics + + ${project.version} + zip + true + + ${project.build.directory}/maven-shared-archive-resources/carbonapps + + **/* + org.wso2.carbon.devicemgt-plugins org.wso2.carbon.device.mgt.iot.arduino.ui diff --git a/features/iot-plugins-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.feature/src/main/resources/agent/Connect.ino b/features/iot-plugins-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.feature/src/main/resources/agent/Connect.ino index a97852a68c..1b37255c3d 100644 --- a/features/iot-plugins-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.feature/src/main/resources/agent/Connect.ino +++ b/features/iot-plugins-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.feature/src/main/resources/agent/Connect.ino @@ -100,12 +100,8 @@ void setupResource(){ jsonPayLoad = "{\"event\":{\"metaData\":"; jsonPayLoad += "{\"owner\":\""; jsonPayLoad += String(DEVICE_OWNER); - jsonPayLoad += "\",\"deviceType\":\""; - jsonPayLoad += String(DEVICE_TYPE); jsonPayLoad += "\",\"deviceId\":\""; jsonPayLoad += String(DEVICE_ID); - jsonPayLoad += "\",\"time\":"; - jsonPayLoad += String(TIME); jsonPayLoad += "}, \"payloadData\":{"; if(DEBUG) { diff --git a/features/iot-plugins-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.feature/src/main/resources/p2.inf b/features/iot-plugins-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.feature/src/main/resources/p2.inf index 9d52b358a0..6a31ba6eda 100644 --- a/features/iot-plugins-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.feature/src/main/resources/p2.inf +++ b/features/iot-plugins-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.feature/src/main/resources/p2.inf @@ -10,6 +10,8 @@ org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../featur org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.arduino_${feature.version}/datasources/,target:${installFolder}/../../conf/datasources/,overwrite:true);\ org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../database/);\ org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.arduino_${feature.version}/database/,target:${installFolder}/../../database/,overwrite:true);\ +org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../deployment/server/carbonapps/);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.arduino_${feature.version}/carbonapps/,target:${installFolder}/../../deployment/server/carbonapps/,overwrite:true);\ instructions.unconfigure = \ org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../deployment/server/webapps/arduino.war);\ @@ -20,3 +22,4 @@ org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../con org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../database/ArduinoDM_DB.h2.db);\ org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../deployment/server/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.arduino.device-view);\ org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../deployment/server/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.arduino.type-view);\ +org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../deployment/server/carbonapps/arduino.car);\ \ No newline at end of file diff --git a/features/iot-plugins-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/pom.xml b/features/iot-plugins-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/pom.xml index 94046a9d3d..efb39b6946 100644 --- a/features/iot-plugins-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/pom.xml +++ b/features/iot-plugins-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/pom.xml @@ -91,6 +91,18 @@ + + org.wso2.carbon.devicemgt-plugins + org.wso2.carbon.device.mgt.iot.raspberrypi.analytics + + ${project.version} + zip + true + + ${project.build.directory}/maven-shared-archive-resources/carbonapps + + **/* + org.wso2.carbon.devicemgt-plugins org.wso2.carbon.device.mgt.iot.raspberrypi.ui diff --git a/features/iot-plugins-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/p2.inf b/features/iot-plugins-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/p2.inf index 088a6edca3..dc84290411 100644 --- a/features/iot-plugins-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/p2.inf +++ b/features/iot-plugins-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/p2.inf @@ -10,6 +10,8 @@ org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../featur org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.raspberrypi_${feature.version}/datasources/,target:${installFolder}/../../conf/datasources/,overwrite:true);\ org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../database/);\ org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.raspberrypi_${feature.version}/database/,target:${installFolder}/../../database/,overwrite:true);\ +org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../deployment/server/carbonapps/);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.raspberrypi_${feature.version}/carbonapps/,target:${installFolder}/../../deployment/server/carbonapps/,overwrite:true);\ instructions.unconfigure = \ org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../deployment/server/webapps/raspberrypi.war);\ @@ -20,3 +22,4 @@ org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../con org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../database/RaspberryPiDM_DB.h2.db);\ org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../deployment/server/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.raspberrypi.device-view);\ org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../deployment/server/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.raspberrypi.type-view);\ +org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../deployment/server/carbonapps/raspberrypi.car);\ \ No newline at end of file