Read historical data from Panoramic Power into SkySpark/Ankalytik

Integrations

Panoramic Power

Setup

Run

Execute

SETUP

1) Install / copy pod into Skyspark.

  • bassgCommon.pod

  • bassgPanaromicPowerExt.pod

  • proxyServer.pod

2) Enable bassgCommon.pod and bassgPanaromicPowerExt.pod from project’s settings.

RUN

1) Copy the config.trio fie in /skyspark/config.trio path.

2) This file contains the Skyspark instance configuration, update your Skyspark instance details in it.

Note: Please add original username and password and do not change isEncrypted=false.

3) After running proxyServer for the very first time isEncrypted will be changed to true and password will get encrypted. So if you are changing password make sure you change isEncrypted to false again.

port=9099

skysparkHost=localhost

skysparkPort= 9094

username=su

password=su

skysparkProject=demo

isEncrypted=false

4) Now run the proxyServer from CMD using below command.

$fan proxyServer::Server

5) This will read the config.trio file and start the http server on configured port.

EXECUTE

Now panaromicPower server is running inside Skyspark and proxyServer is running individually, we will provide proxyServer host and port to panaromic box which will call the API with required details to create the data in Skyspark.

For now, we have implemented two API’s one to create sites and equips and second to create points and store history data on those points.

Now to test the APIs we will be using postman or any other similar tool to call the APIs. In production this can be done in any other way as well.

We have to make sure that site and equip create API gets called first so that when we receive a call for a second API site and equip will already present in the database under which we will create points and save the history data.

1) First call the API for the sites with below details.

  • Method: POST

  • URL: http://localhost:9099

  • Request Body

2) Now call the below API to save point’s history values.

  • Method: POST

  • URL: http://localhost:9099

  • Request Body

3) To verify if APIs are working properly or not, check below steps.

Before:

This image shows builder view before calling firs API which will create site and equip. Every record which get created using this extension will have panaromicPowerGenerated Marker tag, so below query can also be used to check the data created.

Above image shows there are no site generated using this extension before calling the API.

Second API call will create point and his records, so below query can be used to check the records created.

For now, it shows no point exist.

After:

After calling first API as we passed two sites in the request body it created two new sites and many different equip under it.

Same can be verified using query in Tools apps.

After calling second API points and his records were also got saved and below query can be used to check the generated records.