Electricity Meters
WARP Charger and Energy Manager support multiple electricity meters.
The electricity meter API is divided into a general part under meters/...
and a meter-specific part under meters/X/... where X corresponds to a meter number.
The meter-specific part always includes
For example, the measurement values of the first electricity meter (which has meter number 0) can be read under meters/0/values.
Additionally, each meter has the APIs
whose content depends on the class of the electricity meter.
The electricity meter class is specified as the union tag of meters/X/config.
Each electricity meter reports its measurement values under meters/X/values as an array of floats.
Which measurement value should be interpreted in which way can be read from meters/X/value_ids (an array of ints, the so-called MeterValueIDs):
For example, if MeterValueID 13 is read at index 3 in meters/X/value_ids, then the meters/X/values value at index 3 should be interpreted as the phase current on L1.
All MeterValueIDs are documented on Github: List of all MeterValueIDs
meters/X/values
The measurement values of the X. electricity meter. The meaning of the measurement values can be determined from meters/X/value_ids.
[
// Index 0
217.6941223, 0, 0,
30.72553635, 0, 0,
6680.515625, 0, 0,
6681.138672, 0, 0,
// Index 12
-90.09844208, 0, 0,
1, 0, 0,
72.56191254, 10.24184513, 30.72553635,
6683.693359, 6680.666016, -90.09844208,
// Index 24
1, 50, 4644.044922,
3.992000103, 0, 0,
0, 0, 30.70857239,
4648.038086, 197.5639954, 4648.038086,
// Index 36
4644.044922, 3.992000103
]
meters/X/update
Updates the measurement values of the X. electricity meter. Can only be used with an API electricity meter (union tag 4 in the corresponding meters/X/config).
# $HOST e.g. warp-AbCd
Write
curl http://$HOST/meters/1/update -d '[
15.9, 16, 16.1,
3657, 3680, 3703
]'
Beispiel für einen Zähler, der pro Phase Strom (Bezug + Einspeisung) und Wirkleistung (Bezug - Einspeisung) misst.
Die korrekte Konfiguration (meters/X/config) für diesen Zähler wäre
[4, { "display_name": "API-Zähler", "value_ids": [13, 17, 21, 39, 48, 57] }]
# $BROKER e.g. my_mosquitto.localdomain
# $PREFIX e.g. warp/AbCd
Write
mosquitto_pub -h $BROKER -t $PREFIX/meters/1/update -m '[
15.9, 16, 16.1,
3657, 3680, 3703
]'
Beispiel für einen Zähler, der pro Phase Strom (Bezug + Einspeisung) und Wirkleistung (Bezug - Einspeisung) misst.
Die korrekte Konfiguration (meters/X/config) für diesen Zähler wäre
[4, { "display_name": "API-Zähler", "value_ids": [13, 17, 21, 39, 48, 57] }]
meters/X/value_ids
The MeterValueIDs of the X. electricity meter. The n-th entry in this array indicates the meaning of the n-th measurement value from meters/X/values. List of all MeterValueIDs
[
// Index 0
1, 2, 3, // Voltage L1-N, L2-N, L3-N
13, 17, 21, // Current (import + export) L1-N, L2-N, L3-N
39, 48, 57, // Active power (import - export) L1-N, L2-N, L3-N
122, 130, 138, // Apparent power (import + export) L1-N, L2-N, L3-N
// Index 12
83, 91, 99, // Reactive power (inductive - capacitive) L1-N, L2-N, L3-N
353, 354, 355, // Power factor (signed; sign indicates direction of current flow) L1, L2, L3
7, // Average phase voltage
29, // Average of (import + export) phase currents
33, // Sum of (import + export) phase currents
74, // Sum of (import - export) phase active powers
154, // Sum of (import + export) phase apparent powers
115, // Sum of (inductive - capacitive) phase reactive powers
// Index 24
356, // Sum of signed power factors
364, // Grid frequency
209, 211, // Active energy (Σ L1, L2, L3, since manufacture) import, export
4, 5, 6, 8, // Voltage L1-L2; L2-L3; L3-L1; ⌀ L1-L2, L2-L3, L3-L1
25, // Neutral conductor current
213, // Active energy (Σ L1, L2, L3, since manufacture) import + export
277, // Reactive energy (Σ L1, L2, L3, since manufacture) inductive + capacitive
214, // Active energy (Σ L1, L2, L3, since last reset) import + export
// Index 36
210, // Active energy (Σ L1, L2, L3, since last reset) import
212 // Active energy (Σ L1, L2, L3, since last reset) export
]
meters/X/history
A 48-hour history of the charging power of the X. electricity meter in watts. Missing values are indicated by null. The history is filled from back to front, so null values only occur consecutively at the beginning of the array if the ESP was restarted within the last 48 hours. Up to 720 values are output, which corresponds to one measurement value every 4 minutes. These measurement values are the respective average of these 4 minutes.
# $HOST e.g. warp-AbCd
curl http://$HOST/meters/1/history
{
"offset": 60927,
"samples": [
null, null, null, null, null, null, null, null,
// 600 weitere null-Werte entfernt
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 1736, 6656, 6655, 6666,
6680, 6716, 6714, 6625, 6640, 6641, 6595, 6612,
6592, 6593, 6589, 6592, 6600, 6625, 6626, 6637,
6665, 6636, 6632, 6656, 6616, 6611, 6646, 6670,
6691, 6715, 6787, 6754, 6761, 6797, 6771, 6685,
6705, 6778, 6703, 6675, 6681, 6721, 6739, 6816,
6872, 6858, 6821, 6836, 6784, 6871, 6943, 6930,
6968, 6955, 6837, 6800, 6846, 6919, 6881, 6736,
6671, 6655, 6674, 6743, 6878, 5733, 4462, 3712,
3098, 2693, 2337, 2098, 1683, 1575, 1575, 84,
0, 0, 0, 0, 0, 0, 0, 0
]
}
Only supported by the HTTP API
| Name | Description |
|---|---|
offsetint (ms) | The age of the last measured value. |
samplesint[..] | The measured values. |
meters/X/live
The last charging power measurement values of the X. electricity meter. Based on these values, the average values for meters/X/history are generated.
# $HOST e.g. warp-AbCd
curl http://$HOST/meters/1/live
{
"offset": 370,
"samples_per_second": 1.99565,
"samples": [
2626, 2626, 2626, 2626, 2626, 2626, 2626, 2673,
2673, 2673, 2673, 2673, 2673, 2673, 2673, 2677,
2677, 2677, 2677, 2677, 2677, 2677, 2677, 2677,
2677, 2677, 2677, 2677, 2677, 2677, 2677, 988,
988, 988, 988, 988, 988, 988, 988, 3,
3, 3, 3, 3, 3, 3, 3, 1,
1, 1, 1, 1, 1, 1, 1, 3,
3, 3, 3, 3, 3, 3, 3, 3,
3, 3, 3, 3, 3, 3, 3, 3,
3, 3, 3, 3, 3, 3, 3, 4
]
}
Es liegen 80 Werte vor, ~ 2 Werte pro Sekunde wurden erhoben, das Offset des letzten Werts sind 370 ms -> Die Messwerte reichen im Moment 40,370 Sekunden in die Vergangenheit.
Only supported by the HTTP API
| Name | Description |
|---|---|
offsetint (ms) | The age of the last measured value. |
samples_per_secondfloat (Hz) | The number of measured values per second. |
samplesint[..] | The measured values. Depending on the length of the array and the samples_per_second value, it can be determined how far back in time the measurement values reach. |
meters/X/config
The configuration of the X. electricity meter. The union tag specifies the meter class.
# $HOST e.g. warp-AbCd
Read
curl http://$HOST/meters/1/config
[4, { "display_name": "API-Zähler", "value_ids": [13, 17, 21, 39, 48, 57] }]
Konfiguriert für den Stromzähler-Slot 1 einen über meters/1/update mit Werten befüllbaren Stromzähler, der pro Phase Strom (Bezug + Einspeisung) und Wirkleistung (Bezug - Einspeisung) misst. 4 ist das Union-Tag des API-Stromzählers.
Write
curl http://$HOST/meters/1/config -d '[4, { "display_name": "API-Zähler", "value_ids": [13, 17, 21, 39, 48, 57] }]'
Konfiguriert für den Stromzähler-Slot 1 einen über meters/1/update mit Werten befüllbaren Stromzähler, der pro Phase Strom (Bezug + Einspeisung) und Wirkleistung (Bezug - Einspeisung) misst. 4 ist das Union-Tag des API-Stromzählers.
# $BROKER e.g. my_mosquitto.localdomain
# $PREFIX e.g. warp/AbCd
Read
mosquitto_sub -v -C 1 -h $BROKER -t $PREFIX/meters/1/config
[4, { "display_name": "API-Zähler", "value_ids": [13, 17, 21, 39, 48, 57] }]
Konfiguriert für den Stromzähler-Slot 1 einen über meters/1/update mit Werten befüllbaren Stromzähler, der pro Phase Strom (Bezug + Einspeisung) und Wirkleistung (Bezug - Einspeisung) misst. 4 ist das Union-Tag des API-Stromzählers.
Write
With MQTT on $PREFIX/meters/1/config_update
mosquitto_pub -h $BROKER -t $PREFIX/meters/1/config_update -m '[4, { "display_name": "API-Zähler", "value_ids": [13, 17, 21, 39, 48, 57] }]'
Konfiguriert für den Stromzähler-Slot 1 einen über meters/1/update mit Werten befüllbaren Stromzähler, der pro Phase Strom (Bezug + Einspeisung) und Wirkleistung (Bezug - Einspeisung) misst. 4 ist das Union-Tag des API-Stromzählers.
- 0 - No electricity meter configured.
- 1 - Internal electricity meter (on RS485 Bricklet)
- 4 - API electricity meter
- 5 - SunSpec device via Modbus TCP
- 6 - Modbus TCP electricity meter.
- 7 - SMA Speedwire electricity meter.
- 8 - RCT Power inverter
null: No electricity meter configured.
| Name | Description |
|---|---|
display_namestring | Display name of the electricity meter |
locationint | Measurement location
|
type_overrideint | Allows overriding the installed meter type if auto-detection does not work.
|
| Name | Description |
|---|---|
display_namestring | Display name of the electricity meter |
locationint | Measurement location
|
value_idsint[..] | MeterValueIDs that should be settable via the API meters/X/update. List of all MeterValueIDs |
| Name | Description |
|---|---|
display_namestring | Display name of the device |
locationint | Measurement location
|
hoststring | Hostname or IP address of the SunSpec device |
portint | Port of the SunSpec device. Typically 502 |
device_addressint | Modbus device address of the SunSpec device |
manufacturer_namestring | Name of the manufacturer of the SunSpec device. The combination of |
model_namestring | Name of the model of the SunSpec device. |
serial_numberstring | Serial number of the SunSpec device. |
model_idint | SunSpec model ID |
model_instanceint | Indicates how many SunSpec models with the same |
| Name | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
display_namestring | Display name of the electricity meter | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
locationint | Measurement location
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
hoststring | Hostname or IP address of the SunSpec device | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
portint | Port of the SunSpec device. Typically 502 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
tableUnion | Register table to be read.
null: No register table configured.
|
| Name | Description |
|---|---|
display_namestring | Display name of the electricity meter |
locationint | Measurement location
|
| Name | Description |
|---|---|
display_namestring | Display name of the inverter |
locationint | Measurement location
|
hoststring | Hostname or IP address of the inverter |
portint | Port of the inverter. Typically 8899 |
virtual_meterint | Virtual meter. Indicates which part of the register table is read.
|
meters/X/state
The state of the X. electricity meter. The content of this API depends on the type of electricity meter configured in meters/X/config.
null: No electricity meter configured.
| Name | Description |
|---|---|
typeint | Type of the installed electricity meter. Not every meter is supported by every device!
|
| Name | Description |
|---|---|
typeint | Type of the installed electricity meter. Not every meter is supported by every device!
|
| Name | Description |
|---|---|
typeint | Type of the installed electricity meter. Not every meter is supported by every device!
|
null: State of the API electricity meter. Currently empty.
null: State of the SunSpec electricity meter. Currently empty.
meters/X/errors
Error counters for communication with the electricity meter. The content of this API depends on the type of electricity meter configured in meters/X/config.
null: No electricity meter configured.
| Name | Description |
|---|---|
meterint | Communication errors between RS485 Bricklet and electricity meter. |
brickletint | Communication errors between ESP Brick and RS485 Bricklet. |
bricklet_resetint | Unexpected resets of the RS485 Bricklet. |
| Name | Description |
|---|---|
local_timeoutint | Local Timeout |
global_timeoutint | Global Timeout |
illegal_functionint | Illegal Function |
illegal_data_accessint | Illegal Data Access |
illegal_data_valueint | Illegal Data Value |
slave_device_failureint | Slave Device Failure |
| Name | Description |
|---|---|
local_timeoutint | Local Timeout |
global_timeoutint | Global Timeout |
illegal_functionint | Illegal Function |
illegal_data_accessint | Illegal Data Access |
illegal_data_valueint | Illegal Data Value |
slave_device_failureint | Slave Device Failure |
null: Error counters of the API electricity meter. Currently empty.
null: Error counters of the SunSpec electricity meter. Currently empty.
meters/X/reset
Resets all resettable (all values whose kind entry is resettable: List of all MeterValueIDs) meter values of the X. electricity meter.
Empty payload. One of the following values must be passed: null, "", false, 0, [] or {}
meters/X/last_reset
The time of the last meter reset (see meters/X/reset) as Unix timestamp. 0 if no reset was performed. If no time synchronization was available at the time of the last reset, this value is instead a counter indicating how many times a reset was performed.
| Name | Description |
|---|---|
last_resetint (s) | Unix timestamp of the time of the last meter reset. |
meters/history
A 48-hour history of charging power in watts. Missing values are indicated by null. The history is filled from back to front, so null values only occur consecutively at the beginning of the array if the ESP was restarted within the last 48 hours. Up to 720 values are output, which corresponds to one measurement value every 4 minutes. These measurement values are the respective average of these 4 minutes.
# $HOST e.g. warp-AbCd
curl http://$HOST/meters/history
{
"offset": 9378,
"samples": [
[
null, null, null, null, null, null, null, null,
// 600 weitere null-Werte entfernt
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 1736, 6656, 6655, 6666,
6680, 6716, 6714, 6625, 6640, 6641, 6595, 6612,
6592, 6593, 6589, 6592, 6600, 6625, 6626, 6637,
6665, 6636, 6632, 6656, 6616, 6611, 6646, 6670,
6691, 6715, 6787, 6754, 6761, 6797, 6771, 6685,
6705, 6778, 6703, 6675, 6681, 6721, 6739, 6816,
6872, 6858, 6821, 6836, 6784, 6871, 6943, 6930,
6968, 6955, 6837, 6800, 6846, 6919, 6881, 6736,
6671, 6655, 6674, 6743, 6878, 5733, 4462, 3712,
3098, 2693, 2337, 2098, 1683, 1575, 1575, 84,
0, 0, 0, 0, 0, 0, 0, 0
],
null,
null,
null,
null,
null,
null
]
}
Only supported by the HTTP API
| Name | Description |
|---|---|
offsetint (ms) | The age of the last measured value. |
samplesint[..][2] | The measured values of all electricity meters.
|
meters/live
The last charging power measurement values. Based on these values, the average values for meters/history are generated. Up to 720 values are output, which corresponds to 6 minutes with one measurement value every 500 milliseconds.
| Name | Description |
|---|---|
offsetint (ms) | The age of the last measured value. |
samples_per_secondfloat (Hz) | The number of measured values per second. |
samplesint[..][2] | The measured values of all electricity meters.
|
meters/X/values
The measurement values of the X. electricity meter. The meaning of the measurement values can be determined from meters/X/value_ids.
[
// Index 0
217.6941223, 0, 0,
30.72553635, 0, 0,
6680.515625, 0, 0,
6681.138672, 0, 0,
// Index 12
-90.09844208, 0, 0,
1, 0, 0,
72.56191254, 10.24184513, 30.72553635,
6683.693359, 6680.666016, -90.09844208,
// Index 24
1, 50, 4644.044922,
3.992000103, 0, 0,
0, 0, 30.70857239,
4648.038086, 197.5639954, 4648.038086,
// Index 36
4644.044922, 3.992000103
]
meters/X/update
Updates the measurement values of the X. electricity meter. Can only be used with an API electricity meter (union tag 4 in the corresponding meters/X/config).
# $HOST e.g. warp2-AbCd
Write
curl http://$HOST/meters/1/update -d '[
15.9, 16, 16.1,
3657, 3680, 3703
]'
Beispiel für einen Zähler, der pro Phase Strom (Bezug + Einspeisung) und Wirkleistung (Bezug - Einspeisung) misst.
Die korrekte Konfiguration (meters/X/config) für diesen Zähler wäre
[4, { "display_name": "API-Zähler", "value_ids": [13, 17, 21, 39, 48, 57] }]
# $BROKER e.g. my_mosquitto.localdomain
# $PREFIX e.g. warp2/AbCd
Write
mosquitto_pub -h $BROKER -t $PREFIX/meters/1/update -m '[
15.9, 16, 16.1,
3657, 3680, 3703
]'
Beispiel für einen Zähler, der pro Phase Strom (Bezug + Einspeisung) und Wirkleistung (Bezug - Einspeisung) misst.
Die korrekte Konfiguration (meters/X/config) für diesen Zähler wäre
[4, { "display_name": "API-Zähler", "value_ids": [13, 17, 21, 39, 48, 57] }]
meters/X/value_ids
The MeterValueIDs of the X. electricity meter. The n-th entry in this array indicates the meaning of the n-th measurement value from meters/X/values. List of all MeterValueIDs
[
// Index 0
1, 2, 3, // Voltage L1-N, L2-N, L3-N
13, 17, 21, // Current (import + export) L1-N, L2-N, L3-N
39, 48, 57, // Active power (import - export) L1-N, L2-N, L3-N
122, 130, 138, // Apparent power (import + export) L1-N, L2-N, L3-N
// Index 12
83, 91, 99, // Reactive power (inductive - capacitive) L1-N, L2-N, L3-N
353, 354, 355, // Power factor (signed; sign indicates direction of current flow) L1, L2, L3
7, // Average phase voltage
29, // Average of (import + export) phase currents
33, // Sum of (import + export) phase currents
74, // Sum of (import - export) phase active powers
154, // Sum of (import + export) phase apparent powers
115, // Sum of (inductive - capacitive) phase reactive powers
// Index 24
356, // Sum of signed power factors
364, // Grid frequency
209, 211, // Active energy (Σ L1, L2, L3, since manufacture) import, export
4, 5, 6, 8, // Voltage L1-L2; L2-L3; L3-L1; ⌀ L1-L2, L2-L3, L3-L1
25, // Neutral conductor current
213, // Active energy (Σ L1, L2, L3, since manufacture) import + export
277, // Reactive energy (Σ L1, L2, L3, since manufacture) inductive + capacitive
214, // Active energy (Σ L1, L2, L3, since last reset) import + export
// Index 36
210, // Active energy (Σ L1, L2, L3, since last reset) import
212 // Active energy (Σ L1, L2, L3, since last reset) export
]
meters/X/history
A 48-hour history of the charging power of the X. electricity meter in watts. Missing values are indicated by null. The history is filled from back to front, so null values only occur consecutively at the beginning of the array if the ESP was restarted within the last 48 hours. Up to 720 values are output, which corresponds to one measurement value every 4 minutes. These measurement values are the respective average of these 4 minutes.
# $HOST e.g. warp2-AbCd
curl http://$HOST/meters/1/history
{
"offset": 60927,
"samples": [
null, null, null, null, null, null, null, null,
// 600 weitere null-Werte entfernt
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 1736, 6656, 6655, 6666,
6680, 6716, 6714, 6625, 6640, 6641, 6595, 6612,
6592, 6593, 6589, 6592, 6600, 6625, 6626, 6637,
6665, 6636, 6632, 6656, 6616, 6611, 6646, 6670,
6691, 6715, 6787, 6754, 6761, 6797, 6771, 6685,
6705, 6778, 6703, 6675, 6681, 6721, 6739, 6816,
6872, 6858, 6821, 6836, 6784, 6871, 6943, 6930,
6968, 6955, 6837, 6800, 6846, 6919, 6881, 6736,
6671, 6655, 6674, 6743, 6878, 5733, 4462, 3712,
3098, 2693, 2337, 2098, 1683, 1575, 1575, 84,
0, 0, 0, 0, 0, 0, 0, 0
]
}
Only supported by the HTTP API
| Name | Description |
|---|---|
offsetint (ms) | The age of the last measured value. |
samplesint[..] | The measured values. |
meters/X/live
The last charging power measurement values of the X. electricity meter. Based on these values, the average values for meters/X/history are generated.
# $HOST e.g. warp2-AbCd
curl http://$HOST/meters/1/live
{
"offset": 370,
"samples_per_second": 1.99565,
"samples": [
2626, 2626, 2626, 2626, 2626, 2626, 2626, 2673,
2673, 2673, 2673, 2673, 2673, 2673, 2673, 2677,
2677, 2677, 2677, 2677, 2677, 2677, 2677, 2677,
2677, 2677, 2677, 2677, 2677, 2677, 2677, 988,
988, 988, 988, 988, 988, 988, 988, 3,
3, 3, 3, 3, 3, 3, 3, 1,
1, 1, 1, 1, 1, 1, 1, 3,
3, 3, 3, 3, 3, 3, 3, 3,
3, 3, 3, 3, 3, 3, 3, 3,
3, 3, 3, 3, 3, 3, 3, 4
]
}
Es liegen 80 Werte vor, ~ 2 Werte pro Sekunde wurden erhoben, das Offset des letzten Werts sind 370 ms -> Die Messwerte reichen im Moment 40,370 Sekunden in die Vergangenheit.
Only supported by the HTTP API
| Name | Description |
|---|---|
offsetint (ms) | The age of the last measured value. |
samples_per_secondfloat (Hz) | The number of measured values per second. |
samplesint[..] | The measured values. Depending on the length of the array and the samples_per_second value, it can be determined how far back in time the measurement values reach. |
meters/X/config
The configuration of the X. electricity meter. The union tag specifies the meter class.
# $HOST e.g. warp2-AbCd
Read
curl http://$HOST/meters/1/config
[4, { "display_name": "API-Zähler", "value_ids": [13, 17, 21, 39, 48, 57] }]
Konfiguriert für den Stromzähler-Slot 1 einen über meters/1/update mit Werten befüllbaren Stromzähler, der pro Phase Strom (Bezug + Einspeisung) und Wirkleistung (Bezug - Einspeisung) misst. 4 ist das Union-Tag des API-Stromzählers.
Write
curl http://$HOST/meters/1/config -d '[4, { "display_name": "API-Zähler", "value_ids": [13, 17, 21, 39, 48, 57] }]'
Konfiguriert für den Stromzähler-Slot 1 einen über meters/1/update mit Werten befüllbaren Stromzähler, der pro Phase Strom (Bezug + Einspeisung) und Wirkleistung (Bezug - Einspeisung) misst. 4 ist das Union-Tag des API-Stromzählers.
# $BROKER e.g. my_mosquitto.localdomain
# $PREFIX e.g. warp2/AbCd
Read
mosquitto_sub -v -C 1 -h $BROKER -t $PREFIX/meters/1/config
[4, { "display_name": "API-Zähler", "value_ids": [13, 17, 21, 39, 48, 57] }]
Konfiguriert für den Stromzähler-Slot 1 einen über meters/1/update mit Werten befüllbaren Stromzähler, der pro Phase Strom (Bezug + Einspeisung) und Wirkleistung (Bezug - Einspeisung) misst. 4 ist das Union-Tag des API-Stromzählers.
Write
With MQTT on $PREFIX/meters/1/config_update
mosquitto_pub -h $BROKER -t $PREFIX/meters/1/config_update -m '[4, { "display_name": "API-Zähler", "value_ids": [13, 17, 21, 39, 48, 57] }]'
Konfiguriert für den Stromzähler-Slot 1 einen über meters/1/update mit Werten befüllbaren Stromzähler, der pro Phase Strom (Bezug + Einspeisung) und Wirkleistung (Bezug - Einspeisung) misst. 4 ist das Union-Tag des API-Stromzählers.
- 0 - No electricity meter configured.
- 2 - Internal electricity meter (on EVSE 2.0 Bricklet)
- 4 - API electricity meter
- 5 - SunSpec device via Modbus TCP
- 6 - Modbus TCP electricity meter.
- 7 - SMA Speedwire electricity meter.
- 8 - RCT Power inverter
null: No electricity meter configured.
| Name | Description |
|---|---|
display_namestring | Display name of the electricity meter |
locationint | Measurement location
|
| Name | Description |
|---|---|
display_namestring | Display name of the electricity meter |
locationint | Measurement location
|
value_idsint[..] | MeterValueIDs that should be settable via the API meters/X/update. List of all MeterValueIDs |
| Name | Description |
|---|---|
display_namestring | Display name of the device |
locationint | Measurement location
|
hoststring | Hostname or IP address of the SunSpec device |
portint | Port of the SunSpec device. Typically 502 |
device_addressint | Modbus device address of the SunSpec device |
manufacturer_namestring | Name of the manufacturer of the SunSpec device. The combination of |
model_namestring | Name of the model of the SunSpec device. |
serial_numberstring | Serial number of the SunSpec device. |
model_idint | SunSpec model ID |
model_instanceint | Indicates how many SunSpec models with the same |
| Name | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
display_namestring | Display name of the electricity meter | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
locationint | Measurement location
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
hoststring | Hostname or IP address of the SunSpec device | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
portint | Port of the SunSpec device. Typically 502 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
tableUnion | Register table to be read.
null: No register table configured.
|
| Name | Description |
|---|---|
display_namestring | Display name of the electricity meter |
locationint | Measurement location
|
| Name | Description |
|---|---|
display_namestring | Display name of the inverter |
locationint | Measurement location
|
hoststring | Hostname or IP address of the inverter |
portint | Port of the inverter. Typically 8899 |
virtual_meterint | Virtual meter. Indicates which part of the register table is read.
|
meters/X/state
The state of the X. electricity meter. The content of this API depends on the type of electricity meter configured in meters/X/config.
null: No electricity meter configured.
| Name | Description |
|---|---|
typeint | Type of the installed electricity meter. Not every meter is supported by every device!
|
| Name | Description |
|---|---|
typeint | Type of the installed electricity meter. Not every meter is supported by every device!
|
| Name | Description |
|---|---|
typeint | Type of the installed electricity meter. Not every meter is supported by every device!
|
null: State of the API electricity meter. Currently empty.
null: State of the SunSpec electricity meter. Currently empty.
meters/X/errors
Error counters for communication with the electricity meter. The content of this API depends on the type of electricity meter configured in meters/X/config.
null: No electricity meter configured.
| Name | Description |
|---|---|
meterint | Communication errors between RS485 Bricklet and electricity meter. |
brickletint | Communication errors between ESP Brick and RS485 Bricklet. |
bricklet_resetint | Unexpected resets of the RS485 Bricklet. |
| Name | Description |
|---|---|
local_timeoutint | Local Timeout |
global_timeoutint | Global Timeout |
illegal_functionint | Illegal Function |
illegal_data_accessint | Illegal Data Access |
illegal_data_valueint | Illegal Data Value |
slave_device_failureint | Slave Device Failure |
| Name | Description |
|---|---|
local_timeoutint | Local Timeout |
global_timeoutint | Global Timeout |
illegal_functionint | Illegal Function |
illegal_data_accessint | Illegal Data Access |
illegal_data_valueint | Illegal Data Value |
slave_device_failureint | Slave Device Failure |
null: Error counters of the API electricity meter. Currently empty.
null: Error counters of the SunSpec electricity meter. Currently empty.
meters/X/reset
Resets all resettable (all values whose kind entry is resettable: List of all MeterValueIDs) meter values of the X. electricity meter.
Empty payload. One of the following values must be passed: null, "", false, 0, [] or {}
meters/X/last_reset
The time of the last meter reset (see meters/X/reset) as Unix timestamp. 0 if no reset was performed. If no time synchronization was available at the time of the last reset, this value is instead a counter indicating how many times a reset was performed.
| Name | Description |
|---|---|
last_resetint (s) | Unix timestamp of the time of the last meter reset. |
meters/history
A 48-hour history of charging power in watts. Missing values are indicated by null. The history is filled from back to front, so null values only occur consecutively at the beginning of the array if the ESP was restarted within the last 48 hours. Up to 720 values are output, which corresponds to one measurement value every 4 minutes. These measurement values are the respective average of these 4 minutes.
# $HOST e.g. warp2-AbCd
curl http://$HOST/meters/history
{
"offset": 9378,
"samples": [
[
null, null, null, null, null, null, null, null,
// 600 weitere null-Werte entfernt
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 1736, 6656, 6655, 6666,
6680, 6716, 6714, 6625, 6640, 6641, 6595, 6612,
6592, 6593, 6589, 6592, 6600, 6625, 6626, 6637,
6665, 6636, 6632, 6656, 6616, 6611, 6646, 6670,
6691, 6715, 6787, 6754, 6761, 6797, 6771, 6685,
6705, 6778, 6703, 6675, 6681, 6721, 6739, 6816,
6872, 6858, 6821, 6836, 6784, 6871, 6943, 6930,
6968, 6955, 6837, 6800, 6846, 6919, 6881, 6736,
6671, 6655, 6674, 6743, 6878, 5733, 4462, 3712,
3098, 2693, 2337, 2098, 1683, 1575, 1575, 84,
0, 0, 0, 0, 0, 0, 0, 0
],
null,
null,
null,
null,
null,
null
]
}
Only supported by the HTTP API
| Name | Description |
|---|---|
offsetint (ms) | The age of the last measured value. |
samplesint[..][5] | The measured values of all electricity meters.
|
meters/live
The last charging power measurement values. Based on these values, the average values for meters/history are generated. Up to 720 values are output, which corresponds to 6 minutes with one measurement value every 500 milliseconds.
| Name | Description |
|---|---|
offsetint (ms) | The age of the last measured value. |
samples_per_secondfloat (Hz) | The number of measured values per second. |
samplesint[..][5] | The measured values of all electricity meters.
|
meters/X/values
The measurement values of the X. electricity meter. The meaning of the measurement values can be determined from meters/X/value_ids.
[
// Index 0
217.6941223, 0, 0,
30.72553635, 0, 0,
6680.515625, 0, 0,
6681.138672, 0, 0,
// Index 12
-90.09844208, 0, 0,
1, 0, 0,
72.56191254, 10.24184513, 30.72553635,
6683.693359, 6680.666016, -90.09844208,
// Index 24
1, 50, 4644.044922,
3.992000103, 0, 0,
0, 0, 30.70857239,
4648.038086, 197.5639954, 4648.038086,
// Index 36
4644.044922, 3.992000103
]
meters/X/update
Updates the measurement values of the X. electricity meter. Can only be used with an API electricity meter (union tag 4 in the corresponding meters/X/config).
# $HOST e.g. warp3-AbCd
Write
curl http://$HOST/meters/1/update -d '[
15.9, 16, 16.1,
3657, 3680, 3703
]'
Beispiel für einen Zähler, der pro Phase Strom (Bezug + Einspeisung) und Wirkleistung (Bezug - Einspeisung) misst.
Die korrekte Konfiguration (meters/X/config) für diesen Zähler wäre
[4, { "display_name": "API-Zähler", "value_ids": [13, 17, 21, 39, 48, 57] }]
# $BROKER e.g. my_mosquitto.localdomain
# $PREFIX e.g. warp3/AbCd
Write
mosquitto_pub -h $BROKER -t $PREFIX/meters/1/update -m '[
15.9, 16, 16.1,
3657, 3680, 3703
]'
Beispiel für einen Zähler, der pro Phase Strom (Bezug + Einspeisung) und Wirkleistung (Bezug - Einspeisung) misst.
Die korrekte Konfiguration (meters/X/config) für diesen Zähler wäre
[4, { "display_name": "API-Zähler", "value_ids": [13, 17, 21, 39, 48, 57] }]
meters/X/value_ids
The MeterValueIDs of the X. electricity meter. The n-th entry in this array indicates the meaning of the n-th measurement value from meters/X/values. List of all MeterValueIDs
[
// Index 0
1, 2, 3, // Voltage L1-N, L2-N, L3-N
13, 17, 21, // Current (import + export) L1-N, L2-N, L3-N
39, 48, 57, // Active power (import - export) L1-N, L2-N, L3-N
122, 130, 138, // Apparent power (import + export) L1-N, L2-N, L3-N
// Index 12
83, 91, 99, // Reactive power (inductive - capacitive) L1-N, L2-N, L3-N
353, 354, 355, // Power factor (signed; sign indicates direction of current flow) L1, L2, L3
7, // Average phase voltage
29, // Average of (import + export) phase currents
33, // Sum of (import + export) phase currents
74, // Sum of (import - export) phase active powers
154, // Sum of (import + export) phase apparent powers
115, // Sum of (inductive - capacitive) phase reactive powers
// Index 24
356, // Sum of signed power factors
364, // Grid frequency
209, 211, // Active energy (Σ L1, L2, L3, since manufacture) import, export
4, 5, 6, 8, // Voltage L1-L2; L2-L3; L3-L1; ⌀ L1-L2, L2-L3, L3-L1
25, // Neutral conductor current
213, // Active energy (Σ L1, L2, L3, since manufacture) import + export
277, // Reactive energy (Σ L1, L2, L3, since manufacture) inductive + capacitive
214, // Active energy (Σ L1, L2, L3, since last reset) import + export
// Index 36
210, // Active energy (Σ L1, L2, L3, since last reset) import
212 // Active energy (Σ L1, L2, L3, since last reset) export
]
meters/X/history
A 48-hour history of the charging power of the X. electricity meter in watts. Missing values are indicated by null. The history is filled from back to front, so null values only occur consecutively at the beginning of the array if the ESP was restarted within the last 48 hours. Up to 720 values are output, which corresponds to one measurement value every 4 minutes. These measurement values are the respective average of these 4 minutes.
# $HOST e.g. warp3-AbCd
curl http://$HOST/meters/1/history
{
"offset": 60927,
"samples": [
null, null, null, null, null, null, null, null,
// 600 weitere null-Werte entfernt
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 1736, 6656, 6655, 6666,
6680, 6716, 6714, 6625, 6640, 6641, 6595, 6612,
6592, 6593, 6589, 6592, 6600, 6625, 6626, 6637,
6665, 6636, 6632, 6656, 6616, 6611, 6646, 6670,
6691, 6715, 6787, 6754, 6761, 6797, 6771, 6685,
6705, 6778, 6703, 6675, 6681, 6721, 6739, 6816,
6872, 6858, 6821, 6836, 6784, 6871, 6943, 6930,
6968, 6955, 6837, 6800, 6846, 6919, 6881, 6736,
6671, 6655, 6674, 6743, 6878, 5733, 4462, 3712,
3098, 2693, 2337, 2098, 1683, 1575, 1575, 84,
0, 0, 0, 0, 0, 0, 0, 0
]
}
Only supported by the HTTP API
| Name | Description |
|---|---|
offsetint (ms) | The age of the last measured value. |
samplesint[..] | The measured values. |
meters/X/live
The last charging power measurement values of the X. electricity meter. Based on these values, the average values for meters/X/history are generated.
# $HOST e.g. warp3-AbCd
curl http://$HOST/meters/1/live
{
"offset": 370,
"samples_per_second": 1.99565,
"samples": [
2626, 2626, 2626, 2626, 2626, 2626, 2626, 2673,
2673, 2673, 2673, 2673, 2673, 2673, 2673, 2677,
2677, 2677, 2677, 2677, 2677, 2677, 2677, 2677,
2677, 2677, 2677, 2677, 2677, 2677, 2677, 988,
988, 988, 988, 988, 988, 988, 988, 3,
3, 3, 3, 3, 3, 3, 3, 1,
1, 1, 1, 1, 1, 1, 1, 3,
3, 3, 3, 3, 3, 3, 3, 3,
3, 3, 3, 3, 3, 3, 3, 3,
3, 3, 3, 3, 3, 3, 3, 4
]
}
Es liegen 80 Werte vor, ~ 2 Werte pro Sekunde wurden erhoben, das Offset des letzten Werts sind 370 ms -> Die Messwerte reichen im Moment 40,370 Sekunden in die Vergangenheit.
Only supported by the HTTP API
| Name | Description |
|---|---|
offsetint (ms) | The age of the last measured value. |
samples_per_secondfloat (Hz) | The number of measured values per second. |
samplesint[..] | The measured values. Depending on the length of the array and the samples_per_second value, it can be determined how far back in time the measurement values reach. |
meters/X/config
The configuration of the X. electricity meter. The union tag specifies the meter class.
# $HOST e.g. warp3-AbCd
Read
curl http://$HOST/meters/1/config
[4, { "display_name": "API-Zähler", "value_ids": [13, 17, 21, 39, 48, 57] }]
Konfiguriert für den Stromzähler-Slot 1 einen über meters/1/update mit Werten befüllbaren Stromzähler, der pro Phase Strom (Bezug + Einspeisung) und Wirkleistung (Bezug - Einspeisung) misst. 4 ist das Union-Tag des API-Stromzählers.
Write
curl http://$HOST/meters/1/config -d '[4, { "display_name": "API-Zähler", "value_ids": [13, 17, 21, 39, 48, 57] }]'
Konfiguriert für den Stromzähler-Slot 1 einen über meters/1/update mit Werten befüllbaren Stromzähler, der pro Phase Strom (Bezug + Einspeisung) und Wirkleistung (Bezug - Einspeisung) misst. 4 ist das Union-Tag des API-Stromzählers.
# $BROKER e.g. my_mosquitto.localdomain
# $PREFIX e.g. warp3/AbCd
Read
mosquitto_sub -v -C 1 -h $BROKER -t $PREFIX/meters/1/config
[4, { "display_name": "API-Zähler", "value_ids": [13, 17, 21, 39, 48, 57] }]
Konfiguriert für den Stromzähler-Slot 1 einen über meters/1/update mit Werten befüllbaren Stromzähler, der pro Phase Strom (Bezug + Einspeisung) und Wirkleistung (Bezug - Einspeisung) misst. 4 ist das Union-Tag des API-Stromzählers.
Write
With MQTT on $PREFIX/meters/1/config_update
mosquitto_pub -h $BROKER -t $PREFIX/meters/1/config_update -m '[4, { "display_name": "API-Zähler", "value_ids": [13, 17, 21, 39, 48, 57] }]'
Konfiguriert für den Stromzähler-Slot 1 einen über meters/1/update mit Werten befüllbaren Stromzähler, der pro Phase Strom (Bezug + Einspeisung) und Wirkleistung (Bezug - Einspeisung) misst. 4 ist das Union-Tag des API-Stromzählers.
- 0 - No electricity meter configured.
- 2 - Internal electricity meter (on EVSE 2.0 Bricklet)
- 4 - API electricity meter
- 5 - SunSpec device via Modbus TCP
- 6 - Modbus TCP electricity meter.
- 7 - SMA Speedwire electricity meter.
- 8 - RCT Power inverter
null: No electricity meter configured.
| Name | Description |
|---|---|
display_namestring | Display name of the electricity meter |
locationint | Measurement location
|
| Name | Description |
|---|---|
display_namestring | Display name of the electricity meter |
locationint | Measurement location
|
value_idsint[..] | MeterValueIDs that should be settable via the API meters/X/update. List of all MeterValueIDs |
| Name | Description |
|---|---|
display_namestring | Display name of the device |
locationint | Measurement location
|
hoststring | Hostname or IP address of the SunSpec device |
portint | Port of the SunSpec device. Typically 502 |
device_addressint | Modbus device address of the SunSpec device |
manufacturer_namestring | Name of the manufacturer of the SunSpec device. The combination of |
model_namestring | Name of the model of the SunSpec device. |
serial_numberstring | Serial number of the SunSpec device. |
model_idint | SunSpec model ID |
model_instanceint | Indicates how many SunSpec models with the same |
| Name | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
display_namestring | Display name of the electricity meter | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
locationint | Measurement location
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
hoststring | Hostname or IP address of the SunSpec device | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
portint | Port of the SunSpec device. Typically 502 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
tableUnion | Register table to be read.
null: No register table configured.
|
| Name | Description |
|---|---|
display_namestring | Display name of the electricity meter |
locationint | Measurement location
|
| Name | Description |
|---|---|
display_namestring | Display name of the inverter |
locationint | Measurement location
|
hoststring | Hostname or IP address of the inverter |
portint | Port of the inverter. Typically 8899 |
virtual_meterint | Virtual meter. Indicates which part of the register table is read.
|
meters/X/state
The state of the X. electricity meter. The content of this API depends on the type of electricity meter configured in meters/X/config.
null: No electricity meter configured.
| Name | Description |
|---|---|
typeint | Type of the installed electricity meter. Not every meter is supported by every device!
|
| Name | Description |
|---|---|
typeint | Type of the installed electricity meter. Not every meter is supported by every device!
|
| Name | Description |
|---|---|
typeint | Type of the installed electricity meter. Not every meter is supported by every device!
|
null: State of the API electricity meter. Currently empty.
null: State of the SunSpec electricity meter. Currently empty.
meters/X/errors
Error counters for communication with the electricity meter. The content of this API depends on the type of electricity meter configured in meters/X/config.
null: No electricity meter configured.
| Name | Description |
|---|---|
meterint | Communication errors between RS485 Bricklet and electricity meter. |
brickletint | Communication errors between ESP Brick and RS485 Bricklet. |
bricklet_resetint | Unexpected resets of the RS485 Bricklet. |
| Name | Description |
|---|---|
local_timeoutint | Local Timeout |
global_timeoutint | Global Timeout |
illegal_functionint | Illegal Function |
illegal_data_accessint | Illegal Data Access |
illegal_data_valueint | Illegal Data Value |
slave_device_failureint | Slave Device Failure |
| Name | Description |
|---|---|
local_timeoutint | Local Timeout |
global_timeoutint | Global Timeout |
illegal_functionint | Illegal Function |
illegal_data_accessint | Illegal Data Access |
illegal_data_valueint | Illegal Data Value |
slave_device_failureint | Slave Device Failure |
null: Error counters of the API electricity meter. Currently empty.
null: Error counters of the SunSpec electricity meter. Currently empty.
meters/X/reset
Resets all resettable (all values whose kind entry is resettable: List of all MeterValueIDs) meter values of the X. electricity meter.
Empty payload. One of the following values must be passed: null, "", false, 0, [] or {}
meters/X/last_reset
The time of the last meter reset (see meters/X/reset) as Unix timestamp. 0 if no reset was performed. If no time synchronization was available at the time of the last reset, this value is instead a counter indicating how many times a reset was performed.
| Name | Description |
|---|---|
last_resetint (s) | Unix timestamp of the time of the last meter reset. |
meters/history
A 48-hour history of charging power in watts. Missing values are indicated by null. The history is filled from back to front, so null values only occur consecutively at the beginning of the array if the ESP was restarted within the last 48 hours. Up to 720 values are output, which corresponds to one measurement value every 4 minutes. These measurement values are the respective average of these 4 minutes.
# $HOST e.g. warp3-AbCd
curl http://$HOST/meters/history
{
"offset": 9378,
"samples": [
[
null, null, null, null, null, null, null, null,
// 600 weitere null-Werte entfernt
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 1736, 6656, 6655, 6666,
6680, 6716, 6714, 6625, 6640, 6641, 6595, 6612,
6592, 6593, 6589, 6592, 6600, 6625, 6626, 6637,
6665, 6636, 6632, 6656, 6616, 6611, 6646, 6670,
6691, 6715, 6787, 6754, 6761, 6797, 6771, 6685,
6705, 6778, 6703, 6675, 6681, 6721, 6739, 6816,
6872, 6858, 6821, 6836, 6784, 6871, 6943, 6930,
6968, 6955, 6837, 6800, 6846, 6919, 6881, 6736,
6671, 6655, 6674, 6743, 6878, 5733, 4462, 3712,
3098, 2693, 2337, 2098, 1683, 1575, 1575, 84,
0, 0, 0, 0, 0, 0, 0, 0
],
null,
null,
null,
null,
null,
null
]
}
Only supported by the HTTP API
| Name | Description |
|---|---|
offsetint (ms) | The age of the last measured value. |
samplesint[..][5] | The measured values of all electricity meters.
|
meters/live
The last charging power measurement values. Based on these values, the average values for meters/history are generated. Up to 720 values are output, which corresponds to 6 minutes with one measurement value every 500 milliseconds.
# $HOST e.g. warp3-AbCd
curl http://$HOST/meters/live
{
"offset": 370,
"samples_per_second": 1.99565,
"samples": [
[
2626, 2626, 2626, 2626, 2626, 2626, 2626, 2673,
2673, 2673, 2673, 2673, 2673, 2673, 2673, 2677,
2677, 2677, 2677, 2677, 2677, 2677, 2677, 2677,
2677, 2677, 2677, 2677, 2677, 2677, 2677, 988,
988, 988, 988, 988, 988, 988, 988, 3,
3, 3, 3, 3, 3, 3, 3, 1,
1, 1, 1, 1, 1, 1, 1, 3,
3, 3, 3, 3, 3, 3, 3, 3,
3, 3, 3, 3, 3, 3, 3, 3,
3, 3, 3, 3, 3, 3, 3, 4
],
null
]
}
Only supported by the HTTP API
| Name | Description |
|---|---|
offsetint (ms) | The age of the last measured value. |
samples_per_secondfloat (Hz) | The number of measured values per second. |
samplesint[..][5] | The measured values of all electricity meters.
|
meters/X/values
The measurement values of the X. electricity meter. The meaning of the measurement values can be determined from meters/X/value_ids.
[
// Index 0
217.6941223, 0, 0,
30.72553635, 0, 0,
6680.515625, 0, 0,
6681.138672, 0, 0,
// Index 12
-90.09844208, 0, 0,
1, 0, 0,
72.56191254, 10.24184513, 30.72553635,
6683.693359, 6680.666016, -90.09844208,
// Index 24
1, 50, 4644.044922,
3.992000103, 0, 0,
0, 0, 30.70857239,
4648.038086, 197.5639954, 4648.038086,
// Index 36
4644.044922, 3.992000103
]
meters/X/update
Updates the measurement values of the X. electricity meter. Can only be used with an API electricity meter (union tag 4 in the corresponding meters/X/config).
# $HOST e.g. wem-AbCd
Write
curl http://$HOST/meters/1/update -d '[
15.9, 16, 16.1,
3657, 3680, 3703
]'
Beispiel für einen Zähler, der pro Phase Strom (Bezug + Einspeisung) und Wirkleistung (Bezug - Einspeisung) misst.
Die korrekte Konfiguration (meters/X/config) für diesen Zähler wäre
[4, { "display_name": "API-Zähler", "value_ids": [13, 17, 21, 39, 48, 57] }]
# $BROKER e.g. my_mosquitto.localdomain
# $PREFIX e.g. wem/AbCd
Write
mosquitto_pub -h $BROKER -t $PREFIX/meters/1/update -m '[
15.9, 16, 16.1,
3657, 3680, 3703
]'
Beispiel für einen Zähler, der pro Phase Strom (Bezug + Einspeisung) und Wirkleistung (Bezug - Einspeisung) misst.
Die korrekte Konfiguration (meters/X/config) für diesen Zähler wäre
[4, { "display_name": "API-Zähler", "value_ids": [13, 17, 21, 39, 48, 57] }]
meters/X/value_ids
The MeterValueIDs of the X. electricity meter. The n-th entry in this array indicates the meaning of the n-th measurement value from meters/X/values. List of all MeterValueIDs
[
// Index 0
1, 2, 3, // Voltage L1-N, L2-N, L3-N
13, 17, 21, // Current (import + export) L1-N, L2-N, L3-N
39, 48, 57, // Active power (import - export) L1-N, L2-N, L3-N
122, 130, 138, // Apparent power (import + export) L1-N, L2-N, L3-N
// Index 12
83, 91, 99, // Reactive power (inductive - capacitive) L1-N, L2-N, L3-N
353, 354, 355, // Power factor (signed; sign indicates direction of current flow) L1, L2, L3
7, // Average phase voltage
29, // Average of (import + export) phase currents
33, // Sum of (import + export) phase currents
74, // Sum of (import - export) phase active powers
154, // Sum of (import + export) phase apparent powers
115, // Sum of (inductive - capacitive) phase reactive powers
// Index 24
356, // Sum of signed power factors
364, // Grid frequency
209, 211, // Active energy (Σ L1, L2, L3, since manufacture) import, export
4, 5, 6, 8, // Voltage L1-L2; L2-L3; L3-L1; ⌀ L1-L2, L2-L3, L3-L1
25, // Neutral conductor current
213, // Active energy (Σ L1, L2, L3, since manufacture) import + export
277, // Reactive energy (Σ L1, L2, L3, since manufacture) inductive + capacitive
214, // Active energy (Σ L1, L2, L3, since last reset) import + export
// Index 36
210, // Active energy (Σ L1, L2, L3, since last reset) import
212 // Active energy (Σ L1, L2, L3, since last reset) export
]
meters/X/history
A 48-hour history of the charging power of the X. electricity meter in watts. Missing values are indicated by null. The history is filled from back to front, so null values only occur consecutively at the beginning of the array if the ESP was restarted within the last 48 hours. Up to 720 values are output, which corresponds to one measurement value every 4 minutes. These measurement values are the respective average of these 4 minutes.
# $HOST e.g. wem-AbCd
curl http://$HOST/meters/1/history
{
"offset": 60927,
"samples": [
null, null, null, null, null, null, null, null,
// 600 weitere null-Werte entfernt
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 1736, 6656, 6655, 6666,
6680, 6716, 6714, 6625, 6640, 6641, 6595, 6612,
6592, 6593, 6589, 6592, 6600, 6625, 6626, 6637,
6665, 6636, 6632, 6656, 6616, 6611, 6646, 6670,
6691, 6715, 6787, 6754, 6761, 6797, 6771, 6685,
6705, 6778, 6703, 6675, 6681, 6721, 6739, 6816,
6872, 6858, 6821, 6836, 6784, 6871, 6943, 6930,
6968, 6955, 6837, 6800, 6846, 6919, 6881, 6736,
6671, 6655, 6674, 6743, 6878, 5733, 4462, 3712,
3098, 2693, 2337, 2098, 1683, 1575, 1575, 84,
0, 0, 0, 0, 0, 0, 0, 0
]
}
Only supported by the HTTP API
| Name | Description |
|---|---|
offsetint (ms) | The age of the last measured value. |
samplesint[..] | The measured values. |
meters/X/live
The last charging power measurement values of the X. electricity meter. Based on these values, the average values for meters/X/history are generated.
# $HOST e.g. wem-AbCd
curl http://$HOST/meters/1/live
{
"offset": 370,
"samples_per_second": 1.99565,
"samples": [
2626, 2626, 2626, 2626, 2626, 2626, 2626, 2673,
2673, 2673, 2673, 2673, 2673, 2673, 2673, 2677,
2677, 2677, 2677, 2677, 2677, 2677, 2677, 2677,
2677, 2677, 2677, 2677, 2677, 2677, 2677, 988,
988, 988, 988, 988, 988, 988, 988, 3,
3, 3, 3, 3, 3, 3, 3, 1,
1, 1, 1, 1, 1, 1, 1, 3,
3, 3, 3, 3, 3, 3, 3, 3,
3, 3, 3, 3, 3, 3, 3, 3,
3, 3, 3, 3, 3, 3, 3, 4
]
}
Es liegen 80 Werte vor, ~ 2 Werte pro Sekunde wurden erhoben, das Offset des letzten Werts sind 370 ms -> Die Messwerte reichen im Moment 40,370 Sekunden in die Vergangenheit.
Only supported by the HTTP API
| Name | Description |
|---|---|
offsetint (ms) | The age of the last measured value. |
samples_per_secondfloat (Hz) | The number of measured values per second. |
samplesint[..] | The measured values. Depending on the length of the array and the samples_per_second value, it can be determined how far back in time the measurement values reach. |
meters/X/config
The configuration of the X. electricity meter. The union tag specifies the meter class.
# $HOST e.g. wem-AbCd
Read
curl http://$HOST/meters/1/config
[4, { "display_name": "API-Zähler", "value_ids": [13, 17, 21, 39, 48, 57] }]
Konfiguriert für den Stromzähler-Slot 1 einen über meters/1/update mit Werten befüllbaren Stromzähler, der pro Phase Strom (Bezug + Einspeisung) und Wirkleistung (Bezug - Einspeisung) misst. 4 ist das Union-Tag des API-Stromzählers.
Write
curl http://$HOST/meters/1/config -d '[4, { "display_name": "API-Zähler", "value_ids": [13, 17, 21, 39, 48, 57] }]'
Konfiguriert für den Stromzähler-Slot 1 einen über meters/1/update mit Werten befüllbaren Stromzähler, der pro Phase Strom (Bezug + Einspeisung) und Wirkleistung (Bezug - Einspeisung) misst. 4 ist das Union-Tag des API-Stromzählers.
# $BROKER e.g. my_mosquitto.localdomain
# $PREFIX e.g. wem/AbCd
Read
mosquitto_sub -v -C 1 -h $BROKER -t $PREFIX/meters/1/config
[4, { "display_name": "API-Zähler", "value_ids": [13, 17, 21, 39, 48, 57] }]
Konfiguriert für den Stromzähler-Slot 1 einen über meters/1/update mit Werten befüllbaren Stromzähler, der pro Phase Strom (Bezug + Einspeisung) und Wirkleistung (Bezug - Einspeisung) misst. 4 ist das Union-Tag des API-Stromzählers.
Write
With MQTT on $PREFIX/meters/1/config_update
mosquitto_pub -h $BROKER -t $PREFIX/meters/1/config_update -m '[4, { "display_name": "API-Zähler", "value_ids": [13, 17, 21, 39, 48, 57] }]'
Konfiguriert für den Stromzähler-Slot 1 einen über meters/1/update mit Werten befüllbaren Stromzähler, der pro Phase Strom (Bezug + Einspeisung) und Wirkleistung (Bezug - Einspeisung) misst. 4 ist das Union-Tag des API-Stromzählers.
- 0 - No electricity meter configured.
- 3 - Electricity meter connected to WARP Energy Manager
- 4 - API electricity meter
- 5 - SunSpec device via Modbus TCP
- 6 - Modbus TCP electricity meter.
- 7 - SMA Speedwire electricity meter.
- 8 - RCT Power inverter
null: No electricity meter configured.
| Name | Description |
|---|---|
display_namestring | Display name of the electricity meter |
locationint | Measurement location
|
| Name | Description |
|---|---|
display_namestring | Display name of the electricity meter |
locationint | Measurement location
|
value_idsint[..] | MeterValueIDs that should be settable via the API meters/X/update. List of all MeterValueIDs |
| Name | Description |
|---|---|
display_namestring | Display name of the device |
locationint | Measurement location
|
hoststring | Hostname or IP address of the SunSpec device |
portint | Port of the SunSpec device. Typically 502 |
device_addressint | Modbus device address of the SunSpec device |
manufacturer_namestring | Name of the manufacturer of the SunSpec device. The combination of |
model_namestring | Name of the model of the SunSpec device. |
serial_numberstring | Serial number of the SunSpec device. |
model_idint | SunSpec model ID |
model_instanceint | Indicates how many SunSpec models with the same |
| Name | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
display_namestring | Display name of the electricity meter | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
locationint | Measurement location
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
hoststring | Hostname or IP address of the SunSpec device | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
portint | Port of the SunSpec device. Typically 502 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
tableUnion | Register table to be read.
null: No register table configured.
|
| Name | Description |
|---|---|
display_namestring | Display name of the electricity meter |
locationint | Measurement location
|
| Name | Description |
|---|---|
display_namestring | Display name of the inverter |
locationint | Measurement location
|
hoststring | Hostname or IP address of the inverter |
portint | Port of the inverter. Typically 8899 |
virtual_meterint | Virtual meter. Indicates which part of the register table is read.
|
meters/X/state
The state of the X. electricity meter. The content of this API depends on the type of electricity meter configured in meters/X/config.
null: No electricity meter configured.
| Name | Description |
|---|---|
typeint | Type of the installed electricity meter. Not every meter is supported by every device!
|
| Name | Description |
|---|---|
typeint | Type of the installed electricity meter. Not every meter is supported by every device!
|
| Name | Description |
|---|---|
typeint | Type of the installed electricity meter. Not every meter is supported by every device!
|
null: State of the API electricity meter. Currently empty.
null: State of the SunSpec electricity meter. Currently empty.
meters/X/errors
Error counters for communication with the electricity meter. The content of this API depends on the type of electricity meter configured in meters/X/config.
null: No electricity meter configured.
| Name | Description |
|---|---|
meterint | Communication errors between RS485 Bricklet and electricity meter. |
brickletint | Communication errors between ESP Brick and RS485 Bricklet. |
bricklet_resetint | Unexpected resets of the RS485 Bricklet. |
| Name | Description |
|---|---|
local_timeoutint | Local Timeout |
global_timeoutint | Global Timeout |
illegal_functionint | Illegal Function |
illegal_data_accessint | Illegal Data Access |
illegal_data_valueint | Illegal Data Value |
slave_device_failureint | Slave Device Failure |
| Name | Description |
|---|---|
local_timeoutint | Local Timeout |
global_timeoutint | Global Timeout |
illegal_functionint | Illegal Function |
illegal_data_accessint | Illegal Data Access |
illegal_data_valueint | Illegal Data Value |
slave_device_failureint | Slave Device Failure |
null: Error counters of the API electricity meter. Currently empty.
null: Error counters of the SunSpec electricity meter. Currently empty.
meters/X/reset
Resets all resettable (all values whose kind entry is resettable: List of all MeterValueIDs) meter values of the X. electricity meter.
Empty payload. One of the following values must be passed: null, "", false, 0, [] or {}
meters/X/last_reset
The time of the last meter reset (see meters/X/reset) as Unix timestamp. 0 if no reset was performed. If no time synchronization was available at the time of the last reset, this value is instead a counter indicating how many times a reset was performed.
| Name | Description |
|---|---|
last_resetint (s) | Unix timestamp of the time of the last meter reset. |
meters/history
A 48-hour history of charging power in watts. Missing values are indicated by null. The history is filled from back to front, so null values only occur consecutively at the beginning of the array if the ESP was restarted within the last 48 hours. Up to 720 values are output, which corresponds to one measurement value every 4 minutes. These measurement values are the respective average of these 4 minutes.
# $HOST e.g. wem-AbCd
curl http://$HOST/meters/history
{
"offset": 9378,
"samples": [
[
null, null, null, null, null, null, null, null,
// 600 weitere null-Werte entfernt
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 1736, 6656, 6655, 6666,
6680, 6716, 6714, 6625, 6640, 6641, 6595, 6612,
6592, 6593, 6589, 6592, 6600, 6625, 6626, 6637,
6665, 6636, 6632, 6656, 6616, 6611, 6646, 6670,
6691, 6715, 6787, 6754, 6761, 6797, 6771, 6685,
6705, 6778, 6703, 6675, 6681, 6721, 6739, 6816,
6872, 6858, 6821, 6836, 6784, 6871, 6943, 6930,
6968, 6955, 6837, 6800, 6846, 6919, 6881, 6736,
6671, 6655, 6674, 6743, 6878, 5733, 4462, 3712,
3098, 2693, 2337, 2098, 1683, 1575, 1575, 84,
0, 0, 0, 0, 0, 0, 0, 0
],
null
]
}
Only supported by the HTTP API
| Name | Description |
|---|---|
offsetint (ms) | The age of the last measured value. |
samplesint[..][7] | The measured values of all electricity meters.
|
meters/live
The last charging power measurement values. Based on these values, the average values for meters/history are generated. Up to 720 values are output, which corresponds to 6 minutes with one measurement value every 500 milliseconds.
# $HOST e.g. wem-AbCd
curl http://$HOST/meters/live
{
"offset": 370,
"samples_per_second": 1.99565,
"samples": [
[
2626, 2626, 2626, 2626, 2626, 2626, 2626, 2673,
2673, 2673, 2673, 2673, 2673, 2673, 2673, 2677,
2677, 2677, 2677, 2677, 2677, 2677, 2677, 2677,
2677, 2677, 2677, 2677, 2677, 2677, 2677, 988,
988, 988, 988, 988, 988, 988, 988, 3,
3, 3, 3, 3, 3, 3, 3, 1,
1, 1, 1, 1, 1, 1, 1, 3,
3, 3, 3, 3, 3, 3, 3, 3,
3, 3, 3, 3, 3, 3, 3, 3,
3, 3, 3, 3, 3, 3, 3, 4
],
null,
null,
null,
null,
null,
null
]
}
Only supported by the HTTP API
| Name | Description |
|---|---|
offsetint (ms) | The age of the last measured value. |
samples_per_secondfloat (Hz) | The number of measured values per second. |
samplesint[..][7] | The measured values of all electricity meters.
|
meters/X/values
The measurement values of the X. electricity meter. The meaning of the measurement values can be determined from meters/X/value_ids.
[
// Index 0
217.6941223, 0, 0,
30.72553635, 0, 0,
6680.515625, 0, 0,
6681.138672, 0, 0,
// Index 12
-90.09844208, 0, 0,
1, 0, 0,
72.56191254, 10.24184513, 30.72553635,
6683.693359, 6680.666016, -90.09844208,
// Index 24
1, 50, 4644.044922,
3.992000103, 0, 0,
0, 0, 30.70857239,
4648.038086, 197.5639954, 4648.038086,
// Index 36
4644.044922, 3.992000103
]
meters/X/update
Updates the measurement values of the X. electricity meter. Can only be used with an API electricity meter (union tag 4 in the corresponding meters/X/config).
# $HOST e.g. wem2-AbCd
Write
curl http://$HOST/meters/1/update -d '[
15.9, 16, 16.1,
3657, 3680, 3703
]'
Beispiel für einen Zähler, der pro Phase Strom (Bezug + Einspeisung) und Wirkleistung (Bezug - Einspeisung) misst.
Die korrekte Konfiguration (meters/X/config) für diesen Zähler wäre
[4, { "display_name": "API-Zähler", "value_ids": [13, 17, 21, 39, 48, 57] }]
# $BROKER e.g. my_mosquitto.localdomain
# $PREFIX e.g. wem2/AbCd
Write
mosquitto_pub -h $BROKER -t $PREFIX/meters/1/update -m '[
15.9, 16, 16.1,
3657, 3680, 3703
]'
Beispiel für einen Zähler, der pro Phase Strom (Bezug + Einspeisung) und Wirkleistung (Bezug - Einspeisung) misst.
Die korrekte Konfiguration (meters/X/config) für diesen Zähler wäre
[4, { "display_name": "API-Zähler", "value_ids": [13, 17, 21, 39, 48, 57] }]
meters/X/value_ids
The MeterValueIDs of the X. electricity meter. The n-th entry in this array indicates the meaning of the n-th measurement value from meters/X/values. List of all MeterValueIDs
[
// Index 0
1, 2, 3, // Voltage L1-N, L2-N, L3-N
13, 17, 21, // Current (import + export) L1-N, L2-N, L3-N
39, 48, 57, // Active power (import - export) L1-N, L2-N, L3-N
122, 130, 138, // Apparent power (import + export) L1-N, L2-N, L3-N
// Index 12
83, 91, 99, // Reactive power (inductive - capacitive) L1-N, L2-N, L3-N
353, 354, 355, // Power factor (signed; sign indicates direction of current flow) L1, L2, L3
7, // Average phase voltage
29, // Average of (import + export) phase currents
33, // Sum of (import + export) phase currents
74, // Sum of (import - export) phase active powers
154, // Sum of (import + export) phase apparent powers
115, // Sum of (inductive - capacitive) phase reactive powers
// Index 24
356, // Sum of signed power factors
364, // Grid frequency
209, 211, // Active energy (Σ L1, L2, L3, since manufacture) import, export
4, 5, 6, 8, // Voltage L1-L2; L2-L3; L3-L1; ⌀ L1-L2, L2-L3, L3-L1
25, // Neutral conductor current
213, // Active energy (Σ L1, L2, L3, since manufacture) import + export
277, // Reactive energy (Σ L1, L2, L3, since manufacture) inductive + capacitive
214, // Active energy (Σ L1, L2, L3, since last reset) import + export
// Index 36
210, // Active energy (Σ L1, L2, L3, since last reset) import
212 // Active energy (Σ L1, L2, L3, since last reset) export
]
meters/X/history
A 48-hour history of the charging power of the X. electricity meter in watts. Missing values are indicated by null. The history is filled from back to front, so null values only occur consecutively at the beginning of the array if the ESP was restarted within the last 48 hours. Up to 720 values are output, which corresponds to one measurement value every 4 minutes. These measurement values are the respective average of these 4 minutes.
# $HOST e.g. wem2-AbCd
curl http://$HOST/meters/1/history
{
"offset": 60927,
"samples": [
null, null, null, null, null, null, null, null,
// 600 weitere null-Werte entfernt
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 1736, 6656, 6655, 6666,
6680, 6716, 6714, 6625, 6640, 6641, 6595, 6612,
6592, 6593, 6589, 6592, 6600, 6625, 6626, 6637,
6665, 6636, 6632, 6656, 6616, 6611, 6646, 6670,
6691, 6715, 6787, 6754, 6761, 6797, 6771, 6685,
6705, 6778, 6703, 6675, 6681, 6721, 6739, 6816,
6872, 6858, 6821, 6836, 6784, 6871, 6943, 6930,
6968, 6955, 6837, 6800, 6846, 6919, 6881, 6736,
6671, 6655, 6674, 6743, 6878, 5733, 4462, 3712,
3098, 2693, 2337, 2098, 1683, 1575, 1575, 84,
0, 0, 0, 0, 0, 0, 0, 0
]
}
Only supported by the HTTP API
| Name | Description |
|---|---|
offsetint (ms) | The age of the last measured value. |
samplesint[..] | The measured values. |
meters/X/live
The last charging power measurement values of the X. electricity meter. Based on these values, the average values for meters/X/history are generated.
# $HOST e.g. wem2-AbCd
curl http://$HOST/meters/1/live
{
"offset": 370,
"samples_per_second": 1.99565,
"samples": [
2626, 2626, 2626, 2626, 2626, 2626, 2626, 2673,
2673, 2673, 2673, 2673, 2673, 2673, 2673, 2677,
2677, 2677, 2677, 2677, 2677, 2677, 2677, 2677,
2677, 2677, 2677, 2677, 2677, 2677, 2677, 988,
988, 988, 988, 988, 988, 988, 988, 3,
3, 3, 3, 3, 3, 3, 3, 1,
1, 1, 1, 1, 1, 1, 1, 3,
3, 3, 3, 3, 3, 3, 3, 3,
3, 3, 3, 3, 3, 3, 3, 3,
3, 3, 3, 3, 3, 3, 3, 4
]
}
Es liegen 80 Werte vor, ~ 2 Werte pro Sekunde wurden erhoben, das Offset des letzten Werts sind 370 ms -> Die Messwerte reichen im Moment 40,370 Sekunden in die Vergangenheit.
Only supported by the HTTP API
| Name | Description |
|---|---|
offsetint (ms) | The age of the last measured value. |
samples_per_secondfloat (Hz) | The number of measured values per second. |
samplesint[..] | The measured values. Depending on the length of the array and the samples_per_second value, it can be determined how far back in time the measurement values reach. |
meters/X/config
The configuration of the X. electricity meter. The union tag specifies the meter class.
# $HOST e.g. wem2-AbCd
Read
curl http://$HOST/meters/1/config
[4, { "display_name": "API-Zähler", "value_ids": [13, 17, 21, 39, 48, 57] }]
Konfiguriert für den Stromzähler-Slot 1 einen über meters/1/update mit Werten befüllbaren Stromzähler, der pro Phase Strom (Bezug + Einspeisung) und Wirkleistung (Bezug - Einspeisung) misst. 4 ist das Union-Tag des API-Stromzählers.
Write
curl http://$HOST/meters/1/config -d '[4, { "display_name": "API-Zähler", "value_ids": [13, 17, 21, 39, 48, 57] }]'
Konfiguriert für den Stromzähler-Slot 1 einen über meters/1/update mit Werten befüllbaren Stromzähler, der pro Phase Strom (Bezug + Einspeisung) und Wirkleistung (Bezug - Einspeisung) misst. 4 ist das Union-Tag des API-Stromzählers.
# $BROKER e.g. my_mosquitto.localdomain
# $PREFIX e.g. wem2/AbCd
Read
mosquitto_sub -v -C 1 -h $BROKER -t $PREFIX/meters/1/config
[4, { "display_name": "API-Zähler", "value_ids": [13, 17, 21, 39, 48, 57] }]
Konfiguriert für den Stromzähler-Slot 1 einen über meters/1/update mit Werten befüllbaren Stromzähler, der pro Phase Strom (Bezug + Einspeisung) und Wirkleistung (Bezug - Einspeisung) misst. 4 ist das Union-Tag des API-Stromzählers.
Write
With MQTT on $PREFIX/meters/1/config_update
mosquitto_pub -h $BROKER -t $PREFIX/meters/1/config_update -m '[4, { "display_name": "API-Zähler", "value_ids": [13, 17, 21, 39, 48, 57] }]'
Konfiguriert für den Stromzähler-Slot 1 einen über meters/1/update mit Werten befüllbaren Stromzähler, der pro Phase Strom (Bezug + Einspeisung) und Wirkleistung (Bezug - Einspeisung) misst. 4 ist das Union-Tag des API-Stromzählers.
- 0 - No electricity meter configured.
- 3 - Electricity meter connected to WARP Energy Manager
- 4 - API electricity meter
- 5 - SunSpec device via Modbus TCP
- 6 - Modbus TCP electricity meter.
- 7 - SMA Speedwire electricity meter.
- 8 - RCT Power inverter
null: No electricity meter configured.
| Name | Description |
|---|---|
display_namestring | Display name of the electricity meter |
locationint | Measurement location
|
| Name | Description |
|---|---|
display_namestring | Display name of the electricity meter |
locationint | Measurement location
|
value_idsint[..] | MeterValueIDs that should be settable via the API meters/X/update. List of all MeterValueIDs |
| Name | Description |
|---|---|
display_namestring | Display name of the device |
locationint | Measurement location
|
hoststring | Hostname or IP address of the SunSpec device |
portint | Port of the SunSpec device. Typically 502 |
device_addressint | Modbus device address of the SunSpec device |
manufacturer_namestring | Name of the manufacturer of the SunSpec device. The combination of |
model_namestring | Name of the model of the SunSpec device. |
serial_numberstring | Serial number of the SunSpec device. |
model_idint | SunSpec model ID |
model_instanceint | Indicates how many SunSpec models with the same |
| Name | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
display_namestring | Display name of the electricity meter | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
locationint | Measurement location
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
hoststring | Hostname or IP address of the SunSpec device | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
portint | Port of the SunSpec device. Typically 502 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
tableUnion | Register table to be read.
null: No register table configured.
|
| Name | Description |
|---|---|
display_namestring | Display name of the electricity meter |
locationint | Measurement location
|
| Name | Description |
|---|---|
display_namestring | Display name of the inverter |
locationint | Measurement location
|
hoststring | Hostname or IP address of the inverter |
portint | Port of the inverter. Typically 8899 |
virtual_meterint | Virtual meter. Indicates which part of the register table is read.
|
meters/X/state
The state of the X. electricity meter. The content of this API depends on the type of electricity meter configured in meters/X/config.
null: No electricity meter configured.
| Name | Description |
|---|---|
typeint | Type of the installed electricity meter. Not every meter is supported by every device!
|
| Name | Description |
|---|---|
typeint | Type of the installed electricity meter. Not every meter is supported by every device!
|
| Name | Description |
|---|---|
typeint | Type of the installed electricity meter. Not every meter is supported by every device!
|
null: State of the API electricity meter. Currently empty.
null: State of the SunSpec electricity meter. Currently empty.
meters/X/errors
Error counters for communication with the electricity meter. The content of this API depends on the type of electricity meter configured in meters/X/config.
null: No electricity meter configured.
| Name | Description |
|---|---|
meterint | Communication errors between RS485 Bricklet and electricity meter. |
brickletint | Communication errors between ESP Brick and RS485 Bricklet. |
bricklet_resetint | Unexpected resets of the RS485 Bricklet. |
| Name | Description |
|---|---|
local_timeoutint | Local Timeout |
global_timeoutint | Global Timeout |
illegal_functionint | Illegal Function |
illegal_data_accessint | Illegal Data Access |
illegal_data_valueint | Illegal Data Value |
slave_device_failureint | Slave Device Failure |
| Name | Description |
|---|---|
local_timeoutint | Local Timeout |
global_timeoutint | Global Timeout |
illegal_functionint | Illegal Function |
illegal_data_accessint | Illegal Data Access |
illegal_data_valueint | Illegal Data Value |
slave_device_failureint | Slave Device Failure |
null: Error counters of the API electricity meter. Currently empty.
null: Error counters of the SunSpec electricity meter. Currently empty.
meters/X/reset
Resets all resettable (all values whose kind entry is resettable: List of all MeterValueIDs) meter values of the X. electricity meter.
Empty payload. One of the following values must be passed: null, "", false, 0, [] or {}
meters/X/last_reset
The time of the last meter reset (see meters/X/reset) as Unix timestamp. 0 if no reset was performed. If no time synchronization was available at the time of the last reset, this value is instead a counter indicating how many times a reset was performed.
| Name | Description |
|---|---|
last_resetint (s) | Unix timestamp of the time of the last meter reset. |
meters/history
A 48-hour history of charging power in watts. Missing values are indicated by null. The history is filled from back to front, so null values only occur consecutively at the beginning of the array if the ESP was restarted within the last 48 hours. Up to 720 values are output, which corresponds to one measurement value every 4 minutes. These measurement values are the respective average of these 4 minutes.
# $HOST e.g. wem2-AbCd
curl http://$HOST/meters/history
{
"offset": 9378,
"samples": [
[
null, null, null, null, null, null, null, null,
// 600 weitere null-Werte entfernt
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 1736, 6656, 6655, 6666,
6680, 6716, 6714, 6625, 6640, 6641, 6595, 6612,
6592, 6593, 6589, 6592, 6600, 6625, 6626, 6637,
6665, 6636, 6632, 6656, 6616, 6611, 6646, 6670,
6691, 6715, 6787, 6754, 6761, 6797, 6771, 6685,
6705, 6778, 6703, 6675, 6681, 6721, 6739, 6816,
6872, 6858, 6821, 6836, 6784, 6871, 6943, 6930,
6968, 6955, 6837, 6800, 6846, 6919, 6881, 6736,
6671, 6655, 6674, 6743, 6878, 5733, 4462, 3712,
3098, 2693, 2337, 2098, 1683, 1575, 1575, 84,
0, 0, 0, 0, 0, 0, 0, 0
],
null,
null,
null,
null,
null,
null
]
}
Only supported by the HTTP API
| Name | Description |
|---|---|
offsetint (ms) | The age of the last measured value. |
samplesint[..][7] | The measured values of all electricity meters.
|
meters/live
The last charging power measurement values. Based on these values, the average values for meters/history are generated. Up to 720 values are output, which corresponds to 6 minutes with one measurement value every 500 milliseconds.
| Name | Description |
|---|---|
offsetint (ms) | The age of the last measured value. |
samples_per_secondfloat (Hz) | The number of measured values per second. |
samplesint[..][7] | The measured values of all electricity meters.
|
meters/X/values
The measurement values of the X. electricity meter. The meaning of the measurement values can be determined from meters/X/value_ids.
[
// Index 0
217.6941223, 0, 0,
30.72553635, 0, 0,
6680.515625, 0, 0,
6681.138672, 0, 0,
// Index 12
-90.09844208, 0, 0,
1, 0, 0,
72.56191254, 10.24184513, 30.72553635,
6683.693359, 6680.666016, -90.09844208,
// Index 24
1, 50, 4644.044922,
3.992000103, 0, 0,
0, 0, 30.70857239,
4648.038086, 197.5639954, 4648.038086,
// Index 36
4644.044922, 3.992000103
]
meters/X/update
Updates the measurement values of the X. electricity meter. Can only be used with an API electricity meter (union tag 4 in the corresponding meters/X/config).
# $HOST e.g. warp-AbCd
Write
curl http://$HOST/meters/1/update -d '[
15.9, 16, 16.1,
3657, 3680, 3703
]'
Beispiel für einen Zähler, der pro Phase Strom (Bezug + Einspeisung) und Wirkleistung (Bezug - Einspeisung) misst.
Die korrekte Konfiguration (meters/X/config) für diesen Zähler wäre
[4, { "display_name": "API-Zähler", "value_ids": [13, 17, 21, 39, 48, 57] }]
# $BROKER e.g. my_mosquitto.localdomain
# $PREFIX e.g. warp/AbCd
Write
mosquitto_pub -h $BROKER -t $PREFIX/meters/1/update -m '[
15.9, 16, 16.1,
3657, 3680, 3703
]'
Beispiel für einen Zähler, der pro Phase Strom (Bezug + Einspeisung) und Wirkleistung (Bezug - Einspeisung) misst.
Die korrekte Konfiguration (meters/X/config) für diesen Zähler wäre
[4, { "display_name": "API-Zähler", "value_ids": [13, 17, 21, 39, 48, 57] }]
meters/X/value_ids
The MeterValueIDs of the X. electricity meter. The n-th entry in this array indicates the meaning of the n-th measurement value from meters/X/values. List of all MeterValueIDs
[
// Index 0
1, 2, 3, // Voltage L1-N, L2-N, L3-N
13, 17, 21, // Current (import + export) L1-N, L2-N, L3-N
39, 48, 57, // Active power (import - export) L1-N, L2-N, L3-N
122, 130, 138, // Apparent power (import + export) L1-N, L2-N, L3-N
// Index 12
83, 91, 99, // Reactive power (inductive - capacitive) L1-N, L2-N, L3-N
353, 354, 355, // Power factor (signed; sign indicates direction of current flow) L1, L2, L3
7, // Average phase voltage
29, // Average of (import + export) phase currents
33, // Sum of (import + export) phase currents
74, // Sum of (import - export) phase active powers
154, // Sum of (import + export) phase apparent powers
115, // Sum of (inductive - capacitive) phase reactive powers
// Index 24
356, // Sum of signed power factors
364, // Grid frequency
209, 211, // Active energy (Σ L1, L2, L3, since manufacture) import, export
4, 5, 6, 8, // Voltage L1-L2; L2-L3; L3-L1; ⌀ L1-L2, L2-L3, L3-L1
25, // Neutral conductor current
213, // Active energy (Σ L1, L2, L3, since manufacture) import + export
277, // Reactive energy (Σ L1, L2, L3, since manufacture) inductive + capacitive
214, // Active energy (Σ L1, L2, L3, since last reset) import + export
// Index 36
210, // Active energy (Σ L1, L2, L3, since last reset) import
212 // Active energy (Σ L1, L2, L3, since last reset) export
]
meters/X/history
A 48-hour history of the charging power of the X. electricity meter in watts. Missing values are indicated by null. The history is filled from back to front, so null values only occur consecutively at the beginning of the array if the ESP was restarted within the last 48 hours. Up to 720 values are output, which corresponds to one measurement value every 4 minutes. These measurement values are the respective average of these 4 minutes.
# $HOST e.g. warp-AbCd
curl http://$HOST/meters/1/history
{
"offset": 60927,
"samples": [
null, null, null, null, null, null, null, null,
// 600 weitere null-Werte entfernt
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 1736, 6656, 6655, 6666,
6680, 6716, 6714, 6625, 6640, 6641, 6595, 6612,
6592, 6593, 6589, 6592, 6600, 6625, 6626, 6637,
6665, 6636, 6632, 6656, 6616, 6611, 6646, 6670,
6691, 6715, 6787, 6754, 6761, 6797, 6771, 6685,
6705, 6778, 6703, 6675, 6681, 6721, 6739, 6816,
6872, 6858, 6821, 6836, 6784, 6871, 6943, 6930,
6968, 6955, 6837, 6800, 6846, 6919, 6881, 6736,
6671, 6655, 6674, 6743, 6878, 5733, 4462, 3712,
3098, 2693, 2337, 2098, 1683, 1575, 1575, 84,
0, 0, 0, 0, 0, 0, 0, 0
]
}
Only supported by the HTTP API
| Name | Description |
|---|---|
offsetint (ms) | The age of the last measured value. |
samplesint[..] | The measured values. |
meters/X/live
The last charging power measurement values of the X. electricity meter. Based on these values, the average values for meters/X/history are generated.
# $HOST e.g. warp-AbCd
curl http://$HOST/meters/1/live
{
"offset": 370,
"samples_per_second": 1.99565,
"samples": [
2626, 2626, 2626, 2626, 2626, 2626, 2626, 2673,
2673, 2673, 2673, 2673, 2673, 2673, 2673, 2677,
2677, 2677, 2677, 2677, 2677, 2677, 2677, 2677,
2677, 2677, 2677, 2677, 2677, 2677, 2677, 988,
988, 988, 988, 988, 988, 988, 988, 3,
3, 3, 3, 3, 3, 3, 3, 1,
1, 1, 1, 1, 1, 1, 1, 3,
3, 3, 3, 3, 3, 3, 3, 3,
3, 3, 3, 3, 3, 3, 3, 3,
3, 3, 3, 3, 3, 3, 3, 4
]
}
Es liegen 80 Werte vor, ~ 2 Werte pro Sekunde wurden erhoben, das Offset des letzten Werts sind 370 ms -> Die Messwerte reichen im Moment 40,370 Sekunden in die Vergangenheit.
Only supported by the HTTP API
| Name | Description |
|---|---|
offsetint (ms) | The age of the last measured value. |
samples_per_secondfloat (Hz) | The number of measured values per second. |
samplesint[..] | The measured values. Depending on the length of the array and the samples_per_second value, it can be determined how far back in time the measurement values reach. |
meters/X/config
The configuration of the X. electricity meter. The union tag specifies the meter class.
# $HOST e.g. warp-AbCd
Read
curl http://$HOST/meters/1/config
[4, { "display_name": "API-Zähler", "value_ids": [13, 17, 21, 39, 48, 57] }]
Konfiguriert für den Stromzähler-Slot 1 einen über meters/1/update mit Werten befüllbaren Stromzähler, der pro Phase Strom (Bezug + Einspeisung) und Wirkleistung (Bezug - Einspeisung) misst. 4 ist das Union-Tag des API-Stromzählers.
Write
curl http://$HOST/meters/1/config -d '[4, { "display_name": "API-Zähler", "value_ids": [13, 17, 21, 39, 48, 57] }]'
Konfiguriert für den Stromzähler-Slot 1 einen über meters/1/update mit Werten befüllbaren Stromzähler, der pro Phase Strom (Bezug + Einspeisung) und Wirkleistung (Bezug - Einspeisung) misst. 4 ist das Union-Tag des API-Stromzählers.
# $BROKER e.g. my_mosquitto.localdomain
# $PREFIX e.g. warp/AbCd
Read
mosquitto_sub -v -C 1 -h $BROKER -t $PREFIX/meters/1/config
[4, { "display_name": "API-Zähler", "value_ids": [13, 17, 21, 39, 48, 57] }]
Konfiguriert für den Stromzähler-Slot 1 einen über meters/1/update mit Werten befüllbaren Stromzähler, der pro Phase Strom (Bezug + Einspeisung) und Wirkleistung (Bezug - Einspeisung) misst. 4 ist das Union-Tag des API-Stromzählers.
Write
With MQTT on $PREFIX/meters/1/config_update
mosquitto_pub -h $BROKER -t $PREFIX/meters/1/config_update -m '[4, { "display_name": "API-Zähler", "value_ids": [13, 17, 21, 39, 48, 57] }]'
Konfiguriert für den Stromzähler-Slot 1 einen über meters/1/update mit Werten befüllbaren Stromzähler, der pro Phase Strom (Bezug + Einspeisung) und Wirkleistung (Bezug - Einspeisung) misst. 4 ist das Union-Tag des API-Stromzählers.
- 0 - No electricity meter configured.
- 1 - Internal electricity meter (on RS485 Bricklet)
- 2 - Internal electricity meter (on EVSE 2.0 Bricklet)
- 3 - Electricity meter connected to WARP Energy Manager
- 4 - API electricity meter
- 5 - SunSpec device via Modbus TCP
- 6 - Modbus TCP electricity meter.
- 7 - SMA Speedwire electricity meter.
- 8 - RCT Power inverter
null: No electricity meter configured.
| Name | Description |
|---|---|
display_namestring | Display name of the electricity meter |
locationint | Measurement location
|
type_overrideint | Allows overriding the installed meter type if auto-detection does not work.
|
| Name | Description |
|---|---|
display_namestring | Display name of the electricity meter |
locationint | Measurement location
|
| Name | Description |
|---|---|
display_namestring | Display name of the electricity meter |
locationint | Measurement location
|
| Name | Description |
|---|---|
display_namestring | Display name of the electricity meter |
locationint | Measurement location
|
value_idsint[..] | MeterValueIDs that should be settable via the API meters/X/update. List of all MeterValueIDs |
| Name | Description |
|---|---|
display_namestring | Display name of the device |
locationint | Measurement location
|
hoststring | Hostname or IP address of the SunSpec device |
portint | Port of the SunSpec device. Typically 502 |
device_addressint | Modbus device address of the SunSpec device |
manufacturer_namestring | Name of the manufacturer of the SunSpec device. The combination of |
model_namestring | Name of the model of the SunSpec device. |
serial_numberstring | Serial number of the SunSpec device. |
model_idint | SunSpec model ID |
model_instanceint | Indicates how many SunSpec models with the same |
| Name | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
display_namestring | Display name of the electricity meter | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
locationint | Measurement location
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
hoststring | Hostname or IP address of the SunSpec device | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
portint | Port of the SunSpec device. Typically 502 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
tableUnion | Register table to be read.
null: No register table configured.
|
| Name | Description |
|---|---|
display_namestring | Display name of the electricity meter |
locationint | Measurement location
|
| Name | Description |
|---|---|
display_namestring | Display name of the inverter |
locationint | Measurement location
|
hoststring | Hostname or IP address of the inverter |
portint | Port of the inverter. Typically 8899 |
virtual_meterint | Virtual meter. Indicates which part of the register table is read.
|
meters/X/state
The state of the X. electricity meter. The content of this API depends on the type of electricity meter configured in meters/X/config.
null: No electricity meter configured.
| Name | Description |
|---|---|
typeint | Type of the installed electricity meter. Not every meter is supported by every device!
|
| Name | Description |
|---|---|
typeint | Type of the installed electricity meter. Not every meter is supported by every device!
|
| Name | Description |
|---|---|
typeint | Type of the installed electricity meter. Not every meter is supported by every device!
|
null: State of the API electricity meter. Currently empty.
null: State of the SunSpec electricity meter. Currently empty.
meters/X/errors
Error counters for communication with the electricity meter. The content of this API depends on the type of electricity meter configured in meters/X/config.
null: No electricity meter configured.
| Name | Description |
|---|---|
meterint | Communication errors between RS485 Bricklet and electricity meter. |
brickletint | Communication errors between ESP Brick and RS485 Bricklet. |
bricklet_resetint | Unexpected resets of the RS485 Bricklet. |
| Name | Description |
|---|---|
local_timeoutint | Local Timeout |
global_timeoutint | Global Timeout |
illegal_functionint | Illegal Function |
illegal_data_accessint | Illegal Data Access |
illegal_data_valueint | Illegal Data Value |
slave_device_failureint | Slave Device Failure |
| Name | Description |
|---|---|
local_timeoutint | Local Timeout |
global_timeoutint | Global Timeout |
illegal_functionint | Illegal Function |
illegal_data_accessint | Illegal Data Access |
illegal_data_valueint | Illegal Data Value |
slave_device_failureint | Slave Device Failure |
null: Error counters of the API electricity meter. Currently empty.
null: Error counters of the SunSpec electricity meter. Currently empty.
meters/X/reset
Resets all resettable (all values whose kind entry is resettable: List of all MeterValueIDs) meter values of the X. electricity meter.
Empty payload. One of the following values must be passed: null, "", false, 0, [] or {}
meters/X/last_reset
The time of the last meter reset (see meters/X/reset) as Unix timestamp. 0 if no reset was performed. If no time synchronization was available at the time of the last reset, this value is instead a counter indicating how many times a reset was performed.
| Name | Description |
|---|---|
last_resetint (s) | Unix timestamp of the time of the last meter reset. |
meters/history
A 48-hour history of charging power in watts. Missing values are indicated by null. The history is filled from back to front, so null values only occur consecutively at the beginning of the array if the ESP was restarted within the last 48 hours. Up to 720 values are output, which corresponds to one measurement value every 4 minutes. These measurement values are the respective average of these 4 minutes.
# $HOST e.g. warp-AbCd
curl http://$HOST/meters/history
{
"offset": 9378,
"samples": [
[
null, null, null, null, null, null, null, null,
// 600 weitere null-Werte entfernt
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 1736, 6656, 6655, 6666,
6680, 6716, 6714, 6625, 6640, 6641, 6595, 6612,
6592, 6593, 6589, 6592, 6600, 6625, 6626, 6637,
6665, 6636, 6632, 6656, 6616, 6611, 6646, 6670,
6691, 6715, 6787, 6754, 6761, 6797, 6771, 6685,
6705, 6778, 6703, 6675, 6681, 6721, 6739, 6816,
6872, 6858, 6821, 6836, 6784, 6871, 6943, 6930,
6968, 6955, 6837, 6800, 6846, 6919, 6881, 6736,
6671, 6655, 6674, 6743, 6878, 5733, 4462, 3712,
3098, 2693, 2337, 2098, 1683, 1575, 1575, 84,
0, 0, 0, 0, 0, 0, 0, 0
],
null,
null,
null,
null,
null,
null
]
}
Only supported by the HTTP API
| Name | Description |
|---|---|
offsetint (ms) | The age of the last measured value. |
samplesint[..][..] | The measured values of all electricity meters. (Only WARP 1)
|
meters/live
The last charging power measurement values. Based on these values, the average values for meters/history are generated. Up to 720 values are output, which corresponds to 6 minutes with one measurement value every 500 milliseconds.
| Name | Description |
|---|---|
offsetint (ms) | The age of the last measured value. |
samples_per_secondfloat (Hz) | The number of measured values per second. |
samplesint[..][..] | The measured values of all electricity meters. (Only WARP 1)
|