The simplest way to experience IoT in the HANA Cloud Platform – Part 1
While I can’t prove that the title is entirely true, the steps outlined below will be tough to beat in terms of cost and simplicity.
Early in 2014, our group was tasked with providing our global sales teams with a super simple way to show a live sensor connected to HCP and other SAP IoT solutions. The purpose is to show an entire end-to-end IoT process where a sensor is either the trigger or a part of the process. This had to be easily supportable for users who were comfortable with new technology as well as those who weren’t. It also had to be flexible enough to be customized for specific customers. So that you can experience this for yourself (and as was mentioned at the Berlin Keynote in September 2015), we are providing a series of blog posts which builds up a sample IoT application.
- In Part 1 (this post), we provide a deployment file of a project that can be deployed to your own HCP trial account. After this is deployed, you will be able to manipulate the sensor (movement, temperature, humidity, etc.) and you will see the impact immediately on the gauges of a simple dashboard.
- In Part 2, we provide an HTML5 dashboard app using WebIDE – available now here The simplest way to experience IoT in the HANA Cloud Platform – Part 2
- In Part 3, we explore how to persist the data in HANA in HCP
- In Part 4, we integrate with the IoT Services provided by HCP
For this blog, we utilize the TI SensorTag to provide sensor data for the fact that it is truly simple to onboard. There are, of course, many sensors that can be used instead which have benefits over the SensorTag and have been highlighted in other blogs. Once the sensor data gets into the HCP environment, the integration options become abundant (HANA, on-premise, S/4 HANA, etc.) and we will explore that in Part 3/4
So let’s get started so that you can decide for yourself if the title is legit or not.
– Obtain a SensorTag from TI.
At $29, this is a very low investment. See http://www.ti.com/sensortag
– Install the Evothings client app on your iOS https://itunes.apple.com/us/app/evothings-client/id848974292?mt=8 or Android device https://play.google.com/store/apps/details?id=com.evothings.evothingsclient&hl=en . Your mobile phone will be used as the bridge/gateway from the sensor to HCP. Ensure Bluetooth is activated because the sensor communicates via BLE. For iOS, your bridge must be one of these or above:
- iPad (Air, Mini, 3rd & 4th gen)
- iPhone (6s Plus, 6s, 6 Plus, 6, 5s, 5c, 5 & 4s)
– Install a QR code reader on your device.
– Download the WAR file found here: https://drive.google.com/file/d/0Bwdrs4BVb3zkTHNrUmQ0VnNCZEk/view?usp=sharing
1. Deploy the WAR file according to the instructions here: https://help.hana.ondemand.com/help/frameset.htm?abded969628240259d486c4b29b3948c.html
2. After the application has uploaded and started, click on the application URL.
3. With a QR reader on your iOS device, open the QR code below and open the URL. This will open the Evothings app and start the bridge application.
4. Start your SensorTag by pressing the power button and the bridge will then connect to it and start to send data to the HCP application.
5. Refresh the browser page and you will see the gauges.
6. Shake the device, turn the device, cover the light sensor, apply heat, etc. to see the gauges dance!
Note that the SensorTag has 3 modes:
- Sleeping (no flashing lights)
- Available for Pairing (flashing green light)
- Active (no flashing lights)
Unfortunately, you cannot tell visually on the SensorTag if it is sleeping or active.
When you have the SensorTag in hand, these steps probably took you less than 10 minutes to complete, so it is proven to be a “simple” setup. Stay tuned to the next few installments in this series to build upon this foundation. Please let us know how we did with part 1 by providing some comments below!
Find out more during the TechEd Hands-On session. You can find the details here: https://sessioncatalog.sapevents.com/go/agendabuilder.sessions/?l=112&sid=25283_453146&locale=en_US
Many thanks to my colleagues within the Solution Experience team who put the architecture together and is constantly creating valuable demonstrations of SAP’s ability to Run Simple!
Whoever built this demo is a genius - simple and effective. Thanks!
Thanks Georg! Nemrude Verzano is the genius who built the core web app.
really works as described!!!
Biggest Issue was connecting the SensorTag to my phone...
(Tried to do a manual bluetooth connection: Did not work. Then found out that the Evothings app initiates the connection to the SensorTag. Just needed to activate bluetooth)...
I love the simplicity of this demo. Really nice work! Got it up and running in just 2 minutes.
The bridge does not detect the sensor (detection via TI app works), and I receive some errors 'websocket error occured: [object CustomEvent]'. Any idea?
Update: Connection works,if I first connect via the TI app, then start the bridge, and the close the connection to the TI app. The bridge now shows the status 'connected', but no values are retrieved. Websocket errors are still there...
Hi Gernot -
It sounds like the web socket is not connecting from the bridge to the HCP app. Can you verify that the app is "Started" and green on your HCP trial account?
yes, it's up and running.
Update: I deleted and deployed again, now the websocket issues seem to be gone. Let's see, it's still 'Reading Services'.
Update: The Bridge App connects successfully, but then it stays with 'Reading Services' endlessly. Hm...
Hi Gernot -
Make sure the TI app is closed (to guarantee that it is not connected to the sensor). Then, power on the sensor so that the green light is flashing and then start the bridge.
thanks for your help, unfortunately it does not work for me. The connection to the sensor works, but then the bridge stays with 'Reading Services'. Any information I can derive from the logs in HCP?
Well, I got the old model of the sensor tag and did not realize. I will try to change the code accordingly.
What all sensors are available in SensorTag?.are there ways to avoid using mobile app for bridge..do we need a wifi shield to send data then?
BLE is the only option from the SensorTag right now which is why you need the mobile device. I suppose you could build a bridge from a desktop if you wanted.
I see from the TI site that they have a Wifi version of the SensorTag coming, but I don't know when that will be.
Is there any app for Windows Phone?
I couldn't find any info regarding this on TI site as well.
Is there any work around for this or I need to use android/iphone only?
Sorry Ram, but I don't know of a way to connect with a Windows Phone.
I have tried to find the next part with no luck. Please drop a link if you fund it 😉
we have not finished the next parts as blogs yet. We are currently busy with other topics. Will have more time for them in February.
I did it! I love it. Thanks for that. Do have any advice on what would I have to do enable faculty at universties to be able to view the following IoT experience in an SAP Demo Solution context (http://www.bit.ly/iotexperience) For example:
regarding the launchpad there is not much to do. Take a look how a Fiori launchpad can be created on HCP. Go to the cockpit and select Subscriptions->portal where you can create a launchpad within a minute. The apps behind the tiles of our launchpad have been developed/designed mostly created by our team, but some by other teams of our PreSales group we belong to.
With the simple example we provided with this blog you can send the SensorTag data to it as described and consume the data with the WebSocket endpoint. The WebSocket endpoint looks usually like this:
Use any WebSocket enabled client, I prefer the web app Advanced Rest Client in Chrome, replace the placeholder YOURACCOUNT with your account and connect to your simplesensortag app running on your account. Then you should be able to consume the data with the client. Now you can connect any html5 site/page with your endpoint. It is this SIMPLE. That’s one reason I packaged the app like this.
I want to have a look of the amazing demo you showed: http://www.bit.ly/iotexperience
But I met the following error after logon with my Jam account:
Do you know how to apply to access the amazing demo?
Could you help me?
Nice tutorial... easy and works 🙂
When can we expect the following parts??
I second that. I can not wait for the next update.
Finally out - The simplest way to experience IoT in the HANA Cloud Platform - Part 2
great tutorial Jeff
Very simple and nice demo. Just tried it and got it work in 10 minutes
Hi! I can see the data of the tag in the app on the iPad, but the gauges do not change, even it I try to reload the page ... what could be wrong? BR, EF
please restart the application on HCP. Sometimes the WebSocket part is not being initialised properly. If this doesn't help redeploy the app on HCP.
Hope this helps,
I re-deployed the whole application, but the gauges don't work! The scan of the QR code works and afterwards I can see the changing values of the tag on the iPad, but somehow the data is not recognized on the Website! How does the process work anyway? After scanning the QR code, the app on the pad opens the URL, and then... ?
Elmar, not sure if you were able to solve it or not, but I tested the setup recently and it worked fine for me. So, this is the sequence how the application works:
This is it. Maybe you have a proxy issue? If you see the data on the Evothings client then it is a network issue.
Hope that this helps,
Could someone please unhide my comment? I dont think that it is abusive or something like that!
Moderators review all posts by Newbies (less than 30 points). We review as promptly as possible, but we are almost all volunteers (i.e. this is not our day job). So sometimes it takes a little while before we can get to it.
Cheers, Mike (Moderator)
SAP Technology RIG
Has anyone seen "Part 3 - we explore how to persist the data in HANA in HCP"?
Thanks！ It works for me！
Nice Blog. But where are parts 3 and 4 - the most important parts of that blog series?
Thanx and Regards,
Thanks for the wonderful demo. I want to save the data as well. How can I do it?
Hi guys, now that the app to bridge sensor with Cloud platform is SapIotBridge and not EVOTHINGS... What shall we change?
I am trying to use SapIotBridge but no data is received on the cloud application...
Thanks for your help.