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: 
Former Member

SAP Cloud Platform launched the IoT Service in May this year. For those who are interested in the overall picture I would like to forward you to the SAP Enterprise Architecture Explorer providing more insight how it fits into SAP Leonardo IoT specifically SAP Leonardo IoT Foundation.


IoT Service Cockpit offers number of benefits and services to the Developers to on-board Devices, create Endpoints, Configure Events/Alarms. It lets us consume the real-time sensor data on Cloud (IoT Gateway Cloud) as well as provides IoT Gateway Edge services. IoT Gateway Edge enables us to process the sensor data near the Sensor network without the need to send it to SAP Cloud Platform. Have a look at this introductory blog about IoT 4.0 Leonardo for Next Gen Business to get overall picture.


This tutorial's going to be a series of posts starting with this First Blog on getting yourself on-boarded with IoT Gateway Cloud. Later, I'll be also sharing topics related to IoT Gateway Edge, Device Lifecycle Management, User Management and others.


Here's my attempt to share the learning I got from recently concluded DevCamp in Labs Bangalore. Following were the topics which we were introduced and I've come-up with this Video Tutorials which hopefully will help people get on-boarded with the latest Leonardo IoT Service Cockpit.


Topics: - [ IoT Gateway Cloud ]

  • Check the Pre-requisites.

  • IoT Gateway Cloud Services with MQTT Network Devices (Simulator - PAHO Client)

  • IoT Gateway Cloud Services with REST Network Devices (Simulator - POSTMAN Client)






Pre-requisites:

  1. Access to SCP IoT Services 4.0 Instance

  2. Java 1.8 Installed and JAVA_HOME Configured (check below)


STEPS: -




  • Right click on My Computer > Properties > Advanced System Settings > Environment Variables

  • Under System variables, click on New and enter following

  • Variable name: JAVA_HOME

  • Variable value: path of the JDK installation folder (for ex: C:/Program files/java/jdk1.8.0_73)


 

  1. Install the MQTT Network Simulator (PAHO Client)

  2. Install Chrome POSTMAN Extension.


 

Demo




 




IoT Gateway Cloud Services MQTT Protocol:

 

  1. Introduction to "IoT Service Cockpit"

  2. Creating Device Data Model

    • Downloading Centralized Data Model

    • Extending Data Model with Custom Profile

    • Uploading New DataModel back to the Cockpit.



  3. Device Onboarding

    • Creating Physical Node

    • Download Certificates of Physical Node



  4. Send Data from MQTT Device Simulator (PAHO Client)

    • Configure PAHO Client with Device Certificates for Secure Communication

      • ssl://<HOST_NAME>:8883

      • Give password for Trust Store



    • Connecting to MQTT Gateway Cloud ("Make sure to connect to SAP_Internet")

    • Creating Logical Nodes (E.g. Sensors) Under the Physical Node.

      • Topic: measures/<MAC_ADDRESS>

      • E.g. {"measureIds":[1,2], "values":["75","30"], "profileId":XXX,"logNodeAddr":2 }



    • Sending MQTT Message Data via MQTT Body



  5. Consume & View the Data



Demo


 



 




IoT Gateway Cloud Services REST Protocol:

  1. Creating Device Data Model - Update with Custom Profile. Upload the Updated DataModel back to Service Cockpit.

  2. Device Onboarding

    • Creating Physical Node (Type: Endpoint)

    • Download Certificate of the Physical Device

    • Generate .p12 Certificates from client.ks. Run this command from certificate folder -

      • keytool -importkeystore -srckeystore client.ks -destkeystore client.p12 -deststoretype pkcs12



    • Refer the password file. Keep the Password same for all three times. .p12 file generated successfully.



  3. Enable SSL Certificate on Windows(Chrome Browser). Chrome -> Settings -> Manager Certificates. Import new .p12 file.

  4. Sending Data from POSTMAN using Secure Certificate.

    • Need to Close all chrome.exe instances. Use this command -

      • TASKKILL /IM chrome.exe /F



    • This will close all the chrome browser instances including POSTMAN(if open). You can optionally re-install the POSTMAN client following the Prerequisite video.



  5. Open POSTMAN and execute the POST call using this syntax -


  6. Consume & View the Data



Demo




 

NOTE:

  • The availability of IoT Service Cockpit instance is currently limited to Customers.

  • This blog serves as a reference for quickly starting-off your IoT Journey with SAP Cloud Platform Internet of Things.


Get your hands dirty with the IoT Service and then further exploring SAP Leonardo IoT. Feel free to ask questions and provide feedback to improve the blog contents.

 



 











Last Modified 23rd Jul, 2017
Document Version 1.0

 
14 Comments