Skip to content

Protocol Documentation¤

Table of Contents¤

Top

frequenz/api/common/components.proto¤

BatteryType¤

Enumerated battery types.

Name Number Description
BATTERY_TYPE_UNSPECIFIED 0 Unspecified.
BATTERY_TYPE_LI_ION 1 Li-ion batteries.
BATTERY_TYPE_NA_ION 2 Sodium-ion batteries

ComponentCategory¤

Enumrated component categories.

Name Number Description
COMPONENT_CATEGORY_UNSPECIFIED 0 An unknown component categories, useful for error handling, and marking unknown components in a list of components with otherwise known categories.
COMPONENT_CATEGORY_GRID 1 The point where the local microgrid is connected to the grid.
COMPONENT_CATEGORY_METER 2 A meter, for measuring electrical metrics, e.g., current, voltage, etc.
COMPONENT_CATEGORY_INVERTER 3 An electricity generator, with batteries or solar energy.
COMPONENT_CATEGORY_CONVERTER 4 A DC-DC converter.
COMPONENT_CATEGORY_BATTERY 5 A storage system for electrical energy, used by inverters.
COMPONENT_CATEGORY_EV_CHARGER 6 A station for charging electrical vehicles.
COMPONENT_CATEGORY_SENSOR 7 A sensor for measuring ambient metrics, e.g., temperature, humidity, etc.
COMPONENT_CATEGORY_CRYPTO_MINER 8 A crypto miner.
COMPONENT_CATEGORY_ELECTROLYZER 9 An electrolyzer for converting water into hydrogen and oxygen.
COMPONENT_CATEGORY_CHP 10 A heat and power combustion plant (CHP stands for combined heat and power).
COMPONENT_CATEGORY_RELAY 11 A relay. Relays generally have two states: open (connected) and closed (disconnected). They are generally placed in front of a component, e.g., an inverter, to control whether the component is connected to the grid or not.
COMPONENT_CATEGORY_PRECHARGE_MODULE 12 A precharge module. Precharging involves gradually ramping up the DC voltage to prevent any potential damage to sensitive electrical components like capacitors. While many inverters and batteries come equipped with in-built precharging mechanisms, some may lack this feature. In such cases, we need to use external precharging modules.

EvChargerType¤

Enumerated EV charger types.

Name Number Description
EV_CHARGER_TYPE_UNSPECIFIED 0 Default type.
EV_CHARGER_TYPE_AC 1 The EV charging station supports AC charging only.
EV_CHARGER_TYPE_DC 2 The EV charging station supports DC charging only.
EV_CHARGER_TYPE_HYBRID 3 The EV charging station supports both AC and DC.

InverterType¤

Enumerated inverter types.

Name Number Description
INVERTER_TYPE_UNSPECIFIED 0 Unspecified.
INVERTER_TYPE_BATTERY 1 Battery inverter.
INVERTER_TYPE_SOLAR 2 Solar inverter.
INVERTER_TYPE_HYBRID 3 Hybrid inverter.

SensorType¤

Enumerated sensor types.

Name Number Description
SENSOR_TYPE_UNSPECIFIED 0 Unspecified
SENSOR_TYPE_THERMOMETER 1 Thermometer (temperature sensor)
SENSOR_TYPE_HYGROMETER 2 Hygrometer (humidity sensor)
SENSOR_TYPE_BAROMETER 3 Barometer (pressure sensor).
SENSOR_TYPE_PYRANOMETER 4 Pyranometer (solar irradiance sensor).
SENSOR_TYPE_ANEMOMETER 5 Anemometer (wind velocity and direction sensor).
SENSOR_TYPE_ACCELEROMETER 6 Accelerometers (acceleration sensor).
SENSOR_TYPE_GENERAL 7 General sensors, which do not fall in any of the above categories

Scalar Value Types¤

.proto Type Notes C++ Java Python Go C# PHP Ruby
double double double float float64 double float Float
float float float float float32 float float Float
int32 Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. int32 int int int32 int integer Bignum or Fixnum (as required)
int64 Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. int64 long int/long int64 long integer/string Bignum
uint32 Uses variable-length encoding. uint32 int int/long uint32 uint integer Bignum or Fixnum (as required)
uint64 Uses variable-length encoding. uint64 long int/long uint64 ulong integer/string Bignum or Fixnum (as required)
sint32 Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. int32 int int int32 int integer Bignum or Fixnum (as required)
sint64 Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. int64 long int/long int64 long integer/string Bignum
fixed32 Always four bytes. More efficient than uint32 if values are often greater than 2^28. uint32 int int uint32 uint integer Bignum or Fixnum (as required)
fixed64 Always eight bytes. More efficient than uint64 if values are often greater than 2^56. uint64 long int/long uint64 ulong integer/string Bignum
sfixed32 Always four bytes. int32 int int int32 int integer Bignum or Fixnum (as required)
sfixed64 Always eight bytes. int64 long int/long int64 long integer/string Bignum
bool bool boolean boolean bool bool boolean TrueClass/FalseClass
string A string must always contain UTF-8 encoded or 7-bit ASCII text. string String str/unicode string string string String (UTF-8)
bytes May contain any arbitrary sequence of bytes. string ByteString str []byte ByteString string String (ASCII-8BIT)