An Inter-Wiki Page Data Processor for a M2M System @Matsue, 1sep., Eskm2013

1,191 views
1,185 views

Published on

Published in: Technology, Business
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,191
On SlideShare
0
From Embeds
0
Number of Embeds
78
Actions
Shares
0
Downloads
2
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

An Inter-Wiki Page Data Processor for a M2M System @Matsue, 1sep., Eskm2013

  1. 1. An Inter-Wiki Page Data Processor for a M2M System Takashi Yamanoue, Kentaro Oda and Koichi Shimozono Kagoshima University, Kagoshima Japan IIAI ESKM 2013, 1st Sep. 2013
  2. 2. • Introduction • Overview of the M2M system • The Data Processor • Usage Example • Comparisons with Related Work • Concluding Remarks
  3. 3. Introduction • Wiki is friendly to people -> Wiki must be friendly to machines • Takashi Yamanoue, Kentaro Oda and Koichi Shimozono: A M2M system using Arduino, Android and Wki Software, Proceedings of the 3rd IIAI Internationa Conference on e- Service and Knowledge Management(IIAI ESKM 2012), pp.123-128, Fukuoka, Japan, 20-22 Sep. 2012.
  4. 4. Introduction
  5. 5. Introduction
  6. 6. Introduction GND OUT Vdd PIR Napion AMN2111 Light Sensor DEV-08464 Temperature Sensor. DEV-08777 1kΩ100kΩ 100kΩ LED Android Terminal USB Cable connector
  7. 7. Introduction • (This time) Add a Data Processor to the mobile terminal. • The Data Processor – Reads data from the sensors or wiki pages. – Processes the data after that. – Outputs the processed data on a wiki page or Controls actuators by the processed data. – Is Controlled by the Program which is written on a Wiki page.
  8. 8. Introduction Android terminal Mobile Terminal Data Processor Command Program Data Output
  9. 9. Overview of the M2M system Actuators ADK Android terminal Mobile Terminal Sensors ADK Android terminal Mobile Terminal Android terminal Mobile Terminal PukiWiki PukiWiki Commands + Sensor data Commands + Sensor data Commands + Program + Output of the Processor Command s Command s Sensor Data Sensors ADK Android terminal Mobile Terminal Sensor Data Command s, Program Command s Commands, Program Commands + Program + Output of the Processor
  10. 10. The Data Processor Behavior of a Mobile Terminal The Data Processor
  11. 11. The Data Processor Start to read commands and the program from the Wiki page.
  12. 12. The Data Processor Program ex. An Example of the program in a Wiki page Just like a BASIC A Dimension is a Hash table Just like Lua.
  13. 13. The Data Processor Output of the Program
  14. 14. The Data Processor • Equipped with functions for communicating with other objects of the mobile terminal. The data processor can read/write data from/to web pages and sensors/actuators using these functions. • Equipped with table manipulation functions such like – sumif, countif of Excel
  15. 15. The Data Processor Some of Embedded Functions • Sending command to another object. May have a return value ex(<object>, <command>) Ex. page=ex(“connector” , “getpage http://www.page.ex/”)
  16. 16. The Data Processor Some of Embedded Functions • Extracting result part in the Wiki page getResultPart(<page>)
  17. 17. The Data Processor Some of Embedded Functions • Parsing CSV and translating the value into an array parseCsv(<csv>,<dataTable>, <rowLabel>,<columnLabel>)
  18. 18. The Data Processor Some of Embedded Functions • <csv> <col-label-1>=<val-1-1>,…,<col-label-1-1n>=<val-1-1n>. <col-label-2>=<val-2-1>,…,<col-label-2-2n>=<val-2-2n>. … <col-label-m>=<val-1-m>, …, <col-label-m-mn>=<val-m-mn>.
  19. 19. The Data Processor Some of Embedded Functions • <rowLabel> is the hash table – (“rowcol”, “row”) – (“maxIndex”, maximum row index of the table). • <columnLabel> is the hash table – (“rowcol”,”col”), – (“maxIndex”, maximum column index of the table), – (<col-label-1>, column index of the label), …, (<col-label-max>).
  20. 20. The Data Processor Some of Embedded Functions • parseCsv(rpart, dataTable, rowLabel, columnLabel) • <csv> … rpart device=d, Date=2013/5/5/ 17:6:18, v=0x0c0. device=a-2, Date=2013/5/5/ 17:6:18, v=155. device=a-1, Date=2013/5/5/ 17:6:18, v=53. device=a-0, Date=2013/5/5/ 17:6:45, ave=242, ..., dt=100. device=a-0, Date=2013/5/5/ 17:7:53, ave=242, …, dt=100.
  21. 21. d Date=2013/5/5/ 17:6:18 0x0c0 a-2 Date=2013/5/5/ 17:6:18 155 a-1 Date=2013/5/5/ 17:6:18 53 a-0 Date=2013/5/5/ 17:6:45 242 a-0 Date=2013/5/5/ 17:7:53 242 (rowcal, col) (maxIndex, …) (device, 0) (Date, 1) (v, 2) (ave,3) parseCsv(rpart,dataTable,rowLabel,columnLabel) columnLabel (rowcal, row) (maxIndex, …) rowLabel dataTable
  22. 22. The Data Processor Some of Embedded Functions
  23. 23. The Data Processor Some of Embedded Functions
  24. 24. The Data Processor Some of Embedded Functions
  25. 25. The Data Processor Some of Embedded Functions
  26. 26. Usage Example • A Remote room monitoring/controlling system • Sensor Side – Acquires human activity, light intensity and temperature data. – Shows them on 24 wiki pages for each hour of a day • Data Process Side – Totals up these data into 31 wiki pages for each day of a month, – By Averaging each sensors’ value of every hour – Controls LEDs of the mobile terminal
  27. 27. Usage Example Sensor Side Data Process Side
  28. 28. Usage Example A Wiki page for each hour of a day Sensor Side
  29. 29. Usage Example …. command:set out-a-8=0 command:get in-d last command:get in-a-2 last command:get in-a-1 last command:get in-a-0 stat command:set readInterval=300000 command:set sendInterval=600000 command:set pageName="pir-1-<hour>" … A Wiki page for each hour, Command part.
  30. 30. Usage Example …. result: device=a-2,Date=2013/8/30 13:59:4, v=168. device=a-1,Date=2013/8/30/ 13:59:4, v=82. device=a-0,Date=2013/8/30/ 14:0:7, ave=349, sdv=6.8789 …, max=361,min=341, … device=a-0,Date=2013/8/30 14:1:13, ave=349, sdv=6.8349 …, max=360,min=340, … … A Wiki page for each hour, Result part.
  31. 31. Usage Example …. graph: ymax=300 graph: ymin=0 graph: x="Date" graph: device="a-2“ graph: y-0="v",color="yellow“ graph: device="a-1“ graph: y-1="v", color="cyan" … A Wiki page for each hour, Graph part.
  32. 32. Usage Example • (A part of) Wiki page for each day of a month • Processor Side
  33. 33. Usage Example
  34. 34. Usage Example command: program daily program: dim dataTable program: dim columnLabel program: dim rowLabel program: ex("service","clear sendBuffer") program: output="" program: url="http://www.yama-lab.org/ adk-wiki-1/index.php?pir-1-"
  35. 35. Usage Example program: avemax0=0 program: avemax1=0 program: avemax2=0 program: avemin0=1024 program: avemin1=1024 program: avemin2=1024
  36. 36. Usage Example program: for i=0 to 23 program: page=ex("connector" , "getpage "+url+i) program: rpart=getResultPart(page) program: ex("service","println "+rpart) program: parseCsv(rpart,dataTable,rowLabel,columnLabel)
  37. 37. Usage Example program: y0=sumif(dataTable, rowLabel, columnLabel("device"), "=", "a-0", columnLabel("sdv")) program: c0=countif(dataTable, rowLabel, columnLabel("device"),"=","a-0") program: ave0=1.0*y0/c0 program: if ave0>avemax0 then avemax0=ave0 program: if ave0<avemin0 then avemin0=ave0
  38. 38. Usage Example program: dataline="device=a-0, Date="+ dataTable(0,columnLabel("Date"))+ ",ave="+ave0 program: ex("service","println "+dataline) program: ex("service","putSendBuffer "+dataline)
  39. 39. Usage Example program: if avemax0 < 7.0 then ex("service","set out-a-8=255") else ex("service","set out-d-8=0") program: if avemax1 < 100.0 then ex("service","set out-a- 9=255") else ex("service","set out-d-9=0") program: if avemax2 > 160.0 then ex("service","set out-a- 10=255") else ex("service","set out-d-10=0") command: end daily command: set pageName="daily-1-<day>" command: set result="" command: run daily Control actuators
  40. 40. Usage Example …. result: device=a-0, Date=2013/8/30/ 23:19:8,ave=8.740391630536074 device=a-1, Date=2013/8/30/ 23:19:8,ave=0.07142857142857142 device=a-2, Date=2013/8/30/ 23:19:8,ave=173.28571428571428 device=a-0, Date=2013/8/30/ 0:58:57,ave=8.862115399734035 device=a-1, Date=2013/8/30/ 0:58:57,ave=0.0 A Wiki page for each day, Result part.
  41. 41. Usage Example ... device=a-1, Date=2013/8/30/ 22:59:8,ave=0.14285714285714285 device=a-2, Date=2013/8/30/ 22:59:8,ave=173.0 device=maxvalues, Data=2013/8/30/ 22:59:8, avemax0=23.272286968015568, avemax1=80.64285714285714, avemax2=177.42857142857142 Maximum values of the day. avemax0: a-0, avemax1: a-1, avemax2: a2
  42. 42. My office of two days before yesterday. Temperature Light intensity Human activity
  43. 43. Comparisons with Related Work • Xively (COSM) – Xively is a real-time open data web service for the Internet of Things. – has open APIs for uploading and manipulating data – Our M2M system has functions similar to those of Xively. – the APIs of Xively are used for the Xively site only. – Our system can be used for any PukiWiki site, not only a specific site.
  44. 44. Comparisons with Related Work • Scripting Layer for Android (SL4A) – brings popular scripting languages to Android. – We uses our original language processor for the data processor now. – However the original language is not familiar with potential users. – We should use SL4A instead of using our original language processor for this potential users of this M2M system.
  45. 45. Comparisons with Related Work • Broadcast – Is an embedded web application for remote Android device management. – uses the SL4A. – Enable Remote Monitoring/Remote Control of an android device. – However the Broadcast does not have the function for data exchanging between web pages.
  46. 46. Comparisons with Related Work • Message Oriented Middleware (MOM) – is software or hardware infrastructure supporting sending and receiving messages between distributed systems. – allows application modules to be distributed over heterogeneous platforms and reduces the complexity of developing applications that span multiple operating systems and network protocols. – Our data processor can be viewed as a MOM.
  47. 47. Concluding Remarks • Successfully acquired remote room data and totaled up the data using our M2M system. • It is easy to define the data flow between wiki pages and it is easy to analyze the data of the M2M system by just writing programs on wiki pages. • This easiness also can be a vulnerability of the security and safety.
  48. 48. Concluding Remarks • We are considering to enhance the security and safety of the M2M system. • It is not so difficult to make the data processor not only for this M2M system but also for other purpose. • We welcome the help of others who would like one to participate in improving and making his or her own sensor/actuator network.
  49. 49. Overview of the M2M system Actuators ADK Android terminal Mobile Terminal Sensors ADK Android terminal Mobile Terminal Android terminal Mobile Terminal PukiWiki PukiWiki Commands + Sensor data Commands + Sensor data Commands + Program + Output of the Processor Command s Command s Sensor Data Sensors ADK Android terminal Mobile Terminal Sensor Data Command s, Program Command s Commands, Program Commands + Program + Output of the Processor

×