Table of Contents

Gateway Local API

Leah Updated by Leah

The Gateway Local API is used by third-party system to read the data from all the Modbus or MBus meters configured and connected to the Climkit Gateway.

The requests must be made locally on the same network (LAN).

API End Point: http://<IP-ADDRESS-OF-THE-GATEWAY:8080/api/v1 (ex: http://192.168.2.10:8080/api/v1)

1. Electricity meter instantaneous values

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. Meter register values

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'],
}

How Did We Do?

Climkit API

Contact