CMi6160
User’s Manual English
CMi6160
User’s Manual English
page | 25 (38)
[2022-10]
v1.4
handled more efficiently. SenML/CBOR also provides one way to structure lists of readings in an efficient
manner.
The first implementation will use M-Bus for encoding the data transferred, but other formats could be
implemented in the future.
Note that SenML, CBOR and M-Bus are separate standards, this page describes how products can use
these three in conjunction for representing multiple measurement values in a compact format suitable for
radio transmission over for instance NB-IoT. Also, other means of encoding the data than M-Bus can be
used in the future.
Elvaco uses SenML/CBOR/M-Bus data representation for transferring meter data in a compact and self-
describing manner. The data being transferred is referred to as a pack, containing one record per
readout.
Structure of SenML pack
Meter readout data is sent as SenML, i.e., a list (aka array) of readout values (records), encoded using
CBOR. Each record is a map of key/value pairs using SenML.
Each product that uses the SenML/CBOR format shall follow the requirements below. In addition, it shall
specify the exact contents of the data values included, meter id format etc. This specification alone is not
sufficient for building a parser for a specific product.
Base Time
•
Base time
is used to set a reference time.
o
Timestamps are always encoded according to SenML (i.e., UNIX time). SenML label -1
“Base time”, SenML definition of Time field
o
This value MUST be included in the first record of the pack
o
All other values have a
time
value that is added to the
base time
to define the exact time
of the readout
Base Name
•
Base name
is used to represent the MeterID (Meter identification in M-Bus)
o
This value MUST be included in the first record of the pack
o
This is represented as a string array (CBOR Major Type 3 - SenML label -
2 “Base
name”)
▪
The product shall specify the exact format for this field, as it may vary depending
on what type of “meter” is used. For an M-Bus format it is typically the M-Bus
data without DIF/VIF.
o
No
name
is set for remaining meter readout values, only values belonging to a single
meter can be represented in one pack.
Data values
•
The actual values from the meter can be encoded using multiple methods, such as M-Bus.
•
The first record can also contain a data value field containing more information than the
remaining records in the pack. This is to include more information for the first reading and then
only a subset of values for the remaining records to save space. (SenML label 8 -
“Data value”)
Other values
•
(Base) Unit
is not used, since the unit is specified by the M-Bus data
•
An “Encoder Version field” is used in a separate record to define the type and version of the