In this article, I describe how you can build an SAPUI5 (HTML5) app with SAP Web IDE to display your weather data from your weather station connected to the SAP Cloud. This article is based on my last article (Create your own Weather Station with SAP Cloud Platform Internet of Things). To have maximum fun, you should already have a weather station built and connected it to the SAP Cloud Platform Internet of Things in the Neo environment.

 

 

It is a good example to familiarize yourself with SAP Cloud.

This article is based in part on the Starter Kit for the SAP Cloud Platform Internet of Things.

 

Requirements

You need: SAP Cloud Platform Internet of Things and your weather station.

 

Create Destinations

Open the SAP Cloud Platform Cockpit in a browser and go to Connectivity > Destinations.

Choose New Destination and create two new destination.

iotmms

Is required to load the messages.

  • Name: iotmms
  • Type: HTTP
  • Description: IoT MMS API
  • URL: https://iotmms<YOUR-ACCOUNT>trial.hanatrial.ondemand.com/com.sap.iotservices.mms
  • Proxy Type: Internet
  • Authentication: BasicAuthentication
    • Enter your SAP Cloud Platform User and Password
    • User: <YOUR-ACCOUNT>
    • Password: <YOUR-PASSWORD>

iotrdms

Is required to load the device information.

  • Name: iotrdms
  • Type: HTTP
  • Description: IoT RDMS API
  • URL: https://iotrdmsiotservices-<YOUR-ACCOUNT>trial.hanatrial.ondemand.com/com.sap.iotservices.dms
  • Proxy Type: Internet
  • Authentication: BasicAuthentication
    • Enter your SAP Cloud Platform User and Password
    • User: <YOUR-ACCOUNT>
    • Password: <YOUR-PASSWORD>

 

Check the destinations. URL, User and Password must be correct. Note that Check Connection validates only the URL.

Import the Application in SAP Web IDE

Open the SAP Cloud Platform Cockpit, go to Services and click on the tile SAP Web IDE. If you have never used the Web IDE before, you may need to enable it first. Click Go to Service.

In the Web IDE click File > Git > Clone Repository.

 

Enter URL https://github.com/Cyclenerd/iot-consumption.git and click Clone.

 

Please ignore Git system files and click Do it later.

 

The application is now available in your workspace.

 

Deploy the Application to SAP Cloud Platform

If you want to run the application directly from the SAP Cloud Platform Cockpit, you need to deploy it into your SAP Cloud Platform account.

Right click your project folder in SAP Web IDE and choose Deploy > Deploy to SAP Cloud Platform. Follow the instructions of the wizard. Ignore the step for registering the application in the Fiori Launchpad.

 

After the deployment you find the application in the SAP Cloud Platform Cockpit under Applications > HTML5 Applications.

 

Open Application

The callable URL can be found in the SAP Cloud Platform Cockpit under Applications > HTML5 Applications > iotconsumption.

Click on the URL. Finished šŸ™‚ Have fun with your new SAPUI5 application.

 

Pull Request Welcome šŸ‘

Improvements to the UI5 app are welcome. Just send me a pull request: https://github.com/Cyclenerd/iot-consumption

 

I hope you enjoy discovering SAP Cloud.

New NetWeaver Information at SAP.com

Very Helpfull

User Rating: Be the first one !