The Internet of Things in SAP Cloud Platform (Practical Demo)

When going through all available services in SAP Cloud Platform, I’ve always been attracted by one of them – the Internet of Things. Given that SAP allocated it a separate category (besides analytics, business, data, UI, … services), it made me feel like they really meant it. Is that really the case?
SAP_cloud_platform_anodius_internet_of_things_1
Internet of Things – SAP Cloud Platform source: ondemand.com


Internet of Things

Under the term “Internet of Things”, you can easily imagine any device that is connected to the Internet. Well, by any, I mean real any – a door, a car key, a fridge, a washing machine. Whatever. Wireless chips (WiFi), due to their mass production and technological progress in production, have become so cheap and small-sized components that they can be used effectively almost anywhere. That is why, for example, the “Smart home” devices have become so spread recently. Whether you’ve forgotten to turn off the stove, close windows or turn off lights, you can find it out through a mobile app anywhere in the world just because the sensors from each home appliance are connected to the internet. Only a few years ago it was the privilege of ultramodern households and the Smart Home solution were worth hundreds to thousands of euros.


How to do it?

For demo purposes, I decided to create a “weather station” that would measure the temperature and humidity of our office and send such data every 30 seconds to SAP Cloud Platform – before I get to work, I can see whether the heating, or air conditioning in summer is working or I opt for another outfit :-).

Just kidding, the purpose was to verify how, and whether it is possible to link the device up to EUR 10 with a solution from SAP. The shopping list was very short and consisted of:

  • NodeMC ESP8266
  • Digital DHT11 thermometer and humidifier
  • Cabling
SAP_cloud_platform_anodius_internet_of_things_2
Components – two-euro coin for comparison

 

I used SAP Cloud Platform in Trial version (Neo Trial), which can be used free of charge for an unlimited period after you register with any mail (you do not have to be a SAP Partner). Therefore, the “Trial” label is not related to time but functional one. After launching the “Internet of Things” service and initial setup from the SAP Cloud Platform, the “iotmms” application automatically appears in the Java applications in the Stopped state.
SAP_cloud_platform_anodius_internet_of_things_3
“iotmms” in the Stopped state source: ondemand.com


After the app is running successfully, it is time to register the device that we will use along with the message type (which form of message we will send to the SAP Cloud Platform).

SAP_cloud_platform_anodius_internet_of_things_4
Message Type source: ondemand.com


Only temperature and humidity is needed for the demo. Messages will be sent via HTTP (OData). MQTT and WebSockets are also available.

SAP_cloud_platform_anodius_internet_of_things_5
Message Management Service Cockpit source: ondemand.com


Using the “Messaging through HTTP” link, you can test whether all the settings are correct and whether the system is receiving messages. If so, a table in the form T_IOT_ “messagetypeid” is created in the database and there is created one record in it.

SAP_cloud_platform_anodius_internet_of_things_6
Table of records from test request HTTP (POST)

 

In addition to the C_TEMPERATURE and C_HUMIDITY attributes, the system automatically added the G_DEVICE (unique registered device ID) and G_CREATED (received message timestamp) fields.  At this moment, everything is ready to receive real data from our device and the appropriate temperature sensor.  Within the infinity cycle the program reads the current temperature and air humidity every 2 seconds, and the a verage of the last 15 measurements (i.e. every 30 seconds each) sends over the HTTP POST request to the SAP Cloud Platform where the records are stored in the corresponding HANA table.

Internet_veci_v_SAP_Cloud_Platform_x


Limitations

The only limitation I encountered with using the Internet of Things in the SAP Cloud Platform was the limitation of the use of the HANA database created, which is a general limitation of the Trial version. After 12 hours, the database automatically switches to Stopped and stops writing data that comes from our device. If you leave it off for more than 14 days, it automatically clears and with it all the records you have stored in it. Of course, you can run it again every 12 hours, but you have to do it manually, which is not always possible (= requires physical presence by PC). That’s why I’ve decided that I’ll send them to ThingSpeak (https://thingspeak.com/) in addition to sending data from the sensor to SAP Cloud Platform, which does not have such a limitation.


Visualisation of acquired data

Data from the database should be visualized to add value to the user.  For visualization I used the IoT Starter Kit from SAP (https://github.com/SAP/iot-starterkit) and from there UI5 ​​Consumption. I have modified these for our needs so that the last 100 values ​​can be displayed in the graph.

SAP_cloud_platform_anodius_internet_of_things_7
Temperature and humidity graph in SAP Cloud Platform

 

SAP_cloud_platform_anodius_internet_of_things_8
Temperature and humidity graph in ThingSpeak


Conclusion

Due to the wide selection of sensors, the possibilities of use are practically unlimited. By verifying integration, we have gained credible evidence that SAP is also ready for these industry opportunities. Thanks to In-Memory technology, the HANA database is also the ideal mean to analyse the amount of data from different sensors. Implementation, for example, in the machinery industry for monitoring parts wear, transporting efficient traffic lights or larger cities in parking management is a very near future issue.
SAP_cloud_platform_anodius_internet_of_things_9

Experts will advise you

Anodius is an official certified SAP partner. We have a team of professionals to help you with your SAP Hybris solution design, implementation, user training and any post-implementation services.

Michal Babinec, Sr. Developer

 

Do you find this article interesting?

Subscribe to our newsletter!



I agree with the processing of personal data for marketing purposes. For more information "Privacy Policy".



Why us?

sap jobs

TEAM

crm software

KNOW HOW

crm solutions

QUALITY

crm

EXPERIENCE

E.ON SPP
Dell Salesforce Deloitte IBM
KPMG CGI Aon Energetika Ljubljana
RWE SAP Energetika Ljubljana Atos
Wien IT Itelligence Generalli Leaf

News

SAP-CX-Anodius

SAP Customer Experience LIVE

The event is held 10-11.11.2018 in Barcelona, Spain.  Watch all event sessions LIVE. 

READ MORE

staffino anodius partner

Let Your Customers Share Their Best Kept Secrets

CX Solution by Staffino.com is a simple, efficient and, moreover, very effective CX (customer experience) solution for every company.

READ MORE

salesforce integration webservicer anodius

Salesforce integration (simple app)

All without a line of code and most importantly – without any middleware!

READ MORE