diff --git a/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.backend.feature/pom.xml b/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.backend.feature/pom.xml index f615c9a12..7b1dfcf2d 100644 --- a/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.backend.feature/pom.xml +++ b/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.backend.feature/pom.xml @@ -113,7 +113,7 @@ p2-feature-gen - org.wso2.carbon.device.mgt.iot.arduino + org.wso2.carbon.device.mgt.iot.arduino.backend ../../../features/etc/feature.properties diff --git a/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.backend.feature/src/main/resources/p2.inf b/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.backend.feature/src/main/resources/p2.inf index 6c09044b9..2bd7898bd 100644 --- a/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.backend.feature/src/main/resources/p2.inf +++ b/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.backend.feature/src/main/resources/p2.inf @@ -2,9 +2,9 @@ instructions.configure = \ org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/resources/);\ org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/resources/devicetypes/);\ org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/deployment/server/webapps/);\ -org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.arduino_${feature.version}/webapps/,target:${installFolder}/../../../repository/deployment/server/webapps/,overwrite:true);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.arduino.backend_${feature.version}/webapps/,target:${installFolder}/../../../repository/deployment/server/webapps/,overwrite:true);\ org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/deployment/server/devicetypes/);\ -org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.arduino_${feature.version}/devicetypes/,target:${installFolder}/../../../repository/deployment/server/devicetypes/,overwrite:true);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.arduino.backend_${feature.version}/devicetypes/,target:${installFolder}/../../../repository/deployment/server/devicetypes/,overwrite:true);\ instructions.unconfigure = \ org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/deployment/server/webapps/arduino.war);\ diff --git a/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.feature/src/main/resources/agent/ArduinoBoardSketch.h b/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.feature/src/main/resources/agent/ArduinoBoardSketch.h deleted file mode 100644 index b6955cf79..000000000 --- a/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.feature/src/main/resources/agent/ArduinoBoardSketch.h +++ /dev/null @@ -1,77 +0,0 @@ -/** - * Copyright (c) 2015, 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 - * in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. -**/ - -#ifndef ArduinoWifiAgent_H -#define ArduinoWifiAgent_H - -#include "Arduino.h" - -// These are the interrupt and control pins -#define ADAFRUIT_CC3000_IRQ 3 // MUST be an interrupt pin! -// These can be any two pins -#define ADAFRUIT_CC3000_VBAT 5 -#define ADAFRUIT_CC3000_CS 10 - -#define WLAN_SSID "ssid" // Your wifi network SSID (cannot be longer than 32 characters!) -#define WLAN_PASS "password" // Your wifi network password - -#define WLAN_SECURITY WLAN_SEC_WPA2 -// Security can be WLAN_SEC_UNSEC, WLAN_SEC_WEP, WLAN_SEC_WPA or WLAN_SEC_WPA2 -#define IDLE_TIMEOUT_MS 3000 - -#define DEVICE_OWNER "${DEVICE_OWNER}" -#define DEVICE_ID "${DEVICE_ID}" -#define DEVICE_TOKEN "${DEVICE_TOKEN}" -#define REFRESH_DEVICE_TOKEN "${DEVICE_REFRESH_TOKEN}" -#define DEVICE_TYPE "arduino" -#define TIME 0 -#define SUPER_TENANT "carbon.super" - -#define DAS_SERVICE_EPOINT "/endpoints${TENANT_DOMAIN}/arduino_receiver?deviceId=${DEVICE_ID}" - -#define IOT_SERVICE_EPOINT "/arduino/device/${DEVICE_ID}/controls" - -#define POLL_INTERVAL 1000 -#define PUSH_INTERVAL 10000 -#define DEBUG true -#define CON_DEBUG true - -#define SERVICE_PORT ${SERVER_EP_PORT} //http port of iot server - -byte server[4] = {${SERVER_EP_IP}}; //Ip address of iot server - -//set static Ip -/** -byte deviceIP[4] = { 192, 168, 1,110 }; //Ststic ip address of arduino -byte dns2[] = { 8, 8, 8, 8 }; //Ststic dns of arduino -byte subnet[] = { 255, 255, 255, 0 }; //Ststic subnet of arduino -byte gateway[] = { 192, 168, 1, 1 }; //Ststic gateway of arduino -*/ - -String host, jsonPayLoad, replyMsg; -String responseMsg, subStrn; -double cpuTemperature = 0; -static unsigned long pushTimestamp = 0; -static unsigned long pollTimestamp = 0; -char charBuf[10]; -String payLoad; - - -#endif - - diff --git a/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.feature/src/main/resources/agent/ArduinoBoardSketch.ino b/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.feature/src/main/resources/agent/ArduinoBoardSketch.ino deleted file mode 100644 index 7f0e6941a..000000000 --- a/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.feature/src/main/resources/agent/ArduinoBoardSketch.ino +++ /dev/null @@ -1,83 +0,0 @@ -/** - * Copyright (c) 2015, 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 - * in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. -**/ - - -#include "ArduinoBoardSketch.h" -#include -#include -#include -Adafruit_CC3000 cc3000 = Adafruit_CC3000(ADAFRUIT_CC3000_CS, ADAFRUIT_CC3000_IRQ, ADAFRUIT_CC3000_VBAT, - SPI_CLOCK_DIVIDER); // you can change this clock speed - -Adafruit_CC3000_Client client; - -uint32_t sserver; - - -void setup() -{ - Serial.begin(115200); - Serial.println(F("Internal Temperature Sensor")); - pinMode(6, OUTPUT); - pinMode(13, OUTPUT); - connectHttp(); - setupResource(); - wdt_enable(WDTO_8S); - -} - -void loop() -{ - wdt_reset(); - while( !cc3000.checkConnected() ){ - connectHttp(); - - } - - - cpuTemperature=getBoardTemp(); - - - if(millis() - pushTimestamp > PUSH_INTERVAL){ - while (!client.connected()) { - setupClient(); - } - pushData(); - - pushTimestamp = millis(); - } - - //Serial.println("PUSHED"); - - - wdt_reset(); - - if(millis() - pollTimestamp > POLL_INTERVAL){ - while (!client.connected()) { - setupClient(); - } - Serial.println("Read Controls"); - readControls(); - - pollTimestamp = millis(); - - } - -// //Serial.println("LOOPING"); - wdt_reset(); -} diff --git a/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.feature/src/main/resources/agent/Connect.ino b/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.feature/src/main/resources/agent/Connect.ino deleted file mode 100644 index ba3785325..000000000 --- a/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.feature/src/main/resources/agent/Connect.ino +++ /dev/null @@ -1,163 +0,0 @@ -/** - * Copyright (c) 2015, 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 - * in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. -**/ - -#include "ArduinoBoardSketch.h" -/********************************************************************************************** - Use the below variables when required to set a static IP for the WifiSheild - ***********************************************************************************************/ - - uint32_t ip, ddns, ssubnet, ggateway; - -String connecting = "connecting.... "; - -void connectHttp() { - /* Initialise the module */ - if(DEBUG) Serial.println(F("\nInitializing...")); - if (!cc3000.begin()) - { - if(DEBUG) Serial.println(F("Couldn't begin()! Check your wiring?")); - while(1); - } - - /********************************************************************************************** - Only required if using static IP for the WifiSheild - ***********************************************************************************************/ - - /** - ip = cc3000.IP2U32(deviceIP[0], deviceIP[1], deviceIP[2], deviceIP[3]); - ddns = cc3000.IP2U32(dns2[0], dns2[1], dns2[2], dns2[3]); - ssubnet = cc3000.IP2U32(subnet[0], subnet[1], subnet[2], subnet[3]); - ggateway = cc3000.IP2U32(gateway[0], gateway[1], gateway[2], gateway[3]); - cc3000.setStaticIPAddress(ip, ssubnet, ggateway, ddns); - */ - // required for setting static IP - - /***********************************************************************************************/ - - - sserver = cc3000.IP2U32(server[0], server[1], server[2], server[3]); - - if(CON_DEBUG) { - Serial.print(F("\nAttempting to connect to ")); - Serial.println(WLAN_SSID); - } - - cc3000.deleteProfiles(); - - if (!cc3000.connectToAP(WLAN_SSID, WLAN_PASS, WLAN_SECURITY)) { - if(CON_DEBUG) Serial.println(F("Failed!")); - while(1); - } - - if(CON_DEBUG) Serial.println(F("Connected to Wifi network!")); - - if(CON_DEBUG) Serial.println(F("Request DHCP")); - while (!cc3000.checkDHCP()) - { - delay(100); - } - - /* Display the IP address DNS, Gateway, etc. */ - while (! displayConnectionDetails()) { - delay(1000); - } - - if (cc3000.checkConnected()) { - Serial.println("client Connected to AP"); - client = cc3000.connectTCP(sserver, SERVICE_PORT); - if (client.connected()) { - if(CON_DEBUG) Serial.println("client Connected to server"); - } else { - if(CON_DEBUG) Serial.println(F("client Connection failed")); - } - } else { - Serial.println(F("client Connection to AP failed")); - } - - if(CON_DEBUG) Serial.println(F("-------------------------------------")); -} - - -void setupResource(){ - String hostIP = getHostIP(server); - String port = String(SERVICE_PORT); - - host = "Host: " + hostIP + ":" + port; - if(DEBUG) Serial.println(host); - - jsonPayLoad = "{\"event\":{\"metaData\":"; - jsonPayLoad += "{\"owner\":\""; - jsonPayLoad += String(DEVICE_OWNER); - jsonPayLoad += "\",\"deviceId\":\""; - jsonPayLoad += String(DEVICE_ID); - jsonPayLoad += "\"}, \"payloadData\":{"; - - if(DEBUG) { - Serial.print("JSON Payload: "); - Serial.println(jsonPayLoad); - Serial.println("-------------------------------"); - } -} - -String getHostIP(byte server[4]){ - String hostIP = String(server[0]); - - for ( int index = 1; index < 4; index++) { - hostIP += "." + String(server[index]); - } - - return hostIP; -} - - -bool displayConnectionDetails(void) -{ - uint32_t ipAddress, netmask, gateway, dhcpserv, dnsserv; - - if(!cc3000.getIPAddress(&ipAddress, &netmask, &gateway, &dhcpserv, &dnsserv)) - { - if(DEBUG) Serial.println(F("Unable to retrieve the IP Address!\r\n")); - return false; - } - else - { - if(CON_DEBUG) { - Serial.print(F("\nIP Addr: ")); cc3000.printIPdotsRev(ipAddress); - Serial.print(F("\nNetmask: ")); cc3000.printIPdotsRev(netmask); - Serial.print(F("\nGateway: ")); cc3000.printIPdotsRev(gateway); - Serial.print(F("\nDHCPsrv: ")); cc3000.printIPdotsRev(dhcpserv); - Serial.print(F("\nDNSserv: ")); cc3000.printIPdotsRev(dnsserv); - Serial.println(); - } - return true; - } -} - -void setupClient(){ - client = cc3000.connectTCP(sserver, SERVICE_PORT); //SERVICE_PORT - if (client.connected()) { - if(CON_DEBUG) Serial.println("client Connected to server"); - } else { - while( !cc3000.checkConnected() ){ - connectHttp(); - - } - if(CON_DEBUG) Serial.println(F("client Connection failed")); - } -} - diff --git a/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.feature/src/main/resources/agent/PollServer.ino b/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.feature/src/main/resources/agent/PollServer.ino deleted file mode 100644 index 040790f2d..000000000 --- a/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.feature/src/main/resources/agent/PollServer.ino +++ /dev/null @@ -1,82 +0,0 @@ -/** - * Copyright (c) 2015, 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 - * in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. -**/ - -#include "ArduinoBoardSketch.h" -void readControls() { - // String responseMsg; - - Serial.println("Started.."); - - client.fastrprint(F("GET ")); - client.fastrprint(IOT_SERVICE_EPOINT); - client.fastrprint(F(" HTTP/1.1")); - client.fastrprint(F("\n")); - client.fastrprint(host.c_str());client.fastrprint(F("\n")); - client.fastrprint(F("Authorization: Bearer ")); client.fastrprint(F(DEVICE_TOKEN)); client.fastrprint(F("\n")); - client.fastrprint(F("\n")); - client.fastrprint(F("protocol: HTTP\n")); - - client.println(); - - if(DEBUG) { - Serial.print("GET "); - Serial.print(IOT_SERVICE_EPOINT); - Serial.print(" HTTP/1.1"); Serial.println(); - Serial.print(host); Serial.println(); - Serial.print("Content-Type: application/json"); Serial.println(); - Serial.println(); - } - - delay(1000); - - while (client.available()) { - char response = client.read(); - if(DEBUG) Serial.print(response); - responseMsg += response; - - } - Serial.println(); - Serial.println("Ended.."); - int index = responseMsg.lastIndexOf(":"); - int newLine = responseMsg.lastIndexOf("\n"); - subStrn = responseMsg.substring(index + 1); - responseMsg = responseMsg.substring(newLine + 1, index); - - if(DEBUG) { - Serial.print("Polling Response: "); - Serial.print(responseMsg); - Serial.println(); - Serial.println("-------------------------------"); - } - - if (subStrn.equals("ON")) { - Serial.println("ITS ON"); - digitalWrite(13, HIGH); - digitalWrite(6, HIGH); - } else if (subStrn.equals("OFF")){ - - Serial.println("ITS OFF"); - digitalWrite(13, LOW); - digitalWrite(6, LOW); - - } - responseMsg = ""; - -} - - diff --git a/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.feature/src/main/resources/agent/PushData.ino b/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.feature/src/main/resources/agent/PushData.ino deleted file mode 100644 index c5879b0fe..000000000 --- a/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.feature/src/main/resources/agent/PushData.ino +++ /dev/null @@ -1,133 +0,0 @@ -/** - * Copyright (c) 2015, 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 - * in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. -**/ - -#include "ArduinoBoardSketch.h" - -/********************************************************************************************** - This method will traverse the array of digital pins and batch the data from the those pins together. - It makes a single call to the server and sends all pin values as a batch. - Server dis-assembles it accordingly and makes multiple publish calls for each sensor type. - ***********************************************************************************************/ - -void pushData(){ - - payLoad = "\"temperature\":"; - payLoad += dtostrf(cpuTemperature, 3, 2, charBuf); - payLoad += "}}}"; - - client.fastrprint(F("POST ")); - client.fastrprint(DAS_SERVICE_EPOINT); - client.fastrprint(F(" HTTP/1.1")); client.fastrprint(F("\n")); - client.fastrprint(host.c_str()); client.fastrprint(F("\n")); - client.fastrprint(F("Authorization: Bearer ")); client.fastrprint(F(DEVICE_TOKEN)); client.fastrprint(F("\n")); - client.fastrprint(F("Content-Type: application/json")); client.fastrprint(F("\n")); - client.fastrprint(F("Accept: application/json")); client.fastrprint(F("\n")); - client.fastrprint(F("Content-Length: ")); - - int payLength = jsonPayLoad.length() + payLoad.length(); - - client.fastrprint(String(payLength).c_str()); client.fastrprint(F("\n")); - client.fastrprint(F("\n")); - - if(DEBUG) { - Serial.print("POST "); - Serial.print(DAS_SERVICE_EPOINT); - Serial.print(" HTTP/1.1"); Serial.println(); - Serial.print(host); Serial.println(); - Serial.print("Content-Type: application/json"); Serial.println(); - Serial.print("Content-Length: "); - Serial.print(payLength); Serial.println(); - Serial.println(); - } - - - int chunkSize = 50; - - for (int i = 0; i < jsonPayLoad.length(); i++) { - if ( (i+1)*chunkSize > jsonPayLoad.length()) { - client.print(jsonPayLoad.substring(i*chunkSize, jsonPayLoad.length())); - if(DEBUG) Serial.print(jsonPayLoad.substring(i*chunkSize, jsonPayLoad.length())); - i = jsonPayLoad.length(); - } else { - client.print(jsonPayLoad.substring(i*chunkSize, (i+1)*chunkSize)); - if(DEBUG) Serial.print(jsonPayLoad.substring(i*chunkSize, (i+1)*chunkSize)); - } - } - - for (int i = 0; i < payLoad.length(); i++) { - if ( (i+1)*chunkSize > payLoad.length()) { - client.print(payLoad.substring(i*chunkSize, payLoad.length())); - if(DEBUG) Serial.print(payLoad.substring(i*chunkSize, payLoad.length())); - i = payLoad.length(); - } else { - client.print(payLoad.substring(i*chunkSize, (i+1)*chunkSize)); - if(DEBUG) Serial.print(payLoad.substring(i*chunkSize, (i+1)*chunkSize)); - } - } - - client.fastrprint(F("\n")); - if(DEBUG) Serial.println(); - - delay(1000); - - - while (client.available()) { - char response = client.read(); - if(DEBUG) Serial.print(response); - } - - - if(DEBUG) { - Serial.println(); - Serial.println("-------------------------------"); - } - - payLoad = ""; -} - - -double getBoardTemp(void) -{ - unsigned int wADC; - double t; - - // The internal temperature has to be used - // with the internal reference of 1.1V. - // Channel 8 can not be selected with - // the analogRead function yet. - - // Set the internal reference and mux. - ADMUX = (_BV(REFS1) | _BV(REFS0) | _BV(MUX3)); - ADCSRA |= _BV(ADEN); // enable the ADC - - delay(20); // wait for voltages to become stable. - - ADCSRA |= _BV(ADSC); // Start the ADC - - // Detect end-of-conversion - while (bit_is_set(ADCSRA,ADSC)); - - // Reading register "ADCW" takes care of how to read ADCL and ADCH. - wADC = ADCW; - - // The offset of 324.31 could be wrong. It is just an indication. - t = (wADC - 324.31 ) / 1.22; - - // The returned temperature is in degrees Celcius. - return (t); -} diff --git a/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.feature/src/main/resources/agent/deviceType.png b/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.feature/src/main/resources/agent/deviceType.png deleted file mode 100644 index 766cd2baa..000000000 Binary files a/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.feature/src/main/resources/agent/deviceType.png and /dev/null differ diff --git a/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.feature/src/main/resources/agent/sketch.properties b/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.feature/src/main/resources/agent/sketch.properties deleted file mode 100644 index 57ba905ef..000000000 --- a/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.feature/src/main/resources/agent/sketch.properties +++ /dev/null @@ -1,20 +0,0 @@ -# -# Copyright (c) 2015, 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 -# in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# - -templates=ArduinoBoardSketch.h -zipfilename=ArduinoBoardSketch.zip \ No newline at end of file diff --git a/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.feature/src/main/resources/p2.inf b/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.feature/src/main/resources/p2.inf deleted file mode 100644 index 081d93a64..000000000 --- a/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.feature/src/main/resources/p2.inf +++ /dev/null @@ -1,26 +0,0 @@ -instructions.configure = \ -org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/resources/);\ -org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/resources/devicetypes/);\ -org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/deployment/server/webapps/);\ -org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.arduino_${feature.version}/webapps/,target:${installFolder}/../../../repository/deployment/server/webapps/,overwrite:true);\ -org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/resources/sketches/);\ -org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/resources/sketches/arduino/);\ -org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.arduino_${feature.version}/agent/,target:${installFolder}/../../../repository/resources/sketches/arduino/,overwrite:true);\ -org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/deployment/server/jaggeryapps/);\ -org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.arduino_${feature.version}/jaggeryapps/,target:${installFolder}/../../../repository/deployment/server/jaggeryapps/,overwrite:true);\ -org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/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}/../../../repository/resources/devicetypes/,overwrite:true);\ -org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/deployment/server/devicetypes/);\ -org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.arduino_${feature.version}/devicetypes/,target:${installFolder}/../../../repository/deployment/server/devicetypes/,overwrite:true);\ - -instructions.unconfigure = \ -org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/deployment/server/webapps/arduino.war);\ -org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/deployment/server/webapps/arduino);\ -org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/resources/sketches/arduino);\ -org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/deployment/server/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.arduino.device-view);\ -org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/deployment/server/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.arduino.type-view);\ -org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/deployment/server/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.arduino.analytics-view);\ -org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/deployment/server/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.arduino.realtime.analytics-view);\ -org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/deployment/server/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.arduino.platform.configuration);\ -org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/resources/devicetypes/arduino.car);\ -org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/deployment/server/devicetypes/arduino.xml);\ \ No newline at end of file diff --git a/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.ui.feature/pom.xml b/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.ui.feature/pom.xml index e65857bd9..3b7c8f87e 100644 --- a/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.ui.feature/pom.xml +++ b/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.ui.feature/pom.xml @@ -111,7 +111,7 @@ p2-feature-gen - org.wso2.carbon.device.mgt.iot.arduino + org.wso2.carbon.device.mgt.iot.arduino.ui ../../../features/etc/feature.properties diff --git a/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.ui.feature/src/main/resources/p2.inf b/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.ui.feature/src/main/resources/p2.inf index ecc9c40a2..2b8e74a8a 100644 --- a/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.ui.feature/src/main/resources/p2.inf +++ b/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.ui.feature/src/main/resources/p2.inf @@ -3,11 +3,11 @@ org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../r org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/resources/devicetypes/);\ org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/resources/sketches/);\ org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/resources/sketches/arduino/);\ -org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.arduino_${feature.version}/agent/,target:${installFolder}/../../../repository/resources/sketches/arduino/,overwrite:true);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.arduino.ui_${feature.version}/agent/,target:${installFolder}/../../../repository/resources/sketches/arduino/,overwrite:true);\ org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/deployment/server/jaggeryapps/);\ -org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.arduino_${feature.version}/jaggeryapps/,target:${installFolder}/../../../repository/deployment/server/jaggeryapps/,overwrite:true);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.arduino.ui_${feature.version}/jaggeryapps/,target:${installFolder}/../../../repository/deployment/server/jaggeryapps/,overwrite:true);\ org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/deployment/server/devicetypes/);\ -org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.arduino_${feature.version}/devicetypes/,target:${installFolder}/../../../repository/deployment/server/devicetypes/,overwrite:true);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.arduino.ui_${feature.version}/devicetypes/,target:${installFolder}/../../../repository/deployment/server/devicetypes/,overwrite:true);\ instructions.unconfigure = \ org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/resources/sketches/arduino);\ diff --git a/features/device-types-feature/arduino-plugin-feature/pom.xml b/features/device-types-feature/arduino-plugin-feature/pom.xml index d4df856ae..d630b4914 100644 --- a/features/device-types-feature/arduino-plugin-feature/pom.xml +++ b/features/device-types-feature/arduino-plugin-feature/pom.xml @@ -33,7 +33,6 @@ http://wso2.org - org.wso2.carbon.device.mgt.iot.arduino.ui.feature org.wso2.carbon.device.mgt.iot.arduino.backend.feature org.wso2.carbon.device.mgt.iot.arduino.analytics.feature diff --git a/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.feature/pom.xml b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.analytics.feature/pom.xml similarity index 64% rename from features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.feature/pom.xml rename to features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.analytics.feature/pom.xml index 686057603..61bc593ef 100644 --- a/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.feature/pom.xml +++ b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.analytics.feature/pom.xml @@ -22,31 +22,19 @@ org.wso2.carbon.devicemgt-plugins - arduino-plugin-feature + raspberrypi-plugin-feature 3.0.32-SNAPSHOT ../pom.xml 4.0.0 - org.wso2.carbon.device.mgt.iot.arduino.feature + org.wso2.carbon.device.mgt.iot.raspberrypi.analytics.feature pom - WSO2 Carbon - IoT Server Arduino Feature + WSO2 Carbon - IoT Server RaspberryPi Analytics Feature http://wso2.org - This feature contains the Arduino Device type specific implementations for the IoT Server + This feature contains the RaspberryPi Device type specific analytics implementations for the IoT Server - - - org.wso2.carbon.devicemgt-plugins - org.wso2.carbon.device.mgt.iot.arduino.api - war - - - com.h2database.wso2 - h2-database-engine - - - @@ -88,7 +76,7 @@ org.wso2.carbon.devicemgt-plugins - org.wso2.carbon.device.mgt.iot.arduino.analytics + org.wso2.carbon.device.mgt.iot.raspberrypi.analytics ${project.version} zip @@ -98,18 +86,6 @@ **/* - - org.wso2.carbon.devicemgt-plugins - org.wso2.carbon.device.mgt.iot.arduino.ui - - ${project.version} - zip - true - - ${project.build.directory}/maven-shared-archive-resources/jaggeryapps/devicemgt - - **/* - @@ -135,29 +111,9 @@ - - copy-jaxrs-war - package - - copy - - - - - org.wso2.carbon.devicemgt-plugins - org.wso2.carbon.device.mgt.iot.arduino.api - - war - true - ${project.build.directory}/maven-shared-archive-resources/webapps/ - - arduino.war - - - - + org.wso2.maven carbon-p2-plugin @@ -170,7 +126,7 @@ p2-feature-gen - org.wso2.carbon.device.mgt.iot.arduino + org.wso2.carbon.device.mgt.iot.raspberrypi.analytics ../../../features/etc/feature.properties @@ -178,12 +134,6 @@ org.eclipse.equinox.p2.type.group:true - - org.wso2.carbon.core.server:${carbon.kernel.version} - - org.wso2.carbon.device.mgt.server:${carbon.devicemgt.version} - - org.wso2.carbon.devicemgt-plugins:org.wso2.carbon.device.mgt.iot.analytics.feature:${carbon.devicemgt.plugins.version} diff --git a/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.feature/src/main/resources/build.properties b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.analytics.feature/src/main/resources/build.properties similarity index 100% rename from features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.feature/src/main/resources/build.properties rename to features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.analytics.feature/src/main/resources/build.properties diff --git a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.analytics.feature/src/main/resources/p2.inf b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.analytics.feature/src/main/resources/p2.inf new file mode 100644 index 000000000..8f06fe31a --- /dev/null +++ b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.analytics.feature/src/main/resources/p2.inf @@ -0,0 +1,3 @@ +instructions.configure = \ +org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/deployment/server/carbonapps/);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.raspberrypi.analytics_${feature.version}/carbonapps/,target:${installFolder}/../../../repository/resources/devicetypes/,overwrite:true);\ diff --git a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.backend.feature/pom.xml b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.backend.feature/pom.xml new file mode 100644 index 000000000..9069fb9ca --- /dev/null +++ b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.backend.feature/pom.xml @@ -0,0 +1,172 @@ + + + + + + + + org.wso2.carbon.devicemgt-plugins + raspberrypi-plugin-feature + 3.0.32-SNAPSHOT + ../pom.xml + + + 4.0.0 + org.wso2.carbon.device.mgt.iot.raspberrypi.backend.feature + pom + WSO2 Carbon - IoT Server RaspberryPi Backend Feature + http://wso2.org + This feature contains the RaspberryPi Device type specific backend implementations for the IoT Server + + + + + org.wso2.carbon.devicemgt-plugins + org.wso2.carbon.device.mgt.iot.raspberrypi.api + war + + + com.h2database.wso2 + h2-database-engine + + + + + + + maven-resources-plugin + + + copy-resources + generate-resources + + copy-resources + + + src/main/resources + + + resources + + build.properties + p2.inf + + + + + + + + + + org.apache.maven.plugins + maven-dependency-plugin + + + copy-jaxrs-war + package + + copy + + + + + org.wso2.carbon.devicemgt-plugins + org.wso2.carbon.device.mgt.iot.raspberrypi.api + + war + true + ${project.build.directory}/maven-shared-archive-resources/webapps/ + raspberrypi.war + + + + + + + + + org.apache.maven.plugins + maven-antrun-plugin + + + + create-raspberrypi-plugin-mgt-schema + package + + run + + + + + + + + + + + + + + + + + + + + + + + + + + + org.wso2.maven + carbon-p2-plugin + ${carbon.p2.plugin.version} + + + p2-feature-generation + package + + p2-feature-gen + + + org.wso2.carbon.device.mgt.iot.raspberrypi.backend + ../../../features/etc/feature.properties + + + org.wso2.carbon.p2.category.type:server + org.eclipse.equinox.p2.type.group:true + + + + org.wso2.carbon.core.server:${carbon.kernel.version} + + org.wso2.carbon.device.mgt.server:${carbon.devicemgt.version} + + + + + + + + + + diff --git a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/build.properties b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.backend.feature/src/main/resources/build.properties similarity index 100% rename from features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/build.properties rename to features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.backend.feature/src/main/resources/build.properties diff --git a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/datasources/raspberrypi-datasources.xml b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.backend.feature/src/main/resources/datasources/raspberrypi-datasources.xml similarity index 100% rename from features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/datasources/raspberrypi-datasources.xml rename to features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.backend.feature/src/main/resources/datasources/raspberrypi-datasources.xml diff --git a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/dbscripts/h2.sql b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.backend.feature/src/main/resources/dbscripts/h2.sql similarity index 100% rename from features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/dbscripts/h2.sql rename to features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.backend.feature/src/main/resources/dbscripts/h2.sql diff --git a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/dbscripts/mssql.sql b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.backend.feature/src/main/resources/dbscripts/mssql.sql similarity index 100% rename from features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/dbscripts/mssql.sql rename to features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.backend.feature/src/main/resources/dbscripts/mssql.sql diff --git a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/dbscripts/mysql.sql b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.backend.feature/src/main/resources/dbscripts/mysql.sql similarity index 100% rename from features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/dbscripts/mysql.sql rename to features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.backend.feature/src/main/resources/dbscripts/mysql.sql diff --git a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/dbscripts/oracle.sql b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.backend.feature/src/main/resources/dbscripts/oracle.sql similarity index 100% rename from features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/dbscripts/oracle.sql rename to features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.backend.feature/src/main/resources/dbscripts/oracle.sql diff --git a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/dbscripts/postgresql.sql b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.backend.feature/src/main/resources/dbscripts/postgresql.sql similarity index 100% rename from features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/dbscripts/postgresql.sql rename to features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.backend.feature/src/main/resources/dbscripts/postgresql.sql diff --git a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/devicetypes/raspberrypi.xml b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.backend.feature/src/main/resources/devicetypes/raspberrypi.xml similarity index 100% rename from features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/devicetypes/raspberrypi.xml rename to features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.backend.feature/src/main/resources/devicetypes/raspberrypi.xml diff --git a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.backend.feature/src/main/resources/p2.inf b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.backend.feature/src/main/resources/p2.inf new file mode 100644 index 000000000..5aba54fd9 --- /dev/null +++ b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.backend.feature/src/main/resources/p2.inf @@ -0,0 +1,24 @@ +instructions.configure = \ +org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/resources/);\ +org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/resources/devicetypes/);\ +org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/deployment/server/webapps/);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.raspberrypi.backend_${feature.version}/webapps/,target:${installFolder}/../../../repository/deployment/server/webapps/,overwrite:true);\ +org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/resources/sketches/);\ +org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/resources/sketches/raspberrypi/);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.raspberrypi.backend_${feature.version}/dbscripts/,target:${installFolder}/../../../dbscripts/cdm/plugins/raspberrypi,overwrite:true);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.raspberrypi.backend_${feature.version}/datasources/,target:${installFolder}/../../../conf/datasources/,overwrite:true);\ +org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/database/);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.raspberrypi.backend_${feature.version}/database/,target:${installFolder}/../../../repository/database/,overwrite:true);\ +org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/deployment/server/devicetypes/);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.raspberrypi.backend_${feature.version}/devicetypes/,target:${installFolder}/../../../repository/deployment/server/devicetypes/,overwrite:true);\ + + +instructions.unconfigure = \ +org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/deployment/server/webapps/raspberrypi.war);\ +org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/deployment/server/webapps/raspberrypi);\ +org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../dbscripts/cdm/plugins/raspberrypi);\ +org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/resources/sketches/raspberrypi);\ +org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../conf/datasources/raspberrypi-datasources.xml);\ +org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/database/RaspberryPiDM_DB.h2.db);\ +org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/resources/devicetypes/raspberrypi.car);\ +org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/deployment/server/devicetypes/raspberrypi.xml);\ \ No newline at end of file diff --git a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/pom.xml b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/pom.xml similarity index 70% rename from features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/pom.xml rename to features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/pom.xml index e1a9a98da..00e1114dc 100644 --- a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/pom.xml +++ b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/pom.xml @@ -28,19 +28,14 @@ 4.0.0 - org.wso2.carbon.device.mgt.iot.raspberrypi.feature + org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature pom - WSO2 Carbon - IoT Server RaspberryPi Feature + WSO2 Carbon - IoT Server RaspberryPi UI Feature http://wso2.org - This feature contains the RaspberryPi Device type specific implementations for the IoT Server + This feature contains the RaspberryPi Device type specific UI implementations for the IoT Server - - org.wso2.carbon.devicemgt-plugins - org.wso2.carbon.device.mgt.iot.raspberrypi.api - war - com.h2database.wso2 h2-database-engine @@ -86,18 +81,6 @@ - - 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 @@ -113,48 +96,6 @@ - - copy-jaxrs-war - package - - copy - - - - - org.wso2.carbon.devicemgt-plugins - org.wso2.carbon.device.mgt.iot.raspberrypi.api - - war - true - ${project.build.directory}/maven-shared-archive-resources/webapps/ - raspberrypi.war - - - - - - unpack-analytics - package - - unpack - - - - - org.wso2.carbon.devicemgt-plugins - org.wso2.carbon.device.mgt.iot.analytics - ${project.version} - zip - true - - ${project.build.directory}/maven-shared-archive-resources/carbonapps - - **/* - - - - @@ -205,7 +146,7 @@ p2-feature-gen - org.wso2.carbon.device.mgt.iot.raspberrypi + org.wso2.carbon.device.mgt.iot.raspberrypi.ui ../../../features/etc/feature.properties @@ -219,11 +160,6 @@ org.wso2.carbon.device.mgt.server:${carbon.devicemgt.version} - - - org.wso2.carbon.devicemgt-plugins:org.wso2.carbon.device.mgt.iot.analytics.feature:${carbon.devicemgt.plugins.version} - - diff --git a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/agent/Adafruit_Python_DHT.zip b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/agent/Adafruit_Python_DHT.zip similarity index 100% rename from features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/agent/Adafruit_Python_DHT.zip rename to features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/agent/Adafruit_Python_DHT.zip diff --git a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/agent/README.md b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/agent/README.md similarity index 100% rename from features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/agent/README.md rename to features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/agent/README.md diff --git a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/agent/RaspberryService.sh b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/agent/RaspberryService.sh similarity index 100% rename from features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/agent/RaspberryService.sh rename to features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/agent/RaspberryService.sh diff --git a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/agent/deviceConfig.properties b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/agent/deviceConfig.properties similarity index 100% rename from features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/agent/deviceConfig.properties rename to features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/agent/deviceConfig.properties diff --git a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/agent/org.eclipse.paho.mqtt.python.tar b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/agent/org.eclipse.paho.mqtt.python.tar similarity index 100% rename from features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/agent/org.eclipse.paho.mqtt.python.tar rename to features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/agent/org.eclipse.paho.mqtt.python.tar diff --git a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/agent/sketch.properties b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/agent/sketch.properties similarity index 100% rename from features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/agent/sketch.properties rename to features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/agent/sketch.properties diff --git a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/agent/src/RaspberryAgent.py b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/agent/src/RaspberryAgent.py similarity index 100% rename from features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/agent/src/RaspberryAgent.py rename to features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/agent/src/RaspberryAgent.py diff --git a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/agent/src/RaspberryStats.log b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/agent/src/RaspberryStats.log similarity index 100% rename from features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/agent/src/RaspberryStats.log rename to features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/agent/src/RaspberryStats.log diff --git a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/agent/src/httpServer.py b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/agent/src/httpServer.py similarity index 100% rename from features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/agent/src/httpServer.py rename to features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/agent/src/httpServer.py diff --git a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/agent/src/iotUtils.py b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/agent/src/iotUtils.py similarity index 100% rename from features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/agent/src/iotUtils.py rename to features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/agent/src/iotUtils.py diff --git a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/agent/src/mqttConnector.py b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/agent/src/mqttConnector.py similarity index 100% rename from features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/agent/src/mqttConnector.py rename to features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/agent/src/mqttConnector.py diff --git a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/agent/src/running_mode.py b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/agent/src/running_mode.py similarity index 100% rename from features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/agent/src/running_mode.py rename to features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/agent/src/running_mode.py diff --git a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/agent/startService.sh b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/agent/startService.sh similarity index 100% rename from features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/agent/startService.sh rename to features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/agent/startService.sh diff --git a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/agent/testAgent.sh b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/agent/testAgent.sh similarity index 100% rename from features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/agent/testAgent.sh rename to features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/agent/testAgent.sh diff --git a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/build.properties b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/build.properties new file mode 100644 index 000000000..9c86577d7 --- /dev/null +++ b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/build.properties @@ -0,0 +1 @@ +custom = true diff --git a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/datasources/raspberrypi-datasources.xml b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/datasources/raspberrypi-datasources.xml new file mode 100644 index 000000000..62982ef29 --- /dev/null +++ b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/datasources/raspberrypi-datasources.xml @@ -0,0 +1,48 @@ + + + + + org.wso2.carbon.ndatasource.rdbms.RDBMSDataSourceReader + + + + + RaspberryPi_DB + The datasource used for the RaspberryPi database + + jdbc/RaspberryPiDM_DB + + + + jdbc:h2:repository/database/RaspberryPiDM_DB;DB_CLOSE_ON_EXIT=FALSE + + wso2carbon + wso2carbon + org.h2.Driver + 50 + 60000 + true + SELECT 1 + 30000 + + + + + + diff --git a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/dbscripts/h2.sql b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/dbscripts/h2.sql new file mode 100644 index 000000000..67e702ec9 --- /dev/null +++ b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/dbscripts/h2.sql @@ -0,0 +1,9 @@ + +-- ----------------------------------------------------- +-- Table `RASPBERRYPI_DEVICE` +-- ----------------------------------------------------- +CREATE TABLE IF NOT EXISTS `RASPBERRYPI_DEVICE` ( + `RASPBERRYPI_DEVICE_ID` VARCHAR(45) NOT NULL , + `DEVICE_NAME` VARCHAR(100) NULL DEFAULT NULL, + PRIMARY KEY (`RASPBERRYPI_DEVICE_ID`) ); + diff --git a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/dbscripts/mssql.sql b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/dbscripts/mssql.sql new file mode 100644 index 000000000..a944f4cb2 --- /dev/null +++ b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/dbscripts/mssql.sql @@ -0,0 +1,9 @@ + +-- ----------------------------------------------------- +-- Table `RASPBERRYPI_DEVICE` +-- ----------------------------------------------------- +CREATE TABLE IF NOT EXISTS RASPBERRYPI_DEVICE ( + RASPBERRYPI_DEVICE_ID VARCHAR(45) NOT NULL , + DEVICE_NAME VARCHAR(100) NULL DEFAULT NULL, + PRIMARY KEY (RASPBERRYPI_DEVICE_ID) ); + diff --git a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/dbscripts/mysql.sql b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/dbscripts/mysql.sql new file mode 100644 index 000000000..ad0ec54b7 --- /dev/null +++ b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/dbscripts/mysql.sql @@ -0,0 +1,12 @@ +-- ----------------------------------------------------- +-- Table `RASPBERRYPI_DEVICE` +-- ----------------------------------------------------- +CREATE TABLE IF NOT EXISTS `RASPBERRYPI_DEVICE` ( + `RASPBERRYPI_DEVICE_ID` VARCHAR(45) NOT NULL , + `DEVICE_NAME` VARCHAR(100) NULL DEFAULT NULL, + PRIMARY KEY (`RASPBERRYPI_DEVICE_ID`) ) +ENGINE = InnoDB; + + + + diff --git a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/dbscripts/oracle.sql b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/dbscripts/oracle.sql new file mode 100644 index 000000000..b72ecb564 --- /dev/null +++ b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/dbscripts/oracle.sql @@ -0,0 +1,9 @@ + +-- ----------------------------------------------------- +-- Table `RASPBERRYPI_DEVICE` +-- ----------------------------------------------------- +CREATE TABLE RASPBERRYPI_DEVICE ( + RASPBERRYPI_DEVICE_ID VARCHAR(45) NOT NULL , + DEVICE_NAME VARCHAR(100) NULL DEFAULT NULL, + PRIMARY KEY (RASPBERRYPI_DEVICE_ID) ); + diff --git a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/dbscripts/postgresql.sql b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/dbscripts/postgresql.sql new file mode 100644 index 000000000..a944f4cb2 --- /dev/null +++ b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/dbscripts/postgresql.sql @@ -0,0 +1,9 @@ + +-- ----------------------------------------------------- +-- Table `RASPBERRYPI_DEVICE` +-- ----------------------------------------------------- +CREATE TABLE IF NOT EXISTS RASPBERRYPI_DEVICE ( + RASPBERRYPI_DEVICE_ID VARCHAR(45) NOT NULL , + DEVICE_NAME VARCHAR(100) NULL DEFAULT NULL, + PRIMARY KEY (RASPBERRYPI_DEVICE_ID) ); + diff --git a/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.feature/src/main/resources/devicetypes/arduino.xml b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/devicetypes/raspberrypi.xml similarity index 63% rename from features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.feature/src/main/resources/devicetypes/arduino.xml rename to features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/devicetypes/raspberrypi.xml index 7871e1d42..85db147c6 100644 --- a/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.feature/src/main/resources/devicetypes/arduino.xml +++ b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/devicetypes/raspberrypi.xml @@ -17,12 +17,12 @@ ~ specific language governing permissions and limitations ~ under the License. --> - + Control Bulb - Control Bulb on Arduino Uno - + Control Bulb on Raspberrypi + state @@ -34,6 +34,16 @@ false + + true + + + raspberrypi.mqtt.adapter + 0 + true + + + en_US 1.0.0 diff --git a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/p2.inf b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/p2.inf similarity index 59% rename from features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/p2.inf rename to features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/p2.inf index 935c08882..86bcd6364 100644 --- a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/p2.inf +++ b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/p2.inf @@ -1,26 +1,20 @@ instructions.configure = \ org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/resources/);\ org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/resources/devicetypes/);\ -org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/deployment/server/webapps/);\ -org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.raspberrypi_${feature.version}/webapps/,target:${installFolder}/../../../repository/deployment/server/webapps/,overwrite:true);\ org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/resources/sketches/);\ org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/resources/sketches/raspberrypi/);\ -org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.raspberrypi_${feature.version}/agent/,target:${installFolder}/../../../repository/resources/sketches/raspberrypi/,overwrite:true);\ -org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.raspberrypi_${feature.version}/dbscripts/,target:${installFolder}/../../../dbscripts/cdm/plugins/raspberrypi,overwrite:true);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.raspberrypi.ui_${feature.version}/agent/,target:${installFolder}/../../../repository/resources/sketches/raspberrypi/,overwrite:true);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.raspberrypi.ui_${feature.version}/dbscripts/,target:${installFolder}/../../../dbscripts/cdm/plugins/raspberrypi,overwrite:true);\ org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/deployment/server/jaggeryapps/);\ -org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.raspberrypi_${feature.version}/jaggeryapps/,target:${installFolder}/../../../repository/deployment/server/jaggeryapps/,overwrite:true);\ -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.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.raspberrypi.ui_${feature.version}/jaggeryapps/,target:${installFolder}/../../../repository/deployment/server/jaggeryapps/,overwrite:true);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.raspberrypi.ui_${feature.version}/datasources/,target:${installFolder}/../../../conf/datasources/,overwrite:true);\ org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/database/);\ -org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.raspberrypi_${feature.version}/database/,target:${installFolder}/../../../repository/database/,overwrite:true);\ -org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/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}/../../../repository/resources/devicetypes/,overwrite:true);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.raspberrypi.ui_${feature.version}/database/,target:${installFolder}/../../../repository/database/,overwrite:true);\ org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/deployment/server/devicetypes/);\ -org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.raspberrypi_${feature.version}/devicetypes/,target:${installFolder}/../../../repository/deployment/server/devicetypes/,overwrite:true);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.raspberrypi.ui_${feature.version}/devicetypes/,target:${installFolder}/../../../repository/deployment/server/devicetypes/,overwrite:true);\ instructions.unconfigure = \ -org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/deployment/server/webapps/raspberrypi.war);\ -org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/deployment/server/webapps/raspberrypi);\ org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../dbscripts/cdm/plugins/raspberrypi);\ org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/resources/sketches/raspberrypi);\ org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../conf/datasources/raspberrypi-datasources.xml);\ diff --git a/features/device-types-feature/raspberrypi-plugin-feature/pom.xml b/features/device-types-feature/raspberrypi-plugin-feature/pom.xml index 5ee8dff85..09271a19c 100644 --- a/features/device-types-feature/raspberrypi-plugin-feature/pom.xml +++ b/features/device-types-feature/raspberrypi-plugin-feature/pom.xml @@ -33,7 +33,9 @@ http://wso2.org - org.wso2.carbon.device.mgt.iot.raspberrypi.feature + org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature + org.wso2.carbon.device.mgt.iot.raspberrypi.backend.feature + org.wso2.carbon.device.mgt.iot.raspberrypi.analytics.feature