Merge pull request #135 from ayyoob/das-ext

few fixes after testing the device type with the refactoring
application-manager-new
Ruwan 9 years ago
commit d9905d9b15

@ -17,7 +17,7 @@
~ under the License.
-->
<project name="create-sample-sensor-capps" default="zip" basedir=".">
<project name="create-connectedcup-capps" default="zip" basedir=".">
<property name="project-name" value="${ant.project.name}"/>
<property name="target-dir" value="target/carbonapps"/>

@ -17,6 +17,6 @@
~ under the License.
-->
<artifact name="Sparkscripts" version="1.0.0" type="analytics/spark" serverRole="DataAnalyticsServer">
<artifact name="coffee_level_script" version="1.0.0" type="analytics/spark" serverRole="DataAnalyticsServer">
<file>coffee_level_script.xml</file>
</artifact>

@ -20,18 +20,11 @@
<Analytics>
<Name>coffee_level_script</Name>
<Script>
CREATE TEMPORARY TABLE DeviceCoffeeLevelData USING CarbonAnalytics OPTIONS(tableName
"ORG_WSO2_IOT_DEVICES_COFFEELEVEL");
CREATE TEMPORARY TABLE DeviceCoffeeLevelData USING CarbonAnalytics OPTIONS(tableName "ORG_WSO2_IOT_DEVICES_COFFEELEVEL");
CREATE TEMPORARY TABLE DeviceCoffeeLevelSummaryData USING CarbonAnalytics OPTIONS (tableName
"DEVICE_COFFEELEVEL_SUMMARY", schema "coffeelevel FLOAT, deviceType STRING -i, deviceId STRING -i, owner
STRING -i,
time LONG -i",primaryKeys "deviceType, deviceId, owner, time");
CREATE TEMPORARY TABLE DeviceCoffeeLevelSummaryData USING CarbonAnalytics OPTIONS (tableName "DEVICE_COFFEELEVEL_SUMMARY", schema "coffeelevel FLOAT, deviceType STRING -i, deviceId STRING -i, owner STRING -i, time LONG -i",primaryKeys "deviceType, deviceId, owner, time");
insert into table DeviceCoffeeLevelSummaryData select coffeelevel, meta_deviceType as deviceType,
meta_deviceId as deviceId, meta_owner as owner, cast(meta_time/1000 as BIGINT)as time from
DeviceCoffeeLevelData group by coffeelevel, meta_deviceType, meta_deviceId, meta_owner, cast(meta_time/1000 as
BIGINT);
insert into table DeviceCoffeeLevelSummaryData select coffeelevel, meta_deviceType as deviceType, meta_deviceId as deviceId, meta_owner as owner, cast(meta_time/1000 as BIGINT)as time from DeviceCoffeeLevelData group by coffeelevel, meta_deviceType, meta_deviceId, meta_owner, cast(meta_time/1000 as BIGINT);
</Script>
<CronExpression>0 * * * * ?</CronExpression>
<CronExpression>0 0/5 * * * ?</CronExpression>
</Analytics>

@ -1,7 +1,7 @@
{
"name": "org.wso2.iot.devices.coffeelevel",
"version": "1.0.0",
"nickName": "Coffee Level Data",
"nickName": "CoffeeLevel",
"description": "Coffee Level data received from the Device",
"metaData": [
{"name":"owner","type":"STRING"},
@ -14,7 +14,4 @@
"name": "coffeelevel","type": "FLOAT"
}
]
}
}

@ -17,7 +17,7 @@
~ under the License.
-->
<eventReceiver name="EventReceiver_ConnectedCup" statistics="disable" trace="disable" xmlns="http://wso2.org/carbon/eventreceiver">
<eventReceiver name="connected_cup_receiver" statistics="disable" trace="disable" xmlns="http://wso2.org/carbon/eventreceiver">
<from eventAdapterType="oauth-mqtt">
<property name="topic">carbon.super/connectedcup/#</property>
<property name="username">admin</property>

@ -1,7 +1,7 @@
{
"name": "org.wso2.iot.connectedcup",
"version": "1.0.0",
"nickName": "connectedcup stream",
"nickName": "connectedcup",
"description": "This hold the device type stream of connectedcup",
"metaData": [
{"name": "owner", "type": "STRING"},

@ -18,7 +18,7 @@
var palette = new Rickshaw.Color.Palette({scheme: "classic9"});
function drawGraph(from, to) {
function drawGraph_connectedcup(from, to) {
retrieveDataAndDrawLineGraph("temperature", from, to);
retrieveDataAndDrawLineGraph("coffeelevel", from, to);
}

Loading…
Cancel
Save