LogoLogo
  • KPN THINGS USER GUIDE
    • Introduction
    • Getting started
      • Registration and setup
      • Device simulator app
      • Connect devices
        • SIM cards
        • Supported devices and KPN Devices
        • SODAQ R412M
        • Smartrak
        • Marvin development board
        • LoPy5
        • Arduino MKR WAN 1300/1310
        • Arduin MKR NB 1500
    • All videos
    • Tutorials
      • Configure a flow
      • Connect a HTTPs destination
      • Create a simple IoT web applicationPage
      • Send instruction to LoRa DevicePage
      • Send your data to Azure SQL
      • Technical overview
        • Management data model
        • Uplink communication
        • Downlink communication
        • Location data
      • Accounts and projects
        • Customer accounts and users
        • Projects
        • Customer management
        • Cost overview and contract
    • Frequently asked
      • Multi Factor Authentication
  • GENERAL FUNCTIONS
    • Quick reference videos
    • APIs
  • THE PORTAL EXPLAINED
    • Things Manager
      • Devices
        • Bulk operations
      • Data
        • Device data graph
      • Connectivity
        • LoRa connectivity configuration
      • Bulk reports
    • Things Creator
    • Support
      • News
      • Release notes
      • Real-time status
      • Service reports
      • Documents
      • Support tickets
      • Invoices
      • Contact info
    • Shop
  • BUILDING BLOCKS
    • Devices
      • Sensors
        • KPN Conditionsensor CO2 II
        • KPN Conditionsensor CO2 III
        • KPN Conditionsensor CO2 III motionPage 1
        • KPN FillTag I
        • KPN FillTag II
        • 1M2M ED1608
        • Elsys ERS
        • Device Simulator (Mobile Phone app)
        • Generic Device (Internet connected)
        • Generic LoRa device (preset connectivity)
        • Generic LoRa device (programmable)
        • Generic M2M device
        • Generic M2M device (with Internet connection)
      • Trackers
        • KPN Global Tracker Autonomous
        • KPN Global Tracker Wired
        • KPN LocationTag I
        • KPN LocationTag II
        • KPN LocationTag II v2
        • KPN LocationTag II v2 Expert Mode
        • KPN LocationTag II v3
        • KPN LocationTag III (with GPS)
        • KPN LocationTag III (without GPS)
        • KPN LocationTag III v2
        • KPN LocationTag III v2 Buffer
        • KPN LocationTag III v3
        • KPN LocationTag III v4
        • KPN LocationTag V
        • KPN LocationTag VI
        • KPN LocationTag WS
        • Streamline LoRa
        • Streamline M2M
        • Viloc
      • Routers
      • Gateways
        • KPN FSK Basestation
      • Device SDK
    • Connectivity
      • Connecting LoRa devices
        • LoRa connectivity configuration
      • Connecting M2M devices
      • Connecting Internet devices
      • Connecting MQTT Devices
    • Data Processing
      • ThingsML and SenML
        • ThingsML
        • SenML
          • Understanding and Interpreting SenML Data
          • Changes in KPN SenML
      • Device Twin
      • Decoders and encoders
        • Common measurements list
        • Decoder migrations
        • DIY Decoder
          • DIY decoder scripts
      • Merger
      • Device data
      • Devices
    • Destinations
      • HTTPS destination
      • MQTT broker
      • Cumulocity IoT Platform
      • Azure Event Hubs
      • Azure IoT Hub
      • Test Endpoint
      • ThingsBoard
      • Datacake
      • AWS Lambda
      • Google Cloud Run functions
  • IOT LINE UP
    • Freemium
      • Test SIM cards
    • Explorer
    • Modular
    • Tailored
    • Terms and Conditions
Powered by GitBook

© 2024 KPN - All rights reserved.

On this page
  • Time fields
  • Base values

Was this helpful?

Export as PDF
  1. BUILDING BLOCKS
  2. Data Processing
  3. ThingsML and SenML
  4. SenML

Changes in KPN SenML

PreviousUnderstanding and Interpreting SenML DataNextDevice Twin

Last updated 5 months ago

Was this helpful?

These changes only apply to Freemium projects.

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