====== Smart Objects and Services ====== ====== Project Presentation ====== == Name== ----------------- **SmartLight** == Group Composition== --------------------------------- **Enshuo ZOU et Thai Ha NGUYEN** ==== Scenario :==== * When the lamp SmartLight ​detects the change of light or the presence of the user, it sends raw data to the remote PC services. * When the Remote ​PC Service ​received ​data, it turns into states: bright ​or not bright, present or not, and transform these states as Json forma to send to the second remote ​PC services. * The 2nd Remote PC Service ​receive ​the Json. It stores ​the Json into a local file, and user can check it. In addition ​the service uploads this file on internet, into the doctor'​s ​dropbox. Then the doctor can treating a patient remotely. ==== Object Shape : ==== == Name of the contact at Reims== **arnaud BILLAUDEL** == Sketch of the Object from Reims : == {{http://i.imgur.com/BsJVqY9.png?450}} == Picture of the Object without instruments and electronics :== {{http://i.imgur.com/sYgacj2.jpg?300}} == Picture of the Object with instruments and electronics outside on the same table (put some circles and arrows on the picture to show where you're going to integrate all of these) : == {{http://i.imgur.com/4LBc9zj.jpg?400}} == Picture of the finished Object (all is integrated): == {{http://i.imgur.com/lkMQkaJ.jpg?350}} == Demonstration Video : == [[http://youtu.be/wQjXlvnyo-0|Youtube SmartLight Video]] ==== Hardware specifications : ==== == List : == ^ sensor or actuator ^reseller link ^ seller reference ^ links to datasheet or technical document^ |Capteur de lumière de précision 1127 | GoTronic | 25486 | http://www.gotronic.fr/art-capteur-de-lumiere-de-precision-1127-12101.htm| |Adaptateur 1101 pour capteurs Sharp | GoTronic | 25465 | http://www.gotronic.fr/art-adaptateur-1101-12080.htm| |Capteur de mesure Sharp GP2Y0A021YK | GoTronic | 24565 | http://www.gotronic.fr/art-capteur-de-mesure-sharp-gp2y0a021yk-11539.htm| ==== Specifications and interface of the service on the object ==== There are two services on the object: * One service is to capture the raw datas from the distance sensor and tranform the datas to real distance whose unit is cm. * The other service is the value from light sensor, which presents the level of brightness. These two services are sent with a specified frequency via upnp (to avoid the problem of overrun on the embedded card phidget). {{http://i.imgur.com/9XAohSX.png?650}} ==== Specifications of the interface of high added value service ==== There are two high added value services for our project: * Save the treated data in a local file to persist data. All these data are in form of json. So that the user can follow his behaviors. * Upload the data file to a dropbox. This is useful when a doctor need to monitor remotely his patient and intervene when there is a need. {{http://i.imgur.com/GqHa0zE.png?650 | second container}} To realize there services, we created a intermediate layer to receive the data sent from the object, and treat these data to get the different states. With the distance data, we can get the states like: the user is present or not. For the brightness data, the states are: bright and not bright. Then we mix the two types of states to get a mixed state, and this is the data that we need to send to the layer of high added value service. Note : (including a figure on the orchestration between services on objects and information systems) {{http://i.imgur.com/oXBwa0A.png?650 | first container on pc}} ==== Project Files: ==== == . wcc of the two containers (embedded and on the remote PC) : == *[[https://drive.google.com/file/d/0B4er7ZV_L52MNGFWYzR3M3Z4djg/edit?usp=sharing|Embedded]] *[[https://drive.google.com/file/d/0B4er7ZV_L52MemJ4UC02dGNCWk0/edit?usp=sharing|Remote PC]] *[[https://drive.google.com/file/d/0B4er7ZV_L52MbUdTel90VWtPSkU/edit?usp=sharing|2nd Container on Remote PC ( to simulate the data base and distance service - upload2dropbox)]] == Beans added for the embedded container (for the service on the object) ** (DLL and Source code for each of them) == *[[https://www.dropbox.com/s/ke5w193mkqcgyga/NoiseFilter.dll|NoiseFilter.dll]] *[[https://www.dropbox.com/s/ahv8kpc9a12mpa7/ConvertToDistance.dll| ConverToDistance.dll]] *[[https://www.dropbox.com/s/es6hj2d5p1nk7si/ConvertToDistance.zip| NoiseFilter Source code]] *[[https://www.dropbox.com/s/es6hj2d5p1nk7si/ConvertToDistance.zip | ConverToDistance Source code]] == Beans added for the remote PC container (for the high added value service on the PC) ** (DLL and Source code for each of them) == *[[https://www.dropbox.com/s/ucngibcfn44i627/pcDLLs.zip | DLLs]] *[[https://www.dropbox.com/s/utedymi5wour8ob/PC_SourceCodes.zip | source code]] == Chesklist to install the embedded service on the object == * Copy SmartLight.wcc, ConvertToDistance.dll and NoiseFilter.dll on the phidget * When the SmartLight device is turned on, the embedded service will be started automatically, by modify the script /etc/rc.local (to add mono Container.exe –r ../Beans –l smartLight2.wcc –n SmartLight) (N.B. As there is a bug from Wcomp for our embedded service, this step is not necessary for us.) == Chesklist to install the remote service/application on the PC == * Copy the CheckBrillantState.dll, CheckPresentState.dll and StateController.dll into the directory Beans of SharpDevlop * Open Device Spy and copy the functional URL of the object * Open SharpDevelop and create a new container, then import service.wcc * Modify the component smartLight_Functional_01's uri with the copied with one (should become green now) * Bind this container to UPnP * create another container and import BD.wcc * Modify the component sl_services_functional_11's uri with the functional uri of the last container. ==== Results of the relations with Reims (being factual without personal opinion) ==== The collaboration with Reims learned us: * How to make the nearly commercial product * How to deal the prototype (we had written a specification file to describe our project) * To communicate (we discuss on the web site of adhoc frequently to make the decisions and to talk about the changes for the project) In result, the prototype was made ​​as commended, except that there are two small remarks: * The high part of the lamp to put in the light sensor is not well done to capture light. * The lamp was too fragile (lamp was already broken when we received it) ==== Prospects : ==== == Possible extensions of the object == * add the actuators into the object. * add the motion sensor. * RFID to distinguish users. == Possible extension of the service on the Object == * Service to alert the user when he stays too long in front of his desk. * Service to alert when the user is in front of the lamp and doctor wants to alert the user. == Possible extension of the high added value Service == * Mixer weather information with states to provide data more relevant. * Combine Calendar service with actuators on objects to advertise user events in the Calendar. * Combine user's personal calendar with the treated data to get a mixed calendar. == Possible GUI for data visualization == * Create a similar, kind GUI Calendar by adding statements of the weather information and events from the user. * Transform the JSON data into a excel file and create the table to show the different data.