Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 
Michał
Advisor
Advisor

Is it possible to develop a pretty nice working solution concept powered by HCP from scratch within 30 hours? At SAP InnoJam nothing is impossible!

The presented solution has been reproduced and a little bit tuned for the purposes of the blog post – I’ve replaced XSJS data generators with real sensors connected to HCP IoT services, but the rest of the source code remained untouched. Code snippets are included.


The idea


Given a “Smart Building” topic, we shortly came up with the Design Thinking approach to an idea for an app powered by HANA Cloud Platform with Fiori-like SAPui5 user interface. In real-time, it is supposed to adjust heating, lighting, windows and so on to the most suitable and acceptable levels by all present people sharing particular space (climate zone) in the office to make them pleased. Their current positions are determined based on data coming from Bluetooth beacons receivers (smartphones/smartwatches).


The challenge


Without loss of generality, let’s imagine that the office is a rectangle open space area with six independently controlled climate zones, as follows:



Localization using Bluetooth beacons in presented, still quite simple, office environment is a challenging task since indoor electromagnetic radiation propagation is complex – BLE (Bluetooth Low Energy) signal is being diffracted, interfered, reflected and absorbed by other devices and varying physical objects hence popular methods like trilateration are not reliable. The presented concept is based on a grid-based sampling method, which make use of HANA calculation and spatial capabilities by matching coming users’ sensors data with previously measured range (area) and average power of each beacon.


The demo set

The demo set consists of Bluetooth beacons, a smartphone/smartwatch, Tessel platform with climate module and HCP trial account with activated IoT services.


1. Bluetooth beacons


Bluetooth Low Energy (BLE) Beacons have already been discussed at SCN. In a nutshell, Bluetooth beacons are small, inexpensive electronic devices that broadcast small pieces of information at regular intervals. This time we are only interested in unique identifier, by which the respective device can be identified.

Estimote Beacons manufactured in Poland have been used.


2. Smartphone / smartwatch


The signal is processed by a personal receiver, which ought to be compact and close to its owner – modern smartphone or smartwatch works well for this task. For the demo purposes, I’ve developed very simple Android application – a middleman, which pushes upon user request received data to HCP IoT Services endpoint.



The app is based on Estimote/AltBeacon Android SDK, but might be easily rewritten to run as a cross-platform service. The source code is available on GitHub.

Discovered Bluetooth beacons data, as mentioned, are pushed to the provided HCP IoT endpoint:



Using the SAP HCP IoT Services has been very well described by aaron.williams2.


3. Tessel platform

The tessel platform with climate module is used to simulate an air conditioner. It communicates two-way with HANA Cloud Platform:

Setting an external device to work with HCP has already been well described at SCN as well – if you’re interested, please follow IoT with SAP HANA DEV by craig.cmehil and Building the hardware by aaron.williams2.


4. SAP HANA Cloud Platform


Behind the scenes the magic happens…



The coming data from the mobile app is being matched with pre-run prepared sampling grid measurements, scored, ranked and matched to the particular owner and one’s climate preferences. In case of the data coming from the Tessel platform, the situation is much simpler as its location is well known. The results sets are combined and exposed via REST/oData XS service:


hcp_03.PNG


The solution is neither the most optimal coded due to limited time and encountered problems with transports from HANA on premise to the cloud nor as fancy as it would be with flexible tables and graph engine, but fulfil its task 😉


5. Any device with web browser compatible with SAPui5


The last part is Fiori-like SAPui5 user interface to set suitable climate values and investigate current situation.



What’s next ?

SAP InnoJam is not only about cool solutions using SAP technology but most of all great atmosphere and people – the part that no words can express. Hope to see you at coming TechEd InnoJam in Barcelona (ian.thain has announced the topics) or one of University Alliances hackathon in case you are a student!


Acknowledgements


This blog post wouldn’t have been possible without the great InnoJam@CeBIT teammates: diana.mihaylova, martinr.hristov, leon.ma, sophia.shan, fox.lu, Jiajia Yu.


Special thanks to vitaliy.rudnytskiy for providing the Tessel platform.

1 Comment