diff --git a/modules/samples/firealarm/component/controller/src/main/java/org.homeautomation/firealarm/controller/api/util/ServiceUtils.java b/modules/samples/firealarm/component/controller/src/main/java/org.homeautomation/firealarm/controller/api/util/ServiceUtils.java index 98ad99c2..d65beec7 100644 --- a/modules/samples/firealarm/component/controller/src/main/java/org.homeautomation/firealarm/controller/api/util/ServiceUtils.java +++ b/modules/samples/firealarm/component/controller/src/main/java/org.homeautomation/firealarm/controller/api/util/ServiceUtils.java @@ -34,14 +34,14 @@ public class ServiceUtils { * * @param owner name of device owner * @param deviceId unique identifier of the device - * @param sensorValue current value of sensor which is set at agent side + * @param sensorValue value of sensor which is set at agent side * @return status */ public static boolean publishTemperatureToDAS(String owner, String deviceId, String sensorValue) { float temperature = Float.parseFloat(sensorValue); - Object payloadCurrent[] = {temperature}; - return publishToDAS(owner, deviceId, payloadCurrent, ORG_WSO2_IOT_DEVICES_TEMPERATURE); + Object payload[] = {temperature}; + return publishToDAS(owner, deviceId, payload, ORG_WSO2_IOT_DEVICES_TEMPERATURE); } /** @@ -49,17 +49,17 @@ public class ServiceUtils { * * @param owner name of device owner * @param deviceId unique identifier of the device - * @param sensorValue current value of sensor which is set at agent side + * @param sensorValue value of sensor which is set at agent side * @return status */ public static boolean publishHumidityToDAS(String owner, String deviceId, String sensorValue) { float humidity = Float.parseFloat(sensorValue); - Object payloadCurrent[] = {humidity}; - return publishToDAS(owner, deviceId, payloadCurrent, ORG_WSO2_IOT_DEVICES_HUMIDITY); + Object payload[] = {humidity}; + return publishToDAS(owner, deviceId, payload, ORG_WSO2_IOT_DEVICES_HUMIDITY); } - private static boolean publishToDAS(String owner, String deviceId, Object[] payloadCurrent, + private static boolean publishToDAS(String owner, String deviceId, Object[] payload, String definition) { PrivilegedCarbonContext.startTenantFlow(); PrivilegedCarbonContext ctx = PrivilegedCarbonContext.getThreadLocalCarbonContext(); @@ -72,7 +72,7 @@ public class ServiceUtils { Object metaData[] = {owner, DeviceTypeConstants.DEVICE_TYPE, deviceId, System.currentTimeMillis()}; try { deviceAnalyticsService.publishEvent(definition, SENSOR_STREAM_VERSION, metaData, - new Object[0], payloadCurrent); + new Object[0], payload); } catch (DataPublisherConfigurationException e) { return false; } finally { diff --git a/modules/samples/firealarm/component/plugin/src/main/java/org/homeautomation/firealarm/plugin/internal/ServiceComponent.java b/modules/samples/firealarm/component/plugin/src/main/java/org/homeautomation/firealarm/plugin/internal/ServiceComponent.java index d949e6a8..6093bb47 100644 --- a/modules/samples/firealarm/component/plugin/src/main/java/org/homeautomation/firealarm/plugin/internal/ServiceComponent.java +++ b/modules/samples/firealarm/component/plugin/src/main/java/org/homeautomation/firealarm/plugin/internal/ServiceComponent.java @@ -49,7 +49,7 @@ public class ServiceComponent { log.debug("firealarm Management Service Component has been successfully activated"); } } catch (Throwable e) { - log.error("Error occurred while activating Current Sensor Management Service Component", e); + log.error("Error occurred while activating Fire Alarm Management Service Component", e); } } @@ -62,7 +62,7 @@ public class ServiceComponent { serviceRegistration.unregister(); } if (log.isDebugEnabled()) { - log.debug("Current Sensor Management Service Component has been successfully de-activated"); + log.debug("Fire Alarm Management Service Component has been successfully de-activated"); } } catch (Throwable e) { log.error("Error occurred while de-activating Iot Device Management bundle", e); diff --git a/modules/samples/firealarm/component/ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.firealarm.device-view/device-view.hbs b/modules/samples/firealarm/component/ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.firealarm.device-view/device-view.hbs index 429c632a..c1741788 100644 --- a/modules/samples/firealarm/component/ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.firealarm.device-view/device-view.hbs +++ b/modules/samples/firealarm/component/ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.firealarm.device-view/device-view.hbs @@ -25,7 +25,7 @@ {{/zone}} {{#zone "device-thumbnail"}} - + {{/zone}} {{#zone "operation-status"}} diff --git a/modules/samples/firealarm/component/ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.firealarm.device-view/public/images/current-sensor.png b/modules/samples/firealarm/component/ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.firealarm.device-view/public/images/current-sensor.png deleted file mode 100644 index b1ce4901..00000000 Binary files a/modules/samples/firealarm/component/ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.firealarm.device-view/public/images/current-sensor.png and /dev/null differ diff --git a/modules/samples/firealarm/component/ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.firealarm.device-view/public/images/deviceType.png b/modules/samples/firealarm/component/ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.firealarm.device-view/public/images/deviceType.png new file mode 100644 index 00000000..7c580869 Binary files /dev/null and b/modules/samples/firealarm/component/ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.firealarm.device-view/public/images/deviceType.png differ diff --git a/modules/samples/firealarm/component/ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.firealarm.type-view/public/images/schematicsGuide.png b/modules/samples/firealarm/component/ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.firealarm.type-view/public/images/schematicsGuide.png index db4d0adb..c15de5f2 100644 Binary files a/modules/samples/firealarm/component/ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.firealarm.type-view/public/images/schematicsGuide.png and b/modules/samples/firealarm/component/ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.firealarm.type-view/public/images/schematicsGuide.png differ diff --git a/modules/samples/firealarm/component/ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.firealarm.type-view/type-view.hbs b/modules/samples/firealarm/component/ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.firealarm.type-view/type-view.hbs index 8299b21e..914f79f6 100644 --- a/modules/samples/firealarm/component/ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.firealarm.type-view/type-view.hbs +++ b/modules/samples/firealarm/component/ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.firealarm.type-view/type-view.hbs @@ -67,7 +67,7 @@