diff --git a/components/device-mgt-iot-arduino/org.wso2.carbon.device.mgt.iot.arduino.mgt.service.impl/pom.xml b/components/device-mgt-iot-arduino/org.wso2.carbon.device.mgt.iot.arduino.mgt.service.impl/pom.xml index 2a391e7abe..d7f30a06fe 100644 --- a/components/device-mgt-iot-arduino/org.wso2.carbon.device.mgt.iot.arduino.mgt.service.impl/pom.xml +++ b/components/device-mgt-iot-arduino/org.wso2.carbon.device.mgt.iot.arduino.mgt.service.impl/pom.xml @@ -32,8 +32,8 @@ org.wso2.carbon.device.mgt.iot.arduino.mgt.service.impl 1.9.2-SNAPSHOT war - WSO2 Carbon - IoT Server Arduino API - WSO2 Carbon - Arduino Service API Implementation + WSO2 Carbon - IoT Server Arduino Manager API + WSO2 Carbon - Arduino Manager API Implementation http://wso2.org diff --git a/components/device-mgt-iot-arduino/org.wso2.carbon.device.mgt.iot.arduino.mgt.service.impl/src/main/java/org/wso2/carbon/device/mgt/iot/arduino/service/ArduinoService.java b/components/device-mgt-iot-arduino/org.wso2.carbon.device.mgt.iot.arduino.mgt.service.impl/src/main/java/org/wso2/carbon/device/mgt/iot/arduino/service/ArduinoService.java index 76ee1e3e0b..a42c2227c1 100644 --- a/components/device-mgt-iot-arduino/org.wso2.carbon.device.mgt.iot.arduino.mgt.service.impl/src/main/java/org/wso2/carbon/device/mgt/iot/arduino/service/ArduinoService.java +++ b/components/device-mgt-iot-arduino/org.wso2.carbon.device.mgt.iot.arduino.mgt.service.impl/src/main/java/org/wso2/carbon/device/mgt/iot/arduino/service/ArduinoService.java @@ -18,38 +18,28 @@ package org.wso2.carbon.device.mgt.iot.arduino.service; -import org.apache.commons.httpclient.HttpStatus; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.wso2.carbon.apimgt.annotations.api.API; import org.wso2.carbon.apimgt.annotations.device.DeviceType; -import org.wso2.carbon.apimgt.annotations.device.feature.Feature; import org.wso2.carbon.apimgt.webapp.publisher.KeyGenerationUtil; import org.wso2.carbon.device.mgt.common.Device; import org.wso2.carbon.device.mgt.common.DeviceIdentifier; import org.wso2.carbon.device.mgt.common.DeviceManagementException; import org.wso2.carbon.device.mgt.common.EnrolmentInfo; import org.wso2.carbon.device.mgt.iot.DeviceManagement; -import org.wso2.carbon.device.mgt.iot.DeviceValidator; import org.wso2.carbon.device.mgt.iot.apimgt.AccessTokenInfo; import org.wso2.carbon.device.mgt.iot.apimgt.TokenClient; import org.wso2.carbon.device.mgt.iot.arduino.plugin.constants.ArduinoConstants; -import org.wso2.carbon.device.mgt.iot.arduino.service.dto.DeviceJSON; -import org.wso2.carbon.device.mgt.iot.arduino.service.transport.ArduinoMQTTSubscriber; -import org.wso2.carbon.device.mgt.iot.arduino.service.util.ArduinoServiceUtils; -import org.wso2.carbon.device.mgt.iot.controlqueue.mqtt.MqttConfig; import org.wso2.carbon.device.mgt.iot.exception.AccessTokenException; import org.wso2.carbon.device.mgt.iot.exception.DeviceControllerException; -import org.wso2.carbon.device.mgt.iot.sensormgt.SensorDataManager; import org.wso2.carbon.device.mgt.iot.util.ZipArchive; import org.wso2.carbon.device.mgt.iot.util.ZipUtil; -import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.ws.rs.Consumes; import javax.ws.rs.DELETE; import javax.ws.rs.GET; -import javax.ws.rs.HeaderParam; import javax.ws.rs.POST; import javax.ws.rs.PUT; import javax.ws.rs.Path; @@ -62,15 +52,9 @@ import javax.ws.rs.core.Response; import java.nio.ByteBuffer; import java.nio.charset.StandardCharsets; import java.util.ArrayList; -import java.util.Calendar; import java.util.Date; -import java.util.HashMap; -import java.util.LinkedList; import java.util.List; -import java.util.Map; -import java.util.NoSuchElementException; import java.util.UUID; -import java.util.concurrent.ConcurrentHashMap; @DeviceType( value = "arduino") public class ArduinoService { @@ -83,61 +67,6 @@ public class ArduinoService { @Context //injected response proxy supporting multiple thread private HttpServletResponse response; - public static final String HTTP_PROTOCOL = "HTTP"; - public static final String MQTT_PROTOCOL = "MQTT"; - - private ArduinoMQTTSubscriber arduinoMQTTSubscriber; - private static Map> replyMsgQueue = new HashMap<>(); - private static Map> internalControlsQueue = new HashMap<>(); - private ConcurrentHashMap deviceToIpMap = new ConcurrentHashMap<>(); - - /** - * @param arduinoMQTTSubscriber an object of type "ArduinoMQTTSubscriber" specific for this ArduinoService - */ - @SuppressWarnings("unused") - public void setArduinoMQTTSubscriber( - final ArduinoMQTTSubscriber arduinoMQTTSubscriber) { - this.arduinoMQTTSubscriber = arduinoMQTTSubscriber; - - if (MqttConfig.getInstance().isEnabled()) { - Runnable xmppStarter = new Runnable() { - @Override - public void run() { - arduinoMQTTSubscriber.initConnector(); - arduinoMQTTSubscriber.connectAndSubscribe(); - } - }; - - Thread xmppStarterThread = new Thread(xmppStarter); - xmppStarterThread.setDaemon(true); - xmppStarterThread.start(); - } else { - log.warn("MQTT disabled in 'devicemgt-config.xml'. Hence, ArduinoMQTTSubscriber not started."); - } - } - - /** - * @return the "ArduinoMQTTSubscriber" object of this ArduinoService instance - */ - @SuppressWarnings("unused") - public ArduinoMQTTSubscriber getArduinoMQTTSubscriber() { - return arduinoMQTTSubscriber; - } - - /** - * @return the queue containing all the MQTT reply messages from all Arduinos communicating to this service - */ - public static Map> getReplyMsgQueue() { - return replyMsgQueue; - } - - /** - * @return the queue containing all the MQTT controls received to be sent to any Arduinos connected to this server - */ - public static Map> getInternalControlsQueue() { - return internalControlsQueue; - } - /* --------------------------------------------------------------------------------------- Device management specific APIs --------------------------------------------------------------------------------------- */ diff --git a/components/device-mgt-iot-arduino/org.wso2.carbon.device.mgt.iot.arduino.mgt.service.impl/src/main/java/org/wso2/carbon/device/mgt/iot/arduino/service/dto/DeviceJSON.java b/components/device-mgt-iot-arduino/org.wso2.carbon.device.mgt.iot.arduino.mgt.service.impl/src/main/java/org/wso2/carbon/device/mgt/iot/arduino/service/dto/DeviceJSON.java deleted file mode 100644 index 1be336bbde..0000000000 --- a/components/device-mgt-iot-arduino/org.wso2.carbon.device.mgt.iot.arduino.mgt.service.impl/src/main/java/org/wso2/carbon/device/mgt/iot/arduino/service/dto/DeviceJSON.java +++ /dev/null @@ -1,36 +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. - */ - -package org.wso2.carbon.device.mgt.iot.arduino.service.dto; - -import org.codehaus.jackson.annotate.JsonIgnoreProperties; - -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; - -@XmlRootElement - -@JsonIgnoreProperties(ignoreUnknown = true) -public class DeviceJSON { - @XmlElement(required = true) public String owner; - @XmlElement(required = true) public String deviceId; - @XmlElement(required = true) public String reply; - @XmlElement public Long time; - @XmlElement public String key; - @XmlElement public float value; -} diff --git a/components/device-mgt-iot-arduino/org.wso2.carbon.device.mgt.iot.arduino.mgt.service.impl/src/main/java/org/wso2/carbon/device/mgt/iot/arduino/service/exception/ArduinoException.java b/components/device-mgt-iot-arduino/org.wso2.carbon.device.mgt.iot.arduino.mgt.service.impl/src/main/java/org/wso2/carbon/device/mgt/iot/arduino/service/exception/ArduinoException.java deleted file mode 100644 index ee81f9798e..0000000000 --- a/components/device-mgt-iot-arduino/org.wso2.carbon.device.mgt.iot.arduino.mgt.service.impl/src/main/java/org/wso2/carbon/device/mgt/iot/arduino/service/exception/ArduinoException.java +++ /dev/null @@ -1,31 +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. - */ - -package org.wso2.carbon.device.mgt.iot.arduino.service.exception; - -public class ArduinoException extends Exception { - private static final long serialVersionUID = 118512086957330189L; - - public ArduinoException(String errorMessage) { - super(errorMessage); - } - - public ArduinoException(String errorMessage, Throwable throwable) { - super(errorMessage, throwable); - } -} diff --git a/components/device-mgt-iot-arduino/org.wso2.carbon.device.mgt.iot.arduino.mgt.service.impl/src/main/java/org/wso2/carbon/device/mgt/iot/arduino/service/transport/ArduinoMQTTSubscriber.java b/components/device-mgt-iot-arduino/org.wso2.carbon.device.mgt.iot.arduino.mgt.service.impl/src/main/java/org/wso2/carbon/device/mgt/iot/arduino/service/transport/ArduinoMQTTSubscriber.java deleted file mode 100644 index 0edb99a16d..0000000000 --- a/components/device-mgt-iot-arduino/org.wso2.carbon.device.mgt.iot.arduino.mgt.service.impl/src/main/java/org/wso2/carbon/device/mgt/iot/arduino/service/transport/ArduinoMQTTSubscriber.java +++ /dev/null @@ -1,146 +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. - */ - -package org.wso2.carbon.device.mgt.iot.arduino.service.transport; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.eclipse.paho.client.mqttv3.MqttMessage; -import org.wso2.carbon.device.mgt.common.DeviceManagementException; -import org.wso2.carbon.device.mgt.iot.arduino.plugin.constants.ArduinoConstants; -import org.wso2.carbon.device.mgt.iot.arduino.service.ArduinoService; -import org.wso2.carbon.device.mgt.iot.config.server.DeviceManagementConfigurationManager; -import org.wso2.carbon.device.mgt.iot.controlqueue.mqtt.MqttConfig; -import org.wso2.carbon.device.mgt.iot.controlqueue.mqtt.MqttSubscriber; - -import java.io.File; -import java.util.LinkedList; -import java.util.UUID; - -public class ArduinoMQTTSubscriber extends MqttSubscriber { - private static Log log = LogFactory.getLog(ArduinoMQTTSubscriber.class); - - private static final String serverName = - DeviceManagementConfigurationManager.getInstance().getDeviceManagementServerInfo().getName(); - private static final String subscribeTopic = - serverName + File.separator + "+" + File.separator + ArduinoConstants.DEVICE_TYPE + File.separator + "#"; - - - private static final String iotServerSubscriber = UUID.randomUUID().toString().substring(0, 5); - private static String mqttEndpoint; - - private ArduinoMQTTSubscriber() { - super(iotServerSubscriber, ArduinoConstants.DEVICE_TYPE, - MqttConfig.getInstance().getMqttQueueEndpoint(), subscribeTopic); - } - - public void initConnector() { - mqttEndpoint = MqttConfig.getInstance().getMqttQueueEndpoint(); - } - - public void connectAndSubscribe() { - try { - super.connectAndSubscribe(); - } catch (DeviceManagementException e) { - log.error("Subscription to MQTT Broker at: " + mqttEndpoint + " failed"); - retryMQTTSubscription(); - } - } - - @Override - protected void postMessageArrived(String topic, MqttMessage message) { - int lastIndex = topic.lastIndexOf("/"); - String deviceId = topic.substring(lastIndex + 1); - - lastIndex = message.toString().lastIndexOf(":"); - String msgContext = message.toString().substring(lastIndex + 1); - - LinkedList deviceControlList = null; - LinkedList replyMessageList = null; - - if (msgContext.equals("IN") || msgContext.equals(ArduinoConstants.STATE_ON) || msgContext.equals( - ArduinoConstants.STATE_OFF)) { - - if (log.isDebugEnabled()) { - log.debug("Received a control message: "); - log.debug("Control message topic: " + topic); - log.debug("Control message: " + message.toString()); - } - - synchronized (ArduinoService.getInternalControlsQueue()) { - deviceControlList = ArduinoService.getInternalControlsQueue().get(deviceId); - if (deviceControlList == null) { - ArduinoService.getInternalControlsQueue() - .put(deviceId, deviceControlList = new LinkedList()); - } - } - deviceControlList.add(message.toString()); - - } else if (msgContext.equals("OUT")) { - - if (log.isDebugEnabled()) { - log.debug("Recieved reply from a device: "); - log.debug("Reply message topic: " + topic); - log.debug("Reply message: " + message.toString().substring(0, lastIndex)); - } - - synchronized (ArduinoService.getReplyMsgQueue()) { - replyMessageList = ArduinoService.getReplyMsgQueue().get(deviceId); - if (replyMessageList == null) { - ArduinoService.getReplyMsgQueue() - .put(deviceId, replyMessageList = new LinkedList()); - } - } - replyMessageList.add(message.toString()); - } - } - - private void retryMQTTSubscription() { - Thread retryToSubscribe = new Thread() { - @Override - public void run() { - while (true) { - if (!isConnected()) { - if (log.isDebugEnabled()) { - log.debug("Subscriber re-trying to reach MQTT queue...."); - } - - try { - ArduinoMQTTSubscriber.super.connectAndSubscribe(); - } catch (DeviceManagementException e1) { - if (log.isDebugEnabled()) { - log.debug("Attempt to re-connect to MQTT-Queue failed"); - } - } - } else { - break; - } - - try { - Thread.sleep(5000); - } catch (InterruptedException e1) { - log.error("MQTT: Thread S;eep Interrupt Exception"); - } - } - } - }; - - retryToSubscribe.setDaemon(true); - retryToSubscribe.start(); - } -} diff --git a/components/device-mgt-iot-arduino/org.wso2.carbon.device.mgt.iot.arduino.mgt.service.impl/src/main/java/org/wso2/carbon/device/mgt/iot/arduino/service/util/ArduinoServiceUtils.java b/components/device-mgt-iot-arduino/org.wso2.carbon.device.mgt.iot.arduino.mgt.service.impl/src/main/java/org/wso2/carbon/device/mgt/iot/arduino/service/util/ArduinoServiceUtils.java deleted file mode 100644 index 35d86b01df..0000000000 --- a/components/device-mgt-iot-arduino/org.wso2.carbon.device.mgt.iot.arduino.mgt.service.impl/src/main/java/org/wso2/carbon/device/mgt/iot/arduino/service/util/ArduinoServiceUtils.java +++ /dev/null @@ -1,235 +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. - */ - -package org.wso2.carbon.device.mgt.iot.arduino.service.util; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.apache.http.HttpResponse; -import org.apache.http.client.methods.HttpGet; -import org.apache.http.concurrent.FutureCallback; -import org.apache.http.impl.nio.client.CloseableHttpAsyncClient; -import org.apache.http.impl.nio.client.HttpAsyncClients; -import org.wso2.carbon.context.PrivilegedCarbonContext; -import org.wso2.carbon.device.mgt.analytics.exception.DataPublisherConfigurationException; -import org.wso2.carbon.device.mgt.analytics.service.DeviceAnalyticsService; -import org.wso2.carbon.device.mgt.common.DeviceManagementException; -import org.wso2.carbon.device.mgt.iot.DeviceController; -import org.wso2.carbon.device.mgt.iot.arduino.plugin.constants.ArduinoConstants; -import org.wso2.carbon.device.mgt.iot.exception.DeviceControllerException; - -import javax.ws.rs.HttpMethod; -import java.io.BufferedReader; -import java.io.IOException; -import java.io.InputStreamReader; -import java.net.HttpURLConnection; -import java.net.MalformedURLException; -import java.net.ProtocolException; -import java.net.URL; -import java.util.concurrent.CountDownLatch; -import java.util.concurrent.Future; - -public class ArduinoServiceUtils { - private static final Log log = LogFactory.getLog(ArduinoServiceUtils.class); - - //TODO; replace this tenant domain - private static final String SUPER_TENANT = "carbon.super"; - private static final String TEMPERATURE_STREAM_DEFINITION = "org.wso2.iot.devices.temperature"; - - public static String sendCommandViaHTTP(final String deviceHTTPEndpoint, String urlContext, - boolean fireAndForgot) throws DeviceManagementException { - - String responseMsg = ""; - String urlString = ArduinoConstants.URL_PREFIX + deviceHTTPEndpoint + urlContext; - - if (log.isDebugEnabled()) { - log.debug(urlString); - } - - if (!fireAndForgot) { - HttpURLConnection httpConnection = getHttpConnection(urlString); - - try { - httpConnection.setRequestMethod(HttpMethod.GET); - } catch (ProtocolException e) { - String errorMsg = - "Protocol specific error occurred when trying to set method to GET" + - " for:" + urlString; - log.error(errorMsg); - throw new DeviceManagementException(errorMsg, e); - } - - responseMsg = readResponseFromGetRequest(httpConnection); - - } else { - CloseableHttpAsyncClient httpclient = null; - try { - - httpclient = HttpAsyncClients.createDefault(); - httpclient.start(); - HttpGet request = new HttpGet(urlString); - final CountDownLatch latch = new CountDownLatch(1); - Future future = httpclient.execute( - request, new FutureCallback() { - @Override - public void completed(HttpResponse httpResponse) { - latch.countDown(); - } - - @Override - public void failed(Exception e) { - latch.countDown(); - } - - @Override - public void cancelled() { - latch.countDown(); - } - }); - - latch.await(); - - } catch (InterruptedException e) { - if (log.isDebugEnabled()) { - log.debug("Sync Interrupted"); - } - } finally { - try { - if (httpclient != null) { - httpclient.close(); - - } - } catch (IOException e) { - if (log.isDebugEnabled()) { - log.debug("Failed on close"); - } - } - } - } - - return responseMsg; - } - - - public static boolean sendCommandViaMQTT(String deviceOwner, String deviceId, String resource, - String state) throws DeviceManagementException { - - /*boolean result; - DeviceController deviceController = new DeviceController(); - - try { - result = deviceController.publishMqttControl(deviceOwner, ArduinoConstants.DEVICE_TYPE, deviceId, resource, state); - } catch (DeviceControllerException e) { - String errorMsg = "Error whilst trying to publish to MQTT Queue"; - log.error(errorMsg); - throw new DeviceManagementException(errorMsg, e); - } - return result;*/ - return false; - } - - /* --------------------------------------------------------------------------------------- - Utility methods relevant to creating and sending http requests - --------------------------------------------------------------------------------------- */ - - /* This methods creates and returns a http connection object */ - - public static HttpURLConnection getHttpConnection(String urlString) throws - DeviceManagementException { - - URL connectionUrl = null; - HttpURLConnection httpConnection; - - try { - connectionUrl = new URL(urlString); - httpConnection = (HttpURLConnection) connectionUrl.openConnection(); - } catch (MalformedURLException e) { - String errorMsg = - "Error occured whilst trying to form HTTP-URL from string: " + urlString; - log.error(errorMsg); - throw new DeviceManagementException(errorMsg, e); - } catch (IOException e) { - String errorMsg = "Error occured whilst trying to open a connection to: " + - connectionUrl.toString(); - log.error(errorMsg); - throw new DeviceManagementException(errorMsg, e); - } - - return httpConnection; - } - - /* This methods reads and returns the response from the connection */ - - public static String readResponseFromGetRequest(HttpURLConnection httpConnection) - throws DeviceManagementException { - BufferedReader bufferedReader; - try { - bufferedReader = new BufferedReader(new InputStreamReader( - httpConnection.getInputStream())); - } catch (IOException e) { - String errorMsg = - "There is an issue with connecting the reader to the input stream at: " + - httpConnection.getURL(); - log.error(errorMsg); - throw new DeviceManagementException(errorMsg, e); - } - - String responseLine; - StringBuilder completeResponse = new StringBuilder(); - - try { - while ((responseLine = bufferedReader.readLine()) != null) { - completeResponse.append(responseLine); - } - } catch (IOException e) { - String errorMsg = - "Error occured whilst trying read from the connection stream at: " + - httpConnection.getURL(); - log.error(errorMsg); - throw new DeviceManagementException(errorMsg, e); - } - try { - bufferedReader.close(); - } catch (IOException e) { - log.error( - "Could not succesfully close the bufferedReader to the connection at: " + - httpConnection.getURL()); - } - - return completeResponse.toString(); - } - - public static boolean publishToDAS(String owner, String deviceId, float temperature) { - PrivilegedCarbonContext.startTenantFlow(); - PrivilegedCarbonContext ctx = PrivilegedCarbonContext.getThreadLocalCarbonContext(); - ctx.setTenantDomain(SUPER_TENANT, true); - DeviceAnalyticsService deviceAnalyticsService = (DeviceAnalyticsService) ctx.getOSGiService( - DeviceAnalyticsService.class, null); - Object metdaData[] = {owner, ArduinoConstants.DEVICE_TYPE, deviceId, System.currentTimeMillis()}; - Object payloadData[] = {temperature}; - - try { - deviceAnalyticsService.publishEvent(TEMPERATURE_STREAM_DEFINITION, "1.0.0", metdaData, new Object[0], payloadData); - } catch (DataPublisherConfigurationException e) { - return false; - } finally { - PrivilegedCarbonContext.endTenantFlow(); - } - return true; - } -} diff --git a/components/device-mgt-iot-arduino/org.wso2.carbon.device.mgt.iot.arduino.mgt.service.impl/src/main/webapp/WEB-INF/cxf-servlet.xml b/components/device-mgt-iot-arduino/org.wso2.carbon.device.mgt.iot.arduino.mgt.service.impl/src/main/webapp/WEB-INF/cxf-servlet.xml index 1be763aa18..f13e094338 100644 --- a/components/device-mgt-iot-arduino/org.wso2.carbon.device.mgt.iot.arduino.mgt.service.impl/src/main/webapp/WEB-INF/cxf-servlet.xml +++ b/components/device-mgt-iot-arduino/org.wso2.carbon.device.mgt.iot.arduino.mgt.service.impl/src/main/webapp/WEB-INF/cxf-servlet.xml @@ -30,19 +30,11 @@ - - - - - - - diff --git a/features/device-mgt-iot-digitaldisplay-feature/org.wso2.carbon.device.mgt.iot.digitaldisplay.feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.digital_display.type-view/public/images/myDevices_analytics.png b/features/device-mgt-iot-digitaldisplay-feature/org.wso2.carbon.device.mgt.iot.digitaldisplay.feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.digital_display.type-view/public/images/myDevices_analytics.png index 2fd8075ff4..8f55999a3c 100644 Binary files a/features/device-mgt-iot-digitaldisplay-feature/org.wso2.carbon.device.mgt.iot.digitaldisplay.feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.digital_display.type-view/public/images/myDevices_analytics.png and b/features/device-mgt-iot-digitaldisplay-feature/org.wso2.carbon.device.mgt.iot.digitaldisplay.feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.digital_display.type-view/public/images/myDevices_analytics.png differ diff --git a/features/device-mgt-iot-digitaldisplay-feature/org.wso2.carbon.device.mgt.iot.digitaldisplay.feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.digital_display.type-view/type-view.hbs b/features/device-mgt-iot-digitaldisplay-feature/org.wso2.carbon.device.mgt.iot.digitaldisplay.feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.digital_display.type-view/type-view.hbs index e37da4e208..d81ac17819 100644 --- a/features/device-mgt-iot-digitaldisplay-feature/org.wso2.carbon.device.mgt.iot.digitaldisplay.feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.digital_display.type-view/type-view.hbs +++ b/features/device-mgt-iot-digitaldisplay-feature/org.wso2.carbon.device.mgt.iot.digitaldisplay.feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.digital_display.type-view/type-view.hbs @@ -15,10 +15,10 @@

You'll need the following "Hardware":

  • ITEM 01   Raspberry Pi Board (Internet - Enabled [Wifi or Ethernet]). + Enabled [Wifi or Ethernet]).
  • ITEM 02   A Digital Display with HDMI - Cable. + Cable.
  • GO-TO PREPARE
@@ -50,7 +50,7 @@
Download Now    Copy Link -    +   
@@ -164,15 +164,15 @@

Prepare


Follow the steps to get your Digital-Display up & running and communicating to the - WSO2 IoT-Server.

+ WSO2 IoT-Server.

  • 01   Connect a monitor to your - RaspberryPi via the HDMI cable to get the - Graphical-User-Interface of the RaspberryPi board. + RaspberryPi via the HDMI cable to get the + Graphical-User-Interface of the RaspberryPi board.
  • 02   Setup the RaspberryPi to connect - to the internet (via Ethernet or Wifi) and - note-down its IP_ADDRESS. + to the internet (via Ethernet or Wifi) and + note-down its IP_ADDRESS.

@@ -193,21 +193,16 @@

Try Out


-

WSO2-IoT Server provides Analytics and Real-Time Statistics of your device

+

WSO2-IoT Server enables yout o connect and control your Digital-Display device

  • 01   You can view all your created - devices at our [Device - Management] - page. + devices at our [Device + Management] + page.
  • 02   You can select any of your - created devices here and check for available - operations and monitor Real-Time data. -
  • -
  • 03   You can also view "Analytics" of - the data published to the IoT-Server by navigating - to the [Device-Analytics Page] from here. -
  • + created devices here and check for available + operations and control your device.

@@ -222,43 +217,51 @@ {{#zone "bottomJs"}} {{js "/js/download.js"}} {{js "/js/jquery.validate.js"}} -{{/zone}} \ No newline at end of file +{{/zone}} + diff --git a/features/device-mgt-iot-raspberrypi-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.raspberrypi.type-view/public/images/myDevices_analytics.png b/features/device-mgt-iot-raspberrypi-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.raspberrypi.type-view/public/images/myDevices_analytics.png index 2fd8075ff4..51d63966a4 100644 Binary files a/features/device-mgt-iot-raspberrypi-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.raspberrypi.type-view/public/images/myDevices_analytics.png and b/features/device-mgt-iot-raspberrypi-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.raspberrypi.type-view/public/images/myDevices_analytics.png differ