Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
Showing results for 
Search instead for 
Did you mean: 
Active Contributor

The Internet of Things (IoT) is revolutionizing business, generating revenue and improving customer experiences by creating a connected world. SAP HANA Cloud Platform IoT services makes it easier to connect any sensor or device with any app or business process in a company/business network and perform real-time predictive analysis to improve intelligence and decision-making. According to Gartner, the widespread adoption of the Internet of Things (IoT) is driving the utilization of the PaaS.

If you are looking to quickly setup and the test an IoT service on your HCP Trial account using the sensors within your phone, I would refer you to this good blog by patrick.colucci. It took me only two minutes to set it up and stream sensor data to my HCP trial account.

There is also good series of blog posts by rui.nogueira where he outlines the steps to enable a Raspberry Pi to send sensor data to your HCP trial account. I would highly recommend these blogs to get started with experimenting the IoT service on your trial account for free.

In this blog, I am going to show how we can use Cloud for Analytics to create great visualizations based on the IoT sensor data. This blog is not a step-by-step guide as my previous ones. It is intended to stir your thoughts by showing you how you can leverage other components of HCP to mash up your IoT data with your business data and create great visualizations thereby improving your business processes


Create a new HANA DB

Once you are logged into your HCP account, Select “Database & Schemas” from the cockpit menu. Click on the “New” button to create a new MDC(multitenant database containers) based HANA Database

Provide the Database ID as “hcpta” and select the database system type as HANA MDC. It will take few seconds to create the database.

Once your HANA DB is ready and started, click on the below link to navigate to the HANA Cockpit with the system user and explore the system information. You may create user accounts and assign proper privileges which can be used later for other activities.

Update the bindings for the IoT service

In the start-up blogs referenced above, you would have deployed your MMS. The Message Management Service (MMS) is the component that is responsible for receiving data from devices and sending messages to devices.

Navigate to the Java application and click on “iotmms”

Under “Data source binding” you will see a HANA <shared> schema assigned. This shared schema will be used to store all the data which the MMS receives. This is not a full blown HANA instance as it doesn’t provide us the capability to develop XS applications on top of it.

Delete the binding. Note, all the tables used earlier will no longer be accessible from the IoT services. You will have a fresh DB assigned to your IoT service. Assign the new HANA MDC database as shown below

Now you have a full-fledged HANA DB assigned to your IoT service. You can now go ahead and start building your HANA XS applications on top of it.

Model your HANA Views from heterogeneous sources

Quite often we see requirements where the data captured in IoT tables is not of much value unless you augment it with other business data which is available in your system of records. This is where the HANA Cloud Platform comes into play by providing additional services which enables customers to bring their data from on-premise or cloud solutions to the HANA Cloud Platform and create mashups.

The HANA Cloud Connector is an important piece when it comes to connecting the on-premise SAP backend system with HCP. The Cloud connector runs as on-premise agent in a secured network and acts as a reverse invoke proxy between the on-premise network and SAP HANA Cloud Platform. Customers could use HCI-DS (HANA Cloud Integration – Data Services) or SDI (Smart Data Integration) to provision the HANA tables which are needed for reporting purposes. This could be master data or other transactional data which are required for your reporting purposes.

In next step, I am going to show how you can access these IoT tables (available on HCP) using Eclipse/HANA Studio. I am using Eclipse Luna and have installed all the relevant HANA Plugins.

Add a new Cloud system as shown below

Provide the Account name, User name and your password

The next screen will request you to select a Schema or Database. Select the database you created earlier as show below and provide the SYSTEM credentials

You will be able to see all the Schemas available in the new database.

After you have setup and configured the IoT service, you will be able to stream data to HCP IoT service. You will be able to see the data stored in individual tables in the MMS service as shown below

You can now view the same tables within Eclipse too. If your IoT Tables are growing larger, you can use the SQL Commands here to delete the contents :smile:

In the below image, I have shown an example where there is another schema called  “ERP” which holds tables related to the trucks which are used for Fish Import/Export business (based on the scenario described by Rui in his blog posts).  As mentioned earlier, we could use replication techniques like HDI-DS or SDI to replicate the required data to these tables from the backend system. We can then build views on top of these tables (both from IoT and backend ERP) which can be used for reporting purposes.

There is another blog posted by nash.gajic where he explains how to create HANA tables and views and consume it in Cloud for Analytics.

Create Mashups using Cloud for Analytics

I am going to take Rui’s Fish Export/Import business and show how we can create visualizations for the IoT data. Staff at the head office need to be able to monitor the temperature of the fish boxes in each truck constantly. The earlier they detect something, they chances that they could still use the fish are high. Below is a report which shows where each of their trucks are and also has a color coding to instantly tell which trucks are having a problem. According to the below report we have two trucks which seem to have a problem – one in the state of Victoria and the other in the Queensland.

The staff could then drill down to view more details of the particular truck which is reported to have a problem. This is where data gets mashed up with ERP system to give more information as to who the truck driver is today and what is the load of the truck. The graph below shows the temperature of the fish box in the last five hours and also has details on the outside temperature. In this case, the Staff would be able to see that the temperature of the fish box dropped from -15 degree to 2 degree in the last two hours.

They also can access all the required information to contact the truck driver and fix the problem instantly

They can also view reports to show the overall operating cost involved with the refrigeration systems which is having a problem. If the costs of repair and maintenance are too high, it is time to replace it.

With the complete maintenance data for the truck and refrigeration system in the backend ERP system, it is now possible to build reports on Cloud for Analytics which can be used to predict failures.  By now you should have a good understanding about how you can use SAP HANA Cloud Platform’s IoT services and Cloud for Analytics to create great and meaningful visualizations.

Labels in this area