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.
iotrdms
Is required to load the device information.
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.