PS: App live demo at the end of the blog.
The inspiration for this blog actually came from a community mentor call on SAP Cloud platform IOT conducted by Kumud Singh. In the call Kumud Singh walked us through the steps which needs to be done to configure IoT to receive data from sensors. The data being sent was sent via Postman like tool in SAP Cloud platform. That actually triggered my curiosity to see how does actual data from sensors to SAPCP will work?
The first huddle for me was to find sensors, where can I get them. The easiest way out for me was to use our phones which also have different types of sensors. How can we use it? The next step was obviously to google if anyone has already done it or not? Found this wonderful blog by Former Member where he was able to successfully integrate iPhone sensor data to SAPCP, it actually pointed me in the right direction.
I thought of using the same concept but with an Android phone. We will have an android app so that most of the people can use it, which will send GPS sensor to SAP IOT.
- Found this detailed SAP Cloud Platform IOT Configuration guide and created message structure as shown below with two fields latitude and longitude which will be sent by the android app.
- I have been getting my hands dirty on a hybrid mobile framework Ionic based on Angular for around 2 years or so, thought it to be easiest and fastest solution. If anyone has worked on ionic than he/she must have referred to Josh Moronoy blogs for help and guidance. We made simple GPS coordinate sending hybrid app using this blog but with below mentioned additions as can also be seen in screen shot.
- Endpoint SAP Cloud Platform URL field
- Message id field
- Authentication token field
These fields have been added to make the application available for general use. Once you enter the fields and click start GPS tracking the sensor data is sent to the platform. It keeps doing it in background also so make sure to stop it else your database will get filled. I will be uploading the app on google store soon, so that all of you can use it.
Technology Stack Used
- Ionic/Angular different modules such as Localstorage to save the input data, HTTP for communication with cloud etc. for Hybrid Android App development
- SAP Cloud platform for IOT for receiving and exposing the GPS data
- IoT Analsis app used to check live data
Final Demo Video.
Guys my first video so please bear with the background noise. This i have recorded while walking with my little one. It highlights live streaming of GPS data to SAP IoT.
Always once I blog I don’t know I have this habit of writing what next can be expected, more on similar terms like show must go on
- Upload Ionic hybrid app to google playstore after the cosmetic changes
- SAPUI5 App which consume this data and plot the path taken
- IoT Push data to the device somehow
- SAP Cloud API management to use this data expose it to another Ionic App for display
- SAP FIORI for IOS to display to this data shared by Ionic app
- Ionic app for approval of PO using SAP Cloud platform storage and Workflow services
To be honest with SAP Cloud platform coming into existence the number of possibilities have become infinite, it actually triggers the real concept of everything connected device, people, machines on and on.
Feel free to provide your feedback, open to all ears.