Skip to Content

Using the SAP HCP IoT Services

As a Product Manager for HCP, focusing on IoT, I have been asked to do a lot of CodeJams.  Most of the CodeJams have been on Getting Started on SAP HCP, but with the new release of the SAP IoT Services, we can do IoT CodeJams. For the CodeJams and other events, we need a step by step process on how to get started.  Using Michael Ameling’s great how to” post as a starting point, and trying to re-use as much of his team’s code as possible, I created a number of tutorials.  And since I also wanted to help people get started before they had hardware, I added in how to test your IoT Services using Postman (a REST Client).  If you, never used one of these, it will help get you started with APIs.

I shared them with colleagues to get them proofed and tested.  They gave me great feedback and then passed them around internally here at SAP. So I figured that I could just post them here and share with the wider SAP Community.

Here they are:

  1. Getting Started with the IoT Services–  Just like is says, this gets you going.
  2. Connecting a Java HTML UI5 GUI–  Creating a simple graph and how to upload it.
  3. Connecting a UI5 GUI using WebIDE– This uses the SAP WebIDE to build everything. –added details on how have both the WebIDE and Java working
  4. Nodejs and Python– Writing the python or node.js code that you will need.
  5. Building up the hardware– Using a Tessel-
  6. Completing the Round Trip-  Using the messaging to send messages to your devices.– coming soon

Links:

Rui’s Fish Import/Export – how to build a full project using SAP HCP

The SAP HCP Podcast

SAP Insurance’s IoT House Video

Where SAP HCP is traveling

Gamification Service– How get started with SAP Gamification

34 Comments
You must be Logged on to comment or reply to a post.
  • Great tutorial. I used it along with the "Starter Kit for the SAP HANA Cloud Platform Internet of Things (IoT) Services" (https://github.com/SAP/iot-starterkit).

    I purchased a GrovePi+ Starter Kit For The Raspberry Pi from Dexter Industries (Raspberry Pi Internet of Things Kit). Their team was very responsive to get my GrovePi+ up and running. Then I adapted the example provided in the Starter Kit - I have a rotary angle sensor rather than a slider... no code change here) and I used a LCD RGB display instead of the OLED one. Only very minor change required.

    Here is a photo of my computer. You can see the UI5 app that displays the data on the HANA Cloud Platform, my Raspberry Pi console, and my webcam showing the output on the LCD.

    IoT_Trial.png

    I plan to use the button from the kit to trigger the start/stop of data collection instead of having to crank up the sensor to the max to start and then to 0 to stop. I would also like to do some statistical analysis of the values... things like average, max, min, rate of change, etc.

    More to follow.

    In closing, thanks to the community for sharing so much knowledge that getting up and running was very easy!

    David

    /
    IoT_Trial.png
  • Aaron - you did it again end-to-end tying all of the innovations together from iot device management to ui5 user experience.

    To me the gem in this series is the transition from the hana table exclusively used by the mms service to an xs service exposing odata such that analytics tools from Microsoft (like PowerPivot) or SAP (Smart Business) can make use of it.

    • Thanks.  As much as I would like to take full credit for that, I got about 95% of the code from one of our great Architects, @Anton Levin

  • Hi Aaron, these are very convenient procedures. Thanks a lot!

    But I encounter an issue in part 1 when using sample client to send data with the message type which I created. It shows code 202 and 409, and when I check the stored message, there is no such table matching to the message type that I created. Is this a bug currently or did I miss some steps? Thanks

    websocket result.jpg

    /
    websocket result.jpg
  • Hi Aaron, I still have an issue regarding to field with date type in message type.

    What data format should be for the type of date? Now I send the message with data "2015-12-14 09:00:14", I will get the reply said that "400  {"msg": "Parse error. Expected [timenow] of type [Date]"}".

    Thanks and Best Regards,

    Ji JING

  • Hi, Any one tried to link any user created table to be used to store IOT data?

    By default the tables are created by MMS according to message types, but what is the way that we link user created HANA tables to be used instead of auto generated table?

    Regards

    Srivatsan

  • /
    /wp-content/uploads/2016/01/iot_failed_862316.jpg
  • Hello,

    I am trying to run a demo but I came across a weird problem.

    Problem occurs in HCP, with my trial account. There seems to be a problem when trying to access the service of IoT, within the Services available in HCP. Every time I try to access the service cockpit (“Go to service” link) I get 6 errors, such as “Could not load hierarchies”, “Could not load data types” etc. Due to the above errors and as far as I understand, I am not able to add new message types or device types etc…

    Any ideas about a solution?

    /
    • Hello Athanasios, please check with IoT FAQ https://help.hana.ondemand.com/iot/frameset.htm?a012a3788b6e498a8971dd27c97ce6bf.html

      IoT Cockpit
      Why does the IoT Cockpit display error messages telling me that entities cannot be loaded?

      Cause: Your trust settings are wrong.

      Solution: SAP HANA Cloud Platform cockpit > select your account > select Trust in the left menu. The option Principal Propagation must be Enabled.

      Regards,
      Anton

      • Hello Anton and thank you for the reply,

        The Principal Propagation is enabled already but I still get the same errors…
        I disabled it, signed out of HCP, signed in and enabled it again, but no luck…
        Any other suggestions?

        /
        • I could suggest to re-check your Trust settings -> Trusted Identity Provider (are you using custom one?) and also your role assignments for IoT RDMS under Subscriptions -> iotrdms -> Roles

    • Please, see this blog [1] and official online documentation [2]

      [1] https://blogs.sap.com/2015/04/29/try-out-the-sap-hana-cloud-platform-internet-of-things-iot-services/

      [2] https://help.hana.ondemand.com/iot/frameset.htm