Doorgaan naar artikel

Developers - Hoe werkt de API?

Let op! - Als Enelogic geven we geen support voor het opzetten van de API koppeling. Kom je er niet uit? Schakel dan een lokaal web development bureau in.

Vraag

Ik zou mijn energiedata graag geautomatiseerd willen ophalen door middel van jullie API om mijn database te vullen, hoe werkt dit precies?

Antwoord
Alle informatie over onze API is te vinden via http://docs.enelogic.apiary.io.

Zie ook ons blogbericht hierover: https://enelogic.com/nl/blog/slimme-meter-data-exporteren.

Keywords / Gelijkwaardige vragen
For your question, when you do a GET request on '/api/measuringpoints/', you get a list of 'measuring points' each measuring point in our internal system represents a device which can measure one type of consumption (electricity, gas, and more) which can be identified by the 'unityType' property.
In this case unitType 0 means electricity, 1 is gas. 

About the datapoints, this is a little bit more difficult. As you've seen we return 4 fields (id, quantity, rate and date(time)).
The most important property in here is the rate, which is a slightly customized version of the OBIS coding system. The OBIS codes represent a type of quantity.
For electricity and gas usage it isn't difficult yet, however if your planning to use one of our future datapoint collections like co2 it will be a little more difficult.

Electricity can have the following OBIS codes (http://www.promotic.eu/en/pmdoc/Subsystems/Comm/PmDrivers/IEC62056_OBIS.htm):

Datapoints
In case of normal smart meter or Youless meter:
180 = total consumption (low tariff + normal tariff)
280 = total returned energy (e.g. solar panels)

In case of a Enelogic-P1 live meter
181 = total consumption (low tariff)
182 = total consumption (normal tariff)
281 = total returned energy (low tariff)
282 = total returned energy (normal tariff)

Datapoint days/months
In case of a Youless meter we only return 180 or 280, since the YouLess doesn't store the different tariffs.

Enelogic-P1 live meter or regular smart meter:
181 = total consumption (low tariff)
182 = total consumption (normal tariff)
281 = total returned energy (low tariff)
282 = total returned energy (normal tariff)

Since gas is only a single tariff it only reports in 180.

Feedback en Kennisbank