Table of medium IDs¶
One data type measured by Energomonitor devices are called mediums and they are identified by a medium ID — a 16-bit identifier, usually written as a decimal number. This identifier is used in various places, including the MQTT protocol, API, and Forwarder.
The medium ID consists of two 8-bit components:
quantity (lower 8 bits) — specifies the measured quantity (e.g. electric power)
modifier (higher 8 bits) — describes additional semantics of the measured value:
0 — immediate value at the measurement time
1 — minimum value over the measurement interval
2 — maximum value over the measurement interval
For example, medium ID 12 (quantity 12, modifier 0) denotes immediate electric power, while medium ID 524 (quantity 12, modifier 2) denotes maximum electric power.
In this document, we consider only medium IDs with modifier 0 with an implicit assumption that a different modifier can be applied to any medium ID discussed.
The following table lists all medium IDs together with related information. Medium IDs not listed in the table are reserved for future use by Energomonitor. For the explanation of table columns, see the legend below.
Note that integral aggregation is not available at the moment
ID |
Name |
Unit |
Type |
Processing |
Aggregation |
Post-aggregation ID |
Notes |
---|---|---|---|---|---|---|---|
0 |
(reserved) |
— |
— |
— |
— |
— |
|
1 |
electric power / temperature |
W / °C |
|
scalar |
integral |
22 |
|
2 |
pulse count |
# |
|
counter |
last |
2 |
|
3 |
gas meter pulse count |
# |
|
counter |
last |
3 |
|
4 |
water meter pulse count |
# |
|
counter |
last |
4 |
|
10 |
LQI |
— |
|
scalar |
average |
10 |
|
11 |
RSSI |
dBm |
|
scalar |
average |
11 |
|
12 |
electric power |
W |
|
flow |
integral |
22 |
|
13 |
gas flow rate |
L/h |
|
flow |
integral |
23 |
|
14 |
water flow rate |
L/h |
|
flow |
integral |
24 |
|
15 |
pulse count |
# |
|
counter |
last |
15 |
|
16 |
temperature |
°C |
|
scalar |
average |
16 |
|
17 |
constant voltage |
V |
|
scalar |
average |
17 |
|
20 |
switch state |
— |
|
raw |
last |
20 |
|
21 |
REG |
— |
|
raw |
last |
21 |
|
22 |
electricity consumption |
Wh |
|
volume |
last |
22 |
|
23 |
gas consumption |
L |
|
volume |
last |
23 |
|
24 |
water consumption |
L |
|
volume |
last |
24 |
|
25 |
IPU |
#/kWh / #/m3 |
|
scalar |
last |
25 |
|
26 |
UNIQ |
— |
|
raw |
last |
26 |
|
29 |
CO2 concentration |
ppm |
|
scalar |
average |
29 |
|
35 |
voltage |
V |
|
scalar |
average |
35 |
|
37 |
relative humidity |
% |
|
scalar |
average |
37 |
|
38 |
battery voltage |
V |
|
scalar |
average |
38 |
|
39 |
pulse flow rate |
#/h |
|
scalar |
average |
39 |
|
48 |
illuminance |
lx |
|
scalar |
average |
48 |
|
49 |
smoke |
— |
|
flag |
last |
49 |
|
51 |
motion count |
# |
|
counter |
last |
51 |
|
52 |
flooding |
— |
|
flag |
last |
52 |
|
53 |
precise battery voltage |
mVh |
|
scalar |
average |
53 |
|
54 |
valve state |
— |
|
raw |
last |
54 |
|
55 |
holder |
— |
|
flag |
last |
55 |
|
56 |
heat power |
W |
|
flow |
integral |
57 |
|
57 |
heat consumption |
Wh |
|
volume |
last |
57 |
|
59 |
VOC index |
— |
|
scalar |
average |
59 |
|
60 |
PM1 concentration |
µg/m³ |
|
scalar |
average |
60 |
|
61 |
PM2.5 concentration |
µg/m³ |
|
scalar |
average |
61 |
|
62 |
PM4 concentration |
µg/m³ |
|
scalar |
average |
62 |
|
63 |
PM10 concentration |
µg/m³ |
|
scalar |
average |
63 |
|
64 |
NOX index |
— |
|
scalar |
average |
64 |
|
127 |
(extension) |
— |
— |
— |
— |
— |
|
128 |
connection status |
— |
|
flag |
last |
128 |
Legend
- ID
Medium ID identifying the medium.
- Name
Name of the medium.
- Unit
Unit of measurement of the medium.
- Type
Data type needed to save medium’s values.
For mediums corresponding to hardware registers, bit fields, identifiers, etc., an exact data type is specified (e.g.
uint16
).For mediums corresponding to continuous measured quantities (which is most quantities), data type
float
is specified. Its exact size depends on the data processor and its needs. A minimum required isfloat32
.For mediums corresponding to discrete measured quantities (which is mainly counters), data type
uint
is specified. Its exact size depends on the data processor and its needs. A minimum required isuint32
.In practice, values of all mediums can be processed as
float64
without a loss of precision. This is because this data type can precisely represent numbers up to 253.
- Processing
Defines how to process medium’s values:
raw — should not be processed
counter — should be processed as a counter that increases over time
scalar — should be processed as a scalar
flag — should be processed as a boolean flag
flow — should be processed as a flow rate, possibly used to compute a volume accumulated over time
volume — should be processed as a volume accumulated over time, possibly used to compute a flow rate
Note that a counter can also occasionaly decrease (e.g. when sensor’s internal counter overflows, the battery is replaced, etc.). Such occasions should be detected and treated as invalid data.
- Aggregation
Defines how to compute the result when aggregating medium’s values over a time interval:
last — return the last value in the interval
average — return the average of the values in the interval
integral — compute volume from the flow and return the total volume accumulated over the time interval
- Post-aggregation ID
Medium ID of the resulting value when aggregating medium’s values over a time interval.
- Notes
Additional notes.
Notes