diff --git a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_accelerometer_executionplan/Android-Accelerometer-ExecutionPlan.siddhiql b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_accelerometer_executionplan/Android-Accelerometer-ExecutionPlan.siddhiql
index fa0e7517d..e89e73f86 100755
--- a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_accelerometer_executionplan/Android-Accelerometer-ExecutionPlan.siddhiql
+++ b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_accelerometer_executionplan/Android-Accelerometer-ExecutionPlan.siddhiql
@@ -3,16 +3,16 @@
@Plan:description('Process accelerometer changes.')
@Import('org.wso2.iot.android.accelerometer:1.0.0')
-define stream AccelerometerStream (meta_owner string, meta_deviceId string, meta_timestamp long, x float, y float, z float);
+define stream AccelerometerStream (meta_owner string, meta_deviceId string, meta_timestamp long, axis string, value
+float);
@Export('org.wso2.iot.android.accelerometer.stats:1.0.0')
-define stream AccelerometerStatsStream (meta_owner string, meta_deviceId string, meta_timestamp long, x
-float, y float, z float, year int, month int, day int, hour int, minute int);
+define stream AccelerometerStatsStream (meta_owner string, meta_deviceId string, meta_timestamp long, axis string, value float, year int, month int, day int, hour int, minute int);
partition with (meta_deviceId of AccelerometerStream)
begin
from AccelerometerStream
- select meta_owner, meta_deviceId, meta_timestamp, x, y, z, time:extract
+ select meta_owner, meta_deviceId, meta_timestamp, axis, value, time:extract
(meta_timestamp, 'year') as year, time:extract(meta_timestamp, 'month') as month, time:extract(meta_timestamp, 'day') as day, time:extract(meta_timestamp, 'hour') as hour, time:extract(meta_timestamp, 'minute') as minute
insert into AccelerometerStatsStream;
end;
\ No newline at end of file
diff --git a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_accelerometer_stats_event_sink/org_wso2_iot_android_accelerometer_stats.xml b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_accelerometer_stats_event_sink/org_wso2_iot_android_accelerometer_stats.xml
index abf3b755b..663853bfd 100755
--- a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_accelerometer_stats_event_sink/org_wso2_iot_android_accelerometer_stats.xml
+++ b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_accelerometer_stats_event_sink/org_wso2_iot_android_accelerometer_stats.xml
@@ -26,23 +26,15 @@
LONG
- x
+ axis
false
false
false
false
- FLOAT
-
-
- y
- false
- false
- false
- false
- FLOAT
+ STRING
- z
+ value
false
false
false
diff --git a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_accelerometer_stats_streams/org.wso2.iot.android.accelerometer.stats_1.0.0.json b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_accelerometer_stats_streams/org.wso2.iot.android.accelerometer.stats_1.0.0.json
index f735e0e3b..e1e1567f1 100755
--- a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_accelerometer_stats_streams/org.wso2.iot.android.accelerometer.stats_1.0.0.json
+++ b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_accelerometer_stats_streams/org.wso2.iot.android.accelerometer.stats_1.0.0.json
@@ -19,15 +19,11 @@
],
"payloadData": [
{
- "name": "x",
- "type": "FLOAT"
- },
- {
- "name": "y",
- "type": "FLOAT"
+ "name": "axis",
+ "type": "STRING"
},
{
- "name": "z",
+ "name": "value",
"type": "FLOAT"
},
{
diff --git a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_accelerometer_streams/org.wso2.iot.android.accelerometer_1.0.0.json b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_accelerometer_streams/org.wso2.iot.android.accelerometer_1.0.0.json
index 2c7bdbe54..69d9f8db0 100755
--- a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_accelerometer_streams/org.wso2.iot.android.accelerometer_1.0.0.json
+++ b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_accelerometer_streams/org.wso2.iot.android.accelerometer_1.0.0.json
@@ -19,15 +19,11 @@
],
"payloadData": [
{
- "name": "x",
- "type": "FLOAT"
- },
- {
- "name": "y",
- "type": "FLOAT"
+ "name": "axis",
+ "type": "STRING"
},
{
- "name": "z",
+ "name": "value",
"type": "FLOAT"
}
]
diff --git a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_android_sense_executionplan/Android-Sense-ExecutionPlan.siddhiql b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_android_sense_executionplan/Android-Sense-ExecutionPlan.siddhiql
index 3b4d7b32f..cbb3a64e3 100755
--- a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_android_sense_executionplan/Android-Sense-ExecutionPlan.siddhiql
+++ b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_android_sense_executionplan/Android-Sense-ExecutionPlan.siddhiql
@@ -33,19 +33,19 @@ define stream SmsStream (meta_owner string, meta_deviceId string, meta_timestamp
define stream geoLocationStream (id string, timeStamp long, latitude double, longitude double, type string, speed float, heading float);
@Export('org.wso2.iot.android.accelerometer:1.0.0')
-define stream AccelerometerStream (meta_owner string, meta_deviceId string, meta_timestamp long, x float, y float, z float);
+define stream AccelerometerStream (meta_owner string, meta_deviceId string, meta_timestamp long, axis string, value float);
@Export('org.wso2.iot.android.gyroscope:1.0.0')
-define stream GyroscopeStream (meta_owner string, meta_deviceId string, meta_timestamp long, x float, y float, z float);
+define stream GyroscopeStream (meta_owner string, meta_deviceId string, meta_timestamp long, axis string, value float);
@Export('org.wso2.iot.android.magnetic:1.0.0')
-define stream MagneticStream (meta_owner string, meta_deviceId string, meta_timestamp long, x float, y float, z float);
+define stream MagneticStream (meta_owner string, meta_deviceId string, meta_timestamp long, axis string, value float);
@Export('org.wso2.iot.android.gravity:1.0.0')
define stream GravityStream (meta_owner string, meta_deviceId string, meta_timestamp long, x float, y float, z float);
@Export('org.wso2.iot.android.rotation:1.0.0')
-define stream RotationStream (meta_owner string, meta_deviceId string, meta_timestamp long, x float, y float, z float);
+define stream RotationStream (meta_owner string, meta_deviceId string, meta_timestamp long, axis string, value float);
@Export('org.wso2.iot.android.pressure:1.0.0')
define stream PressureStream (meta_owner string, meta_deviceId string, meta_timestamp long, pressure float);
@@ -57,14 +57,39 @@ define stream LightStream (meta_owner string, meta_deviceId string, meta_timesta
define stream ProximityStream (meta_owner string, meta_deviceId string, meta_timestamp long, proximity float);
from AndroidSense[meta_type == 'accelerometer']
-select meta_owner, meta_deviceId, meta_timestamp, accelerometer_x as x, accelerometer_y as y, accelerometer_z as z
+select meta_owner, meta_deviceId, meta_timestamp, 'X' as axis, accelerometer_x as value
+insert into AccelerometerStream;
+
+from AndroidSense[meta_type == 'accelerometer']
+select meta_owner, meta_deviceId, meta_timestamp, 'Y' as axis, accelerometer_y as value
+insert into AccelerometerStream;
+
+from AndroidSense[meta_type == 'accelerometer']
+select meta_owner, meta_deviceId, meta_timestamp, 'Z' as axis, accelerometer_z as value
insert into AccelerometerStream;
from AndroidSense[meta_type == 'gyroscope']
-select meta_owner, meta_deviceId, meta_timestamp, gyroscope_x as x, gyroscope_y as y, gyroscope_z as z
+select meta_owner, meta_deviceId, meta_timestamp, 'X' as axis, gyroscope_x as value
insert into GyroscopeStream;
+
+from AndroidSense[meta_type == 'gyroscope']
+select meta_owner, meta_deviceId, meta_timestamp, 'Y' as axis, gyroscope_y as value
+insert into GyroscopeStream;
+
+from AndroidSense[meta_type == 'gyroscope']
+select meta_owner, meta_deviceId, meta_timestamp, 'Z' as axis, gyroscope_z as value
+insert into GyroscopeStream;
+
from AndroidSense[meta_type == 'magnetic']
-select meta_owner, meta_deviceId, meta_timestamp, magnetic_x as x, magnetic_y as y, magnetic_z as z
+select meta_owner, meta_deviceId, meta_timestamp, 'X' as axis, magnetic_x as value
+insert into MagneticStream;
+
+from AndroidSense[meta_type == 'magnetic']
+select meta_owner, meta_deviceId, meta_timestamp, 'Y' as axis, magnetic_y as value
+insert into MagneticStream;
+
+from AndroidSense[meta_type == 'magnetic']
+select meta_owner, meta_deviceId, meta_timestamp, 'Z' as axis, magnetic_z as value
insert into MagneticStream;
from AndroidSense[meta_type == 'gravity']
@@ -72,7 +97,15 @@ select meta_owner, meta_deviceId, meta_timestamp, gravity_x as x, gravity_y as y
insert into GravityStream;
from AndroidSense[meta_type == 'rotation']
-select meta_owner, meta_deviceId, meta_timestamp, rotation_x as x, rotation_y as y, rotation_z as z
+select meta_owner, meta_deviceId, meta_timestamp, 'X' as axis, rotation_x as value
+insert into RotationStream;
+
+from AndroidSense[meta_type == 'rotation']
+select meta_owner, meta_deviceId, meta_timestamp, 'Y' as axis, rotation_y as value
+insert into RotationStream;
+
+from AndroidSense[meta_type == 'rotation']
+select meta_owner, meta_deviceId, meta_timestamp, 'Z' as axis, rotation_z as value
insert into RotationStream;
from AndroidSense[meta_type == 'pressure']
diff --git a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_battery_percentage_chart_gadget/Android_Battery_Percentage_Chart/js/provider-libs/ws-client.js b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_battery_percentage_chart_gadget/Android_Battery_Percentage_Chart/js/provider-libs/ws-client.js
index ab7263155..96c835642 100644
--- a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_battery_percentage_chart_gadget/Android_Battery_Percentage_Chart/js/provider-libs/ws-client.js
+++ b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_battery_percentage_chart_gadget/Android_Battery_Percentage_Chart/js/provider-libs/ws-client.js
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+ * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
*
* WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except
diff --git a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_gyroscope_executionplan/Android-Gyroscope-ExecutionPlan.siddhiql b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_gyroscope_executionplan/Android-Gyroscope-ExecutionPlan.siddhiql
index 85d502500..a90efaadf 100755
--- a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_gyroscope_executionplan/Android-Gyroscope-ExecutionPlan.siddhiql
+++ b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_gyroscope_executionplan/Android-Gyroscope-ExecutionPlan.siddhiql
@@ -3,16 +3,16 @@
@Plan:description('Process gyroscope changes.')
@Import('org.wso2.iot.android.gyroscope:1.0.0')
-define stream GyroscopeStream (meta_owner string, meta_deviceId string, meta_timestamp long, x float, y float, z float);
+define stream GyroscopeStream (meta_owner string, meta_deviceId string, meta_timestamp long, axis string, value float);
@Export('org.wso2.iot.android.gyroscope.stats:1.0.0')
-define stream GyroscopeStatsStream (meta_owner string, meta_deviceId string, meta_timestamp long, x
-float, y float, z float, year int, month int, day int, hour int, minute int);
+define stream GyroscopeStatsStream (meta_owner string, meta_deviceId string, meta_timestamp long, axis string, value
+float, year int, month int, day int, hour int, minute int);
partition with (meta_deviceId of GyroscopeStream)
begin
from GyroscopeStream
- select meta_owner, meta_deviceId, meta_timestamp, x, y, z, time:extract
- (meta_timestamp, 'year') as year, time:extract(meta_timestamp, 'month') as month, time:extract(meta_timestamp, 'day') as day, time:extract(meta_timestamp, 'hour') as hour, time:extract(meta_timestamp, 'minute') as minute
+ select meta_owner, meta_deviceId, meta_timestamp, axis, value, time:extract (meta_timestamp, 'year') as year,
+ time:extract(meta_timestamp, 'month') as month, time:extract(meta_timestamp, 'day') as day, time:extract(meta_timestamp, 'hour') as hour, time:extract(meta_timestamp, 'minute') as minute
insert into GyroscopeStatsStream;
end;
\ No newline at end of file
diff --git a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_gyroscope_stats_event_sink/org_wso2_iot_android_gyroscope_stats.xml b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_gyroscope_stats_event_sink/org_wso2_iot_android_gyroscope_stats.xml
index ba42b4ba7..c8f77320b 100755
--- a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_gyroscope_stats_event_sink/org_wso2_iot_android_gyroscope_stats.xml
+++ b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_gyroscope_stats_event_sink/org_wso2_iot_android_gyroscope_stats.xml
@@ -26,23 +26,15 @@
LONG
- x
+ axis
false
false
false
false
- FLOAT
-
-
- y
- false
- false
- false
- false
- FLOAT
+ STRING
- z
+ value
false
false
false
diff --git a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_gyroscope_stats_streams/org.wso2.iot.android.gyroscope.stats_1.0.0.json b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_gyroscope_stats_streams/org.wso2.iot.android.gyroscope.stats_1.0.0.json
index 6282a16a5..03292564f 100755
--- a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_gyroscope_stats_streams/org.wso2.iot.android.gyroscope.stats_1.0.0.json
+++ b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_gyroscope_stats_streams/org.wso2.iot.android.gyroscope.stats_1.0.0.json
@@ -19,15 +19,11 @@
],
"payloadData": [
{
- "name": "x",
- "type": "FLOAT"
- },
- {
- "name": "y",
- "type": "FLOAT"
+ "name": "axis",
+ "type": "STRING"
},
{
- "name": "z",
+ "name": "value",
"type": "FLOAT"
},
{
diff --git a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_gyroscope_streams/org.wso2.iot.android.gyroscope_1.0.0.json b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_gyroscope_streams/org.wso2.iot.android.gyroscope_1.0.0.json
index b7fcf81b7..05f1a3226 100755
--- a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_gyroscope_streams/org.wso2.iot.android.gyroscope_1.0.0.json
+++ b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_gyroscope_streams/org.wso2.iot.android.gyroscope_1.0.0.json
@@ -19,15 +19,11 @@
],
"payloadData": [
{
- "name": "x",
- "type": "FLOAT"
- },
- {
- "name": "y",
- "type": "FLOAT"
+ "name": "axis",
+ "type": "STRING"
},
{
- "name": "z",
+ "name": "value",
"type": "FLOAT"
}
]
diff --git a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_magnetic_executionplan/Android-Magnetic-ExecutionPlan.siddhiql b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_magnetic_executionplan/Android-Magnetic-ExecutionPlan.siddhiql
index d7af0016f..52f7bb7ce 100755
--- a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_magnetic_executionplan/Android-Magnetic-ExecutionPlan.siddhiql
+++ b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_magnetic_executionplan/Android-Magnetic-ExecutionPlan.siddhiql
@@ -3,16 +3,15 @@
@Plan:description('Process magnetic field changes.')
@Import('org.wso2.iot.android.magnetic:1.0.0')
-define stream MagneticStream (meta_owner string, meta_deviceId string, meta_timestamp long, x float, y float, z float);
+define stream MagneticStream (meta_owner string, meta_deviceId string, meta_timestamp long, axis string, value float);
@Export('org.wso2.iot.android.magnetic.stats:1.0.0')
-define stream MagneticStatsStream (meta_owner string, meta_deviceId string, meta_timestamp long, x
-float, y float, z float, year int, month int, day int, hour int, minute int);
+define stream MagneticStatsStream (meta_owner string, meta_deviceId string, meta_timestamp long, axis string, value float, year int, month int, day int, hour int, minute int);
partition with (meta_deviceId of MagneticStream)
begin
from MagneticStream
- select meta_owner, meta_deviceId, meta_timestamp, x, y, z, time:extract
+ select meta_owner, meta_deviceId, meta_timestamp, axis, value, time:extract
(meta_timestamp, 'year') as year, time:extract(meta_timestamp, 'month') as month, time:extract(meta_timestamp, 'day') as day, time:extract(meta_timestamp, 'hour') as hour, time:extract(meta_timestamp, 'minute') as minute
insert into MagneticStatsStream;
end;
\ No newline at end of file
diff --git a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_magnetic_stats_event_sink/org_wso2_iot_android_magnetic_stats.xml b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_magnetic_stats_event_sink/org_wso2_iot_android_magnetic_stats.xml
index 93328ca02..992d63505 100755
--- a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_magnetic_stats_event_sink/org_wso2_iot_android_magnetic_stats.xml
+++ b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_magnetic_stats_event_sink/org_wso2_iot_android_magnetic_stats.xml
@@ -26,23 +26,15 @@
LONG
- x
+ axis
false
false
false
false
- FLOAT
-
-
- y
- false
- false
- false
- false
- FLOAT
+ STRING
- z
+ value
false
false
false
diff --git a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_magnetic_stats_streams/org.wso2.iot.android.magnetic.stats_1.0.0.json b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_magnetic_stats_streams/org.wso2.iot.android.magnetic.stats_1.0.0.json
index 109ba5b1d..468369cf0 100755
--- a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_magnetic_stats_streams/org.wso2.iot.android.magnetic.stats_1.0.0.json
+++ b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_magnetic_stats_streams/org.wso2.iot.android.magnetic.stats_1.0.0.json
@@ -19,15 +19,11 @@
],
"payloadData": [
{
- "name": "x",
- "type": "FLOAT"
- },
- {
- "name": "y",
- "type": "FLOAT"
+ "name": "axis",
+ "type": "STRING"
},
{
- "name": "z",
+ "name": "value",
"type": "FLOAT"
},
{
diff --git a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_magnetic_streams/org.wso2.iot.android.magnetic_1.0.0.json b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_magnetic_streams/org.wso2.iot.android.magnetic_1.0.0.json
index a9ad5d8dc..a468cdf3e 100755
--- a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_magnetic_streams/org.wso2.iot.android.magnetic_1.0.0.json
+++ b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_magnetic_streams/org.wso2.iot.android.magnetic_1.0.0.json
@@ -19,15 +19,11 @@
],
"payloadData": [
{
- "name": "x",
- "type": "FLOAT"
- },
- {
- "name": "y",
- "type": "FLOAT"
+ "name": "axis",
+ "type": "STRING"
},
{
- "name": "z",
+ "name": "value",
"type": "FLOAT"
}
]
diff --git a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_rotation_executionplan/Android-Rotation-ExecutionPlan.siddhiql b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_rotation_executionplan/Android-Rotation-ExecutionPlan.siddhiql
index df2e44c6d..19f66e977 100755
--- a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_rotation_executionplan/Android-Rotation-ExecutionPlan.siddhiql
+++ b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_rotation_executionplan/Android-Rotation-ExecutionPlan.siddhiql
@@ -3,16 +3,16 @@
@Plan:description('Process rotation field changes.')
@Import('org.wso2.iot.android.rotation:1.0.0')
-define stream RotationStream (meta_owner string, meta_deviceId string, meta_timestamp long, x float, y float, z float);
+define stream RotationStream (meta_owner string, meta_deviceId string, meta_timestamp long, axis string, value float);
@Export('org.wso2.iot.android.rotation.stats:1.0.0')
-define stream RotationStatsStream (meta_owner string, meta_deviceId string, meta_timestamp long, x
-float, y float, z float, year int, month int, day int, hour int, minute int);
+define stream RotationStatsStream (meta_owner string, meta_deviceId string, meta_timestamp long, axis string, value
+float, year int, month int, day int, hour int, minute int);
partition with (meta_deviceId of RotationStream)
begin
from RotationStream
- select meta_owner, meta_deviceId, meta_timestamp, x, y, z, time:extract
+ select meta_owner, meta_deviceId, meta_timestamp, axis, value, time:extract
(meta_timestamp, 'year') as year, time:extract(meta_timestamp, 'month') as month, time:extract(meta_timestamp, 'day') as day, time:extract(meta_timestamp, 'hour') as hour, time:extract(meta_timestamp, 'minute') as minute
insert into RotationStatsStream;
end;
\ No newline at end of file
diff --git a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_rotation_stats_event_sink/org_wso2_iot_android_rotation_stats.xml b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_rotation_stats_event_sink/org_wso2_iot_android_rotation_stats.xml
index 018b265f6..c235a8ac2 100755
--- a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_rotation_stats_event_sink/org_wso2_iot_android_rotation_stats.xml
+++ b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_rotation_stats_event_sink/org_wso2_iot_android_rotation_stats.xml
@@ -26,23 +26,15 @@
LONG
- x
+ axis
false
false
false
false
- FLOAT
-
-
- y
- false
- false
- false
- false
- FLOAT
+ STRING
- z
+ value
false
false
false
diff --git a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_rotation_stats_streams/org.wso2.iot.android.rotation.stats_1.0.0.json b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_rotation_stats_streams/org.wso2.iot.android.rotation.stats_1.0.0.json
index 1bf43d4d6..418c8daf1 100755
--- a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_rotation_stats_streams/org.wso2.iot.android.rotation.stats_1.0.0.json
+++ b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_rotation_stats_streams/org.wso2.iot.android.rotation.stats_1.0.0.json
@@ -19,15 +19,11 @@
],
"payloadData": [
{
- "name": "x",
- "type": "FLOAT"
- },
- {
- "name": "y",
- "type": "FLOAT"
+ "name": "axis",
+ "type": "STRING"
},
{
- "name": "z",
+ "name": "value",
"type": "FLOAT"
},
{
diff --git a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_rotation_streams/org.wso2.iot.android.rotation_1.0.0.json b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_rotation_streams/org.wso2.iot.android.rotation_1.0.0.json
index 22e6988e2..c82c7f066 100755
--- a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_rotation_streams/org.wso2.iot.android.rotation_1.0.0.json
+++ b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_rotation_streams/org.wso2.iot.android.rotation_1.0.0.json
@@ -19,15 +19,11 @@
],
"payloadData": [
{
- "name": "x",
- "type": "FLOAT"
- },
- {
- "name": "y",
- "type": "FLOAT"
+ "name": "axis",
+ "type": "STRING"
},
{
- "name": "z",
+ "name": "value",
"type": "FLOAT"
}
]
diff --git a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_sense_dashboard/android-iot.json b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_sense_dashboard/android-iot.json
index 36570f484..41eaafb20 100644
--- a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_sense_dashboard/android-iot.json
+++ b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_sense_dashboard/android-iot.json
@@ -10,17 +10,17 @@
"hideAllMenuItems": false,
"id": "android-iot",
"identityServerUrl": "",
- "isEditorEnable": true,
+ "isEditorEnable": false,
"isUserCustom": false,
"isanon": false,
- "landing": "home",
+ "landing": "sensors",
"menu": [
{
- "id": "home",
+ "id": "sensors",
"isanon": false,
"ishidden": false,
"subordinates": [],
- "title": "Home"
+ "title": "Sensors"
},
{
"id": "real-time",
@@ -61,7 +61,7 @@
"id": "test",
"isanon": false,
"ishidden": false,
- "title": "test",
+ "title": "Test",
"subordinates": []
}
],
@@ -70,22 +70,23 @@
"content": {
"anon": {},
"default": {
- "a": [
+ "a": [],
+ "b": [
{
- "id": "ACCELEROMETER_Y-0",
+ "id": "ANDROID_MAGNETIC_GADGET-0",
"content": {
- "id": "ACCELEROMETER_Y",
- "title": "ACCELEROMETER Y",
+ "id": "ANDROID_MAGNETIC_GADGET",
+ "title": "ANDROID_MAGNETIC_GADGET",
"type": "gadget",
- "thumbnail": "fs://gadget/ACCELEROMETER_Y/thumbnail.png",
+ "thumbnail": "fs://gadget/ANDROID_MAGNETIC_GADGET/thumbnail.png",
"data": {
- "url": "fs://gadget/ACCELEROMETER_Y/gadget.xml"
+ "url": "fs://gadget/ANDROID_MAGNETIC_GADGET/gadget.xml"
},
"styles": {
"no_heading": false,
"hide_gadget": false,
"titlePosition": "center",
- "title": "ACCELEROMETER Y"
+ "title": "MAGNETIC FIELD"
},
"options": {
"windowSize": {
@@ -97,7 +98,7 @@
}
},
"locale_titles": {
- "en-US": "ACCELEROMETER Y"
+ "en-US": "MAGNETIC FIELD"
},
"settings": {
"priority": "5",
@@ -106,58 +107,22 @@
}
}
],
- "b": [
- {
- "id": "ACCELEROMETER_Z-0",
- "content": {
- "id": "ACCELEROMETER_Z",
- "title": "ACCELEROMETER Z",
- "type": "gadget",
- "thumbnail": "fs://gadget/ACCELEROMETER_Z/thumbnail.png",
- "data": {
- "url": "fs://gadget/ACCELEROMETER_Z/gadget.xml"
- },
- "styles": {
- "no_heading": false,
- "hide_gadget": false,
- "titlePosition": "center",
- "title": "ACCELEROMETER Z"
- },
- "options": {
- "windowSize": {
- "type": "STRING",
- "title": "Window Size",
- "value": "10",
- "options": [],
- "required": false
- }
- },
- "locale_titles": {
- "en-US": "ACCELEROMETER Z"
- },
- "settings": {
- "priority": "5",
- "timeoutInterval": "60000"
- }
- }
- }
- ],
"8e564cb7a1c6519179e2111cc05a79ca": [
{
- "id": "Accelerometer_X-0",
+ "id": "ANDROID_ACCELEROMETER_GADGET-0",
"content": {
- "id": "Accelerometer_X",
- "title": "Accelerometer X",
+ "id": "ANDROID_ACCELEROMETER_GADGET",
+ "title": "ANDROID_ACCELEROMETER_GADGET",
"type": "gadget",
- "thumbnail": "fs://gadget/Accelerometer_X/thumbnail.png",
+ "thumbnail": "fs://gadget/ANDROID_ACCELEROMETER_GADGET/thumbnail.png",
"data": {
- "url": "fs://gadget/Accelerometer_X/gadget.xml"
+ "url": "fs://gadget/ANDROID_ACCELEROMETER_GADGET/gadget.xml"
},
"styles": {
"no_heading": false,
"hide_gadget": false,
"titlePosition": "center",
- "title": "Accelerometer X"
+ "title": "ACCELEROMETER"
},
"options": {
"windowSize": {
@@ -169,7 +134,7 @@
}
},
"locale_titles": {
- "en-US": "Accelerometer X"
+ "en-US": "ACCELEROMETER"
},
"settings": {
"priority": "5",
@@ -249,43 +214,107 @@
}
}
}
+ ],
+ "765379a7012b8819ea13524e5b312509": [
+ {
+ "id": "ANDROID_ROTATION_GADGET-0",
+ "content": {
+ "id": "ANDROID_ROTATION_GADGET",
+ "title": "ANDROID_ROTATION_GADGET",
+ "type": "gadget",
+ "thumbnail": "fs://gadget/ANDROID_ROTATION_GADGET/thumbnail.png",
+ "data": {
+ "url": "fs://gadget/ANDROID_ROTATION_GADGET/gadget.xml"
+ },
+ "styles": {
+ "no_heading": false,
+ "hide_gadget": false,
+ "titlePosition": "center",
+ "title": "ROTATIONAL VECTOR"
+ },
+ "options": {
+ "windowSize": {
+ "type": "STRING",
+ "title": "Window Size",
+ "value": "10",
+ "options": [],
+ "required": false
+ }
+ },
+ "locale_titles": {
+ "en-US": "ROTATIONAL VECTOR"
+ },
+ "settings": {
+ "priority": "5",
+ "timeoutInterval": "60000"
+ }
+ }
+ }
+ ],
+ "47ceaee8a089ea8ef75c91e5b83a1a36": [
+ {
+ "id": "ANDROID_GYROSCOPE_GADGET-0",
+ "content": {
+ "id": "ANDROID_GYROSCOPE_GADGET",
+ "title": "ANDROID_GYROSCOPE_GADGET",
+ "type": "gadget",
+ "thumbnail": "fs://gadget/ANDROID_GYROSCOPE_GADGET/thumbnail.png",
+ "data": {
+ "url": "fs://gadget/ANDROID_GYROSCOPE_GADGET/gadget.xml"
+ },
+ "styles": {
+ "no_heading": false,
+ "hide_gadget": false,
+ "titlePosition": "center",
+ "title": "GYROSCOPE"
+ },
+ "options": {
+ "windowSize": {
+ "type": "STRING",
+ "title": "Window Size",
+ "value": "10",
+ "options": [],
+ "required": false
+ }
+ },
+ "locale_titles": {
+ "en-US": "GYROSCOPE"
+ },
+ "settings": {
+ "priority": "5",
+ "timeoutInterval": "60000"
+ }
+ }
+ }
]
}
},
- "id": "home",
+ "id": "sensors",
"isanon": false,
"layout": {
"content": {
"loggedIn": {
"blocks": [
- {
- "id": "a",
- "x": 4,
- "y": 0,
- "width": 4,
- "height": 4,
- "banner": false
- },
{
"id": "b",
- "x": 8,
+ "x": 6,
"y": 0,
- "width": 4,
- "height": 4,
+ "width": 6,
+ "height": 5,
"banner": false
},
{
"id": "8e564cb7a1c6519179e2111cc05a79ca",
"x": 0,
"y": 0,
- "width": 4,
- "height": 4,
+ "width": 6,
+ "height": 5,
"banner": false
},
{
"id": "fdfada688ff9e7b3271eece314618532",
"x": 0,
- "y": 4,
+ "y": 5,
"width": 6,
"height": 3,
"banner": false
@@ -293,7 +322,7 @@
{
"id": "46193833e958e9f7e879263f372eb508",
"x": 6,
- "y": 4,
+ "y": 5,
"width": 6,
"height": 3,
"banner": false
@@ -301,25 +330,17 @@
{
"id": "765379a7012b8819ea13524e5b312509",
"x": 0,
- "y": 7,
- "width": 4,
- "height": 4,
+ "y": 8,
+ "width": 6,
+ "height": 5,
"banner": false
},
{
"id": "47ceaee8a089ea8ef75c91e5b83a1a36",
- "x": 8,
- "y": 7,
- "width": 4,
- "height": 4,
- "banner": false
- },
- {
- "id": "4a9feeb19fc2ea76e252dcd62c954279",
- "x": 4,
- "y": 7,
- "width": 4,
- "height": 4,
+ "x": 6,
+ "y": 8,
+ "width": 6,
+ "height": 5,
"banner": false
}
]
@@ -327,7 +348,7 @@
},
"fluidLayout": false
},
- "title": "Home"
+ "title": "Sensors"
},
{
"content": {
@@ -1281,7 +1302,7 @@
},
{
"id": "test",
- "title": "test",
+ "title": "Test",
"layout": {
"content": {
"loggedIn": {
@@ -1438,5 +1459,6 @@
},
"shareDashboard": false,
"theme": "Default Theme",
- "title": "Android IOT"
-}
\ No newline at end of file
+ "title": "Android IOT",
+ "defaultPriority": "5"
+}
diff --git a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/artifacts.xml b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/artifacts.xml
index 0d9518345..3619bedc6 100644
--- a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/artifacts.xml
+++ b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/artifacts.xml
@@ -187,11 +187,7 @@
serverRole="DataAnalyticsServer"/>
-
-
-
+
@@ -228,6 +226,8 @@
serverRole="DataAnalyticsServer"/>
+
@@ -239,6 +239,8 @@
serverRole="DataAnalyticsServer"/>
+