WSO2 IOT server
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}
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
add a comment |
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
add a comment |
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
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
wso2 raspberry-pi3
asked Jan 3 at 5:11
Chathura JayawardaneChathura Jayawardane
126
126
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
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"
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
|
show 18 more comments
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
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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"
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
|
show 18 more comments
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"
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
|
show 18 more comments
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"
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"
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
|
show 18 more comments
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
|
show 18 more comments
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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