From 50fc4ea27099c9a95c494641b04864ff6e79b4ac Mon Sep 17 00:00:00 2001 From: GPrathap Date: Thu, 7 Jan 2016 07:26:06 +0530 Subject: [PATCH] added Adafruit Python DHT Sensor Library installation --- .../src/main/resources/agent/README.md | 3 +-- .../src/main/resources/agent/testAgent.sh | 3 +++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/features/device-mgt-iot-raspberrypi-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/agent/README.md b/features/device-mgt-iot-raspberrypi-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/agent/README.md index 1500c82751..d80a3e63d5 100644 --- a/features/device-mgt-iot-raspberrypi-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/agent/README.md +++ b/features/device-mgt-iot-raspberrypi-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/agent/README.md @@ -12,8 +12,7 @@ specific language governing permissions and limitations under the License. testAgent.sh -------------- This script is used to run this service in a testing environment. It can be run on a real Raspberry Pi device or in a -virtual environment.If this runs on a real Raspberry Pi device, you need to install [Adafruit Python DHT Sensor Library](https://github.com/adafruit/Adafruit_Python_DHT). -To install Adafruit Python DHT Sensor Library: follow the instructions given here https://github.com/adafruit/Adafruit_Python_DHT. +virtual environment. To run: ` sudo ./testAgent.sh ` and follow the instructions. diff --git a/features/device-mgt-iot-raspberrypi-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/agent/testAgent.sh b/features/device-mgt-iot-raspberrypi-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/agent/testAgent.sh index b9d24532bf..ea9e4bee11 100644 --- a/features/device-mgt-iot-raspberrypi-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/agent/testAgent.sh +++ b/features/device-mgt-iot-raspberrypi-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/agent/testAgent.sh @@ -98,6 +98,9 @@ cp deviceConfig.properties ./src if [ "$mode" = "N" ]; then sudo apt-get install rpi.gpio + git clone https://github.com/adafruit/Adafruit_Python_DHT.git + sudo apt-get install build-essential python-dev python-openssl + sudo python ./Adafruit_Python_DHT/setup.py install fi chmod +x ./src/RaspberryAgent.py