From b03105f50b41e0228ac048ead00967a5f851e996 Mon Sep 17 00:00:00 2001 From: mharindu Date: Wed, 4 May 2016 01:15:31 +0530 Subject: [PATCH] Fixed issues in arduino temperature sensor --- .../src/main/webapp/META-INF/permissions.xml | 6 +++--- .../src/main/resources/agent/PollServer.ino | 3 +-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/components/iot-plugins/arduino-plugin/org.wso2.carbon.device.mgt.iot.arduino.api/src/main/webapp/META-INF/permissions.xml b/components/iot-plugins/arduino-plugin/org.wso2.carbon.device.mgt.iot.arduino.api/src/main/webapp/META-INF/permissions.xml index c59a0b9798..4966eba2e2 100644 --- a/components/iot-plugins/arduino-plugin/org.wso2.carbon.device.mgt.iot.arduino.api/src/main/webapp/META-INF/permissions.xml +++ b/components/iot-plugins/arduino-plugin/org.wso2.carbon.device.mgt.iot.arduino.api/src/main/webapp/META-INF/permissions.xml @@ -31,16 +31,16 @@ control bulb - device-mgt/user/operations + /device-mgt/user/operations /device/*/bulb POST arduino_user get controls - device-mgt/user/operations + /device-mgt/user/operations /device/*/controls - POST + GET arduino_device diff --git a/features/iot-plugins-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.feature/src/main/resources/agent/PollServer.ino b/features/iot-plugins-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.feature/src/main/resources/agent/PollServer.ino index 2c2019a107..040790f2df 100644 --- a/features/iot-plugins-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.feature/src/main/resources/agent/PollServer.ino +++ b/features/iot-plugins-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.feature/src/main/resources/agent/PollServer.ino @@ -28,8 +28,6 @@ void readControls() { 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("\n")); client.fastrprint(F("protocol: HTTP\n")); @@ -77,6 +75,7 @@ void readControls() { digitalWrite(6, LOW); } + responseMsg = ""; }