Presentation is loading. Please wait.

Presentation is loading. Please wait.

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. An Auto-Join Network of Things Wong, H. and Wesson, B. Oracle Confidential – Internal/Restricted/Highly.

Similar presentations


Presentation on theme: "Copyright © 2014, Oracle and/or its affiliates. All rights reserved. An Auto-Join Network of Things Wong, H. and Wesson, B. Oracle Confidential – Internal/Restricted/Highly."— Presentation transcript:

1 Copyright © 2014, Oracle and/or its affiliates. All rights reserved. An Auto-Join Network of Things Wong, H. and Wesson, B. Oracle Confidential – Internal/Restricted/Highly Restricted bit.ly/TUT6256

2 Copyright © 2014, Oracle and/or its affiliates. All rights reserved. Safe Harbor Statement The following is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, and timing of any features or functionality described for Oracle’s products remains at the sole discretion of Oracle. Oracle Confidential – Internal/Restricted/Highly Restricted2

3 Copyright © 2014, Oracle and/or its affiliates. All rights reserved. Program Agenda 3 1 2 3 4 5 Introduction to the Internet of Things Install Java Embedded and the Oracle IoT Gateway Configure the “lookup service” Add liquid level and thermometer sensors View data analytics on the device and in the cloud

4 Copyright © 2014, Oracle and/or its affiliates. All rights reserved. Managing Complexity Data, Insights, Actions at the Right Time

5 Copyright © 2014, Oracle and/or its affiliates. All rights reserved. Integrate and Secure Analyze and Act Acquire and Manage Internet of Things Oracle Confidential – Internal/Restricted/Highly Restricted 5

6 Copyright © 2014, Oracle and/or its affiliates. All rights reserved. Acquire and Manage A Standards-based, Scalable and Secure Device Platform Oracle Confidential – Internal/Restricted/Highly Restricted 6

7 Copyright © 2014, Oracle and/or its affiliates. All rights reserved. Integrate and Secure Reduce Cost and Complexity and Protect Your Investment Oracle Confidential – Internal/Restricted/Highly Restricted 7

8 Copyright © 2014, Oracle and/or its affiliates. All rights reserved. Analyze and Act Extract Business Value and Take Action Oracle Confidential – Internal/Restricted/Highly Restricted 8

9 Copyright © 2014, Oracle and/or its affiliates. All rights reserved. Motivation Towards Real-Time Everything * While Ensuring Accuracy, Efficiency, and Scale Action Time Business Value *Richard Hackethorn’s Component’s of Action Time 9 Acquire & Manage Integrate & Secure Analyze & Act Acquire & Manage Integrate & Secure Analyze & Act Increased Value Reduced Time

10 Copyright © 2014, Oracle and/or its affiliates. All rights reserved. Program Agenda 10 1 2 3 4 5 Introduction to the Internet of Things Install the Java Embedded Runtime Configure the “lookup service” Add liquid level and thermometer sensors View data analytics on the device and in the cloud

11 Copyright © 2014, Oracle and/or its affiliates. All rights reserved. Install the Java Embedded Runtime Install Raspbian Debian Wheezy (September 2014 Version) including JDK 8 * or install Java Embedded (oracle-java8-jdk) 11 sudo apt-get update sudo apt-get install oracle-java8-jdk sudo chmod +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 Raspbian Debian Wheezy Version September 2014http://www.raspberrypi.org/downloads Exercise 2

12 Copyright © 2014, Oracle and/or its affiliates. All rights reserved. Configure Java Embedded Runtime Oracle Java SE 8 – Java Programming Language Java Programming Language Lambda Expressions Method references Default methods Repeating Annotations, Type Annotations – Compact Profiles - predefined subsets of the Java SE platform Compact Profiles 12 Exercise 2

13 Copyright © 2014, Oracle and/or its affiliates. All rights reserved. Program Agenda 13 1 2 3 4 5 Introduction to the Internet of Things Install the Oracle IoT Gateway Configure the “lookup service” Add liquid level and thermometer sensors View data analytics on the device and in the cloud

14 Copyright © 2014, Oracle and/or its affiliates. All rights reserved. Configure the “lookup service” 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 unicast Clients use the lookup service to retrieve a proxy object to the service Endpoint Registry Running a Simple Jini Lookup Service with Java Embedded 14 Exercise 3

15 Copyright © 2014, Oracle and/or its affiliates. All rights reserved.15 // … // liquidLevelProbe has been discovered // … if (!liquidLevelProbeDiscoveredFlag) { System.out.println("liquidLevelProbe discovered"); joinLookUpService(LIQUID_LEVEL_PROBE); liquidLevelProbeDiscoveredFlag = true; } Calling the Lookup Server Exercise 3

16 Copyright © 2014, Oracle and/or its affiliates. All rights reserved. Program Agenda 16 1 2 3 4 5 Introduction to the Internet of Things Install the Oracle IoT Gateway Configure the “lookup service” Add liquid level and thermometer sensors View data analytics on the device and in the cloud

17 Copyright © 2014, Oracle and/or its affiliates. All rights reserved. Add liquid level sensor using IoT Auto-Join 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 Add an eTape liquid level and thermometer sensors to Raspberry Pi 17 Exercise 4 java –jar iot-liquid-level-sensor.jar

18 Copyright © 2014, Oracle and/or its affiliates. All rights reserved.18 // Open RandomAccessFile handle to each GPIO port raf = 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; } Add liquid level sensor using IoT Auto-Join Exercise 4

19 Copyright © 2014, Oracle and/or its affiliates. All rights reserved. Add thermometer using IoT Auto-Join Add a Go!Temp Temperature Probe to Your Raspberry Pi 19 Exercise 4 java –jar iot-temp-probe.jar 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

20 Copyright © 2014, Oracle and/or its affiliates. All rights reserved.20 // Endpoint: tempProbe File 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; } Add thermometer using IoT Auto-Join Exercise 4

21 Copyright © 2014, Oracle and/or its affiliates. All rights reserved. Program Agenda 21 1 2 3 4 5 Introduction to the Internet of Things Install the Oracle IoT Gateway Configure the “lookup service” Add liquid level and thermometer sensors View data analytics on the device and in the cloud

22 Copyright © 2014, Oracle and/or its affiliates. All rights reserved. Set-up data 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 Running Simple Analytics on the Gateway 22 Exercise 5

23 Copyright © 2014, Oracle and/or its affiliates. All rights reserved.23 static void tempProbeAdapter() { System.out.println("liquidLevelProbe Adapter: storing data locally " + "and sending data to IoT Cloud"); // Store data locally // Upload data to the IoT Cloud CloudStorageConfig myConfig = new CloudStorageConfig(); myConfig.setServiceName("myService-myIdentityDomain").setUsername("myUsername").setPassword("myPassword".toCharArray()).setServiceUrl("https://storage.us2.oraclecloud.com"); CloudStorage myConnection = CloudStorageFactory.getStorage(myConfig); FileInputStream fis = new FileInputStream("iotcloud-liquid-level-data.txt"); myConnection.storeObject("MyContainer", "iotcloud-liquid-level-data.txt", "text/plain", fis); // Process data } Set-up data analytics on the Gateway Exercise 5

24 Copyright © 2014, Oracle and/or its affiliates. All rights reserved. Set-up data 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/ Running a Global Analytics on the Cloud 24 Exercise 5

25 Copyright © 2014, Oracle and/or its affiliates. All rights reserved.25 static void tempProbeAdapter() { System.out.println("liquidLevelProbe Adapter: storing data locally " + "and sending data to IoT Cloud"); // Store data locally // Upload data to the IoT Cloud CloudStorageConfig myConfig = new CloudStorageConfig(); myConfig.setServiceName("myService-myIdentityDomain").setUsername("myUsername").setPassword("myPassword".toCharArray()).setServiceUrl("https://storage.us2.oraclecloud.com"); CloudStorage myConnection = CloudStorageFactory.getStorage(myConfig); FileInputStream fis = new FileInputStream("iotcloud-liquid-level-data.txt"); myConnection.storeObject("MyContainer", "iotcloud-liquid-level-data.txt", "text/plain", fis); // Process data } Set-up data analytics on the Cloud Exercise 5

26


Download ppt "Copyright © 2014, Oracle and/or its affiliates. All rights reserved. An Auto-Join Network of Things Wong, H. and Wesson, B. Oracle Confidential – Internal/Restricted/Highly."

Similar presentations


Ads by Google