Skip to Content
Author's profile photo Jörn Mangels

Electricity-Fiori-App for home

Motivation:

Previous assumption: Fiori or SAPUI5 is (exclusively) used for user interfaces to SAP backend systems! (Display / Edit SAP Data)

New assumption: Fiori (UI5) can also be used outside the SAP context to connect non-SAP systems. Example here: At home in a private environment.

Fiori (UI5) – APP: Electricity Data Overview

Make consumption and feed-in data evaluable

Requirements for this: Collect data for consumption and feed-in by photovoltaics into mysql-tables with raspberry-pi.

So, for my example I need tables for today, week, month and years.

These tables in mysql on raspberry pi need an excellent easy to use user interface: Fiori

 

We do not have an SAP Gateway server in the private environment, which provides us ODATA services.

But we also want to use a standard way to receive the data. We use the JSONModel.

So we need something for reading mysql-tables that is compatiple with JSONModel in SAPUI5.

So we can reach this goal with php.

What is PHP? OpenSource scripting language especially for web development, can be well embedded in HTML.

PHP has a good integration with mysql.

That we need a source in the LAN which returns the stream data in JSON format when we call it up.

Example for reading mysql and providing jsondata:

PHP:

Json result of this php:

So we have to call up these php-connectors to build a model in ui5-App:

oModel.loadData("http://192.168.2.140/STROM/get_data_json.php", oPara, true, "POST");

Now it is fun to create nice user-interfaces to show the data:

Main-App:

Actual data overview:

Monitor: To display power on distance.

Period-report:

 

Here the app in action on a tablet to display current power on roof.

 

Green value is high so the sun is shining…

Have fun…

Jörn

Assigned Tags

      6 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Michael Koch
      Michael Koch

      Excellent stuff. I always love it when Fiori and UI5 is "brought home" for any non-SAP purpose!

       

      Well done and keep the blog posts coming.

       

      M

      Author's profile photo Jörn Mangels
      Jörn Mangels
      Blog Post Author

      Thx, yes this was the main motivation for me...

      Author's profile photo Mark Teichmann
      Mark Teichmann

      Great blog post and nice use case!

       I would like to add a detail regarding UI5:

      If no SAP component is involved you are free to use OpenUI5. If you already use a licenced SAP product anywhere in your application then you also may use SAPUI5 which is not free to use in general.

       

      Cheers,

      Mark

      Author's profile photo Nabheet Madan
      Nabheet Madan

      So cool..thanks for sharing this inspired me to develop something which i have been for so long. will share the experience.

      Thanks

      Nabheet

       

      Author's profile photo Jörn Mangels
      Jörn Mangels
      Blog Post Author

      Thank you I am looking forward to your project. You are welcome to contact me for exchange etc

      Author's profile photo Carmine D'Agostino
      Carmine D'Agostino

      Many thanks ! Good Stuff 🙂