From d88f5a67593a3922ef01e2d6dab862fa4e7790a7 Mon Sep 17 00:00:00 2001 From: amarendra-dianomic Date: Wed, 29 Aug 2018 11:49:36 +0530 Subject: [PATCH 01/14] Fixes and refactoring per FOGL-1724 --- packages/Debian/armhf/DEBIAN/postinst | 6 ------ python/foglamp/plugins/south/dht11/dht11.py | 24 +++++++++++++++------ 2 files changed, 17 insertions(+), 13 deletions(-) diff --git a/packages/Debian/armhf/DEBIAN/postinst b/packages/Debian/armhf/DEBIAN/postinst index 34c792a..5da6e82 100755 --- a/packages/Debian/armhf/DEBIAN/postinst +++ b/packages/Debian/armhf/DEBIAN/postinst @@ -35,12 +35,6 @@ set_files_ownership () { chown -R root:root /usr/local/foglamp/python/foglamp/plugins/south/dht11 } -add_service () { - output=$(curl -sX POST http://localhost:8081/foglamp/service -d '{"name": "DHT11", "type": "south", "plugin": "dht11", "enabled": true}') - echo $output -} - # install_deps # FIXME: https://github.com/adafruit/Adafruit_Python_DHT/issues/99 set_files_ownership -add_service echo "dht11 plugin installed." diff --git a/python/foglamp/plugins/south/dht11/dht11.py b/python/foglamp/plugins/south/dht11/dht11.py index 47ec7d0..0f817d6 100644 --- a/python/foglamp/plugins/south/dht11/dht11.py +++ b/python/foglamp/plugins/south/dht11/dht11.py @@ -15,6 +15,7 @@ import Adafruit_DHT from foglamp.common import logger +from foglamp.plugins.common import utils from foglamp.services.south import exceptions @@ -25,19 +26,28 @@ _DEFAULT_CONFIG = { 'plugin': { - 'description': 'Python module name of the plugin to load', - 'type': 'string', - 'default': 'dht11' + 'description': 'Python module name of the plugin to load', + 'type': 'string', + 'default': 'dht11', + 'readonly': 'true' + }, + 'assetName': { + 'description': 'Asset prefix', + 'type': 'string', + 'default': "dht11", + 'order': "1" }, 'pollInterval': { 'description': 'The interval between poll calls to the sensor poll routine expressed in milliseconds.', 'type': 'integer', - 'default': '1000' + 'default': '1000', + 'order': '2' }, 'gpiopin': { 'description': 'The GPIO pin into which the DHT11 data pin is connected', 'type': 'integer', - 'default': '4' + 'default': '4', + 'order': '3' } } @@ -97,10 +107,10 @@ def plugin_poll(handle): try: humidity, temperature = Adafruit_DHT.read_retry(Adafruit_DHT.DHT11, handle['gpiopin']['value']) if humidity is not None and temperature is not None: - time_stamp = str(datetime.now(tz=timezone.utc)) + time_stamp = utils.local_timestamp() readings = {'temperature': temperature, 'humidity': humidity} wrapper = { - 'asset': 'dht11', + 'asset': handle['assetName']['value'], 'timestamp': time_stamp, 'key': str(uuid.uuid4()), 'readings': readings From 4e56860d0fa451da1326331fc2ad3922c229ce9d Mon Sep 17 00:00:00 2001 From: amarendra-dianomic Date: Thu, 30 Aug 2018 17:00:56 +0530 Subject: [PATCH 02/14] handle changed to new_config in plugin_reconfigure() --- python/foglamp/plugins/south/dht11/dht11.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/foglamp/plugins/south/dht11/dht11.py b/python/foglamp/plugins/south/dht11/dht11.py index 0f817d6..a7a4c3f 100644 --- a/python/foglamp/plugins/south/dht11/dht11.py +++ b/python/foglamp/plugins/south/dht11/dht11.py @@ -137,7 +137,7 @@ def plugin_reconfigure(handle, new_config): """ _LOGGER.info("Old config for DHT11 plugin {} \n new config {}".format(handle, new_config)) - new_handle = copy.deepcopy(handle) + new_handle = copy.deepcopy(new_config) new_handle['restart'] = 'no' return new_handle From 7a32c44dab287e66c2672f84212dd8c2ae01bf85 Mon Sep 17 00:00:00 2001 From: amarendra-dianomic Date: Thu, 30 Aug 2018 17:21:55 +0530 Subject: [PATCH 03/14] Log message added to plugin_shutdown() --- python/foglamp/plugins/south/dht11/dht11.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/foglamp/plugins/south/dht11/dht11.py b/python/foglamp/plugins/south/dht11/dht11.py index a7a4c3f..7ae4fe2 100644 --- a/python/foglamp/plugins/south/dht11/dht11.py +++ b/python/foglamp/plugins/south/dht11/dht11.py @@ -151,4 +151,4 @@ def plugin_shutdown(handle): Returns: Raises: """ - pass + _LOGGER.info("DHT11 Poll plugin shutdown") From 56315d8bac1d1328e746e0e471799be511fbbf11 Mon Sep 17 00:00:00 2001 From: amarendra-dianomic Date: Tue, 4 Sep 2018 13:02:53 +0530 Subject: [PATCH 04/14] assetName description fixed --- python/foglamp/plugins/south/dht11/dht11.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/foglamp/plugins/south/dht11/dht11.py b/python/foglamp/plugins/south/dht11/dht11.py index a7a4c3f..a17c431 100644 --- a/python/foglamp/plugins/south/dht11/dht11.py +++ b/python/foglamp/plugins/south/dht11/dht11.py @@ -32,7 +32,7 @@ 'readonly': 'true' }, 'assetName': { - 'description': 'Asset prefix', + 'description': 'Asset name', 'type': 'string', 'default': "dht11", 'order': "1" From 87f1d9c05110e7682bddef199fe8c7e644c62ee5 Mon Sep 17 00:00:00 2001 From: Vaibhav Singhal Date: Fri, 21 Sep 2018 19:04:36 +0530 Subject: [PATCH 05/14] version changed --- VERSION.south.dht11 | 4 +-- packages/Debian/armhf/DEBIAN/preinst | 51 ---------------------------- 2 files changed, 2 insertions(+), 53 deletions(-) delete mode 100755 packages/Debian/armhf/DEBIAN/preinst diff --git a/VERSION.south.dht11 b/VERSION.south.dht11 index 4b859cf..d104037 100644 --- a/VERSION.south.dht11 +++ b/VERSION.south.dht11 @@ -1,2 +1,2 @@ -foglamp_south_dht11_version=1.0.1 -foglamp_version>=1.3 \ No newline at end of file +foglamp_south_dht11_version=1.1.0 +foglamp_version>=1.4 diff --git a/packages/Debian/armhf/DEBIAN/preinst b/packages/Debian/armhf/DEBIAN/preinst deleted file mode 100755 index 63020c5..0000000 --- a/packages/Debian/armhf/DEBIAN/preinst +++ /dev/null @@ -1,51 +0,0 @@ -#!/bin/sh - -##-------------------------------------------------------------------- -## Copyright (c) 2018 OSIsoft, LLC -## -## Licensed 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. -##-------------------------------------------------------------------- - -##-------------------------------------------------------------------- -## -## @preinst DEBIAN/preinst -## This script is used to execute pre installation tasks. -## -## Author: Ivan Zoratti, Ashwin Gopalakrishnan -## -##-------------------------------------------------------------------- - -set -e -get_foglamp_script () { - foglamp_script=$(dpkg -L foglamp | grep 'foglamp/bin/foglamp$') - echo $foglamp_script -} - -is_foglamp_running () { - set +e - foglamp_script=$(get_foglamp_script) - foglamp_status_output=$($foglamp_script status 2>&1 | grep 'FogLAMP Uptime') - rc=$((!$?)) - echo $rc - set -e -} - -# main - -# exit if foglamp is not running -IS_FOGLAMP_RUNNING=$(is_foglamp_running) -if [ "$IS_FOGLAMP_RUNNING" -eq "0" ] -then - echo "*** ERROR. FogLAMP is currently not running. Start FogLAMP and try again. ***" - exit 1 -fi From 3a65ad12721433a45b056b690dc34256f44e77d0 Mon Sep 17 00:00:00 2001 From: Vaibhav Singhal Date: Thu, 22 Nov 2018 17:57:57 +0530 Subject: [PATCH 06/14] make_deb automated to check underlying arch and remove preinst --- README.rst | 5 +- make_deb | 82 +++++++++++----------------- packages/Debian/armhf/DEBIAN/control | 2 +- packages/Debian/armhf/DEBIAN/preinst | 51 ----------------- 4 files changed, 36 insertions(+), 104 deletions(-) delete mode 100755 packages/Debian/armhf/DEBIAN/preinst diff --git a/README.rst b/README.rst index 0584456..2871923 100644 --- a/README.rst +++ b/README.rst @@ -21,15 +21,14 @@ Create Debian Package .. code-block:: console $ ./make_deb help - make_deb {arm} [clean|cleanall] + make_deb [clean|cleanall] This script is used to create the Debian package of foglamp dht11 plugin Arguments: - arm - Build an armv7l package clean - Remove all the old versions saved in format .XXXX cleanall - Remove all the versions, including the last one -``./make_deb arm`` will create the debian package inside ``packages/Debian/build/``. +``./make_deb `` will create the debian package inside ``packages/Debian/build/``. Pre Debian Package Install diff --git a/make_deb b/make_deb index 885a07b..07b4da4 100755 --- a/make_deb +++ b/make_deb @@ -16,67 +16,51 @@ ## limitations under the License. ##-------------------------------------------------------------------- ## -## Author: Ivan Zoratti, Praveen Garg +## Author: Ivan Zoratti, Praveen Garg, Vaibhav Singhal ## set -e GIT_ROOT=`pwd` # The script must be executed from the root git directory -architecture="none" -usage="$(basename "$0") {arm} [clean|cleanall] -This script is used to create the Debian package of foglamp dht11 plugin - -Arguments: - arm - Build an armv7l package - clean - Remove all the old versions saved in format .XXXX - cleanall - Remove all the versions, including the last one" - -if [ $# -gt 0 ] -then - for i in "$@" - do - case "$i" in - arm) - architecture="armhf" - shift - ;; - clean) - echo -n "Cleaning the build folder from older versions..." - find "${GIT_ROOT}/packages/Debian/build" -maxdepth 1 | grep '.*\.[0-9][0-9][0-9][0-9]' | xargs rm -rf +for i in "$@" +do + case "$i" in + clean) + echo -n "Cleaning the build folder from older versions..." + find "${GIT_ROOT}/packages/build" -maxdepth 1 | grep '.*\.[0-9][0-9][0-9][0-9]' | xargs rm -rf + echo "Done." + exit 0 + ;; + cleanall) + if [ -d "${GIT_ROOT}/packages/build" ]; then + echo -n "Cleaning the build folder..." + rm -rf ${GIT_ROOT}/packages/build/* echo "Done." - shift - ;; - cleanall) - if [ -d "${GIT_ROOT}/packages/Debian/build" ]; then - echo -n "Cleaning the build folder..." - rm -rf ${GIT_ROOT}/packages/Debian/build/* - echo "Done." - else - echo "No build folder, skipping cleanall" - fi - shift - ;; - help) - echo "${usage}" - exit 1 - ;; - *) - echo "Unrecognized option: $i" - exit 1 - ;; - esac - done -else - echo "See help and select the architecture to use, *x86* or *arm*" -fi + else + echo "No build folder, skipping cleanall" + fi + exit 0 + ;; + help) + echo "${usage}" + exit 0 + ;; + *) + echo "Unrecognized option: $i" + exit 1 + ;; + esac +done # If the architecture has not been defined, then the script is complete -if [[ "$architecture" == "none" ]]; then - # echo "${usage}" +if [ "$(dpkg --print-architecture)" != "armhf" ]; then + echo "Package building is only supported on armhf architecture!!" exit 0 fi +architecture="armhf" + version=`cat ${GIT_ROOT}/VERSION.south.dht11 | tr -d ' ' | grep 'foglamp_south_dht11_version=' | head -1 | sed -e 's/\(.*\)=\(.*\)/\2/g'` foglamp_version=`cat ${GIT_ROOT}/VERSION.south.dht11 | tr -d ' ' | grep 'foglamp_version' | head -1 | sed -e 's/\(.*\)version\(.*\)/\2/g'` BUILD_ROOT="${GIT_ROOT}/packages/Debian/build" diff --git a/packages/Debian/armhf/DEBIAN/control b/packages/Debian/armhf/DEBIAN/control index 01d36d2..baaaf3d 100644 --- a/packages/Debian/armhf/DEBIAN/control +++ b/packages/Debian/armhf/DEBIAN/control @@ -3,7 +3,7 @@ Version: 1.0.0 Section: devel Priority: optional Architecture: armhf -Depends: foglamp +Depends: build-essential,python3-dev,foglamp Conflicts: Maintainer: Dianomic Systems, Inc. Homepage: http://www.dianomic.com diff --git a/packages/Debian/armhf/DEBIAN/preinst b/packages/Debian/armhf/DEBIAN/preinst deleted file mode 100755 index 63020c5..0000000 --- a/packages/Debian/armhf/DEBIAN/preinst +++ /dev/null @@ -1,51 +0,0 @@ -#!/bin/sh - -##-------------------------------------------------------------------- -## Copyright (c) 2018 OSIsoft, LLC -## -## Licensed 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. -##-------------------------------------------------------------------- - -##-------------------------------------------------------------------- -## -## @preinst DEBIAN/preinst -## This script is used to execute pre installation tasks. -## -## Author: Ivan Zoratti, Ashwin Gopalakrishnan -## -##-------------------------------------------------------------------- - -set -e -get_foglamp_script () { - foglamp_script=$(dpkg -L foglamp | grep 'foglamp/bin/foglamp$') - echo $foglamp_script -} - -is_foglamp_running () { - set +e - foglamp_script=$(get_foglamp_script) - foglamp_status_output=$($foglamp_script status 2>&1 | grep 'FogLAMP Uptime') - rc=$((!$?)) - echo $rc - set -e -} - -# main - -# exit if foglamp is not running -IS_FOGLAMP_RUNNING=$(is_foglamp_running) -if [ "$IS_FOGLAMP_RUNNING" -eq "0" ] -then - echo "*** ERROR. FogLAMP is currently not running. Start FogLAMP and try again. ***" - exit 1 -fi From 4b2a9d98aada87c51c3150cd4e500edd8bdc5712 Mon Sep 17 00:00:00 2001 From: Praveen Garg Date: Thu, 22 Nov 2018 18:10:18 +0530 Subject: [PATCH 07/14] plugin_init should return config deepcopy --- python/foglamp/plugins/south/dht11/dht11.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/foglamp/plugins/south/dht11/dht11.py b/python/foglamp/plugins/south/dht11/dht11.py index a17c431..fcb4883 100644 --- a/python/foglamp/plugins/south/dht11/dht11.py +++ b/python/foglamp/plugins/south/dht11/dht11.py @@ -86,7 +86,7 @@ def plugin_init(config): Raises: """ - handle = config + handle = copy.deepcopy(config) return handle From dde2f7c29ff4403e04f48181cc91adcad94919ff Mon Sep 17 00:00:00 2001 From: Vaibhav Singhal Date: Mon, 26 Nov 2018 14:59:53 +0530 Subject: [PATCH 08/14] usage added --- make_deb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/make_deb b/make_deb index 07b4da4..cd0f555 100755 --- a/make_deb +++ b/make_deb @@ -20,6 +20,14 @@ ## set -e +plugin_type="south" +plugin_name="dht11" + +usage="$(basename "$0") [clean|cleanall] +This script is used to create the Debian package of FogLAMP '${plugin_name}' ${plugin_type} plugin +Arguments: + clean - Remove all the old versions saved in format .XXXX + cleanall - Remove all the versions, including the last one" GIT_ROOT=`pwd` # The script must be executed from the root git directory for i in "$@" From 7c1e84d3fe4cb25bb701cdd56e16840b5d5dbd79 Mon Sep 17 00:00:00 2001 From: ashish-jabble Date: Wed, 2 Jan 2019 19:01:03 +0530 Subject: [PATCH 09/14] displayName attribute added and other minor fixes --- .gitignore | 2 +- python/foglamp/plugins/south/dht11/dht11.py | 15 +++++++++------ 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index d62aa2a..70553e8 100644 --- a/.gitignore +++ b/.gitignore @@ -9,7 +9,7 @@ *.idea # Build -packages/Debian/build/ +packages/build/ # Compiled Object files *.pyc diff --git a/python/foglamp/plugins/south/dht11/dht11.py b/python/foglamp/plugins/south/dht11/dht11.py index 5a183e9..47a3d30 100644 --- a/python/foglamp/plugins/south/dht11/dht11.py +++ b/python/foglamp/plugins/south/dht11/dht11.py @@ -26,7 +26,7 @@ _DEFAULT_CONFIG = { 'plugin': { - 'description': 'Python module name of the plugin to load', + 'description': 'DHT11 South Plugin', 'type': 'string', 'default': 'dht11', 'readonly': 'true' @@ -35,19 +35,22 @@ 'description': 'Asset name', 'type': 'string', 'default': "dht11", - 'order': "1" + 'order': "1", + 'displayName': 'Asset Name' }, 'pollInterval': { 'description': 'The interval between poll calls to the sensor poll routine expressed in milliseconds.', 'type': 'integer', 'default': '1000', - 'order': '2' + 'order': '2', + 'displayName': 'Poll Interval' }, - 'gpiopin': { + 'gpioPin': { 'description': 'The GPIO pin into which the DHT11 data pin is connected', 'type': 'integer', 'default': '4', - 'order': '3' + 'order': '3', + 'displayName': 'GPIO Pin' } } @@ -105,7 +108,7 @@ def plugin_poll(handle): """ try: - humidity, temperature = Adafruit_DHT.read_retry(Adafruit_DHT.DHT11, handle['gpiopin']['value']) + humidity, temperature = Adafruit_DHT.read_retry(Adafruit_DHT.DHT11, handle['gpioPin']['value']) if humidity is not None and temperature is not None: time_stamp = utils.local_timestamp() readings = {'temperature': temperature, 'humidity': humidity} From 4e35d86983dbb85d1eacb8e1bd6d1018644ef664 Mon Sep 17 00:00:00 2001 From: ashish-jabble Date: Thu, 3 Jan 2019 07:03:05 +0000 Subject: [PATCH 10/14] feedback fixes --- README.rst | 2 +- make_deb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.rst b/README.rst index 2871923..0a0852e 100644 --- a/README.rst +++ b/README.rst @@ -28,7 +28,7 @@ Create Debian Package clean - Remove all the old versions saved in format .XXXX cleanall - Remove all the versions, including the last one -``./make_deb `` will create the debian package inside ``packages/Debian/build/``. +``./make_deb`` will create the debian package inside ``packages/build/``. Pre Debian Package Install diff --git a/make_deb b/make_deb index cd0f555..2b96ba5 100755 --- a/make_deb +++ b/make_deb @@ -71,7 +71,7 @@ architecture="armhf" version=`cat ${GIT_ROOT}/VERSION.south.dht11 | tr -d ' ' | grep 'foglamp_south_dht11_version=' | head -1 | sed -e 's/\(.*\)=\(.*\)/\2/g'` foglamp_version=`cat ${GIT_ROOT}/VERSION.south.dht11 | tr -d ' ' | grep 'foglamp_version' | head -1 | sed -e 's/\(.*\)version\(.*\)/\2/g'` -BUILD_ROOT="${GIT_ROOT}/packages/Debian/build" +BUILD_ROOT="${GIT_ROOT}/packages/build" # Final package name package_name="foglamp-south-dht11-${version}-${architecture}" From 47b8a675c1b7ed59ae4c2aff5e7923a2deb1c82f Mon Sep 17 00:00:00 2001 From: Mark Riddoch Date: Fri, 4 Jan 2019 14:33:30 +0000 Subject: [PATCH 11/14] Update LICENSE --- LICENSE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE b/LICENSE index 261eeb9..a4d3b5d 100644 --- a/LICENSE +++ b/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright [yyyy] [name of copyright owner] + Copyright 2018 Dianomic Systems Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. From caa85a1214862febec69b4b8eb2eff435a4f666f Mon Sep 17 00:00:00 2001 From: Mark Riddoch Date: Fri, 4 Jan 2019 16:24:47 +0100 Subject: [PATCH 12/14] Update other copyrights --- make_deb | 2 +- packages/Debian/armhf/DEBIAN/postinst | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/make_deb b/make_deb index 2b96ba5..9cef37c 100755 --- a/make_deb +++ b/make_deb @@ -1,7 +1,7 @@ #!/bin/bash ##-------------------------------------------------------------------- -## Copyright (c) 2018 OSIsoft, LLC +## Copyright (c) 2018 Dianomic Systems ## ## Licensed under the Apache License, Version 2.0 (the "License"); ## you may not use this file except in compliance with the License. diff --git a/packages/Debian/armhf/DEBIAN/postinst b/packages/Debian/armhf/DEBIAN/postinst index 5da6e82..ff1488b 100755 --- a/packages/Debian/armhf/DEBIAN/postinst +++ b/packages/Debian/armhf/DEBIAN/postinst @@ -1,7 +1,7 @@ #!/bin/sh ##-------------------------------------------------------------------- -## Copyright (c) 2018 OSIsoft, LLC +## Copyright (c) 2018 Dianomic Systems ## ## Licensed under the Apache License, Version 2.0 (the "License"); ## you may not use this file except in compliance with the License. From 570e92cc1051a2a0ac84ed3da28b6ba75e6dd170 Mon Sep 17 00:00:00 2001 From: ashish-jabble Date: Fri, 11 Jan 2019 14:15:35 +0530 Subject: [PATCH 13/14] FOGL-2295 pollInterval removal fixes & copyright fixes --- python/foglamp/plugins/south/dht11/dht11.py | 11 +---------- test/test_dht11.py | 2 +- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/python/foglamp/plugins/south/dht11/dht11.py b/python/foglamp/plugins/south/dht11/dht11.py index 47a3d30..4ccd648 100644 --- a/python/foglamp/plugins/south/dht11/dht11.py +++ b/python/foglamp/plugins/south/dht11/dht11.py @@ -20,7 +20,7 @@ __author__ = "Mark Riddoch" -__copyright__ = "Copyright (c) 2017 OSIsoft, LLC" +__copyright__ = "Copyright (c) 2018 Dianomic Systems" __license__ = "Apache 2.0" __version__ = "${VERSION}" @@ -38,13 +38,6 @@ 'order': "1", 'displayName': 'Asset Name' }, - 'pollInterval': { - 'description': 'The interval between poll calls to the sensor poll routine expressed in milliseconds.', - 'type': 'integer', - 'default': '1000', - 'order': '2', - 'displayName': 'Poll Interval' - }, 'gpioPin': { 'description': 'The GPIO pin into which the DHT11 data pin is connected', 'type': 'integer', @@ -141,8 +134,6 @@ def plugin_reconfigure(handle, new_config): _LOGGER.info("Old config for DHT11 plugin {} \n new config {}".format(handle, new_config)) new_handle = copy.deepcopy(new_config) - new_handle['restart'] = 'no' - return new_handle diff --git a/test/test_dht11.py b/test/test_dht11.py index 30e4c25..380ad19 100644 --- a/test/test_dht11.py +++ b/test/test_dht11.py @@ -9,7 +9,7 @@ from python.foglamp.plugins.south.dht11 import dht11 __author__ = "Praveen Garg" -__copyright__ = "Copyright (c) 2017 OSIsoft, LLC" +__copyright__ = "Copyright (c) 2018 Dianomic Systems" __license__ = "Apache 2.0" __version__ = "${VERSION}" From c24d08657ab8c78fc5e083c74379f3a301d559f0 Mon Sep 17 00:00:00 2001 From: dianomicbot Date: Thu, 7 Feb 2019 14:55:37 +0000 Subject: [PATCH 14/14] VERSION changed --- VERSION.south.dht11 | 4 ++-- python/foglamp/plugins/south/dht11/dht11.py | 2 +- test/test_dht11.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/VERSION.south.dht11 b/VERSION.south.dht11 index d104037..c5ca7fa 100644 --- a/VERSION.south.dht11 +++ b/VERSION.south.dht11 @@ -1,2 +1,2 @@ -foglamp_south_dht11_version=1.1.0 -foglamp_version>=1.4 +foglamp_south_dht11_version=1.5.0 +foglamp_version>=1.5 diff --git a/python/foglamp/plugins/south/dht11/dht11.py b/python/foglamp/plugins/south/dht11/dht11.py index 4ccd648..d5b30e5 100644 --- a/python/foglamp/plugins/south/dht11/dht11.py +++ b/python/foglamp/plugins/south/dht11/dht11.py @@ -64,7 +64,7 @@ def plugin_info(): return { 'name': 'DHT11 GPIO', - 'version': '1.0', + 'version': '1.5.0', 'mode': 'poll', 'type': 'south', 'interface': '1.0', diff --git a/test/test_dht11.py b/test/test_dht11.py index 380ad19..f88a206 100644 --- a/test/test_dht11.py +++ b/test/test_dht11.py @@ -28,7 +28,7 @@ def test_plugin_contract(): def test_plugin_info(): assert dht11.plugin_info() == { 'name': 'DHT11 GPIO', - 'version': '1.0', + 'version': '1.5.0', 'mode': 'poll', 'type': 'south', 'interface': '1.0',