mirror of
https://repository.entgra.net/community/product-iots.git
synced 2025-09-16 23:32:19 +00:00
Merge branch 'master' of https://github.com/wso2-incubator/product-device-cloud
This commit is contained in:
commit
aa001675b3
@ -343,6 +343,8 @@
|
|||||||
toFile="target/wso2carbon-core-${carbon.kernel.version}/samples/arduino/build.xml.disable"/>
|
toFile="target/wso2carbon-core-${carbon.kernel.version}/samples/arduino/build.xml.disable"/>
|
||||||
<move file="target/wso2carbon-core-${carbon.kernel.version}/samples/raspberrypi/build.xml"
|
<move file="target/wso2carbon-core-${carbon.kernel.version}/samples/raspberrypi/build.xml"
|
||||||
toFile="target/wso2carbon-core-${carbon.kernel.version}/samples/raspberrypi/build.xml.disable"/>
|
toFile="target/wso2carbon-core-${carbon.kernel.version}/samples/raspberrypi/build.xml.disable"/>
|
||||||
|
<move file="target/wso2carbon-core-${carbon.kernel.version}/samples/virtual_firealarm/build.xml"
|
||||||
|
toFile="target/wso2carbon-core-${carbon.kernel.version}/samples/virtual_firealarm/build.xml.disable"/>
|
||||||
<move file="target/wso2carbon-core-${carbon.kernel.version}/samples/sample_pom.xml"
|
<move file="target/wso2carbon-core-${carbon.kernel.version}/samples/sample_pom.xml"
|
||||||
toFile="target/wso2carbon-core-${carbon.kernel.version}/samples/pom.xml"
|
toFile="target/wso2carbon-core-${carbon.kernel.version}/samples/pom.xml"
|
||||||
overwrite="true"/>
|
overwrite="true"/>
|
||||||
|
|||||||
@ -103,12 +103,10 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.wso2.carbon.devicemgt</groupId>
|
<groupId>org.wso2.carbon.devicemgt</groupId>
|
||||||
<artifactId>org.wso2.carbon.policy.mgt.core</artifactId>
|
<artifactId>org.wso2.carbon.policy.mgt.core</artifactId>
|
||||||
<scope>provided</scope>
|
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.wso2.carbon.devicemgt</groupId>
|
<groupId>org.wso2.carbon.devicemgt</groupId>
|
||||||
<artifactId>org.wso2.carbon.policy.mgt.common</artifactId>
|
<artifactId>org.wso2.carbon.policy.mgt.common</artifactId>
|
||||||
<scope>provided</scope>
|
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
|
|||||||
@ -62,6 +62,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.wso2.carbon.device.mgt.iot.server.sample</groupId>
|
<groupId>org.wso2.carbon.device.mgt.iot.server.sample</groupId>
|
||||||
<artifactId>org.wso2.carbon.device.mgt.iot.sample.firealarm.plugin.impl</artifactId>
|
<artifactId>org.wso2.carbon.device.mgt.iot.sample.firealarm.plugin.impl</artifactId>
|
||||||
|
<version>${carbon.iot.device.mgt.version}</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!--JAX-RS -->
|
<!--JAX-RS -->
|
||||||
|
|||||||
@ -471,9 +471,6 @@
|
|||||||
|
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
<extensions>
|
<extensions>
|
||||||
<extension>
|
<extension>
|
||||||
|
|||||||
@ -99,6 +99,13 @@
|
|||||||
<scope>system</scope>
|
<scope>system</scope>
|
||||||
<systemPath>${basedir}/../../../../repository/components/plugins/org.wso2.carbon.device.mgt.analytics_0.9.2.SNAPSHOT.jar</systemPath>
|
<systemPath>${basedir}/../../../../repository/components/plugins/org.wso2.carbon.device.mgt.analytics_0.9.2.SNAPSHOT.jar</systemPath>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.wso2.carbon.devicemgt</groupId>
|
||||||
|
<artifactId>org.wso2.carbon.policy.mgt.core</artifactId>
|
||||||
|
<version>${carbon.device.mgt.version}</version>
|
||||||
|
<scope>system</scope>
|
||||||
|
<systemPath>${basedir}/../../../../repository/components/plugins/org.wso2.carbon.policy.mgt.core_0.9.2.SNAPSHOT.jar</systemPath>
|
||||||
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.wso2.carbon.devicemgt</groupId>
|
<groupId>org.wso2.carbon.devicemgt</groupId>
|
||||||
<artifactId>org.wso2.carbon.policy.mgt.common</artifactId>
|
<artifactId>org.wso2.carbon.policy.mgt.common</artifactId>
|
||||||
@ -197,13 +204,12 @@
|
|||||||
<type>war</type>
|
<type>war</type>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.eclipse.paho</groupId>
|
<groupId>org.eclipse.paho</groupId>
|
||||||
<artifactId>mqtt-client</artifactId>
|
<artifactId>mqtt-client</artifactId>
|
||||||
<version>${eclipse.paho.version}</version>
|
<version>${paho.mqtt.version}</version>
|
||||||
<scope>system</scope>
|
<scope>provided</scope>
|
||||||
<systemPath>${basedir}/../../../../repository/components/lib/mqtt-push-1.0-SNAPSHOT-jar-with-dependencies.jar</systemPath>
|
</dependency>
|
||||||
</dependency>
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>javax</groupId>
|
<groupId>javax</groupId>
|
||||||
<artifactId>javaee-web-api</artifactId>
|
<artifactId>javaee-web-api</artifactId>
|
||||||
@ -401,75 +407,84 @@
|
|||||||
<groupId>com.google.code.gson</groupId>
|
<groupId>com.google.code.gson</groupId>
|
||||||
<artifactId>gson</artifactId>
|
<artifactId>gson</artifactId>
|
||||||
<version>${google.gson.version}</version>
|
<version>${google.gson.version}</version>
|
||||||
<scope>system</scope>
|
|
||||||
<systemPath>${basedir}/../../../../repository/components/plugins/com.google.gson_2.3.1.jar</systemPath>
|
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<!--Dependencies on XMPP Client Library-->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.igniterealtime.smack.wso2</groupId>
|
||||||
|
<artifactId>smack</artifactId>
|
||||||
|
<version>${smack.wso2.version}</version>
|
||||||
|
<scope>system</scope>
|
||||||
|
<systemPath>${basedir}/../../../../repository/components/plugins/smack_3.0.4.wso2v1.jar</systemPath>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.igniterealtime.smack.wso2</groupId>
|
||||||
|
<artifactId>smackx</artifactId>
|
||||||
|
<version>${smackx.wso2.version}</version>
|
||||||
|
<scope>system</scope>
|
||||||
|
<systemPath>${basedir}/../../../../repository/components/plugins/smackx_3.0.4.wso2v1.jar</systemPath>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
</dependencyManagement>
|
</dependencyManagement>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<!-- IoT server version -->
|
<!-- IoT server version -->
|
||||||
<device.mgt.iot.feature.version>1.0.0</device.mgt.iot.feature.version>
|
<device.mgt.iot.feature.version>1.0.0</device.mgt.iot.feature.version>
|
||||||
|
|
||||||
|
|
||||||
<!--Carbon kernel versions-->
|
<!--Carbon kernel versions-->
|
||||||
<carbon.kernel.version>4.4.0</carbon.kernel.version>
|
<carbon.kernel.version>4.4.0</carbon.kernel.version>
|
||||||
<carbon.kernel.version.range>[4.4.0, 4.5.0)</carbon.kernel.version.range>
|
<carbon.kernel.version.range>[4.4.0, 4.5.0)</carbon.kernel.version.range>
|
||||||
|
|
||||||
<!--<carbon.p2.plugin.version>1.5.4</carbon.p2.plugin.version>-->
|
<!--<carbon.p2.plugin.version>1.5.4</carbon.p2.plugin.version>-->
|
||||||
|
|
||||||
<!--Maven build number plugin-->
|
<!--Maven build number plugin-->
|
||||||
<maven-buildnumber-plugin.version>1.3</maven-buildnumber-plugin.version>
|
<maven-buildnumber-plugin.version>1.3</maven-buildnumber-plugin.version>
|
||||||
|
|
||||||
<!--Testing -->
|
<!--Testing -->
|
||||||
<test.framework.version>4.3.1</test.framework.version>
|
<test.framework.version>4.3.1</test.framework.version>
|
||||||
<testng.version>6.8</testng.version>
|
<testng.version>6.8</testng.version>
|
||||||
|
|
||||||
<!--Eclipse Osgi-->
|
<!--Eclipse Osgi-->
|
||||||
<eclipse.equinox.common.version>3.6.100.v20120522-1841</eclipse.equinox.common.version>
|
<eclipse.equinox.common.version>3.6.100.v20120522-1841</eclipse.equinox.common.version>
|
||||||
<eclipse.osgi.version>3.8.1.v20120830-144521</eclipse.osgi.version>
|
<eclipse.osgi.version>3.8.1.v20120830-144521</eclipse.osgi.version>
|
||||||
|
|
||||||
<!--Orbit versions-->
|
<!--Orbit versions-->
|
||||||
<orbit.h2.engine.version>1.2.140.wso2v3</orbit.h2.engine.version>
|
<orbit.h2.engine.version>1.2.140.wso2v3</orbit.h2.engine.version>
|
||||||
<orbit.tomcat.version>7.0.52.wso2v5</orbit.tomcat.version>
|
<orbit.tomcat.version>7.0.52.wso2v5</orbit.tomcat.version>
|
||||||
<orbit.tomcat.jdbc.pooling.version>7.0.34.wso2v2</orbit.tomcat.jdbc.pooling.version>
|
<orbit.tomcat.jdbc.pooling.version>7.0.34.wso2v2</orbit.tomcat.jdbc.pooling.version>
|
||||||
|
|
||||||
<eclipse.paho.version>0.4.0</eclipse.paho.version>
|
<google.gson.version>2.2.4</google.gson.version>
|
||||||
|
|
||||||
|
<!-- CXF version -->
|
||||||
|
<cxf.version>2.6.1</cxf.version>
|
||||||
|
<jackson.version>1.9.0</jackson.version>
|
||||||
|
<javax.ws.rs.version>1.1.1</javax.ws.rs.version>
|
||||||
|
|
||||||
|
<!-- Device Management -->
|
||||||
|
<carbon.device.mgt.version>0.9.2-SNAPSHOT</carbon.device.mgt.version>
|
||||||
|
<carbon.device.mgt.version.range>[0.8.0, 2.0.0)</carbon.device.mgt.version.range>
|
||||||
|
|
||||||
<!-- CXF version -->
|
<!-- IOT Device Management -->
|
||||||
<cxf.version>2.6.1</cxf.version>
|
<carbon.iot.device.mgt.version>1.0.0-SNAPSHOT</carbon.iot.device.mgt.version>
|
||||||
<jackson.version>1.9.0</jackson.version>
|
|
||||||
<javax.ws.rs.version>1.1.1</javax.ws.rs.version>
|
|
||||||
|
|
||||||
|
<commons-httpclient.orbit.version>3.1.0.wso2v2</commons-httpclient.orbit.version>
|
||||||
|
<commons-json.version>3.0.0.wso2v1</commons-json.version>
|
||||||
|
<jackson.fasterxml.version>2.6.1</jackson.fasterxml.version>
|
||||||
|
|
||||||
|
<!-- Source code -->
|
||||||
|
<wso2.maven.compiler.source>1.7</wso2.maven.compiler.source>
|
||||||
|
<wso2.maven.compiler.target>1.7</wso2.maven.compiler.target>
|
||||||
|
<carbon.analytics.version>1.0.3</carbon.analytics.version>
|
||||||
|
|
||||||
<!-- Device Management -->
|
<!--XMPP/MQTT Version-->
|
||||||
|
<smack.wso2.version>3.0.4.wso2v1</smack.wso2.version>
|
||||||
<carbon.device.mgt.version>0.9.2-SNAPSHOT</carbon.device.mgt.version>
|
<smackx.wso2.version>3.0.4.wso2v1</smackx.wso2.version>
|
||||||
<carbon.device.mgt.version.range>[0.8.0, 2.0.0)</carbon.device.mgt.version.range>
|
<paho.mqtt.version>0.4.0</paho.mqtt.version>
|
||||||
|
|
||||||
<!-- IOT Device Management -->
|
|
||||||
<carbon.iot.device.mgt.version>1.0.0-SNAPSHOT</carbon.iot.device.mgt.version>
|
|
||||||
|
|
||||||
|
|
||||||
<commons-httpclient.orbit.version>3.1.0.wso2v2</commons-httpclient.orbit.version>
|
|
||||||
<commons-json.version>2.0.0.wso2v1</commons-json.version>
|
|
||||||
<google.gson.version>2.3.1</google.gson.version>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- Source code -->
|
|
||||||
<wso2.maven.compiler.source>1.7</wso2.maven.compiler.source>
|
|
||||||
<wso2.maven.compiler.target>1.7</wso2.maven.compiler.target>
|
|
||||||
<carbon.analytics.version>1.0.3</carbon.analytics.version>
|
|
||||||
|
|
||||||
</properties>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</properties>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
<extensions>
|
<extensions>
|
||||||
|
|||||||
@ -8,8 +8,8 @@
|
|||||||
"overview_version":"1.0.0",
|
"overview_version":"1.0.0",
|
||||||
"overview_name":"virtual_firealarm",
|
"overview_name":"virtual_firealarm",
|
||||||
"overview_url":"http://www.google.lk",
|
"overview_url":"http://www.google.lk",
|
||||||
"setupGuide_guideImage":"undefined",
|
"setupGuide_guideImage":"virtual_firealarm/guide.png",
|
||||||
"overview_actionLabel":"Download Agent",
|
"overview_actionLabel":"Download a virtual device",
|
||||||
"sketches_Sketches":"virtual_firealarm",
|
"sketches_Sketches":"virtual_firealarm",
|
||||||
"ingredients_ingredients":[
|
"ingredients_ingredients":[
|
||||||
"Virtual Agent that simulates an actual firealarm"
|
"Virtual Agent that simulates an actual firealarm"
|
||||||
|
|||||||
BIN
modules/samples/virtual_firealarm/artifact/guide.png
Normal file
BIN
modules/samples/virtual_firealarm/artifact/guide.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 75 KiB |
2
modules/samples/virtual_firealarm/sketch/startservice.sh
Normal file → Executable file
2
modules/samples/virtual_firealarm/sketch/startservice.sh
Normal file → Executable file
@ -11,7 +11,7 @@ echo "----------------------------------------------------------------"
|
|||||||
unzip firealarm-virtual-agent-1.0-SNAPSHOT-jar-with-dependencies.jar.zip
|
unzip firealarm-virtual-agent-1.0-SNAPSHOT-jar-with-dependencies.jar.zip
|
||||||
|
|
||||||
while true; do
|
while true; do
|
||||||
read -p "What is the network-interface of your PC that the Agent should use (find from ifconfig. ex: wlan0,en0,eth0..) > " interface
|
read -p "What is the network-interface of your device that the Agent should use (find from ifconfig. ex: wlan0,en0,eth0..) > " interface
|
||||||
|
|
||||||
echo "Setting the network-interface to " $interface
|
echo "Setting the network-interface to " $interface
|
||||||
sed s/^network-interface=.*/network-interface=$interface/ deviceConfig.properties > myTmp
|
sed s/^network-interface=.*/network-interface=$interface/ deviceConfig.properties > myTmp
|
||||||
|
|||||||
@ -304,8 +304,8 @@ public class VirtualFireAlarmService {
|
|||||||
public Response downloadSketch(@QueryParam("owner") String owner,
|
public Response downloadSketch(@QueryParam("owner") String owner,
|
||||||
@QueryParam("deviceName") String customDeviceName,
|
@QueryParam("deviceName") String customDeviceName,
|
||||||
@PathParam("sketch_type") String sketchType) {
|
@PathParam("sketch_type") String sketchType) {
|
||||||
|
//TODO:: null check customDeviceName at UI level
|
||||||
ZipArchive zipFile = null;
|
ZipArchive zipFile = null;
|
||||||
try {
|
try {
|
||||||
zipFile = createDownloadFile(owner, customDeviceName, sketchType);
|
zipFile = createDownloadFile(owner, customDeviceName, sketchType);
|
||||||
Response.ResponseBuilder rb = Response.ok(zipFile.getZipFile());
|
Response.ResponseBuilder rb = Response.ok(zipFile.getZipFile());
|
||||||
@ -391,8 +391,7 @@ public class VirtualFireAlarmService {
|
|||||||
//Register the device with CDMF
|
//Register the device with CDMF
|
||||||
String deviceName = customDeviceName + "_" + deviceId;
|
String deviceName = customDeviceName + "_" + deviceId;
|
||||||
status = register(deviceId, deviceName, owner);
|
status = register(deviceId, deviceName, owner);
|
||||||
// status = register(deviceId, owner + "s_" + sketchType + "_" + deviceId.substring(0, 3),
|
|
||||||
// owner);
|
|
||||||
if (!status) {
|
if (!status) {
|
||||||
String msg = "Error occurred while registering the device with " + "id: " + deviceId
|
String msg = "Error occurred while registering the device with " + "id: " + deviceId
|
||||||
+ " owner:" + owner;
|
+ " owner:" + owner;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user