Decoder migrations

Decoder migrations

Currently, we are working on improving our decoders. Some older decoders on our platform contain some bugs and output SenML that is not in line with the SenML RFC specification. Besides improving the output, we are also updating the decoders from a technical perspective. This will provide the basis for the 'DIY-decoder' feature that will be available in the future. This document will give you information on what will change and how it might affect you and how you can use these new decoders.

Changes

General changes

For all the relevant decoders, a new version is available in the KPN Things Portal. All these new versions have some common changes to improve the SenML output.

  • String values should not have a unit

  • Wherever the time origin was set as {"n": "TIME_ORIGIN", "vs": "THINGSENGINE"} it is now set as { "n": "timeOrigin", "vs": "NETWORK" }

  • Time values (t and bt) are more precise and may contain decimal places.

  • Valueless 'base records' have been removed and base values are now correctly set on the first real record of the SenML pack.

  • LoRa Geolocation and Location by LoRa On Premises Gateway data decoding is included by all new LoRa decoders, thus you do not need to use specific extra decoders to receive this data.

With the previous decoder versions, you would typically see SenML as illustrated below:

[
  {
    "bn": "urn:dev:DEVEUI:0123456789012345:",
    "bt": 1693136532.83
  },
  {
    "n": "mode",
    "vs": "active"
  },
  {
    "n": "batteryLevelLow",
    "vb": false
  },
  {
    "n": "batteryVoltage",
    "u": "V",
    "v": 3.59
  },
  {
    "n": "TIME_ORIGIN",
    "vs": "THINGSENGINE"
  }
]

Whereas the new version would output SenML like:

[
  {
    "bn": "urn:dev:DEVEUI:0123456789012345:",
    "bt": 1693136532.83,
    "n": "mode",
    "vs": "active"
  },
  {
    "n": "batteryLevelLow",
    "vb": false
  },
  {
    "n": "batteryVoltage",
    "u": "V",
    "v": 3.59
  },
  {
    "n": "timeOrigin",
    "vs": "NETWORK"
  }
]

For more information on how to interpret and parse SenML data please visit this page.

Specific changes

Besides general changes, some decoders may have some specific changes as well, like bug fixes. To see what has changed for a specific decoder, you can head over to the device type page and choose your device type. Here you can find the documentation for its decoders and examples of their output.

Configuration

When you head over to the decoder configuration of your flow, you will see that a new version is available. To use the new version, just press the toggle. Don't forget to disable the previous version, otherwise you might receive your data twice, since it will be decoder with both the old and the new version.

Note that if you use + LoRa Geolocation data or + Location by LoRa On Premises Gateway reception decoders, this functionality is also a part of the new version of your LoRa decoder. To make sure you do not receive duplicate location data you should disable these as well.

If you want to test if you can process the improved payloads without impacting your current flow, you can configure a new flow, using the new version of the decoder.

Please ensure your solution is compatible with the updated decoder version, as the old versions will be retired from the of 2024.

Last updated