Inhaltsübersicht

Lokale API des Gateways

Die lokale API des Gateways wird von einem System eines Drittanbieters verwendet, um Daten von allen Modbus- oder MBus-Zählern zu lesen, die konfiguriert und mit dem Climkit-Gateway verbunden sind.

Die Abfragen müssen lokal im selben Netzwerk (LAN) erfolgen.

Endpunkt der API : http://<IP-ADDRESS-OF-THE-GATEWAY:8080/api/v1 (Beispiel: http://192.168.2.10:8080/api/v1)

1. Momentanwerte des Stromzählers

URL : /meter/<prim_ad>/

Method : GET

Auth required : No

Parameters (URL)
----------
prim_ad: int
The bus address of the electricity meter

Returns
-------
A dictionnary structured as

{
'L1_a': last_reading['L1_a'],
'L2_a': last_reading['L2_a'],
'L3_a': last_reading['L3_a'],
'total_W': last_reading['total_W'],
'ts': last_reading['ts'],
'valid': last_reading['connect'],
}

where last_reading is the last record of the meter reading (The frequency depends on the meter configuration, either 1 second or 15 minutes)

2. Werte der Zählerregister

URL : /meter/<meter_type>/<meter_ad>/

Method : GET

Auth required : No

Parameters (URL)
----------
meter_type: str
The meter type in ['electricity', 'hot_water', 'cold_water', 'heating']
meter_ad: int
The bus address of the meter

Returns
-------
A dictionnary structured as
{
'L1_a': last_reading['L1_a'],
'L2_a': last_reading['L2_a'],
'L3_a': last_reading['L3_a'],
'total_W': last_reading['total_W'],
'ts': last_reading['ts'],
'valid': last_reading['connect']
}

where last_reading is the last record of the meter reading (The frequency depends on the meter type and configuration, either 1 second or 15 minutes).

The mapping meter-type -> registers is as follows:
{
'electricity': ['en_im', 'en_ex', 'L1_a', 'L2_a', 'L3_a', 'total_W'],
'hot_water': ['vol_m3'],
'cold_water': ['vol_m3'],
'heating': ['heat_energy_kwh', 'power_kw', 'diff_temp', 'flow_temp', 'vol_flow_m3_h'],
}

Wie haben wir abgeschnitten?

Climkit-API

Kontakt