Additional Units for Sensor Measurement Lists (SenML)
Extracted elements (14)
Joule per meter (J/m) and its scaled derivative Wh/km are registered to describe energy expended for achieving motion over a given distance, serving as an equivalent of inverse mileage for electric vehicles. This is not a traditional electromagnetic unit but fills a practical need.
Secondary units are placed in a separate subregistry rather than the main SenML Units registry because they are derived by linear transformation from existing primary units. This separation preserves the direct-comparison property of primary units while still providing a standardized mapping for convenience units like ms, kW, and km/h.
SenML normally requires unscaled SI units (following the Celsius/Kelvin precedent), but this document extends that exception to volt-ampere (VA), volt-ampere reactive (var), joule per meter (J/m), kilogram per cubic meter (kg/m3), and degree (deg) because these are in wide use across SDOs and engineering practice.
The percent symbol '%' is not used as the secondary unit name for percent (1/100 of unity); instead '/100' is registered. The name '%' was already taken in RFC 8428 as a NOT RECOMMENDED synonym for '/' (unity) for legacy reasons, and using it with a different meaning would create confusion.
The symbol B is registered for Byte despite B being taken in SI for bel, because RFC 8428 already registered dB for logarithmic relative power, leaving B free. The octet symbol 'o' is in wide use only in French-speaking countries, while B is globally dominant in engineering circles.
The unit 'var' (volt-ampere reactive) is registered as a separate primary unit from VA because there is strong interest in using it specifically for the imaginary content of complex power (reactive power) per IEEE 1459, making the distinction between apparent and reactive power explicit in the unit symbol.
Secondary units cannot be used directly in SenML version 10 'u' fields; their use requires either a must-understand field (label ending in '_') or a new SenML version indicator that explicitly permits secondary units, as defined outside the scope of RFC 8798.
As of SenML version 10 (RFC 8428), SenML packs are limited to using primary units in 'u' fields. The use of primary units enables direct comparison of measurements from different sources and simplifies implementations that trigger on the presence of a quantity in a certain unit.
Instead of pulling the IANA registry in each individual instance of the code, the software update mechanism (or a similar mechanism leading to less frequent IANA visits) SHOULD be used to disseminate updated units registries obtained from IANA towards the instances via common repositories, to avoid high load at IANA and a potential single point of failure.
Where the benefits of directly using a secondary unit in a SenML pack outweigh the above considerations, the use of secondary units in 'u' fields MAY be enabled by indicating a new SenML version that specifically allows this and/or by using a must-understand field (label ending in '_') whose definition specifically allows this.
Secondary units are converted to their corresponding SenML primary unit by multiplying the value by the Scale number and then adding the Offset, yielding the value in the given SenML unit. For example, 100 ms × (1/1000) + 0 = 0.1 s; 10 dBm × 1 + (−30) = −20 dBW.
RFC 8798 creates a new 'Secondary Units' subregistry under 'Sensor Measurement Lists (SenML)' at IANA, with six columns: Secondary Unit, Description, SenML Unit, Scale, Offset, and Reference. Initial content contains 33 entries including ms, min, h, MHz, kW, kVA, kvar, Ah, Wh, kWh, mV, mA, dBm, ppm, hPa, km/h, and others. New entries are added by Expert Review per RFC 8126.
RFC 8798 registers eight new primary units in the IANA 'SenML Units' subregistry: B (Byte), VA (volt-ampere, Apparent Power), VAs (volt-ampere second, Apparent Energy), var (volt-ampere reactive, Reactive Power), vars (volt-ampere-reactive second, Reactive Energy), J/m (joule per meter), kg/m3 (kilogram per cubic meter), and deg (degree, plane angle). All are of type float.
The introduction of new measurement units poses no additional security risks beyond those in RFC 8428, except a potential for confusion about the proper unit to use and the risk that an implementation assuming only primary units may no longer work correctly when secondary units are present. Implementations that process secondary units are expected to have been developed with awareness of the risks of multiple units for the same logical type.