For those who have already worked with the SAP HANA Cloud Platform Internet of Things (IoT) Services (BETA) before. A new version of the Message Management Service (MMS) is available. An update is highly recommended. Please, deploy a new version of MMS from the IoT Services Cockpit into your HCP account. Pay your attention that the naming convention for the IoT tables has been changed. IoT tables are named according to the following pattern now
T_IOT_<MESSAGE_TYPE_ID>
. You might need to adapt the consumption part of your IoT Business Applications. For more information, please see the documentation at https://help.hana.ondemand.com/iot
A Starter Kit for working with the SAP HANA Cloud Platform IoT Services
The document and the code snippets will provide a complete end to end example of how to use the IoT Services. You will learn how to enable the Services as well as how to send messages and how to receive push messages. Moreover, the samples for data consumption are provided.
- HANA Cloud Platform IoT Services Overview
- Getting started in the Cloud
- Sending messages from the device
- Consuming the messages sent from the device
- Pushing messages to the device
- Receiving the messages sent to the device
- Integrated examples for IoT Devices
- What comes next
SAP HANA Cloud Platform IoT Services are designed to facilitate and support the implementation of Internet of Things applications. The services provide interfaces for registering devices and their specific data types, sending data to a data base running in SAP HANA Cloud Platform (HCP) in a secure and efficient manner, storing the data in HCP as well as provide easy access to the data stored.
The respective services are distributed across two main components: Remote Device Management Service (RDMS) and Message Management Service (MMS). Moreover, there is a web-based interface called IoT Services Cockpit which provides easy access to the various services.
MMS provides various APIs that can be used by devices to send data to the SAP HANA Cloud Platform. It processes the data and persists the data in the attached databases. There may be other use cases, though, which require forwarding the data to other Message Brokers or Event Stream Processors.
The Internet of Things Services Cockpit is the main interface for users to interact with the Remote Device Management Service (RDMS). It can be used to register new devices, to define the schema of messages (devices types and message types) they can send and/or receive, as well as to establish the necessary trust relationship devices need to interact with MMS. The Internet of Things Services Cockpit and RDMS are provided as Cloud services and can be used through subscriptions.
IoT Business Applications can be built using either the HANA XS, the Java or HTML5 mechanisms provided by the HCP infrastructure.
- Get HANA Cloud Platform Developer Account
- Enable Internet of Things Services
- Create Device Information in Internet of Things Services Cockpit
- Deploy the Message Management Service (MMS)
- Send messages with MMS embedded sample client using HTTP API
- Send messages with MMS embedded sample client using WebSocket API
- Send messages with Python client using HTTP API
- Send messages with Python client using WebSocket API
- Consume the messages with MMS embedded client
- Consume the messages with Web Application based on Java and UI5 using HCP Persistence Service
- Consume the messages with HANA XS using XSJS and OData
- Consume the messages with Python using PyHDB
- Consume the messages with Node.js using NodeHDB
- Push messages with MMS embedded sample client using HTTP and WebSocket API
- Push messages with Web Application based on Java and UI5 using HTTP API
In order to get you up and running fast we provide examples that you may use both with or without specific IoT Device hardware.
If you want to take a quick start with a device simulation that runs on your desktop you can use two Python programs with a graphical user interface. In order to run the programs on your desktop (Windows and OSX have been tested) you need a Python installation and the urllib3 module installed. Please refer to the these instructions for guidance on how to meet these preconditions.
With the usage of
- the device simulation that you can start with
python iot_starterkit_desktop.py
and that produces the User Interface shown below
- a program to send messages to the simulated device and switch its LED on or off that you start with
python iot_starterkit_push_ui.py
and that produces the User Interface shown below
you can already experience the functionality of an end-to-end scenario.
We provide instructions and code for usage with a Raspberry Pi and a GrovePi shield that lets you attach various input and output peripherals. In the example we use a Slide Potentiometer for the input of values that can be changed by the user as well as an LED and an OLED graphical display for visible output. You should be able to comfortably purchase these components and assemble them without having to solder.
Please follow these steps to setup and use the Raspberry Pi with the shown peripherals and the example application.
The initial version of the IoT Starter Kit for HCP IoT Services as first published at SAPPHIRE 2015 intentionally tries to provide a simple and easy to reproduce example. We welcome feedback on the adaptation of the HCP IoT Services and your own usage examples via the SCN page "Try out IoT Service on SAP HANA Cloud Platform".