Skip to Content

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

To report this post you need to login first.

6 Comments

You must be Logged on to comment or reply to a post.

  1. 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

    (0) 
  2. 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

    (0) 
  3. 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

     

    (0) 

Leave a Reply