KPN Things Developer Manual
↩ All Documentation
  • Welcome to the Things Developer Manual
  • Concepts
    • Overview
    • Uplink communication
    • Downlink communication
    • SenML
      • Upcoming Changes in KPN SenML
    • Management data model
    • Location data
    • API access ✨
  • Devices
    • Introduction to Devices
    • Supported developer kits
    • Supported device types
    • KPN Things devices
    • Device SDK
  • Connectivity
    • Introduction to Connectivity
    • KPN Things LoRa
    • KPN Things M2M
      • Firmware over the air 💎
    • Internet ✨
  • Processing
    • Introduction to Processing
    • ThingsML
    • Common measurements list
    • DIY Decoder 🔜
    • Merger 💎
    • Built-in decoders
  • Destinations
    • Introduction to Destinations
    • Azure Event Hub
    • Azure IoT Hub
    • Cumulocity environment
    • HTTPS endpoint
    • MQTT broker
  • 📗Additional resources
    • Things Portal Manual
    • Getting started
    • Contact Support
Powered by GitBook
On this page
  • Time fields
  • Base values
  1. Concepts
  2. SenML

Upcoming Changes in KPN SenML

PreviousSenMLNextManagement data model

Last updated 2 years ago

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

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:

[
  {
    "bn": "urn:dev:DEVEUI:0123456789ABCDEF:",
    "bt": 1.58565075E9
  },
  {
    "n": "temperature1",
    "v": 20.5,
    "u": "Cel"
  },
  {
    "n": "temperature2",
    "v": 22.6,
    "u": "Cel"
  }
]

In the new situation this will no longer occur. The base values will be part of the first measurement, and will look like this:

[
  {
    "bn": "urn:dev:DEVEUI:0123456789ABCDEF:",
    "bt": 1.58565075E9,
    "n": "temperature1",
    "v": 20.5,
    "u": "Cel"
  },
  {
    "n": "temperature2",
    "v": 22.6,
    "u": "Cel"
  }
]

Check the software on your end to see if it can handle this.

In the first measurement, the "v" and "u" fields of the first measures are missing (). 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.

Section 4 of the SenML standard
which is allowed in SenML