Kategorie-Archiv: API

SmartPi API

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:

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