WSO2 IOT server





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}







0















I am using WSO2 IOT server with raspberrypi 3. I am in the beginning level. I was able to switch on/off the LED bulb which is connected to raspberrypi with this command.



curl -k -X POST "https://172.16.13.86:8243/raspberrypi/1.0.0/device/us310v497by0/bulb?state=on" -H "accept: application/json" -H "Authorization: Bearer 739e2223-62b6-3a24-890f-5b6e610ed6d2"



Now I want to get the current temperature which is detected by the dht11 sensor. I want to know a same type of command which I used for switch on/off the LED bulb. Can anyone help me please?










share|improve this question





























    0















    I am using WSO2 IOT server with raspberrypi 3. I am in the beginning level. I was able to switch on/off the LED bulb which is connected to raspberrypi with this command.



    curl -k -X POST "https://172.16.13.86:8243/raspberrypi/1.0.0/device/us310v497by0/bulb?state=on" -H "accept: application/json" -H "Authorization: Bearer 739e2223-62b6-3a24-890f-5b6e610ed6d2"



    Now I want to get the current temperature which is detected by the dht11 sensor. I want to know a same type of command which I used for switch on/off the LED bulb. Can anyone help me please?










    share|improve this question

























      0












      0








      0








      I am using WSO2 IOT server with raspberrypi 3. I am in the beginning level. I was able to switch on/off the LED bulb which is connected to raspberrypi with this command.



      curl -k -X POST "https://172.16.13.86:8243/raspberrypi/1.0.0/device/us310v497by0/bulb?state=on" -H "accept: application/json" -H "Authorization: Bearer 739e2223-62b6-3a24-890f-5b6e610ed6d2"



      Now I want to get the current temperature which is detected by the dht11 sensor. I want to know a same type of command which I used for switch on/off the LED bulb. Can anyone help me please?










      share|improve this question














      I am using WSO2 IOT server with raspberrypi 3. I am in the beginning level. I was able to switch on/off the LED bulb which is connected to raspberrypi with this command.



      curl -k -X POST "https://172.16.13.86:8243/raspberrypi/1.0.0/device/us310v497by0/bulb?state=on" -H "accept: application/json" -H "Authorization: Bearer 739e2223-62b6-3a24-890f-5b6e610ed6d2"



      Now I want to get the current temperature which is detected by the dht11 sensor. I want to know a same type of command which I used for switch on/off the LED bulb. Can anyone help me please?







      wso2 raspberry-pi3






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Jan 3 at 5:11









      Chathura JayawardaneChathura Jayawardane

      126




      126
























          1 Answer
          1






          active

          oldest

          votes


















          0














          Please try:



          curl -X GET --header 'Accept: application/json' 'https://ServerIP:9443/api/device-mgt/v1.0/events/last-known/deviceType/deviceId' -H "Authorization: Bearer token"






          share|improve this answer
























          • thanks a lot... But it gives an error like this.. I tried 3 types of access tokens. This is the error. {"fault":{"code":900908,"message":"Resource forbidden ","description":"Access failure for API: /api/device-mgt/v1.0/events/1.0.0, version: 1.0.0 status: (900908) - Resource forbidden "}}

            – Chathura Jayawardane
            Jan 7 at 10:26













          • curl -v -k -X GET --header 'Accept: application/json' '172.16.13.86:8243/api/device-mgt/v1.0/events/last-known/…' -H "Authorization: Bearer cfe03639-4eca-3766-ac11-df23a769279e"

            – Chathura Jayawardane
            Jan 7 at 10:44











          • Well, it seems there is issue of permission. Have you followed this for generating access token? docs.wso2.com/display/IoTS310/…

            – kamran
            Jan 8 at 7:49













          • Yes.. I did it.. but it gives an error like this. Unable to search the table - IOT_PER_DEVICE_STREAM_CARBON_SUPER_RASPBERRYPI for tenant id : -1234 with query : meta_deviceId:qec50zwoao9u. <!-- ~ Copyright (c) 2016, WSO2 Inc. (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 ~ ~ apache.org/licenses/LICENSE-2.

            – Chathura Jayawardane
            Jan 9 at 5:02











          • And also I can't see device analytics... Analytics graph does not show anything about past. But I can see my realtime data in the graph at any time.

            – Chathura Jayawardane
            Jan 10 at 10:28














          Your Answer






          StackExchange.ifUsing("editor", function () {
          StackExchange.using("externalEditor", function () {
          StackExchange.using("snippets", function () {
          StackExchange.snippets.init();
          });
          });
          }, "code-snippets");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "1"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54016667%2fwso2-iot-server%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          0














          Please try:



          curl -X GET --header 'Accept: application/json' 'https://ServerIP:9443/api/device-mgt/v1.0/events/last-known/deviceType/deviceId' -H "Authorization: Bearer token"






          share|improve this answer
























          • thanks a lot... But it gives an error like this.. I tried 3 types of access tokens. This is the error. {"fault":{"code":900908,"message":"Resource forbidden ","description":"Access failure for API: /api/device-mgt/v1.0/events/1.0.0, version: 1.0.0 status: (900908) - Resource forbidden "}}

            – Chathura Jayawardane
            Jan 7 at 10:26













          • curl -v -k -X GET --header 'Accept: application/json' '172.16.13.86:8243/api/device-mgt/v1.0/events/last-known/…' -H "Authorization: Bearer cfe03639-4eca-3766-ac11-df23a769279e"

            – Chathura Jayawardane
            Jan 7 at 10:44











          • Well, it seems there is issue of permission. Have you followed this for generating access token? docs.wso2.com/display/IoTS310/…

            – kamran
            Jan 8 at 7:49













          • Yes.. I did it.. but it gives an error like this. Unable to search the table - IOT_PER_DEVICE_STREAM_CARBON_SUPER_RASPBERRYPI for tenant id : -1234 with query : meta_deviceId:qec50zwoao9u. <!-- ~ Copyright (c) 2016, WSO2 Inc. (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 ~ ~ apache.org/licenses/LICENSE-2.

            – Chathura Jayawardane
            Jan 9 at 5:02











          • And also I can't see device analytics... Analytics graph does not show anything about past. But I can see my realtime data in the graph at any time.

            – Chathura Jayawardane
            Jan 10 at 10:28


















          0














          Please try:



          curl -X GET --header 'Accept: application/json' 'https://ServerIP:9443/api/device-mgt/v1.0/events/last-known/deviceType/deviceId' -H "Authorization: Bearer token"






          share|improve this answer
























          • thanks a lot... But it gives an error like this.. I tried 3 types of access tokens. This is the error. {"fault":{"code":900908,"message":"Resource forbidden ","description":"Access failure for API: /api/device-mgt/v1.0/events/1.0.0, version: 1.0.0 status: (900908) - Resource forbidden "}}

            – Chathura Jayawardane
            Jan 7 at 10:26













          • curl -v -k -X GET --header 'Accept: application/json' '172.16.13.86:8243/api/device-mgt/v1.0/events/last-known/…' -H "Authorization: Bearer cfe03639-4eca-3766-ac11-df23a769279e"

            – Chathura Jayawardane
            Jan 7 at 10:44











          • Well, it seems there is issue of permission. Have you followed this for generating access token? docs.wso2.com/display/IoTS310/…

            – kamran
            Jan 8 at 7:49













          • Yes.. I did it.. but it gives an error like this. Unable to search the table - IOT_PER_DEVICE_STREAM_CARBON_SUPER_RASPBERRYPI for tenant id : -1234 with query : meta_deviceId:qec50zwoao9u. <!-- ~ Copyright (c) 2016, WSO2 Inc. (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 ~ ~ apache.org/licenses/LICENSE-2.

            – Chathura Jayawardane
            Jan 9 at 5:02











          • And also I can't see device analytics... Analytics graph does not show anything about past. But I can see my realtime data in the graph at any time.

            – Chathura Jayawardane
            Jan 10 at 10:28
















          0












          0








          0







          Please try:



          curl -X GET --header 'Accept: application/json' 'https://ServerIP:9443/api/device-mgt/v1.0/events/last-known/deviceType/deviceId' -H "Authorization: Bearer token"






          share|improve this answer













          Please try:



          curl -X GET --header 'Accept: application/json' 'https://ServerIP:9443/api/device-mgt/v1.0/events/last-known/deviceType/deviceId' -H "Authorization: Bearer token"







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Jan 4 at 8:42









          kamrankamran

          1345




          1345













          • thanks a lot... But it gives an error like this.. I tried 3 types of access tokens. This is the error. {"fault":{"code":900908,"message":"Resource forbidden ","description":"Access failure for API: /api/device-mgt/v1.0/events/1.0.0, version: 1.0.0 status: (900908) - Resource forbidden "}}

            – Chathura Jayawardane
            Jan 7 at 10:26













          • curl -v -k -X GET --header 'Accept: application/json' '172.16.13.86:8243/api/device-mgt/v1.0/events/last-known/…' -H "Authorization: Bearer cfe03639-4eca-3766-ac11-df23a769279e"

            – Chathura Jayawardane
            Jan 7 at 10:44











          • Well, it seems there is issue of permission. Have you followed this for generating access token? docs.wso2.com/display/IoTS310/…

            – kamran
            Jan 8 at 7:49













          • Yes.. I did it.. but it gives an error like this. Unable to search the table - IOT_PER_DEVICE_STREAM_CARBON_SUPER_RASPBERRYPI for tenant id : -1234 with query : meta_deviceId:qec50zwoao9u. <!-- ~ Copyright (c) 2016, WSO2 Inc. (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 ~ ~ apache.org/licenses/LICENSE-2.

            – Chathura Jayawardane
            Jan 9 at 5:02











          • And also I can't see device analytics... Analytics graph does not show anything about past. But I can see my realtime data in the graph at any time.

            – Chathura Jayawardane
            Jan 10 at 10:28





















          • thanks a lot... But it gives an error like this.. I tried 3 types of access tokens. This is the error. {"fault":{"code":900908,"message":"Resource forbidden ","description":"Access failure for API: /api/device-mgt/v1.0/events/1.0.0, version: 1.0.0 status: (900908) - Resource forbidden "}}

            – Chathura Jayawardane
            Jan 7 at 10:26













          • curl -v -k -X GET --header 'Accept: application/json' '172.16.13.86:8243/api/device-mgt/v1.0/events/last-known/…' -H "Authorization: Bearer cfe03639-4eca-3766-ac11-df23a769279e"

            – Chathura Jayawardane
            Jan 7 at 10:44











          • Well, it seems there is issue of permission. Have you followed this for generating access token? docs.wso2.com/display/IoTS310/…

            – kamran
            Jan 8 at 7:49













          • Yes.. I did it.. but it gives an error like this. Unable to search the table - IOT_PER_DEVICE_STREAM_CARBON_SUPER_RASPBERRYPI for tenant id : -1234 with query : meta_deviceId:qec50zwoao9u. <!-- ~ Copyright (c) 2016, WSO2 Inc. (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 ~ ~ apache.org/licenses/LICENSE-2.

            – Chathura Jayawardane
            Jan 9 at 5:02











          • And also I can't see device analytics... Analytics graph does not show anything about past. But I can see my realtime data in the graph at any time.

            – Chathura Jayawardane
            Jan 10 at 10:28



















          thanks a lot... But it gives an error like this.. I tried 3 types of access tokens. This is the error. {"fault":{"code":900908,"message":"Resource forbidden ","description":"Access failure for API: /api/device-mgt/v1.0/events/1.0.0, version: 1.0.0 status: (900908) - Resource forbidden "}}

          – Chathura Jayawardane
          Jan 7 at 10:26







          thanks a lot... But it gives an error like this.. I tried 3 types of access tokens. This is the error. {"fault":{"code":900908,"message":"Resource forbidden ","description":"Access failure for API: /api/device-mgt/v1.0/events/1.0.0, version: 1.0.0 status: (900908) - Resource forbidden "}}

          – Chathura Jayawardane
          Jan 7 at 10:26















          curl -v -k -X GET --header 'Accept: application/json' '172.16.13.86:8243/api/device-mgt/v1.0/events/last-known/…' -H "Authorization: Bearer cfe03639-4eca-3766-ac11-df23a769279e"

          – Chathura Jayawardane
          Jan 7 at 10:44





          curl -v -k -X GET --header 'Accept: application/json' '172.16.13.86:8243/api/device-mgt/v1.0/events/last-known/…' -H "Authorization: Bearer cfe03639-4eca-3766-ac11-df23a769279e"

          – Chathura Jayawardane
          Jan 7 at 10:44













          Well, it seems there is issue of permission. Have you followed this for generating access token? docs.wso2.com/display/IoTS310/…

          – kamran
          Jan 8 at 7:49







          Well, it seems there is issue of permission. Have you followed this for generating access token? docs.wso2.com/display/IoTS310/…

          – kamran
          Jan 8 at 7:49















          Yes.. I did it.. but it gives an error like this. Unable to search the table - IOT_PER_DEVICE_STREAM_CARBON_SUPER_RASPBERRYPI for tenant id : -1234 with query : meta_deviceId:qec50zwoao9u. <!-- ~ Copyright (c) 2016, WSO2 Inc. (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 ~ ~ apache.org/licenses/LICENSE-2.

          – Chathura Jayawardane
          Jan 9 at 5:02





          Yes.. I did it.. but it gives an error like this. Unable to search the table - IOT_PER_DEVICE_STREAM_CARBON_SUPER_RASPBERRYPI for tenant id : -1234 with query : meta_deviceId:qec50zwoao9u. <!-- ~ Copyright (c) 2016, WSO2 Inc. (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 ~ ~ apache.org/licenses/LICENSE-2.

          – Chathura Jayawardane
          Jan 9 at 5:02













          And also I can't see device analytics... Analytics graph does not show anything about past. But I can see my realtime data in the graph at any time.

          – Chathura Jayawardane
          Jan 10 at 10:28







          And also I can't see device analytics... Analytics graph does not show anything about past. But I can see my realtime data in the graph at any time.

          – Chathura Jayawardane
          Jan 10 at 10:28






















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54016667%2fwso2-iot-server%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          MongoDB - Not Authorized To Execute Command

          How to fix TextFormField cause rebuild widget in Flutter

          in spring boot 2.1 many test slices are not allowed anymore due to multiple @BootstrapWith