> For the complete documentation index, see [llms.txt](https://docs.twtg.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.twtg.io/docs/installation-and-provisioning/provisioning/step-4-encoder-and-decoder-in-the-lns.md).

# Step 4: Encoder & Decoder in the LNS

LoRaWAN messages are binary strings, optimized for low-bandwidth RF communication. These binary messages can be translated to readable JSON messages using a decoder and vice versa using an encoder. TWTG provides these codecs according to the [TS013-1.0.0 Payload Codec API specification](https://resources.lora-alliance.org/technical-specifications/ts013-1-0-0-payload-codec-api) and are available in the product documentation via the following links:

{% hint style="info" %}
Please note there are different protocol versions in some of the device types. The overview table of the LoRa Communication folder guides towards the right protocol version of the device the user has.&#x20;
{% endhint %}

* [Pressure Gauge (PG)](https://github.com/TWTG-R-D-B-V/neon-product-documentation/tree/main/PG/LoRa%20Communication)
* [Pressure Sensor (PS)](https://github.com/TWTG-R-D-B-V/neon-product-documentation/tree/main/PS/LoRa%20Communication)
* [Temperature Sensor (TS)](https://github.com/TWTG-R-D-B-V/neon-product-documentation/tree/main/TS/LoRa%20Communication)
* [Temperature Transmitter (TT)](https://github.com/TWTG-R-D-B-V/neon-product-documentation/tree/main/TT/LoRa%20Communication)
* [Vibration Sensor (VB)](https://github.com/TWTG-R-D-B-V/neon-product-documentation/tree/main/VB/LoRa%20Communication)
* [Contact Sensor (VS-CS)](https://github.com/TWTG-R-D-B-V/neon-product-documentation/tree/main/VS-CS/LoRa%20Communication)
* [Valve Sensor - Multiturn (VS-MT)](https://github.com/TWTG-R-D-B-V/neon-product-documentation/tree/main/VS-MT/LoRa%20Communication)
* [Valve Sensor - Quarter Turn (VS-QT)](https://github.com/TWTG-R-D-B-V/neon-product-documentation/tree/main/VS-QT/LoRa%20Communication)

For convenience, the encoder (downlinks) and the decoder (uplinks) can be added to the LNS or the application server. Please refer to the documentation of your LNS for a guide on how to achieve this. Quick links to the most commonly used LNS are presented next:

* [The Things Network & The Things Stack](https://www.thethingsindustries.com/docs/integrations/payload-formatters/javascript/)
* [Actility Thingpark](https://docs.thingpark.com/thingpark-x/latest/)
* [Chirpstask](https://www.chirpstack.io/docs/chirpstack/use/device-profiles.html#codec)
* [Loriot](https://docs.loriot.io/display/NMS/Payload+Codec+page)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.twtg.io/docs/installation-and-provisioning/provisioning/step-4-encoder-and-decoder-in-the-lns.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
