Upcoming Changes in KPN SenML
Starting from 13 december 2022! There are changes in the way that KPN Things processes SenML for Devices in a Freemium project. This will impact the base values and the time value. These changes could have an impact on your software.
This will be implemented in a future version of KPN Things.
Time fields
KPN Things currently rounds the SenML bt
and t
fields in its SenML output to whole seconds. We are going to remove or change this rounding to allow for more accurate time values. Although time values always use seconds as their unit, it means that these values may contain fractional seconds.
For example, "t"
may contain the value 0.001
or -33.333333
whereas before they would be rounded as 0
or -33
respectively. Depending on the device, a "t"
value may change from "t": 1.659571200E9
to "t": 1.6595711995E9
. So this changes in this example from Thursday, August 4, 2022 0:00:00
to Wednesday, August 3, 2022 23:59:59.500
.
Check your device specification and your implementation to see if this has an impact on you. You may be affected if your software assumes the time values are always integers.
Base values
The base values sent by KPN Things are currently presented as a separate SenML record. As each record represents a measurement, this record containing only the base values implies a measurement of "v": 0
for "n": ""
. This is incorrect, as such a measurement was never made. In the future, KPN Things will no longer generate a separate SenML record with only the base name and base time fields, but instead will follow the SenML specification and store the base values as needed in existing records. Note: base values can appear in any SenML record, not just the first. To properly resolve the records in a SenML pack care must be taken to follow the specification to decompress the pack correctly.
To read more on this topic see Section 4 of the SenML standard
base values can appear in any SenML record, not just the first. To properly resolve the records in a SenML pack, care must be taken to follow the specification to decompress the pack correctly.
Currently the system sends SenML like this:
In the first measurement, the "v"
and "u"
fields of the first measures are missing (which is allowed in SenML). But this indicates a sensor with the name urn:dev:DEVEUI:0123456789ABCDEF:
that has no units or values, which is not a representation of reality.
In the new situation this will no longer occur. The base values will be part of the first measurement, and will look like this:
Check the software on your end to see if it can handle this.
Last updated