SAP HANA Internet of Things(IoT):Raspberry, Uno, PubNub, UI5

Easy to understand hands-on course for learning IoT using SAP HANA, SAPUI5, Raspberry Pi, Arduino & extend with PubNub.
4.0 (48 ratings) Instead of using a simple lifetime average, Udemy calculates a
course's star rating by considering a number of different factors
such as the number of ratings, the age of ratings, and the
likelihood of fraudulent ratings.
554 students enrolled
$95
Take This Course
  • Lectures 29
  • Contents Video: 4.5 hours
    Other: 0 mins
  • Skill Level All Levels
  • Languages English
  • Includes Lifetime access
    30 day money back guarantee!
    Available on iOS and Android
    Certificate of Completion
Wishlisted Wishlist

How taking a course works

Discover

Find online courses made by experts from around the world.

Learn

Take your courses with you and learn anywhere, anytime.

Master

Learn and practice real-world skills and achieve your goals.

About This Course

Published 5/2015 English

Course Description

Do you know why all of a sudden all big names in IT like SAP, IBM, Apple, Google and Amazon are talking about Internet of Things so seriously ?

Have you ever read an article or attended a talk or watched a video or even spoke to your colleagues about Internet of Things (IoT) and it filled you with more questions than answers ?

To put in a very simple way, IoT will be bigger than anything that's ever been done in high tech and IoT projects are not simple to do, therefore consultants and teams who are working in IoT are paid top rates and salaries.

After long and extensive work of more than 5 SAP consultants and hardware experts for more than 1 month, we are able to finally compile a course which can cover entire end-to-end Internet of Things, in a simple and easy to understand way .

This course is packed with information, knowledge, hands-on and real life project experience learning.

After taking this course :

  1. You will be able to create your own cutting edge IoT usecases with SAP HANA and extend it with PubNub Cloud, an IoT platform already serving big names in the market.
  2. You will be ready to work and manage an IoT project.
  3. If you have never worked with SAP HANA XSJS or SAPUI5, after taking this course, you will be ready to make your first application.
  4. You will be able to understand how PubNub IoT Cloud works and how it is being used by big names like SAP Finance, Coca-Cola, CBS, Yahoo and many more.
  5. And you will be ready for a pay/rate raise.

We have covered SAP HANA Native development, SAPUI5, Raspberry Pi, Arduino Uno and sensor interfacing to solve a personal life problem that will keep the course interesting and fun. Once we achieved that, we will extend the same project by using PubNub Cloud platform and replacing SAP HANA backend.

All the steps are easy to follow and understand.

You will be learning some of the most difficult technologies with ease because this course was compiled based upon DEEP principle.

Even if you are a beginner in IT or an expert or a manager you will never regret after taking this course.

We are giving you a 30 days money back guarantee!

The Future is Now!

What are the requirements?

  • We have tried to make the course flow very simple and step by step, so even if you have no or very little experience of SAP HANA or hardware's configuration, you will be able to follow through.

What am I going to get from this course?

  • Work with Raspberry Pi and configure it for IoT usecases.
  • Identify all the components and flow in an Internet of Things application.
  • Create your own cutting edge Internet of Things use cases using SAP HANA XS, SAPUI5, Raspberry Pi and Arduino Uno.
  • Create your first SAP HANA XSJS and SAPUI5 APP.
  • Use the very popular PubNub Cloud, an IoT management platform build for commercial use. PubNub is already used by some of the big names like SAP, Yahoo, CBS, Coca-Cola and many more.
  • Get long-term exciting projects in Internet of Things with top-market rates and salaries.

What is the target audience?

  • For anyone who want to build IoT use case for customers.
  • For anyone who want to learn Raspberry Pie and learn how to work with it.
  • For Technical SAP Consultants who want to stay hot in the marketplace and get ready to work in exciting future IoT projects.
  • For Functional Consultants who want to understand how their role will be in IoT projects.
  • For Project Managers and Business Analysts who want to understand and get a holistic picture of an IoT project.

What you get with this course?

Not for you? No problem.
30 day money back guarantee.

Forever yours.
Lifetime access.

Learn on the go.
Desktop, iOS and Android.

Get rewarded.
Certificate of completion.

Curriculum

Section 1: Getting Started
06:46

The Internet of Things (IoT) is the network of physical objects or "things" embedded with electronics, software, sensors and connectivity to enable it to achieve greater value and service by exchanging data with the manufacturer, operator and/or other connected devices.

There are already some simple applications in the market based on IoT, like smart umbrellas and smart houses.

In industry, predictive maintenance capability of machinery is avoiding unplanned downtime, in order to save huge failover cost and time.

According to recent reports and estimation, by Gartner and Cisco, the economic impact that IoT will have in coming 5 years is more than $14 trillion.

Recent buying of connected home device maker Nest, for $3.2 billion, and seven more similar companies, by Google, has hyped the IoT even more.


*** Claim Your Special Bonuses ***
Preview
Article
08:40

The projects involving Internet of Things (IoT) will be very different from the way we normally deliver enterprise solutions, since developers will need to know and understand the connected devices and the new architecture and security standards.

The testing landscape will be completely transformed which will ensure the application robustness, security and fault safe.

Once the security standards are set for IoT applications, UX will drive the competitiveness in the marketplace, between major players.


Getting Started
3 questions
Section 2: Internet of Things in Real World
09:59

Apart from the new architecture and standards, there will be many new components like sensors, microcontrollers and microprocessors, and interfacing and programming tasks, which one needs to know to work in IoT projects.

A sensor is a transducer whose purpose is to sense (that is, to detect) some characteristics of its environment. It detects events or changes in quantities and provides a corresponding output, generally as an electrical or optical signal; for example, a thermocouple converts temperature to an output voltage.

There are 2 categories: Digital and Analogic sensors.

Digital sensors can interface digital devices, like your computer, but analogic sensors need an Analogic to Digital convertor (A to D convertor) for interfacing with computing devices.

Digital sensors are easy to interface compared to analogic sensors, but have limitations like inflexibility and are more expensive.

A microcontroller (sometimes abbreviated µC, uC or MCU) is a small computer on a single integrated circuit, containing a processor core, memory and programmable input/output peripherals.

Program memory as RAM, Flash or ROM is also often included in chips.

Microcontrollers are designed for embedded applications, in contrast to the microprocessors used in personal computers or other general purpose applications.

Analogic sensors can be connected to microcontrolling devices like Arduino, which can be easily programmed to control and monitor sensor data.

Arduino can then be interfaced with other devices for helping in other tasks.

Raspberry Pi, which is a microprocessor also well known for its size and computation capability, has been widely used to interface with Arduino, in IoT applications.

Arduino and Raspberry Pi can be easily setup through serial communication, using USB connection .

Both Raspberry Pi and Arduino have a huge community around it to help developers building applications.

05:57

There are already some customers who are leveraging IoT capabilities.

Although most of the projects that involve IoT are carried with an aura of secrecy to maintain competitive advantage, there are some popular SAP public examples that include Kaeser Kompressoren predictive maintenance, BMW connected cars and AMG sensors for engine testing.

These examples are some of the next generation manufacturing operations, so-called Industry 4.0.

03:07

To understand IoT, and the individual components, we have chosen a problem/project to keep things interesting.

We are going to setup a small home monitoring system.

We are going to use a photo sensor that will measure the light intensity of a room and then monitor it remotely,

We can monitor a facility during our absence.

SAP HANA is best suited for IoT for its In memory capability, which plays a major role when we have huge data set, and analytics capability, for real time monitoring.

Internet of Things in Real World
2 questions
Section 3: Arduino Uno
04:41

Arduino is an open-source computer hardware and software company that designs and manufactures kits for building digital devices and interactive objects that can sense and control the physical world. Arduino boards may be purchased preassembled, or as do-it-yourself kits; at the same time, the hardware design information is available for those who would like to assemble an Arduino from scratch.

The project is based on a family of microcontroller board designs, manufactured primarily by SmartProjects in Italy and also by several other vendors, using various 8-bit Atmel AVR microcontrollers or 32-bit Atmel ARM processors.

These systems provide sets of digital and analogic I/O pins that can be interfaced with various extension boards and circuits. The boards feature serial communication interfaces, including USB on some models, for loading programs from personal computers.

For programming the microcontrollers, the Arduino platform provides an integrated development environment (IDE) based on the Processing project, which includes support for C and C++ programming languages.

It can be bought in Amazon within $10-$20.

05:10

The Arduino Uno is a microcontroller board based on the ATmega328. It has 14 digital input/output pins (of which 6 can be used as PWM outputs), 6 analog inputs, a 16 MHz ceramic resonator, a USB connection, a power jack, an ICSP header, and a reset button.

It contains everything needed to support the microcontroller; simply connect it to a computer with a USB cable, or power it with a AC-to-DC adapter or battery, to get started.

Main Interfacing Components of Arduino Uno

  1. Analog Reference Pin
  2. Digital Ground
  3. Digital Pins 2-13
  4. Digital Pins 0-1/Serial In/Out - TX/RX - These pins cannot be used for digital I/O (digitalRead and digitalWrite) if you are also using serial communication (e.g. Serial.begin).
  5. Reset Button
  6. In-circuit Serial Programmer Analog In Pins 0-5
  7. Power and Ground Pins (3.3V,5V and GND)
  8. External Power Supply In (9-12VDC)
  9. Toggles for External Power and USB Power
13:32

A sketch is the name that Arduino uses for a program. It's the unit of code that is uploaded to and run on an Arduino board.

There are many example programs present in the IDE of Arduino, which can be used to learn and use in real life projects .

There are two special functions that are part of every Arduino sketch: setup()and loop().

The setup()is called once, when the sketch starts. It's a good place to do setup tasks like setting pin modes or initializing libraries. The loop()function is called over and over and is the heart of most sketches. You need to include both functions in your sketch, even if you don't need them for anything.

A variable in sketch is a place for storing a piece of data. It has a name, a type, and a value. For example, our blink sketch declares a variable with the name ledPin, with type int, and an initial value of 13. It's being used to indicate which Arduino pin the LED is connected to. Every time the name ledPinappears in the code, its value will be retrieved.

Serial monitor can be used for real serial data from Arduino. The frequency at both ends needs to be set with the same values to make it happen.

06:26

Breadboard

Breadboard, sometimes known as a solderless breadboard. It has lots of holes that you can stick wires or electronic components into, and which are connected inside the breadboard. This lets you create a circuit containing multiple components without having to physically attach them to each other.

Interfacing a circuit with Arduino requires setting a power input in the circuit and connecting the sensor or device with Digital/Analog I/O pins, depending on the type of device and/or sensors.

Arduino Uno
5 questions
Section 4: Raspberry Pi
10:44

Raspberry Pi is a series of credit card-sized single-board computers, developed in the UK by the Raspberry Pi Foundation, with the intention of promoting the teaching of basic computer science in schools.

Raspberry Pi is capable of running a complete operating system and the real advantage is the capability to run with so less power consumption and the easiness to interface with other micro-controllers and digital and analogic devices .

The original Raspberry Pi is based on the Broadcom system on a chip (SoC), which includes an ARM700 MHzprocessor, VideoCore GPU, and was originally shipped with 256 megabytes of RAM, later upgraded (models B and B+) to 512 MB.

The system has Secure Digital (SD) or MicroSD sockets for boot media and persistent storage.

The chip used in the Raspberry Pi is equivalent to a chip used in a cellphone, and does not become hot enough to need any special cooling. RAM in Raspberry Pi is a Package on Package (POP) on top of the SoC (system on a chip), so it is not removable or swappable, and 512 MB is the maximum RAM the Raspberry Pi can support since there are no manufacturers making larger-capacity compatible devices.

The GPU provides Open GL1080p30 H.264 high-profile encode and decode.The GPU is capable of 1Gpixel/s, 1.5Gtexel/s or 24 GFLOPs of general purpose computing and features a bunch of texture filtering and DMA infrastructure. This means that graphics capabilities are roughly equivalent to the original Xbox's level of performance. Overall, real world performance is something like a 300MHz Pentium 2, only with much, much swankier graphics

The Raspberry Pi primarily uses Linux-kernel-based operating systems. It also has a huge open source community build around it.

14:00

Raspberry Pi is a fine little computer board, though not nearly as good as the Arduino when it comes to I/O capabilities.

It is very simple to interface with Arduino and once we have made the Arduino connection we can connect Raspberry Pi through serial connection and do wonders with it.

Steps for Configuring Raspberry Pi and connecting it to computer and Internet:

  1. Download the RASPBIAN OS
  2. Write the image to the disc (SD card) using Win32 image. If you will copy and paste the disk to image, then it will not work.
  3. Open the SD card in your computer and add the IP address of Raspberry Pi and the IP that can be used to communicate over internet, at the end of file cmdline.txt. Make sure that you are leaving a line break at the end, as in Linux it will be assumed to be execution of the command. It will be better to use notepad++ to edit, as sometimes notepad can insert some windows specific characters in the file which will not work in Linux (Raspberry system). Also make sure that both IP are in same network. Example: rootwait ip=192.168.137.10::192.168.137.1
  4. Install Xming and Putty. Putty will be used to establish a SSH connection to Raspberry Pi and Xming will be used to create a Graphical session.
  5. Once you have installed them, run Xming server and then open Putty.
  6. Enter the IP of the Raspberry Pi you configured in step 3 i.e :192.168.137.10
  7. Also make sure that you have SSH enabled in X11
  8. Start the SSH and use the credentials: username is pi and password is raspberry
  9. Now you are inside the Raspberry Pi. To view graphical interface you have to type lxsession
  10. Use Ping to test if you are able to reach to internet.
19:00

Install Java in the Raspberry Pi

Usually Raspbian will come with Java installed but you can still check it via the following command:

java -version

When you update your Raspbian it will also update the Java library, if required.

sudo apt-get update

The communication is in serial mode between Arduino and Raspberry Pi, so we need a way to make our Java program to understand it.

So download the below files:

libjawt.so

librxtxSerial.so

RXTXcomm.jar

and go into the download folder of the files and type the below commands:


sudo cp libjawt.so /usr/lib/jvm/jdk-8-oracle-arm-vfp-hflt/lib/arm
sudo cp RXTXcomm.jar /usr/lib/jvm/jdk-8-oracle-arm-vfp-hflt/jre/lib
sudo cp librxtxSerial.so /usr/lib/jvm/jdk-8-oracle-arm-vfp-hflt/lib/arm
sudo cp librxtxSerial.so /usr/lib/jni/

Now, we are assuming here that you have your jdk-8-oracle-arm-vfp-hflt inside your /usr/lib/jvm.

If not, then your Java is not updated to jdk-8 and you have to update the JDK and JRE .

sudo apt-get install oracle-java8-installer

15:41

Install Jedit for quick and easy copy and paste in Raspberry Pi .

Copy Java program from UI5CN blog part 4 and compile it with the following command:

javac -source 1.6 -target 1.6 -cp /usr/lib/jvm/jdk-8-oracle-arm-vfp-hflt/jre/lib/RXTXcomm.jar SerialTestGET.java

Here, we are giving class path of our RXTX.jar file and using 1.6 compatible compiler mode because the Jar file is 1.6 compatible.

Run the class file which you created from the compilation using

java SerialTestGET

Raspberry Pi
5 questions
Section 5: SAP HANA XSJS and SAPUI5
07:45

The overall usecase which we have considered involves the following communication sequence:

Sensor->Arduino->Raspberry Pi->Internet->SAP HANA XSJS->SAP HANA DB->SAP UI5 Application

Raspberry Pi will be sending data to SAP HANA by invoking SAP XSJS script and providing data in request parameter.

The data is stored in a table where we are going to store the sensor ID, timestamp and the sensor value.

SAPUI5 application will be reading recent data using polling mechanism.

In order to keep the development process simple to understand we have not provided a security key validation during sensor reading insertion into HANA DB.

And also we have not considered the timestamp when the data is inserted in the database so we could avoid the timestamp conversion steps.

SAPUI5 application will have two tiles: one to show near real time sensor values and another as a comparator.

Note: In real life IoT project these two things should be included. We can also use push notification instead of polling which is a better alternative in real IoT world projects.

05:03

We are going to create the following files:

DemoSchema.hdbschema: For linking the DemoSchema to the project.

SensorNetwork.hbdd: For our Data Definition.

insert_sensors_reading.hdbprocedure: For inserting sensor data to HANA database.

sensor_read.hdbprocedure: For reading recent sensor data from HANA database.

getSensorReading.xsjs: For passing recent sensor data to SAPUI5 application.

putSensorReading.xsjs: For allowing Raspberry Pi to insert sensor reading to SAP HANA database.

.xsaccess and anonymous_access.xssqlcc: For providing anonymous access to HANA Database .

We need to configure the anonymous access by going into HANA admin panel using URL:

https://<ip:host>/sap/hana/xs/admin/

06:51


We need to download Eclipse Kepler and install SAP HANA plugins from this repository https://tools.hana.ondemand.com/kepler/

14:49

We need to copy the program present in the powerpoint to the corresponding files.

Special attention: make changes in the code if you are going to use a different package structure. In this case, you need to replace all the occurrences of demoApp.demo01.app02.SHIOT_02 with your HANA project package path.

.hdbschema is a design-time definition of a database schema, which organizes database objects into groups.

This database schema enables you to create and activate application artifacts such as tables, views and database procedures. Without a defined schema, database objects cannot be generated in the SAP HANA catalog upon activation of specific design-time artifacts that are added to the SAP HANA repository.

06:34

SAP HANA repository: The SAP HANA repository is the central component of the SAP HANA development infrastructure and an integral part of the SAP HANA system. The repository is used for central storage and versioning of software artifacts, and it is also the foundation for lifecycle management for SAP HANA content and for the translation of SAP HANA applications. The repository provides the export and import functions needed for shipping applications to customers and for transporting development results between SAP HANA systems.

17:09

The XSJS file are using $.request.parameters.get() function to read data from the URL and $.response.contentType, $.response.status and $.response.setBody() variables and function respectively to set the response of the XSJS script.

HANA database procedures are called by the XSJS script using conn.prepareCall() function which takes a parameter called query that corresponds to our stored procedure call statement with appropriate parameter set using setString() and setInteger() integer.

On successful reading of the record we will get a record of demo02sensor_active_TS which is storing sensor Transactional Data in our HANA Database.

On successful insertion of a new record in demo02sensor_active_TS table we get zero number of the record in the database.

Having exception handling in XSJS script is useful as it can give you a quick feedback in case of errors.

14:00

Given an overview of the architecture and concepts of SAPUI5

SAPUI5 is a client UI technology based on JavaScript, CSS and HTML5. SAPUI5 applications run in a browser. Depending on the device the application is to run on (mobile, tablet or desktop PC), you use different UI libraries.

In the Model View Controller concept, the representation of information is separated from the user's interaction:

  • The view is responsible for defining and rendering the UI.
  • The model manages the application data.
  • The controller reacts to view events and user interaction by modifying the view and model.

As SAPUI5 is a client-side web UI library meaning that it runs in a browser, a SAPUI5 application typically is composed of an HTML page and, if required, many more files.

To create a SAPUI5 Application Project, you must have installed the SAPUI5 Application Development feature in your Eclipse installation.


13:08

As SAPUI5 is a client-side web UI library meaning that it runs in a browser, a SAPUI5 application typically is composed of an HTML page and, if required, many more files.

SAPUI5 is implemented in JavaScript. For loading SAPUI5, its bootstrap needs to be included with a <script> tag. The last two attributes select the visual design to apply initially (other choices would be sap_hcb or sap_goldreflection) and the SAPUI5 control library/libraries to use . In your scenario you need to make sure the URL points to a SAPUI5 installation.

<script id="sap-ui-bootstrap"

src="resources/sap-ui-core.js"

data-sap-ui-theme="sap_bluecrystal"


SAP UI5 project for this project is very simple and contains only one Controller SHIOT_UI_02.controller.js and a view SHIOT_UI_02.view.js.


View:

View is using sap.suite.ui.commons.GenericTile and placing them in tile container sap.suite.ui.commons.TileContent which is added to the content section of the sap.m.Page.

setInterval() is responsible for the polling mechanism in the View which will run the changeKPITest function of the controller every 3 sec.


Controller :

changeKPITest() is responsible for calling XSJS script using AJAX and updating the SAPUI5 model which is bound to the tiles. It is also changing the small color window background CSS relative to sensor measurement.


The development code can be found in the powerpoint provided in the resource section or UI5CN blog.

SAP UI5 application need to be linked to our previously build SAP HANA project .

SAP HANA XSJS and SAPUI5
5 questions
Section 6: Go-Live
06:35

This section is the Go-Live phase where we tie the loose ends.

So far, we have connected the sensor circuit, interfaced it with Arduino and connected Arduino to Raspberry Pi which is able to reach internet and read serial data from a Java program.

From SAP side, we have our SAP HANA native development and SAPUI5 frontend ready.

We are going to start the Raspberry Pi Java program and open the SAPUI5 application in our browser.

We will see the dashboard changing based on the sensor reading of our home.

Section 7: Final wrap-up
05:33

Congratulations!

You have reached the end of the course.

This video wraps everything up and it's where we thank you for sticking with us throughout this course.

And lastly... please ... leave a review and if you liked it give a 5-star rating.

Tell us if you enjoyed the course and found the material useful.

If you think we could have done something better, please say so.

We love to learn from past experiences.

Kind regards!

Section 8: Bonus : Extending IoT usecase with PubNub Cloud for real time commercial use
05:21

PubNub is a cloud based Data Stream Network.

It allows you to build and deploy realtime apps with excellent scalability, reliability, performance and service.

Already some big names are using PubNub like SAP Finance, Coca-Cola, McDonald's, CBS,Yahoo and more.

04:21

PubNub supports more than 70 SDK which allows developers to take advantage of PubNub cloud.

The free account provides 1 Million messages with 100 devices on 30 days trial which is enough to learn the

basics of using PubNub and create IoT usecases and Proof-of-Concepts for customers.

05:45

We have already setup a sensor circuit which is sending data to Arduino which is connected to internet via Raspberry Pi .

Raspberry Pi is pushing the sensor readings to SAP HANA. And in the frontend SAP UI5 application is able to show the data in near real time .

Now we are going to extend the usecase by making Raspberry Pi communicate directly to Pubnub cloud to push data updates and also enabling push notification capabilities to our SAP UI5 frontend.

13:01

We will change our existing Java code by replacing the module, which was pushing data to SAP HANA, to make it push data to PubNub Cloud. The Java development is easy to follow through.

The Jar files required are linked in the external links section on this lecture with the Java program code which will be used in this project .

We suggest you to sign up with PubNub and go to admin console where you will get Subscribe key and Publish key which you need to replace in our code.

Once you start your Java program, it will be able to send data via your PubNub cloud to the my_channel which is a default channel given to you when you sign up with PubNub on trial basis for free.

05:40

The front end UI5 code will be able to get push notifications from the PubNub cloud, if you subscribe to the same channel with the same keys in which the Raspberry Pi is publishing the data.

For now we are only displaying the sensor data in console and the communication are in real time.

Students Who Viewed This Course Also Viewed

  • Loading
  • Loading
  • Loading

Instructor Biography

UI5 Community Network, SAP Experts - SAP Services, SAP Consulting, SAP Education

SAP Experts - SAP Services, SAP Consulting, SAP Education, with more than a decade of experience in enhancing and implementing cutting edge technology for major European industries, some of them includes big Fortune 500 names.

Deep knowledge on the SAP functional side, as well, in Logistics, PLM, SRM Procurement, Supply Chain and Plant Maintenance.

We work extensively in SAP UI5 and Fiori with SAP and non SAP ERPs and also have a complete understanding and first hand working experience with SAP HANA and the new UI.

We believe that sharing makes the World a better place.

Instructor Biography

Ready to start learning?
Take This Course