Have questions? Please contact us.
inside.live - Build Your IoT Prototype Within Minutes
Are you a supporter of the hands-on approach? It’s all about trial and error, right? Get close to the Internet of Things (IoT) in a fun and entertaining way by using this blog article as a manual for your individual IoT scenario on the SAP HANA Cloud Platform. Feel inspired while trying something new! At the end of this article, you will discover a prototype I created with my quadcopter.
Two Tools for Laying the Groundwork for Your Internet of Things Prototype
SAP launched several IoT services on the SAP HANA Cloud Platform. In combination with that, we at NTT DATA Business Solutions created an application for your iOS-devices. So you have a platform and an interface for sensors. Start developing your personal Internet of Things scenario within minutes by watching the following video or using the written manual below.
First – Sign Up for a SAP HANA Cloud Platform Account
You can sign up for a free trial account at https://hcp.sap.com/try.html. It’s quick and easy, and after you have signed up, you can use SAP Single Sign on so you don’t have to type in your password every time you log on at https://hanatrial.ondemand.com. The free version comes with the ability to connect to backend systems and to Eclipse Studio for Developers, and you get one gigabyte of SAP HANA to play around with. There are some limitations to the free edition, but for trying out stuff, it is absolutely sufficient.
Second – Start with the Configuration of Your Internet of Things Platform
First, activate IoT-services. That requires you to click on the “Services” tab on the left hand side of your overview screen. Scroll down until you find “Internet of Things Services,” and click on it. Then you should be able to click “Enable” to activate the services. That step will make the IoT cockpit available to you. There are two major services included with IoT services on HCP. One is the “Remote Device Management Service” (RDMS) that you just activated. That is where you will manage your devices, as well as the message types they use for communication. The other major service you should be aware of is the “Message Management Service” (MMS). The MMS controls the messages shared between the HCP and your device interface. Once the RDMS is set up, the real action (sensor data) flows through the MMS.
Since the services in HCP are protected, you need to make sure that you have the required roles. Select “Configure Internet of Things Services” in the detail view of the service. From there, hit the “Roles” button on the left-hand side. Assign yourself to the role of “IoT-User”. Later on, you will need to repeat the process for the Message Management Service cockpit role “IoT-MMS-User”. Go to the “Applications” tab in the SAP HANA Cloud Platform cockpit of your account, hit “Subscriptions” and select the “iotcockpit” application. Once it has opened, choose the “Roles” tab and make sure that the role “IoT-User” is assigned to your user.
The next step is to access the Remote Device Management Service. Go back to your “IoT service”, and click on “Go to service”. This is your RDMS cockpit. Under “Device Management”, on the left, you will see your message types. This shows the structure of your information being transmitted to and from your devices. Then, you will see your device types, which categorize your devices and link them to a message type. On the right, you’ll see the different physical devices registered to your account. Since you do not have anything set up, yet, your tiles will have a zero in them. Hold on; we will change this.
On the lower part of the screen, you will see the Message Management Service. This is where you will deploy the service, and later (as in my case) update it to later versions. Go ahead and click it to deploy. In the next step, you will be able to bind the IoT-MMS-User role to your user, as we did in previous steps.
Please note: Since the SAP HANA Cloud Platform gets updated every two weeks, there may be some changes to the processes described here. Therefore, keep an eye on the documentation offered by SAP at https://help.hana.ondemand.com/iot.
Ready, Set, Go! Connect With the NTT DATA Business Solutions IoT Sensor App
Now, we are bringing the sensor interface in to the game. In our case, the entity in question will be an iOS device running the NTT DATA Business Solutions IoTSensor app. Go to the Apple App Store and search for “IoTSensor.”
After the app is up and running, make sure it gets access to all of the sensors. When you click the “Sensor” button (select your device name), you should be able to see real-time sensor information from your device. Play around with it, so you know what to expect. You can also add external sensors, connected by Bluetooth.
So the SAP HANA Cloud Platform is running with the IoT services, and the NTT DATA Business Solutions IoTSensor app is running on the device. Now, we need to connect the two of them. Before doing so, it is important to establish a message type and device type in RDMS. Go into your RDMS cockpit again and hit “Message Types”. Create a new message type by clicking the little plus sign, and give it the following fields and type.
After creating it, save the Message ID that is automatically generated for your entry. It is needed for the IoTSensor app. Go back to the RDMS cockpit and enter “Device Types”. Again, create a new entry.
Give it a suitable name, and add the message type you just created. Save the “Device Type ID” and the “Device Registration Token” that are generated. Open your iOS device and the IoT Sensor App. Go to “Connection” and add a new one by entering the required fields. Hit “Registration” and a confirmation message will appear. Go back to the main screen and check if the connection is now red in color. Select your device again, and it will turn red. You are now ready to start transmitting data to HCP. Just hit the red button on the lower-middle part of the screen, and you’re in action! Move your device around for a while to “get the wheels in motion.”
So, where did your data go? You should be able to view it through the MMS services. In your IoT cockpit, hit “Send and view messages, or perform other actions”. Once you’re in, go to “Display stored messages.”
What you will see next may be kind of cryptic. What you will be looking for is a table starting with “T_IOT_” and then the message ID that you received when you created the message type. Click on the table name, and you will see the data that your device transmitted to SAP HCP.
A cool thing to make note of is that there is an OData API-button on the top right. Click it and you will get both the service URL and the metadata you need for creating a service on top of your data.
Discover My Personal Internet of Things Use Case