0% found this document useful (0 votes)
98 views

Blog - Enerserve.eu SmartPi API

The SmartPi API allows accessing real-time and historical energy data from the SmartPi device via a RESTful interface. Current, voltage, power, frequency and other values can be retrieved for individual phases or all phases together by calling the API and specifying the phase and value types. Historical data spanning custom date ranges can also be obtained from the API for metrics like power, current and energy over time.

Uploaded by

vecoreda
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
98 views

Blog - Enerserve.eu SmartPi API

The SmartPi API allows accessing real-time and historical energy data from the SmartPi device via a RESTful interface. Current, voltage, power, frequency and other values can be retrieved for individual phases or all phases together by calling the API and specifying the phase and value types. Historical data spanning custom date ranges can also be obtained from the API for metrics like power, current and energy over time.

Uploaded by

vecoreda
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

SmartPi API

blog.enerserve.eu/2016/09/29/smartpi-api/

admin 29. September 2016

With the integrated RESTful-service it is possible to connect the SmartPi and read out all
relevant values. The webinterface of the SmartPi uses also the REST-API.

Actual Values:
For example type http://<ipaddress:1080>/api/all/all/now in your webbrowser to
get all actual values.

The structure of the URL looks like: http://<ipaddress>:


<port>/api/<phaseid>/<valueid>/now

Allowed parameters for valueid:

current Current [A] (available for phase 1,2,3, neutral conductor)

voltage Voltage [V] (available for phase 1,2,3)

power Power [W] (available for phase 1,2,3)

cosphi cos φ (available for phase 1,2,3 – it is important to measure the voltage)

frequency Frequency [Hz] (available for phase 1,2,3)

all Get all Values

Allowed parameters for phaseid:

1 Phase 1

2 Phase 2

3 Phase 3

4 only for use with valueid current (current of neutral conductor)

all All phases

Historical and chart data:


The REST-API can also serve historical data.
For example http://<ipaddress:1080>/api/chart/123/power/from/2016-09-
29T00:00:00.000Z/to/2016-09-29T14:00:00.000Z gives you all measured values of
power

from September 29,2016 between 0.00 a.m and 2.00 p.m.

The structure of the URL looks like: http://<ipaddress>:


<port>/api/chart/<phaseid>/<valueid>

Allowed parameters for valueid:

1/2
current Current [A] (available for phase 1,2,3, neutral conductor)

voltage Voltage [V] (available for phase 1,2,3)

power Power [W] (available for phase 1,2,3)

cosphi cos φ (available for phase 1,2,3 – it is important to measure the voltage)

energy_pos Energy [Wh] (energy consumption)

energy_neg Energy [Wh] (energy production)

Allowed parameters for phaseid:

1 Phase 1

2 Phase 2

3 Phase 3

4 only for use with valueid current (current of neutral conductor)

123 All phases

2/2

You might also like