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
  • Attributes
  • Example
  • Before merge
  • After merge

Was this helpful?

Export as PDF
  1. BUILDING BLOCKS
  2. Data Processing

Merger

PreviousDIY decoder scriptsNextDevice data

Last updated 3 months ago

Was this helpful?

Add-on feature This feature is only available for contracted customers. Please contact if your are interested!

When configuring your Destination, you can also configure merger functionality. When you enable the merger for your Destination, you can have data from different decoders merged into one message to your Destination.

The merger could be useful to merge LoRa Geolocation information with the decode payload from your LoRa device, in order to present this LoRa Geolocation data as an ordinary measurement to your application.

If two SenML packs that are merged contain a record with the same SenML name, both SenML records will be put in the final SenML pack. You application should.

In the future, we plan to implement priority, where measurements with the same SenML name can overwrite the other measurement.

Attributes

Attribute

Value

Description

merge

true/false

Whether to enable merger functionality.

mergeDecoderSpecifications

array of uuid's

Array of decoder specification uuid's of decoder outputs you want to merge.

ttl

nr. seconds

(Default: 10) max. time to wait for all messages to merge.

orphanStrategy

DISCARD/FORWARD

What to do with messages arriving after the ttl.

With a ttl of 10s you could expect up to 2% of LoRa Geolocation messaged to be outside the ttl. With a ttl of 15s, up to 1% can be outside ttl.

A higher ttl will increase the change all messages are merged. A lower ttl will introduce a shorter delay for message that could not be merged.

Example

Below an example of two merged messages is given.

Before merge

// Output from the LoRa Geolocation decoder
[
  {"bn": "urn:dev:DEVEUI:0059AC00001B036E:", "bt": 1599058945, "n": "locOrigin", "vs": "KPNLORA"},
  {"n": "latitude", "u": "lat", "v": 51.982597},
  {"n": "longitude", "u": "lon", "v": 4.467995},
  {"n": "radius", "u": "m", "v": 111.272842}
]

// Output from the ThingsML for LoRa decoder
[
  {"bn": "urn:dev:DEVEUI:0059AC00001B036E:", "bt": 1599058946, "n": "temperature", "u": "Cel", "v": 25},
  {"n": "humidity", "u": "%RH", "v": 13.6},
  {"n": "radius", "u": "m", "v": 20}
]

After merge

As you can see the two decoder outputs have been merged into one SenML pack. Because the LoRa Geolocation data is one second newer than the data from the payload, all SenML records from the latter are given an extra t-attribute to express the time difference.

Also, since both decoder outputs contain a radius measurement, there are now two SenML records with this measurement name.

[
  {"bn": "urn:dev:DEVEUI:0059AC00001B036E:", "bt": 1599058945, "n": "locOrigin", "vs": "KPNLORA"},
  {"n": "latitude", "u": "lat", "v": 51.982597},
  {"n": "longitude", "u": "lon", "v": 4.467995},
  {"n": "radius", "u": "m", "v": 111.272842},
  {"n": "temperature", "u": "Cel", "v": 25, "t": 1},
  {"n": "humidity", "u": "%RH", "v": 13.6, "t": 1},
  {"n": "radius", "u": "m", "v": 20, "t": 1}
]

Decoder specification uuid's are listed on the page and the page.

Supported device types
KPN Things devices
iot@kpn.com
The merger can merge the output of multiple decoders back to one message.