An Auto-Join Network of Things

of 25

Please download to get full document.

View again

All materials on our website are shared by users. If you have any questions about copyright issues, please report us to resolve them. We are always happy to assist you.
PDF
25 pages
0 downs
3 views
Share
Description
An Auto-Join Network of Things. Wong, H. and Wesson, B. bit.ly /TUT6256. Program Agenda. Introduction to the Internet of Things Install Java Embedded and the Oracle IoT Gateway Configure the “ lookup service ” Add liquid level and thermometer sensors
Transcript
An Auto-Join Network of ThingsWong, H. and Wesson, B.bit.ly/TUT6256Oracle Confidential – Internal/Restricted/Highly RestrictedOracle Confidential – Internal/Restricted/Highly RestrictedProgram AgendaIntroduction to the Internet of ThingsInstall Java Embedded and the Oracle IoT GatewayConfigure the “lookup service”Add liquid level and thermometer sensorsView data analytics on the device and in the cloud12345Managing ComplexityData, Insights, Actions at the Right TimeAcquireand ManageIntegrate and SecureInternet of ThingsAnalyzeand ActOracle Confidential – Internal/Restricted/Highly Restricted5Acquire and ManageA Standards-based, Scalable and Secure Device PlatformOracle Confidential – Internal/Restricted/Highly Restricted6Integrate and SecureReduce Cost and Complexityand Protect Your InvestmentOracle Confidential – Internal/Restricted/Highly Restricted7Analyze and ActExtract Business Value and Take ActionOracle Confidential – Internal/Restricted/Highly Restricted8Motivation Towards Real-Time Everything*While Ensuring Accuracy, Efficiency, and ScaleAcquire & ManageAcquire & ManageIntegrate & SecureIntegrate & SecureReduced TimeBusiness ValueAnalyze & ActAnalyze & ActIncreased ValueAction Time*Richard Hackethorn’s Component’s of Action Time9Program AgendaIntroduction to the Internet of ThingsInstall the Java Embedded RuntimeConfigure the “lookup service”Add liquid level and thermometer sensorsView data analytics on the device and in the cloud12345Exercise 2 Install the Java Embedded RuntimeInstall RaspbianDebian Wheezy (September 2014 Version) including JDK 8* or install Java Embedded (oracle-java8-jdk)sudoapt-get updatesudoapt-get install oracle-java8-jdksudochmod +s /usr/lib/jvm/jdk-8-oracle-arm-vfp-hflt/bin/java
  • java –version
  • java version "1.8.0"
  • Java(TM) SE Runtime Environment (build 1.8.0-b132)
  • Java HotSpot(TM) Client VM (build 25.0-b70, mixed mode)
  • * Not part of tutorial. Navigate to http://www.raspberrypi.org/downloads and choose RaspbianDebian Wheezy Version September 2014Exercise 2 Configure Java Embedded Runtime
  • Oracle Java SE 8
  • Java Programming Language
  • Lambda Expressions
  • Method references
  • Default methods
  • Repeating Annotations, Type Annotations
  • Compact Profiles - predefined subsets of the Java SE platform
  • Program AgendaIntroduction to the Internet of ThingsInstall the Oracle IoT GatewayConfigure the “lookup service”Add liquid level and thermometer sensorsView data analytics on the device and in the cloud12345Exercise 3 Configure the “lookup service”Running a Simple Jini Lookup Service with Java Embedded
  • Provides the infrastructure for the Service-object-oriented architecture (SOOA).
  • Locating services is done through a lookup service
  • Services try to contact a lookup service (LUS), either by unicast interaction, when it knows the actual location of the lookup service
  • Clients use the lookup service to retrieve a proxy object to the service
  • Endpoint Registry
  • Exercise 3 Calling the Lookup Server // … // liquidLevelProbe has been discovered // … if (!liquidLevelProbeDiscoveredFlag) {System.out.println("liquidLevelProbe discovered");joinLookUpService(LIQUID_LEVEL_PROBE); liquidLevelProbeDiscoveredFlag = true;}Program AgendaIntroduction to the Internet of ThingsInstall the Oracle IoT GatewayConfigure the “lookup service”Add liquid level and thermometer sensorsView data analytics on the device and in the cloud12345Exercise 4 Add liquid level sensor using IoT Auto-JoinAdd an eTape liquid level and thermometer sensors to Raspberry Pi
  • Writing a IoT Endpoint proxy object
  • Registering the IoT Endpoint proxy object with the IoT Gateway LUS
  • User plugs in the liquid level sensor to the Raspberry Pi and it is auto-discovered
  • Running the liquid level sensor
  • java –jar iot-liquid-level-sensor.jarExercise 4 Add liquid level sensor using IoT Auto-Join // Open RandomAccessFile handle to each GPIO portraf= new RandomAccessFile("/sys/class/gpio/gpio"+ gpioInputChannel + "/value", "r");raf.seek(0);raf.read(inBytes);inLine = new String(inBytes); // Endpoint: liquidLevelProbe if (inLine.startsWith("1")) {commandChannels[1].write(GPIO_ON);commandChannels[1].flush(); if (!liquidLevelProbeDiscoveredFlag) {System.out.println("liquidLevelProbe discovered");joinLookUpService(LIQUID_LEVEL_PROBE); liquidLevelProbeDiscoveredFlag = true; }Exercise 4 Add thermometer using IoT Auto-JoinAdd a Go!Temp Temperature Probe to Your Raspberry Pi
  • Writing a IoT Endpoint proxy object
  • Registering the IoT Endpoint proxy object with the IoT Gateway LUS
  • User plugs in Go!Temp Temperature Probe to the Raspberry Pi and it is auto-discovered
  • Run the temperature probe
  • java –jar iot-temp-probe.jar
  • Exercise 4 Add thermometer using IoT Auto-Join // Endpoint: tempProbeFile tempProbeCheck = new File("/dev/ldusb0");if (tempProbeCheck.exists()) {commandChannels[0].write(GPIO_ON);commandChannels[0].flush();if (!tempProbeDiscoveredFlag) {System.out.println("tempProbe discovered");joinLookUpService(TEMP_PROBE); tempProbeDiscoveredFlag = true;}Program AgendaIntroduction to the Internet of ThingsInstall the Oracle IoT GatewayConfigure the “lookup service”Add liquid level and thermometer sensorsView data analytics on the device and in the cloud12345Exercise 5 Set-up data analytics on the GatewayRunning Simple Analytics on the Gateway
  • Data Analytics on the Gateway
  • Local Analytics can be used to monitor the local devices and sensors
  • Local Java algorithms to watch for triggers
  • User is notified for anomalous events
  • Examining Analytics Running on the Raspberry Pi
  • Browse the Gateway URL for demo
  • Exercise 5 Set-up data analytics on the Gatewaystatic void tempProbeAdapter() {System.out.println("liquidLevelProbe Adapter: storing data locally " + "and sending data to IoT Cloud"); // Store data locally // Upload data to the IoT CloudCloudStorageConfigmyConfig = new CloudStorageConfig();myConfig.setServiceName("myService-myIdentityDomain").setUsername("myUsername").setPassword("myPassword".toCharArray()).setServiceUrl("https://storage.us2.oraclecloud.com");CloudStoragemyConnection = CloudStorageFactory.getStorage(myConfig);FileInputStreamfis = new FileInputStream("iotcloud-liquid-level-data.txt");myConnection.storeObject("MyContainer", "iotcloud-liquid-level-data.txt", "text/plain", fis); // Process data}Exercise 5 Set-up data analytics on the CloudRunning a Global Analytics on the Cloud
  • Data Analytics in the Cloud
  • Global Analytics can be used to monitor the worldwide sets of devices and sensors
  • Global ruleset to watch for triggers
  • Administrator is notified for anomalous events
  • Examining Analytics Running in the Cloud
  • Browse the Cloud URL
  • http://iotcloud.x10host.com/autojoin/
  • Exercise 5 Set-up data analytics on the Cloudstatic void tempProbeAdapter() {System.out.println("liquidLevelProbe Adapter: storing data locally " + "and sending data to IoT Cloud"); // Store data locally // Upload data to the IoT CloudCloudStorageConfigmyConfig = new CloudStorageConfig();myConfig.setServiceName("myService-myIdentityDomain") .setUsername("myUsername") .setPassword("myPassword".toCharArray()) .setServiceUrl("https://storage.us2.oraclecloud.com");CloudStoragemyConnection = CloudStorageFactory.getStorage(myConfig);FileInputStreamfis = new FileInputStream("iotcloud-liquid-level-data.txt");myConnection.storeObject("MyContainer", "iotcloud-liquid-level-data.txt", "text/plain", fis); // Process data}
    Related Search
    We Need Your Support
    Thank you for visiting our website and your interest in our free products and services. We are nonprofit website to share and download documents. To the running of this website, we need your help to support us.

    Thanks to everyone for your continued support.

    No, Thanks