Update Decoder

Overview

The Decoder Update Function is a technical utility that enables users to update the payload decoder script for a specific sensor directly in TTS (The Things Stack). Decoders are essential for interpreting the raw bytes received from LoRaWAN devices into readable telemetry data—such as temperature, battery level, and timestamps. This feature ensures that the software can continue to properly interpret device data even when changes are made to the firmware or payload structure.

⚠️ Important Note:

This function should be used with caution and only by technically proficient users familiar with how decoders work. Misconfiguration can lead to incorrect data being processed or visualized.


When to Use

Use the Decoder Update feature when:

  • A sensor’s firmware has been updated and its payload structure has changed.

  • A new sensor model requires a different decoding approach.

  • You’ve made changes to the decoder in your profile and need them reflected in TTS.

  • A bug or error has been identified in the existing decoder logic.


How It Works

  1. Access Decoder Update:

    • Navigate to the sensor’s admin panel and click Update Decoder.

  2. Compare Scripts:

    • You will see two side-by-side panes:

      • In TTS: Shows the currently active decoder script in The Things Stack.

      • In Profile (Latest): Displays the latest decoder version saved in your system’s profile.

  3. Review and Assess:

    • Compare both scripts carefully to identify differences.

    • Ensure the updated script correctly decodes all necessary telemetry values (e.g., temperatureC_TMP117, temperatureC_SHT).

  4. Apply the Update:

    • Click Update Latest if you’re confident in the changes.

    • This will push the decoder update to the LoRa server (TTS) and apply it to the specific device.


Technical Considerations

  • JavaScript-based decoder syntax is used.

  • MD5 hashes are shown below each version for quick integrity comparison.

  • Updates are device-specific, meaning only the selected sensor’s decoder is modified.


Benefits

  • Flexibility: Allows support for a range of sensor models and firmware versions.

  • Precision: Decoder logic can be tailored for advanced use cases.

  • Traceability: Changes can be audited and versioned through MD5 hashing and visual diff.


Last updated

Was this helpful?