HI JK:

It is very helpful! Thank you so much! 



Best Regards,

Annie



  _____  

From: Jee Hyeok Kim [mailto:[email protected]] 
Sent: Wednesday, April 20, 2016 6:16 PM
To: Annie Weng; iotivity-dev at lists.iotivity.org
Subject: Re: [dev] Trigger requests from cloud



Hi Annie,



Thanks for interests cloud.



Current release (1.1) has no nice methods to support your scenario.



1. If you are able to use one userId to register, you can use existing
iotivity client to control whole devices.



2. Otherwise, if there exists many userId, as you mentioned, you should
retrieve whole device list directly from RD,



And do requests to other devices without credential checks. But it is not
good idea. 



3. If you are able to check code, you can refer
org.iotivity.cloud.accountserver.db.AccountDBManager class



and you could modify it to retrieve whole device list if userId is admin.

(currently, it returns devices which registerd to same userId.)

* Change getDevices function like below

MongoCursor<Document> cursor = collection.find(
                Filters.eq(Constants.USER_ID, userId)).iterator();

->

MongoCursor<Document> cursor;

if(userId.equals("admin"))

{

cursor = collection.find(
                Filters.eq(Constants.USER_ID, userId)).iterator();

}

else

{//Returns whole devices

cursor = collection.find().iterator();

}



and use existing resource client to control.



Here is page that show our plan.

https://wiki.iotivity.org/iotivity_cloud





Best Regards

JK





------- Original Message -------

Sender : Annie Weng<annie.weng at u-media.com.tw>

Date : 2016-04-20 17:51 (GMT+09:00)

Title : [dev] Trigger requests from cloud




Hi All:

We are now developing on iotivity cloud. (iotivity-1.1.0)

Being the admin, we wanna control all devices from cloud side directly.

Is there any API to trigger CRUDN requests from Cloud Server?

Or, we should just add a daemon as iotivity client on our cloud and access
RD directly?



Thank you.



Best Regards,

Annie







| Jee Hyeok, Kim | IoT Solution Lab, SW Center | Mobile) +82-10-9168-3641 |









<http://ext.samsung.net/mailcheck/SeenTimeChecker?do=88b6a78ac05616df3c3b5a6
e24b671383eb95abfc8fd97230b7132fc79196e208d53be25e6998ffa967fc14ece02f51b060
7098f5ab594e9041da38094672ab505564c43ca1ee55ecf878f9a26ce15a0> 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://lists.iotivity.org/pipermail/iotivity-dev/attachments/20160422/69a0f010/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.gif
Type: image/gif
Size: 13168 bytes
Desc: not available
URL: 
<http://lists.iotivity.org/pipermail/iotivity-dev/attachments/20160422/69a0f010/attachment.gif>

Reply via email to